From 47177fefc55affbf07eb09a6bda86c062cf5617a Mon Sep 17 00:00:00 2001 From: Jerko J <83344666+JJ-Cro@users.noreply.github.com> Date: Tue, 15 Oct 2024 18:17:21 +0200 Subject: [PATCH] feat(): updated examples --- .gitignore | 2 +- docs/endpointFunctionList.md | 500 +++++++++--------- .../batchCreateVirtualSubaccountAndAPIKey.js | 19 + examples/apidoc/RestClientV2/borrowLoan.js | 19 + .../RestClientV2/cancelSpotFollowerOrder.js | 19 + .../closeFuturesFollowerPositions.js | 19 + .../RestClientV2/closeFuturesTraderOrder.js | 19 + examples/apidoc/RestClientV2/convert.js | 19 + examples/apidoc/RestClientV2/convertBGB.js | 19 + .../apidoc/RestClientV2/createSubaccount.js | 19 + .../RestClientV2/createSubaccountApiKey.js | 19 + .../createSubaccountDepositAddress.js | 19 + .../RestClientV2/createVirtualSubaccount.js | 19 + .../createVirtualSubaccountAPIKey.js | 19 + .../RestClientV2/earnSubscribeSavings.js | 19 + .../RestClientV2/futuresBatchCancelOrders.js | 19 + .../RestClientV2/futuresBatchSubmitOrders.js | 19 + .../RestClientV2/futuresCancelAllOrders.js | 19 + .../apidoc/RestClientV2/futuresCancelOrder.js | 19 + .../RestClientV2/futuresCancelPlanOrder.js | 19 + .../futuresFlashClosePositions.js | 19 + .../apidoc/RestClientV2/futuresModifyOrder.js | 19 + .../RestClientV2/futuresModifyPlanOrder.js | 19 + .../RestClientV2/futuresModifyTPSLPOrder.js | 19 + .../apidoc/RestClientV2/futuresSubmitOrder.js | 19 + .../RestClientV2/futuresSubmitPlanOrder.js | 19 + .../RestClientV2/futuresSubmitPlanSubOrder.js | 19 + .../RestClientV2/futuresSubmitReversal.js | 19 + .../RestClientV2/futuresSubmitTPSLOrder.js | 19 + .../apidoc/RestClientV2/getAnnouncements.js | 19 + examples/apidoc/RestClientV2/getBalances.js | 19 + examples/apidoc/RestClientV2/getBotAccount.js | 19 + examples/apidoc/RestClientV2/getBrokerInfo.js | 19 + .../apidoc/RestClientV2/getBrokerTraders.js | 19 + .../getBrokerTradersHistoricalOrders.js | 19 + .../getBrokerTradersPendingOrders.js | 19 + .../apidoc/RestClientV2/getConvertBGBCoins.js | 19 + .../RestClientV2/getConvertBGBHistory.js | 19 + .../apidoc/RestClientV2/getConvertCoins.js | 19 + .../apidoc/RestClientV2/getConvertHistory.js | 19 + .../RestClientV2/getConvertQuotedPrice.js | 19 + .../apidoc/RestClientV2/getEarnAccount.js | 19 + .../RestClientV2/getEarnSavingsAccount.js | 19 + .../RestClientV2/getEarnSavingsAssets.js | 19 + .../RestClientV2/getEarnSavingsProducts.js | 19 + .../RestClientV2/getEarnSavingsRecords.js | 19 + .../getEarnSavingsRedemptionResult.js | 19 + .../getEarnSavingsSubscription.js | 19 + .../getEarnSavingsSubscriptionResult.js | 19 + .../apidoc/RestClientV2/getFundingAssets.js | 19 + .../RestClientV2/getFuturesAccountAsset.js | 19 + .../RestClientV2/getFuturesAccountAssets.js | 19 + .../RestClientV2/getFuturesAccountBills.js | 19 + .../getFuturesActiveBuySellVolumeData.js | 19 + .../getFuturesActiveLongShortAccountData.js | 19 + .../getFuturesActiveLongShortPositionData.js | 19 + .../getFuturesActiveTakerBuySellVolumeData.js | 19 + .../RestClientV2/getFuturesAllTickers.js | 19 + .../apidoc/RestClientV2/getFuturesCandles.js | 19 + .../RestClientV2/getFuturesContractConfig.js | 19 + .../getFuturesCurrentFundingRate.js | 19 + .../apidoc/RestClientV2/getFuturesFills.js | 19 + .../getFuturesFollowerCurrentOrders.js | 19 + .../getFuturesFollowerFollowLimit.js | 19 + .../getFuturesFollowerHistoryOrders.js | 19 + .../getFuturesFollowerSettings.js | 19 + .../RestClientV2/getFuturesFollowerTraders.js | 19 + .../RestClientV2/getFuturesHistoricCandles.js | 19 + .../getFuturesHistoricFundingRates.js | 19 + .../getFuturesHistoricIndexPriceCandles.js | 19 + .../getFuturesHistoricMarkPriceCandles.js | 19 + .../getFuturesHistoricOrderFills.js | 19 + .../RestClientV2/getFuturesHistoricOrders.js | 19 + .../getFuturesHistoricPlanOrders.js | 19 + .../getFuturesHistoricPositions.js | 19 + .../RestClientV2/getFuturesHistoricTrades.js | 19 + .../RestClientV2/getFuturesLongShortRatio.js | 19 + .../RestClientV2/getFuturesMergeDepth.js | 19 + .../RestClientV2/getFuturesNextFundingTime.js | 19 + .../RestClientV2/getFuturesOpenCount.js | 19 + .../RestClientV2/getFuturesOpenInterest.js | 19 + .../RestClientV2/getFuturesOpenOrders.js | 19 + .../apidoc/RestClientV2/getFuturesOrder.js | 19 + .../RestClientV2/getFuturesPlanOrders.js | 19 + .../apidoc/RestClientV2/getFuturesPosition.js | 19 + .../RestClientV2/getFuturesPositionTier.js | 19 + .../RestClientV2/getFuturesPositions.js | 19 + .../RestClientV2/getFuturesRecentTrades.js | 19 + .../getFuturesSubAccountAssets.js | 19 + .../RestClientV2/getFuturesSymbolPrice.js | 19 + .../apidoc/RestClientV2/getFuturesTicker.js | 19 + .../getFuturesTraderCurrentOrder.js | 19 + .../RestClientV2/getFuturesTraderFollowers.js | 19 + .../getFuturesTraderHistoryOrders.js | 19 + .../RestClientV2/getFuturesTraderOrder.js | 19 + .../getFuturesTraderProfitHistory.js | 19 + .../getFuturesTraderProfitShare.js | 19 + .../getFuturesTraderProfitShareGroup.js | 19 + .../getFuturesTraderProfitShareHistory.js | 19 + .../getFuturesTraderSymbolSettings.js | 19 + .../getFuturesTransactionRecords.js | 19 + .../RestClientV2/getFuturesVIPFeeRate.js | 19 + .../getIsolatedMarginBorrowingRatio.js | 19 + .../apidoc/RestClientV2/getLoanCurrencies.js | 19 + examples/apidoc/RestClientV2/getLoanDebts.js | 19 + .../getLoanEstInterestAndBorrowable.js | 19 + .../apidoc/RestClientV2/getLoanHistory.js | 19 + .../RestClientV2/getLoanLiquidationRecords.js | 19 + .../RestClientV2/getLoanPledgeRateHistory.js | 19 + .../RestClientV2/getMarginAccountAssets.js | 19 + .../RestClientV2/getMarginBorrowHistory.js | 19 + .../RestClientV2/getMarginCurrencies.js | 19 + .../RestClientV2/getMarginFinancialHistory.js | 19 + .../RestClientV2/getMarginFlashRepayResult.js | 19 + .../getMarginHistoricOrderFills.js | 19 + .../RestClientV2/getMarginHistoricOrders.js | 19 + .../RestClientV2/getMarginInterestHistory.js | 19 + .../getMarginInterestRateAndMaxBorrowable.js | 19 + .../getMarginLiquidationHistory.js | 19 + .../getMarginLiquidationOrders.js | 19 + .../RestClientV2/getMarginLoanGrowthRate.js | 19 + .../RestClientV2/getMarginMaxBorrowable.js | 19 + .../RestClientV2/getMarginMaxTransferable.js | 19 + .../RestClientV2/getMarginOpenOrders.js | 19 + .../RestClientV2/getMarginRepayHistory.js | 19 + .../apidoc/RestClientV2/getMarginRiskRate.js | 19 + .../getMarginTierConfiguration.js | 19 + .../getMarginTransactionRecords.js | 19 + .../RestClientV2/getOngoingLoanOrders.js | 19 + .../getP2PMerchantAdvertisementList.js | 19 + .../apidoc/RestClientV2/getP2PMerchantInfo.js | 19 + .../apidoc/RestClientV2/getP2PMerchantList.js | 19 + .../RestClientV2/getP2PMerchantOrders.js | 19 + .../RestClientV2/getP2PTransactionRecords.js | 19 + .../apidoc/RestClientV2/getRepayHistory.js | 19 + examples/apidoc/RestClientV2/getServerTime.js | 19 + .../apidoc/RestClientV2/getSharkfinAccount.js | 19 + .../apidoc/RestClientV2/getSharkfinAssets.js | 19 + .../RestClientV2/getSharkfinProducts.js | 19 + .../apidoc/RestClientV2/getSharkfinRecords.js | 19 + .../RestClientV2/getSharkfinSubscription.js | 19 + .../getSharkfinSubscriptionResult.js | 19 + .../apidoc/RestClientV2/getSpotAccount.js | 19 + .../RestClientV2/getSpotAccountAssets.js | 19 + .../RestClientV2/getSpotAccountBills.js | 19 + .../RestClientV2/getSpotBGBDeductInfo.js | 19 + .../apidoc/RestClientV2/getSpotCandles.js | 19 + .../apidoc/RestClientV2/getSpotCoinInfo.js | 19 + .../RestClientV2/getSpotCurrentPlanOrders.js | 19 + .../RestClientV2/getSpotDepositAddress.js | 19 + .../RestClientV2/getSpotDepositHistory.js | 19 + examples/apidoc/RestClientV2/getSpotFills.js | 19 + .../getSpotFollowerCurrentTraderSymbols.js | 19 + .../getSpotFollowerHistoryOrders.js | 19 + .../RestClientV2/getSpotFollowerOpenOrders.js | 19 + .../RestClientV2/getSpotFollowerSettings.js | 19 + .../RestClientV2/getSpotFollowerTraders.js | 19 + .../apidoc/RestClientV2/getSpotFundFlow.js | 19 + .../RestClientV2/getSpotFundNetFlowData.js | 19 + .../RestClientV2/getSpotHistoricCandles.js | 19 + .../RestClientV2/getSpotHistoricOrders.js | 19 + .../RestClientV2/getSpotHistoricPlanOrders.js | 19 + .../RestClientV2/getSpotHistoricTrades.js | 19 + .../getSpotMainSubTransferRecord.js | 19 + .../apidoc/RestClientV2/getSpotMergeDepth.js | 19 + .../apidoc/RestClientV2/getSpotOpenOrders.js | 19 + examples/apidoc/RestClientV2/getSpotOrder.js | 19 + .../RestClientV2/getSpotOrderBookDepth.js | 19 + .../RestClientV2/getSpotPlanSubOrder.js | 19 + .../RestClientV2/getSpotRecentTrades.js | 19 + .../RestClientV2/getSpotSubAccountAssets.js | 19 + .../RestClientV2/getSpotSubDepositAddress.js | 19 + .../apidoc/RestClientV2/getSpotSymbolInfo.js | 19 + examples/apidoc/RestClientV2/getSpotTicker.js | 19 + .../getSpotTraderConfiguration.js | 19 + .../getSpotTraderCurrentOrders.js | 19 + .../RestClientV2/getSpotTraderFollowers.js | 19 + .../getSpotTraderHistoryOrders.js | 19 + .../getSpotTraderHistoryProfit.js | 19 + .../apidoc/RestClientV2/getSpotTraderOrder.js | 19 + .../RestClientV2/getSpotTraderProfit.js | 19 + .../getSpotTraderSymbolSettings.js | 19 + .../getSpotTraderUnrealizedProfit.js | 19 + .../RestClientV2/getSpotTransactionRecords.js | 19 + .../RestClientV2/getSpotTransferHistory.js | 19 + .../RestClientV2/getSpotTransferableCoins.js | 19 + .../apidoc/RestClientV2/getSpotVIPFeeRate.js | 19 + .../RestClientV2/getSpotWhaleNetFlowData.js | 19 + .../RestClientV2/getSpotWithdrawalHistory.js | 19 + .../getSubAccountDepositRecords.js | 19 + .../RestClientV2/getSubaccountApiKey.js | 19 + .../apidoc/RestClientV2/getSubaccountEmail.js | 19 + .../getSubaccountFuturesAssets.js | 19 + .../RestClientV2/getSubaccountSpotAssets.js | 19 + .../apidoc/RestClientV2/getSubaccounts.js | 19 + .../getTradeDataSupportSymbols.js | 19 + examples/apidoc/RestClientV2/getTradeRate.js | 19 + .../getVirtualSubaccountAPIKeys.js | 19 + .../RestClientV2/getVirtualSubaccounts.js | 19 + .../RestClientV2/marginBatchCancelOrders.js | 19 + .../RestClientV2/marginBatchSubmitOrders.js | 19 + examples/apidoc/RestClientV2/marginBorrow.js | 19 + .../apidoc/RestClientV2/marginCancelOrder.js | 19 + .../apidoc/RestClientV2/marginFlashRepay.js | 19 + examples/apidoc/RestClientV2/marginRepay.js | 19 + .../apidoc/RestClientV2/marginSubmitOrder.js | 19 + .../modifyFuturesTraderOrderTPSL.js | 19 + .../RestClientV2/modifySpotTraderOrderTPSL.js | 19 + .../apidoc/RestClientV2/modifySubaccount.js | 19 + .../RestClientV2/modifySubaccountApiKey.js | 19 + .../RestClientV2/modifySubaccountEmail.js | 19 + .../RestClientV2/modifyVirtualSubaccount.js | 19 + .../modifyVirtualSubaccountAPIKey.js | 19 + .../removeFuturesTraderFollower.js | 19 + .../RestClientV2/removeSpotTraderFollowers.js | 19 + examples/apidoc/RestClientV2/repayLoan.js | 19 + .../apidoc/RestClientV2/sellSpotFollower.js | 19 + .../apidoc/RestClientV2/sellSpotTrader.js | 19 + .../apidoc/RestClientV2/setFuturesLeverage.js | 19 + .../RestClientV2/setFuturesMarginMode.js | 19 + .../setFuturesPositionAutoMargin.js | 19 + .../RestClientV2/setFuturesPositionMargin.js | 19 + .../RestClientV2/setFuturesPositionMode.js | 19 + .../RestClientV2/spotBatchCancelOrders.js | 19 + .../RestClientV2/spotBatchSubmitOrders.js | 19 + .../apidoc/RestClientV2/spotCancelOrder.js | 19 + .../RestClientV2/spotCancelPlanOrder.js | 19 + .../RestClientV2/spotCancelPlanOrders.js | 19 + .../RestClientV2/spotCancelSymbolOrder.js | 19 + .../RestClientV2/spotCancelWithdrawal.js | 19 + .../RestClientV2/spotModifyDepositAccount.js | 19 + .../RestClientV2/spotModifyPlanOrder.js | 19 + .../apidoc/RestClientV2/spotSubTransfer.js | 19 + .../apidoc/RestClientV2/spotSubmitOrder.js | 19 + .../RestClientV2/spotSubmitPlanOrder.js | 19 + .../RestClientV2/spotSwitchBGBDeduct.js | 19 + examples/apidoc/RestClientV2/spotTransfer.js | 19 + examples/apidoc/RestClientV2/spotWithdraw.js | 19 + .../RestClientV2/subaccountDepositRecords.js | 19 + .../RestClientV2/subaccountSetAutoTransfer.js | 19 + .../RestClientV2/subaccountWithdrawal.js | 19 + .../subaccountWithdrawalRecords.js | 19 + .../apidoc/RestClientV2/subscribeSharkfin.js | 19 + .../RestClientV2/unfollowFuturesTrader.js | 19 + .../apidoc/RestClientV2/unfollowSpotTrader.js | 19 + .../updateFuturesFollowerSettings.js | 19 + .../RestClientV2/updateFuturesFollowerTPSL.js | 19 + .../updateFuturesTraderGlobalSettings.js | 19 + .../updateFuturesTraderSymbolSettings.js | 19 + .../RestClientV2/updateLoanPledgeRate.js | 19 + .../updateSpotFollowerSettings.js | 19 + .../RestClientV2/updateSpotFollowerTPSL.js | 19 + 252 files changed, 5001 insertions(+), 251 deletions(-) create mode 100644 examples/apidoc/RestClientV2/batchCreateVirtualSubaccountAndAPIKey.js create mode 100644 examples/apidoc/RestClientV2/borrowLoan.js create mode 100644 examples/apidoc/RestClientV2/cancelSpotFollowerOrder.js create mode 100644 examples/apidoc/RestClientV2/closeFuturesFollowerPositions.js create mode 100644 examples/apidoc/RestClientV2/closeFuturesTraderOrder.js create mode 100644 examples/apidoc/RestClientV2/convert.js create mode 100644 examples/apidoc/RestClientV2/convertBGB.js create mode 100644 examples/apidoc/RestClientV2/createSubaccount.js create mode 100644 examples/apidoc/RestClientV2/createSubaccountApiKey.js create mode 100644 examples/apidoc/RestClientV2/createSubaccountDepositAddress.js create mode 100644 examples/apidoc/RestClientV2/createVirtualSubaccount.js create mode 100644 examples/apidoc/RestClientV2/createVirtualSubaccountAPIKey.js create mode 100644 examples/apidoc/RestClientV2/earnSubscribeSavings.js create mode 100644 examples/apidoc/RestClientV2/futuresBatchCancelOrders.js create mode 100644 examples/apidoc/RestClientV2/futuresBatchSubmitOrders.js create mode 100644 examples/apidoc/RestClientV2/futuresCancelAllOrders.js create mode 100644 examples/apidoc/RestClientV2/futuresCancelOrder.js create mode 100644 examples/apidoc/RestClientV2/futuresCancelPlanOrder.js create mode 100644 examples/apidoc/RestClientV2/futuresFlashClosePositions.js create mode 100644 examples/apidoc/RestClientV2/futuresModifyOrder.js create mode 100644 examples/apidoc/RestClientV2/futuresModifyPlanOrder.js create mode 100644 examples/apidoc/RestClientV2/futuresModifyTPSLPOrder.js create mode 100644 examples/apidoc/RestClientV2/futuresSubmitOrder.js create mode 100644 examples/apidoc/RestClientV2/futuresSubmitPlanOrder.js create mode 100644 examples/apidoc/RestClientV2/futuresSubmitPlanSubOrder.js create mode 100644 examples/apidoc/RestClientV2/futuresSubmitReversal.js create mode 100644 examples/apidoc/RestClientV2/futuresSubmitTPSLOrder.js create mode 100644 examples/apidoc/RestClientV2/getAnnouncements.js create mode 100644 examples/apidoc/RestClientV2/getBalances.js create mode 100644 examples/apidoc/RestClientV2/getBotAccount.js create mode 100644 examples/apidoc/RestClientV2/getBrokerInfo.js create mode 100644 examples/apidoc/RestClientV2/getBrokerTraders.js create mode 100644 examples/apidoc/RestClientV2/getBrokerTradersHistoricalOrders.js create mode 100644 examples/apidoc/RestClientV2/getBrokerTradersPendingOrders.js create mode 100644 examples/apidoc/RestClientV2/getConvertBGBCoins.js create mode 100644 examples/apidoc/RestClientV2/getConvertBGBHistory.js create mode 100644 examples/apidoc/RestClientV2/getConvertCoins.js create mode 100644 examples/apidoc/RestClientV2/getConvertHistory.js create mode 100644 examples/apidoc/RestClientV2/getConvertQuotedPrice.js create mode 100644 examples/apidoc/RestClientV2/getEarnAccount.js create mode 100644 examples/apidoc/RestClientV2/getEarnSavingsAccount.js create mode 100644 examples/apidoc/RestClientV2/getEarnSavingsAssets.js create mode 100644 examples/apidoc/RestClientV2/getEarnSavingsProducts.js create mode 100644 examples/apidoc/RestClientV2/getEarnSavingsRecords.js create mode 100644 examples/apidoc/RestClientV2/getEarnSavingsRedemptionResult.js create mode 100644 examples/apidoc/RestClientV2/getEarnSavingsSubscription.js create mode 100644 examples/apidoc/RestClientV2/getEarnSavingsSubscriptionResult.js create mode 100644 examples/apidoc/RestClientV2/getFundingAssets.js create mode 100644 examples/apidoc/RestClientV2/getFuturesAccountAsset.js create mode 100644 examples/apidoc/RestClientV2/getFuturesAccountAssets.js create mode 100644 examples/apidoc/RestClientV2/getFuturesAccountBills.js create mode 100644 examples/apidoc/RestClientV2/getFuturesActiveBuySellVolumeData.js create mode 100644 examples/apidoc/RestClientV2/getFuturesActiveLongShortAccountData.js create mode 100644 examples/apidoc/RestClientV2/getFuturesActiveLongShortPositionData.js create mode 100644 examples/apidoc/RestClientV2/getFuturesActiveTakerBuySellVolumeData.js create mode 100644 examples/apidoc/RestClientV2/getFuturesAllTickers.js create mode 100644 examples/apidoc/RestClientV2/getFuturesCandles.js create mode 100644 examples/apidoc/RestClientV2/getFuturesContractConfig.js create mode 100644 examples/apidoc/RestClientV2/getFuturesCurrentFundingRate.js create mode 100644 examples/apidoc/RestClientV2/getFuturesFills.js create mode 100644 examples/apidoc/RestClientV2/getFuturesFollowerCurrentOrders.js create mode 100644 examples/apidoc/RestClientV2/getFuturesFollowerFollowLimit.js create mode 100644 examples/apidoc/RestClientV2/getFuturesFollowerHistoryOrders.js create mode 100644 examples/apidoc/RestClientV2/getFuturesFollowerSettings.js create mode 100644 examples/apidoc/RestClientV2/getFuturesFollowerTraders.js create mode 100644 examples/apidoc/RestClientV2/getFuturesHistoricCandles.js create mode 100644 examples/apidoc/RestClientV2/getFuturesHistoricFundingRates.js create mode 100644 examples/apidoc/RestClientV2/getFuturesHistoricIndexPriceCandles.js create mode 100644 examples/apidoc/RestClientV2/getFuturesHistoricMarkPriceCandles.js create mode 100644 examples/apidoc/RestClientV2/getFuturesHistoricOrderFills.js create mode 100644 examples/apidoc/RestClientV2/getFuturesHistoricOrders.js create mode 100644 examples/apidoc/RestClientV2/getFuturesHistoricPlanOrders.js create mode 100644 examples/apidoc/RestClientV2/getFuturesHistoricPositions.js create mode 100644 examples/apidoc/RestClientV2/getFuturesHistoricTrades.js create mode 100644 examples/apidoc/RestClientV2/getFuturesLongShortRatio.js create mode 100644 examples/apidoc/RestClientV2/getFuturesMergeDepth.js create mode 100644 examples/apidoc/RestClientV2/getFuturesNextFundingTime.js create mode 100644 examples/apidoc/RestClientV2/getFuturesOpenCount.js create mode 100644 examples/apidoc/RestClientV2/getFuturesOpenInterest.js create mode 100644 examples/apidoc/RestClientV2/getFuturesOpenOrders.js create mode 100644 examples/apidoc/RestClientV2/getFuturesOrder.js create mode 100644 examples/apidoc/RestClientV2/getFuturesPlanOrders.js create mode 100644 examples/apidoc/RestClientV2/getFuturesPosition.js create mode 100644 examples/apidoc/RestClientV2/getFuturesPositionTier.js create mode 100644 examples/apidoc/RestClientV2/getFuturesPositions.js create mode 100644 examples/apidoc/RestClientV2/getFuturesRecentTrades.js create mode 100644 examples/apidoc/RestClientV2/getFuturesSubAccountAssets.js create mode 100644 examples/apidoc/RestClientV2/getFuturesSymbolPrice.js create mode 100644 examples/apidoc/RestClientV2/getFuturesTicker.js create mode 100644 examples/apidoc/RestClientV2/getFuturesTraderCurrentOrder.js create mode 100644 examples/apidoc/RestClientV2/getFuturesTraderFollowers.js create mode 100644 examples/apidoc/RestClientV2/getFuturesTraderHistoryOrders.js create mode 100644 examples/apidoc/RestClientV2/getFuturesTraderOrder.js create mode 100644 examples/apidoc/RestClientV2/getFuturesTraderProfitHistory.js create mode 100644 examples/apidoc/RestClientV2/getFuturesTraderProfitShare.js create mode 100644 examples/apidoc/RestClientV2/getFuturesTraderProfitShareGroup.js create mode 100644 examples/apidoc/RestClientV2/getFuturesTraderProfitShareHistory.js create mode 100644 examples/apidoc/RestClientV2/getFuturesTraderSymbolSettings.js create mode 100644 examples/apidoc/RestClientV2/getFuturesTransactionRecords.js create mode 100644 examples/apidoc/RestClientV2/getFuturesVIPFeeRate.js create mode 100644 examples/apidoc/RestClientV2/getIsolatedMarginBorrowingRatio.js create mode 100644 examples/apidoc/RestClientV2/getLoanCurrencies.js create mode 100644 examples/apidoc/RestClientV2/getLoanDebts.js create mode 100644 examples/apidoc/RestClientV2/getLoanEstInterestAndBorrowable.js create mode 100644 examples/apidoc/RestClientV2/getLoanHistory.js create mode 100644 examples/apidoc/RestClientV2/getLoanLiquidationRecords.js create mode 100644 examples/apidoc/RestClientV2/getLoanPledgeRateHistory.js create mode 100644 examples/apidoc/RestClientV2/getMarginAccountAssets.js create mode 100644 examples/apidoc/RestClientV2/getMarginBorrowHistory.js create mode 100644 examples/apidoc/RestClientV2/getMarginCurrencies.js create mode 100644 examples/apidoc/RestClientV2/getMarginFinancialHistory.js create mode 100644 examples/apidoc/RestClientV2/getMarginFlashRepayResult.js create mode 100644 examples/apidoc/RestClientV2/getMarginHistoricOrderFills.js create mode 100644 examples/apidoc/RestClientV2/getMarginHistoricOrders.js create mode 100644 examples/apidoc/RestClientV2/getMarginInterestHistory.js create mode 100644 examples/apidoc/RestClientV2/getMarginInterestRateAndMaxBorrowable.js create mode 100644 examples/apidoc/RestClientV2/getMarginLiquidationHistory.js create mode 100644 examples/apidoc/RestClientV2/getMarginLiquidationOrders.js create mode 100644 examples/apidoc/RestClientV2/getMarginLoanGrowthRate.js create mode 100644 examples/apidoc/RestClientV2/getMarginMaxBorrowable.js create mode 100644 examples/apidoc/RestClientV2/getMarginMaxTransferable.js create mode 100644 examples/apidoc/RestClientV2/getMarginOpenOrders.js create mode 100644 examples/apidoc/RestClientV2/getMarginRepayHistory.js create mode 100644 examples/apidoc/RestClientV2/getMarginRiskRate.js create mode 100644 examples/apidoc/RestClientV2/getMarginTierConfiguration.js create mode 100644 examples/apidoc/RestClientV2/getMarginTransactionRecords.js create mode 100644 examples/apidoc/RestClientV2/getOngoingLoanOrders.js create mode 100644 examples/apidoc/RestClientV2/getP2PMerchantAdvertisementList.js create mode 100644 examples/apidoc/RestClientV2/getP2PMerchantInfo.js create mode 100644 examples/apidoc/RestClientV2/getP2PMerchantList.js create mode 100644 examples/apidoc/RestClientV2/getP2PMerchantOrders.js create mode 100644 examples/apidoc/RestClientV2/getP2PTransactionRecords.js create mode 100644 examples/apidoc/RestClientV2/getRepayHistory.js create mode 100644 examples/apidoc/RestClientV2/getServerTime.js create mode 100644 examples/apidoc/RestClientV2/getSharkfinAccount.js create mode 100644 examples/apidoc/RestClientV2/getSharkfinAssets.js create mode 100644 examples/apidoc/RestClientV2/getSharkfinProducts.js create mode 100644 examples/apidoc/RestClientV2/getSharkfinRecords.js create mode 100644 examples/apidoc/RestClientV2/getSharkfinSubscription.js create mode 100644 examples/apidoc/RestClientV2/getSharkfinSubscriptionResult.js create mode 100644 examples/apidoc/RestClientV2/getSpotAccount.js create mode 100644 examples/apidoc/RestClientV2/getSpotAccountAssets.js create mode 100644 examples/apidoc/RestClientV2/getSpotAccountBills.js create mode 100644 examples/apidoc/RestClientV2/getSpotBGBDeductInfo.js create mode 100644 examples/apidoc/RestClientV2/getSpotCandles.js create mode 100644 examples/apidoc/RestClientV2/getSpotCoinInfo.js create mode 100644 examples/apidoc/RestClientV2/getSpotCurrentPlanOrders.js create mode 100644 examples/apidoc/RestClientV2/getSpotDepositAddress.js create mode 100644 examples/apidoc/RestClientV2/getSpotDepositHistory.js create mode 100644 examples/apidoc/RestClientV2/getSpotFills.js create mode 100644 examples/apidoc/RestClientV2/getSpotFollowerCurrentTraderSymbols.js create mode 100644 examples/apidoc/RestClientV2/getSpotFollowerHistoryOrders.js create mode 100644 examples/apidoc/RestClientV2/getSpotFollowerOpenOrders.js create mode 100644 examples/apidoc/RestClientV2/getSpotFollowerSettings.js create mode 100644 examples/apidoc/RestClientV2/getSpotFollowerTraders.js create mode 100644 examples/apidoc/RestClientV2/getSpotFundFlow.js create mode 100644 examples/apidoc/RestClientV2/getSpotFundNetFlowData.js create mode 100644 examples/apidoc/RestClientV2/getSpotHistoricCandles.js create mode 100644 examples/apidoc/RestClientV2/getSpotHistoricOrders.js create mode 100644 examples/apidoc/RestClientV2/getSpotHistoricPlanOrders.js create mode 100644 examples/apidoc/RestClientV2/getSpotHistoricTrades.js create mode 100644 examples/apidoc/RestClientV2/getSpotMainSubTransferRecord.js create mode 100644 examples/apidoc/RestClientV2/getSpotMergeDepth.js create mode 100644 examples/apidoc/RestClientV2/getSpotOpenOrders.js create mode 100644 examples/apidoc/RestClientV2/getSpotOrder.js create mode 100644 examples/apidoc/RestClientV2/getSpotOrderBookDepth.js create mode 100644 examples/apidoc/RestClientV2/getSpotPlanSubOrder.js create mode 100644 examples/apidoc/RestClientV2/getSpotRecentTrades.js create mode 100644 examples/apidoc/RestClientV2/getSpotSubAccountAssets.js create mode 100644 examples/apidoc/RestClientV2/getSpotSubDepositAddress.js create mode 100644 examples/apidoc/RestClientV2/getSpotSymbolInfo.js create mode 100644 examples/apidoc/RestClientV2/getSpotTicker.js create mode 100644 examples/apidoc/RestClientV2/getSpotTraderConfiguration.js create mode 100644 examples/apidoc/RestClientV2/getSpotTraderCurrentOrders.js create mode 100644 examples/apidoc/RestClientV2/getSpotTraderFollowers.js create mode 100644 examples/apidoc/RestClientV2/getSpotTraderHistoryOrders.js create mode 100644 examples/apidoc/RestClientV2/getSpotTraderHistoryProfit.js create mode 100644 examples/apidoc/RestClientV2/getSpotTraderOrder.js create mode 100644 examples/apidoc/RestClientV2/getSpotTraderProfit.js create mode 100644 examples/apidoc/RestClientV2/getSpotTraderSymbolSettings.js create mode 100644 examples/apidoc/RestClientV2/getSpotTraderUnrealizedProfit.js create mode 100644 examples/apidoc/RestClientV2/getSpotTransactionRecords.js create mode 100644 examples/apidoc/RestClientV2/getSpotTransferHistory.js create mode 100644 examples/apidoc/RestClientV2/getSpotTransferableCoins.js create mode 100644 examples/apidoc/RestClientV2/getSpotVIPFeeRate.js create mode 100644 examples/apidoc/RestClientV2/getSpotWhaleNetFlowData.js create mode 100644 examples/apidoc/RestClientV2/getSpotWithdrawalHistory.js create mode 100644 examples/apidoc/RestClientV2/getSubAccountDepositRecords.js create mode 100644 examples/apidoc/RestClientV2/getSubaccountApiKey.js create mode 100644 examples/apidoc/RestClientV2/getSubaccountEmail.js create mode 100644 examples/apidoc/RestClientV2/getSubaccountFuturesAssets.js create mode 100644 examples/apidoc/RestClientV2/getSubaccountSpotAssets.js create mode 100644 examples/apidoc/RestClientV2/getSubaccounts.js create mode 100644 examples/apidoc/RestClientV2/getTradeDataSupportSymbols.js create mode 100644 examples/apidoc/RestClientV2/getTradeRate.js create mode 100644 examples/apidoc/RestClientV2/getVirtualSubaccountAPIKeys.js create mode 100644 examples/apidoc/RestClientV2/getVirtualSubaccounts.js create mode 100644 examples/apidoc/RestClientV2/marginBatchCancelOrders.js create mode 100644 examples/apidoc/RestClientV2/marginBatchSubmitOrders.js create mode 100644 examples/apidoc/RestClientV2/marginBorrow.js create mode 100644 examples/apidoc/RestClientV2/marginCancelOrder.js create mode 100644 examples/apidoc/RestClientV2/marginFlashRepay.js create mode 100644 examples/apidoc/RestClientV2/marginRepay.js create mode 100644 examples/apidoc/RestClientV2/marginSubmitOrder.js create mode 100644 examples/apidoc/RestClientV2/modifyFuturesTraderOrderTPSL.js create mode 100644 examples/apidoc/RestClientV2/modifySpotTraderOrderTPSL.js create mode 100644 examples/apidoc/RestClientV2/modifySubaccount.js create mode 100644 examples/apidoc/RestClientV2/modifySubaccountApiKey.js create mode 100644 examples/apidoc/RestClientV2/modifySubaccountEmail.js create mode 100644 examples/apidoc/RestClientV2/modifyVirtualSubaccount.js create mode 100644 examples/apidoc/RestClientV2/modifyVirtualSubaccountAPIKey.js create mode 100644 examples/apidoc/RestClientV2/removeFuturesTraderFollower.js create mode 100644 examples/apidoc/RestClientV2/removeSpotTraderFollowers.js create mode 100644 examples/apidoc/RestClientV2/repayLoan.js create mode 100644 examples/apidoc/RestClientV2/sellSpotFollower.js create mode 100644 examples/apidoc/RestClientV2/sellSpotTrader.js create mode 100644 examples/apidoc/RestClientV2/setFuturesLeverage.js create mode 100644 examples/apidoc/RestClientV2/setFuturesMarginMode.js create mode 100644 examples/apidoc/RestClientV2/setFuturesPositionAutoMargin.js create mode 100644 examples/apidoc/RestClientV2/setFuturesPositionMargin.js create mode 100644 examples/apidoc/RestClientV2/setFuturesPositionMode.js create mode 100644 examples/apidoc/RestClientV2/spotBatchCancelOrders.js create mode 100644 examples/apidoc/RestClientV2/spotBatchSubmitOrders.js create mode 100644 examples/apidoc/RestClientV2/spotCancelOrder.js create mode 100644 examples/apidoc/RestClientV2/spotCancelPlanOrder.js create mode 100644 examples/apidoc/RestClientV2/spotCancelPlanOrders.js create mode 100644 examples/apidoc/RestClientV2/spotCancelSymbolOrder.js create mode 100644 examples/apidoc/RestClientV2/spotCancelWithdrawal.js create mode 100644 examples/apidoc/RestClientV2/spotModifyDepositAccount.js create mode 100644 examples/apidoc/RestClientV2/spotModifyPlanOrder.js create mode 100644 examples/apidoc/RestClientV2/spotSubTransfer.js create mode 100644 examples/apidoc/RestClientV2/spotSubmitOrder.js create mode 100644 examples/apidoc/RestClientV2/spotSubmitPlanOrder.js create mode 100644 examples/apidoc/RestClientV2/spotSwitchBGBDeduct.js create mode 100644 examples/apidoc/RestClientV2/spotTransfer.js create mode 100644 examples/apidoc/RestClientV2/spotWithdraw.js create mode 100644 examples/apidoc/RestClientV2/subaccountDepositRecords.js create mode 100644 examples/apidoc/RestClientV2/subaccountSetAutoTransfer.js create mode 100644 examples/apidoc/RestClientV2/subaccountWithdrawal.js create mode 100644 examples/apidoc/RestClientV2/subaccountWithdrawalRecords.js create mode 100644 examples/apidoc/RestClientV2/subscribeSharkfin.js create mode 100644 examples/apidoc/RestClientV2/unfollowFuturesTrader.js create mode 100644 examples/apidoc/RestClientV2/unfollowSpotTrader.js create mode 100644 examples/apidoc/RestClientV2/updateFuturesFollowerSettings.js create mode 100644 examples/apidoc/RestClientV2/updateFuturesFollowerTPSL.js create mode 100644 examples/apidoc/RestClientV2/updateFuturesTraderGlobalSettings.js create mode 100644 examples/apidoc/RestClientV2/updateFuturesTraderSymbolSettings.js create mode 100644 examples/apidoc/RestClientV2/updateLoanPledgeRate.js create mode 100644 examples/apidoc/RestClientV2/updateSpotFollowerSettings.js create mode 100644 examples/apidoc/RestClientV2/updateSpotFollowerTPSL.js diff --git a/.gitignore b/.gitignore index 09bd823..13a0268 100644 --- a/.gitignore +++ b/.gitignore @@ -24,5 +24,5 @@ bundleReport.html .history/ tiagoSpot.ts restClientRegex.ts - +localtest.sh privaterepotracker \ No newline at end of file diff --git a/docs/endpointFunctionList.md b/docs/endpointFunctionList.md index f5fd12d..e17ed36 100644 --- a/docs/endpointFunctionList.md +++ b/docs/endpointFunctionList.md @@ -41,253 +41,253 @@ This table includes all endpoints from the official Exchange API docs and corres | Function | AUTH | HTTP Method | Endpoint | | -------- | :------: | :------: | -------- | -| `getAnnouncements()` | | GET | `/api/v2/public/annoucements` | -| `getServerTime()` | | GET | `/api/v2/public/time` | -| `getTradeRate()` | :closed_lock_with_key: | GET | `/api/v2/common/trade-rate` | -| `getSpotTransactionRecords()` | :closed_lock_with_key: | GET | `/api/v2/tax/spot-record` | -| `getFuturesTransactionRecords()` | :closed_lock_with_key: | GET | `/api/v2/tax/future-record` | -| `getMarginTransactionRecords()` | :closed_lock_with_key: | GET | `/api/v2/tax/margin-record` | -| `getP2PTransactionRecords()` | :closed_lock_with_key: | GET | `/api/v2/tax/p2p-record` | -| `getP2PMerchantList()` | :closed_lock_with_key: | GET | `/api/v2/p2p/merchantList` | -| `getP2PMerchantInfo()` | :closed_lock_with_key: | GET | `/api/v2/p2p/merchantInfo` | -| `getP2PMerchantOrders()` | :closed_lock_with_key: | GET | `/api/v2/p2p/orderList` | -| `getP2PMerchantAdvertisementList()` | :closed_lock_with_key: | GET | `/api/v2/p2p/advList` | -| `getSpotWhaleNetFlowData()` | :closed_lock_with_key: | GET | `/api/v2/spot/market/whale-net-flow` | -| `getFuturesActiveTakerBuySellVolumeData()` | | GET | `/api/v2/mix/market/taker-buy-sell` | -| `getFuturesActiveLongShortPositionData()` | | GET | `/api/v2/mix/market/position-long-short` | -| `getFuturesLongShortRatio()` | | GET | `/api/v2/mix/market/long-short-ratio` | -| `getMarginLoanGrowthRate()` | | GET | `/api/v2/mix/market/loan-growth` | -| `getIsolatedMarginBorrowingRatio()` | | GET | `/api/v2/mix/market/isolated-borrow-rate` | -| `getFuturesActiveBuySellVolumeData()` | | GET | `/api/v2/mix/market/long-short` | -| `getSpotFundFlow()` | | GET | `/api/v2/spot/market/fund-flow` | -| `getTradeDataSupportSymbols()` | | GET | `/api/v2/spot/market/support-symbols` | -| `getSpotFundNetFlowData()` | | GET | `/api/v2/spot/market/fund-net-flow` | -| `getFuturesActiveLongShortAccountData()` | | GET | `/api/v2/mix/market/account-long-short` | -| `createVirtualSubaccount()` | :closed_lock_with_key: | POST | `/api/v2/user/create-virtual-subaccount` | -| `modifyVirtualSubaccount()` | :closed_lock_with_key: | POST | `/api/v2/user/modify-virtual-subaccount` | -| `batchCreateVirtualSubaccountAndAPIKey()` | :closed_lock_with_key: | POST | `/api/v2/user/batch-create-subaccount-and-apikey` | -| `getVirtualSubaccounts()` | :closed_lock_with_key: | GET | `/api/v2/user/virtual-subaccount-list` | -| `createVirtualSubaccountAPIKey()` | :closed_lock_with_key: | POST | `/api/v2/user/create-virtual-subaccount-apikey` | -| `modifyVirtualSubaccountAPIKey()` | :closed_lock_with_key: | POST | `/api/v2/user/modify-virtual-subaccount-apikey` | -| `getVirtualSubaccountAPIKeys()` | :closed_lock_with_key: | GET | `/api/v2/user/virtual-subaccount-apikey-list` | -| `getFundingAssets()` | :closed_lock_with_key: | GET | `/api/v2/account/funding-assets` | -| `getBotAccount()` | :closed_lock_with_key: | GET | `/api/v2/account/bot-assets` | -| `getBalances()` | :closed_lock_with_key: | GET | `/api/v2/account/all-account-balance` | -| `getConvertCoins()` | :closed_lock_with_key: | GET | `/api/v2/convert/currencies` | -| `getConvertQuotedPrice()` | :closed_lock_with_key: | GET | `/api/v2/convert/quoted-price` | -| `convert()` | :closed_lock_with_key: | POST | `/api/v2/convert/trade` | -| `getConvertHistory()` | :closed_lock_with_key: | GET | `/api/v2/convert/convert-record` | -| `getConvertBGBCoins()` | :closed_lock_with_key: | GET | `/api/v2/convert/bgb-convert-coin-list` | -| `convertBGB()` | :closed_lock_with_key: | POST | `/api/v2/convert/bgb-convert` | -| `getConvertBGBHistory()` | :closed_lock_with_key: | GET | `/api/v2/convert/bgb-convert-records` | -| `getSpotCoinInfo()` | :closed_lock_with_key: | GET | `/api/v2/spot/public/coins` | -| `getSpotSymbolInfo()` | :closed_lock_with_key: | GET | `/api/v2/spot/public/symbols` | -| `getSpotVIPFeeRate()` | :closed_lock_with_key: | GET | `/api/v2/spot/market/vip-fee-rate` | -| `getSpotTicker()` | :closed_lock_with_key: | GET | `/api/v2/spot/market/tickers` | -| `getSpotMergeDepth()` | :closed_lock_with_key: | GET | `/api/v2/spot/market/merge-depth` | -| `getSpotOrderBookDepth()` | :closed_lock_with_key: | GET | `/api/v2/spot/market/orderbook` | -| `getSpotCandles()` | :closed_lock_with_key: | GET | `/api/v2/spot/market/candles` | -| `getSpotHistoricCandles()` | :closed_lock_with_key: | GET | `/api/v2/spot/market/history-candles` | -| `getSpotRecentTrades()` | :closed_lock_with_key: | GET | `/api/v2/spot/market/fills` | -| `getSpotHistoricTrades()` | :closed_lock_with_key: | GET | `/api/v2/spot/market/fills-history` | -| `spotSubmitOrder()` | :closed_lock_with_key: | POST | `/api/v2/spot/trade/place-order` | -| `spotCancelOrder()` | :closed_lock_with_key: | POST | `/api/v2/spot/trade/cancel-order` | -| `spotBatchSubmitOrders()` | :closed_lock_with_key: | POST | `/api/v2/spot/trade/batch-orders` | -| `spotBatchCancelOrders()` | :closed_lock_with_key: | POST | `/api/v2/spot/trade/batch-cancel-order` | -| `spotCancelSymbolOrder()` | :closed_lock_with_key: | POST | `/api/v2/spot/trade/cancel-symbol-order` | -| `getSpotOrder()` | :closed_lock_with_key: | GET | `/api/v2/spot/trade/orderInfo` | -| `getSpotOpenOrders()` | :closed_lock_with_key: | GET | `/api/v2/spot/trade/unfilled-orders` | -| `getSpotHistoricOrders()` | :closed_lock_with_key: | GET | `/api/v2/spot/trade/history-orders` | -| `getSpotFills()` | :closed_lock_with_key: | GET | `/api/v2/spot/trade/fills` | -| `spotSubmitPlanOrder()` | :closed_lock_with_key: | POST | `/api/v2/spot/trade/place-plan-order` | -| `spotModifyPlanOrder()` | :closed_lock_with_key: | POST | `/api/v2/spot/trade/modify-plan-order` | -| `spotCancelPlanOrder()` | :closed_lock_with_key: | POST | `/api/v2/spot/trade/cancel-plan-order` | -| `getSpotCurrentPlanOrders()` | :closed_lock_with_key: | GET | `/api/v2/spot/trade/current-plan-order` | -| `getSpotPlanSubOrder()` | :closed_lock_with_key: | GET | `/api/v2/spot/trade/plan-sub-order` | -| `getSpotHistoricPlanOrders()` | :closed_lock_with_key: | GET | `/api/v2/spot/trade/history-plan-order` | -| `spotCancelPlanOrders()` | :closed_lock_with_key: | POST | `/api/v2/spot/trade/batch-cancel-plan-order` | -| `getSpotAccount()` | :closed_lock_with_key: | GET | `/api/v2/spot/account/info` | -| `getSpotAccountAssets()` | :closed_lock_with_key: | GET | `/api/v2/spot/account/assets` | -| `getSpotSubAccountAssets()` | :closed_lock_with_key: | GET | `/api/v2/spot/account/subaccount-assets` | -| `spotModifyDepositAccount()` | :closed_lock_with_key: | POST | `/api/v2/spot/wallet/modify-deposit-account` | -| `getSpotAccountBills()` | :closed_lock_with_key: | GET | `/api/v2/spot/account/bills` | -| `spotTransfer()` | :closed_lock_with_key: | POST | `/api/v2/spot/wallet/transfer` | -| `getSpotTransferableCoins()` | :closed_lock_with_key: | GET | `/api/v2/spot/wallet/transfer-coin-info` | -| `spotSubTransfer()` | :closed_lock_with_key: | POST | `/api/v2/spot/wallet/subaccount-transfer` | -| `getSpotTransferHistory()` | :closed_lock_with_key: | GET | `/api/v2/spot/account/transferRecords` | -| `spotSwitchBGBDeduct()` | :closed_lock_with_key: | POST | `/api/v2/spot/account/switch-deduct` | -| `spotWithdraw()` | :closed_lock_with_key: | POST | `/api/v2/spot/wallet/withdrawal` | -| `getSpotDepositAddress()` | :closed_lock_with_key: | GET | `/api/v2/spot/wallet/deposit-address` | -| `getSpotSubDepositAddress()` | :closed_lock_with_key: | GET | `/api/v2/spot/wallet/subaccount-deposit-address` | -| `getSpotDepositHistory()` | :closed_lock_with_key: | GET | `/api/v2/spot/wallet/deposit-records` | -| `getSpotBGBDeductInfo()` | :closed_lock_with_key: | GET | `/api/v2/spot/account/deduct-info` | -| `spotCancelWithdrawal()` | :closed_lock_with_key: | POST | `/api/v2/spot/wallet/cancel-withdrawal` | -| `getSpotWithdrawalHistory()` | :closed_lock_with_key: | GET | `/api/v2/spot/wallet/withdrawal-records` | -| `getSpotMainSubTransferRecord()` | :closed_lock_with_key: | GET | `/api/v2/spot/account/sub-main-trans-record` | -| `getSubAccountDepositRecords()` | :closed_lock_with_key: | GET | `/api/v2/spot/wallet/subaccount-deposit-records` | -| `getFuturesVIPFeeRate()` | | GET | `/api/v2/mix/market/vip-fee-rate` | -| `getFuturesTicker()` | | GET | `/api/v2/mix/market/ticker` | -| `getFuturesAllTickers()` | | GET | `/api/v2/mix/market/tickers` | -| `getFuturesMergeDepth()` | | GET | `/api/v2/mix/market/merge-depth` | -| `getFuturesCandles()` | | GET | `/api/v2/mix/market/candles` | -| `getFuturesHistoricCandles()` | | GET | `/api/v2/mix/market/history-candles` | -| `getFuturesHistoricIndexPriceCandles()` | | GET | `/api/v2/mix/market/history-index-candles` | -| `getFuturesHistoricMarkPriceCandles()` | | GET | `/api/v2/mix/market/history-mark-candles` | -| `getFuturesRecentTrades()` | | GET | `/api/v2/mix/market/fills` | -| `getFuturesHistoricTrades()` | | GET | `/api/v2/mix/market/fills-history` | -| `getFuturesOpenInterest()` | | GET | `/api/v2/mix/market/open-interest` | -| `getFuturesNextFundingTime()` | | GET | `/api/v2/mix/market/funding-time` | -| `getFuturesSymbolPrice()` | | GET | `/api/v2/mix/market/symbol-price` | -| `getFuturesHistoricFundingRates()` | | GET | `/api/v2/mix/market/history-fund-rate` | -| `getFuturesCurrentFundingRate()` | | GET | `/api/v2/mix/market/current-fund-rate` | -| `getFuturesContractConfig()` | | GET | `/api/v2/mix/market/contracts` | -| `getFuturesAccountAsset()` | :closed_lock_with_key: | GET | `/api/v2/mix/account/account` | -| `getFuturesAccountAssets()` | :closed_lock_with_key: | GET | `/api/v2/mix/account/accounts` | -| `getFuturesSubAccountAssets()` | :closed_lock_with_key: | GET | `/api/v2/mix/account/sub-account-assets` | -| `getFuturesOpenCount()` | :closed_lock_with_key: | GET | `/api/v2/mix/account/open-count` | -| `setFuturesLeverage()` | :closed_lock_with_key: | POST | `/api/v2/mix/account/set-leverage` | -| `setFuturesPositionAutoMargin()` | :closed_lock_with_key: | POST | `/api/v2/mix/account/set-auto-margin` | -| `setFuturesPositionMargin()` | :closed_lock_with_key: | POST | `/api/v2/mix/account/set-margin` | -| `setFuturesMarginMode()` | :closed_lock_with_key: | POST | `/api/v2/mix/account/set-margin-mode` | -| `setFuturesPositionMode()` | :closed_lock_with_key: | POST | `/api/v2/mix/account/set-position-mode` | -| `getFuturesAccountBills()` | :closed_lock_with_key: | GET | `/api/v2/mix/account/bill` | -| `getFuturesPositionTier()` | | GET | `/api/v2/mix/market/query-position-lever` | -| `getFuturesPosition()` | :closed_lock_with_key: | GET | `/api/v2/mix/position/single-position` | -| `getFuturesPositions()` | :closed_lock_with_key: | GET | `/api/v2/mix/position/all-position` | -| `getFuturesHistoricPositions()` | :closed_lock_with_key: | GET | `/api/v2/mix/position/history-position` | -| `futuresSubmitOrder()` | :closed_lock_with_key: | POST | `/api/v2/mix/order/place-order` | -| `futuresCancelOrder()` | :closed_lock_with_key: | POST | `/api/v2/mix/order/cancel-order` | -| `futuresSubmitReversal()` | :closed_lock_with_key: | POST | `/api/v2/mix/order/click-backhand` | -| `futuresBatchSubmitOrders()` | :closed_lock_with_key: | POST | `/api/v2/mix/order/batch-place-order` | -| `futuresModifyOrder()` | :closed_lock_with_key: | POST | `/api/v2/mix/order/modify-order` | -| `futuresBatchCancelOrders()` | :closed_lock_with_key: | POST | `/api/v2/mix/order/batch-cancel-orders` | -| `futuresFlashClosePositions()` | :closed_lock_with_key: | POST | `/api/v2/mix/order/close-positions` | -| `getFuturesOrder()` | :closed_lock_with_key: | GET | `/api/v2/mix/order/detail` | -| `getFuturesFills()` | :closed_lock_with_key: | GET | `/api/v2/mix/order/fills` | -| `getFuturesHistoricOrderFills()` | :closed_lock_with_key: | GET | `/api/v2/mix/order/fill-history` | -| `getFuturesOpenOrders()` | :closed_lock_with_key: | GET | `/api/v2/mix/order/orders-pending` | -| `getFuturesHistoricOrders()` | :closed_lock_with_key: | GET | `/api/v2/mix/order/orders-history` | -| `futuresCancelAllOrders()` | :closed_lock_with_key: | POST | `/api/v2/mix/order/cancel-all-orders` | -| `futuresSubmitPlanSubOrder()` | :closed_lock_with_key: | POST | `/api/v2/mix/order/plan-sub-order` | -| `futuresSubmitTPSLOrder()` | :closed_lock_with_key: | POST | `/api/v2/mix/order/place-tpsl-order` | -| `futuresSubmitPlanOrder()` | :closed_lock_with_key: | POST | `/api/v2/mix/order/place-plan-order` | -| `futuresModifyTPSLPOrder()` | :closed_lock_with_key: | POST | `/api/v2/mix/order/modify-tpsl-order` | -| `futuresModifyPlanOrder()` | :closed_lock_with_key: | POST | `/api/v2/mix/order/modify-plan-order` | -| `futuresCancelPlanOrder()` | :closed_lock_with_key: | POST | `/api/v2/mix/order/cancel-plan-order` | -| `getFuturesPlanOrders()` | :closed_lock_with_key: | GET | `/api/v2/mix/order/orders-plan-pending` | -| `getFuturesHistoricPlanOrders()` | :closed_lock_with_key: | GET | `/api/v2/mix/order/orders-plan-history` | -| `modifySubaccountEmail()` | :closed_lock_with_key: | POST | `/api/v2/broker/account/modify-subaccount-email` | -| `getBrokerInfo()` | :closed_lock_with_key: | GET | `/api/v2/broker/account/info` | -| `createSubaccount()` | :closed_lock_with_key: | POST | `/api/v2/broker/account/create-subaccount` | -| `getSubaccounts()` | :closed_lock_with_key: | GET | `/api/v2/broker/account/subaccount-list` | -| `modifySubaccount()` | :closed_lock_with_key: | POST | `/api/v2/broker/account/modify-subaccount` | -| `getSubaccountEmail()` | :closed_lock_with_key: | GET | `/api/v2/broker/account/subaccount-email` | -| `getSubaccountSpotAssets()` | :closed_lock_with_key: | GET | `/api/v2/broker/account/subaccount-spot-assets` | -| `getSubaccountFuturesAssets()` | :closed_lock_with_key: | GET | `/api/v2/broker/account/subaccount-future-assets` | -| `createSubaccountDepositAddress()` | :closed_lock_with_key: | POST | `/api/v2/broker/account/subaccount-address` | -| `subaccountWithdrawal()` | :closed_lock_with_key: | POST | `/api/v2/broker/account/subaccount-withdrawal` | -| `subaccountSetAutoTransfer()` | :closed_lock_with_key: | POST | `/api/v2/broker/account/set-subaccount-autotransfer` | -| `subaccountDepositRecords()` | :closed_lock_with_key: | POST | `/api/v2/broker/subaccount-deposit` | -| `subaccountWithdrawalRecords()` | :closed_lock_with_key: | POST | `/api/v2/broker/subaccount-withdrawal` | -| `createSubaccountApiKey()` | :closed_lock_with_key: | POST | `/api/v2/broker/manage/create-subaccount-apikey` | -| `getSubaccountApiKey()` | :closed_lock_with_key: | GET | `/api/v2/broker/manage/subaccount-apikey-list` | -| `modifySubaccountApiKey()` | :closed_lock_with_key: | POST | `/api/v2/broker/manage/modify-subaccount-apikey` | -| `getMarginCurrencies()` | | GET | `/api/v2/margin/currencies` | -| `getMarginBorrowHistory()` | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/borrow-history` | -| `getMarginRepayHistory()` | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/repay-history` | -| `getMarginInterestHistory()` | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/interest-history` | -| `getMarginLiquidationHistory()` | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/liquidation-history` | -| `getMarginFinancialHistory()` | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/financial-records` | -| `getMarginAccountAssets()` | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/account/assets` | -| `marginBorrow()` | :closed_lock_with_key: | POST | `/api/v2/margin/${marginType}/account/borrow` | -| `marginRepay()` | :closed_lock_with_key: | POST | `/api/v2/margin/${marginType}/account/repay` | -| `getMarginRiskRate()` | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/account/risk-rate` | -| `getMarginMaxBorrowable()` | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/account/max-borrowable-amount` | -| `getMarginMaxTransferable()` | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/account/max-transfer-out-amount` | -| `getMarginInterestRateAndMaxBorrowable()` | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/interest-rate-and-limit` | -| `getMarginTierConfiguration()` | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/tier-data` | -| `marginFlashRepay()` | :closed_lock_with_key: | POST | `/api/v2/margin/${marginType}/account/flash-repay` | -| `getMarginFlashRepayResult()` | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/account/query-flash-repay-status` | -| `marginSubmitOrder()` | :closed_lock_with_key: | POST | `/api/v2/margin/${marginType}/place-order` | -| `marginBatchSubmitOrders()` | :closed_lock_with_key: | POST | `/api/v2/margin/${marginType}/batch-place-order` | -| `marginCancelOrder()` | :closed_lock_with_key: | POST | `/api/v2/margin/${marginType}/cancel-order` | -| `marginBatchCancelOrders()` | :closed_lock_with_key: | POST | `/api/v2/margin/${marginType}/batch-cancel-order` | -| `getMarginOpenOrders()` | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/open-orders` | -| `getMarginHistoricOrders()` | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/history-orders` | -| `getMarginHistoricOrderFills()` | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/fills` | -| `getMarginLiquidationOrders()` | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/liquidation-order` | -| `getFuturesTraderCurrentOrder()` | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/order-current-track` | -| `getFuturesTraderHistoryOrders()` | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/order-history-track` | -| `modifyFuturesTraderOrderTPSL()` | :closed_lock_with_key: | POST | `/api/v2/copy/mix-trader/order-modify-tpsl` | -| `getFuturesTraderOrder()` | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/order-total-detail` | -| `getFuturesTraderProfitHistory()` | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/profit-history-summarys` | -| `getFuturesTraderProfitShareHistory()` | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/profit-history-details` | -| `closeFuturesTraderOrder()` | :closed_lock_with_key: | POST | `/api/v2/copy/mix-trader/order-close-positions` | -| `getFuturesTraderProfitShare()` | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/profit-details` | -| `getFuturesTraderProfitShareGroup()` | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/profits-group-coin-date` | -| `getFuturesTraderSymbolSettings()` | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/config-query-symbols` | -| `updateFuturesTraderSymbolSettings()` | :closed_lock_with_key: | POST | `/api/v2/copy/mix-trader/config-setting-symbols` | -| `updateFuturesTraderGlobalSettings()` | :closed_lock_with_key: | POST | `/api/v2/copy/mix-trader/config-settings-base` | -| `getFuturesTraderFollowers()` | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/config-query-followers` | -| `removeFuturesTraderFollower()` | :closed_lock_with_key: | POST | `/api/v2/copy/mix-trader/config-remove-follower` | -| `getFuturesFollowerCurrentOrders()` | :closed_lock_with_key: | GET | `/api/v2/copy/mix-follower/query-current-orders` | -| `getFuturesFollowerHistoryOrders()` | :closed_lock_with_key: | GET | `/api/v2/copy/mix-follower/query-history-orders` | -| `updateFuturesFollowerTPSL()` | :closed_lock_with_key: | POST | `/api/v2/copy/mix-follower/setting-tpsl` | -| `updateFuturesFollowerSettings()` | :closed_lock_with_key: | POST | `/api/v2/copy/mix-follower/settings` | -| `getFuturesFollowerSettings()` | :closed_lock_with_key: | GET | `/api/v2/copy/mix-follower/query-settings` | -| `closeFuturesFollowerPositions()` | :closed_lock_with_key: | POST | `/api/v2/copy/mix-follower/close-positions` | -| `getFuturesFollowerTraders()` | :closed_lock_with_key: | GET | `/api/v2/copy/mix-follower/query-traders` | -| `getFuturesFollowerFollowLimit()` | :closed_lock_with_key: | GET | `/api/v2/copy/mix-follower/query-quantity-limit` | -| `unfollowFuturesTrader()` | :closed_lock_with_key: | POST | `/api/v2/copy/mix-follower/cancel-trader` | -| `getBrokerTraders()` | :closed_lock_with_key: | GET | `/api/v2/copy/mix-broker/query-traders` | -| `getBrokerTradersHistoricalOrders()` | :closed_lock_with_key: | GET | `/api/v2/copy/mix-broker/query-history-traces` | -| `getBrokerTradersPendingOrders()` | :closed_lock_with_key: | GET | `/api/v2/copy/mix-broker/query-current-traces` | -| `getSpotTraderProfit()` | :closed_lock_with_key: | GET | `/api/v2/copy/spot-trader/profit-summarys` | -| `getSpotTraderHistoryProfit()` | :closed_lock_with_key: | GET | `/api/v2/copy/spot-trader/profit-history-details` | -| `getSpotTraderUnrealizedProfit()` | :closed_lock_with_key: | GET | `/api/v2/copy/spot-trader/profit-details` | -| `getSpotTraderOrder()` | :closed_lock_with_key: | GET | `/api/v2/copy/spot-trader/order-total-detail` | -| `modifySpotTraderOrderTPSL()` | :closed_lock_with_key: | POST | `/api/v2/copy/spot-trader/order-modify-tpsl` | -| `getSpotTraderHistoryOrders()` | :closed_lock_with_key: | GET | `/api/v2/copy/spot-trader/order-history-track` | -| `getSpotTraderCurrentOrders()` | :closed_lock_with_key: | GET | `/api/v2/copy/spot-trader/order-current-track` | -| `sellSpotTrader()` | :closed_lock_with_key: | POST | `/api/v2/copy/spot-trader/order-close-tracking` | -| `getSpotTraderSymbolSettings()` | :closed_lock_with_key: | POST | `/api/v2/copy/spot-trader/config-setting-symbols` | -| `removeSpotTraderFollowers()` | :closed_lock_with_key: | POST | `/api/v2/copy/spot-trader/config-remove-follower` | -| `getSpotTraderConfiguration()` | :closed_lock_with_key: | GET | `/api/v2/copy/spot-trader/config-query-settings` | -| `getSpotTraderFollowers()` | :closed_lock_with_key: | GET | `/api/v2/copy/spot-trader/config-query-followers` | -| `cancelSpotFollowerOrder()` | :closed_lock_with_key: | POST | `/api/v2/copy/spot-follower/stop-order` | -| `updateSpotFollowerSettings()` | :closed_lock_with_key: | POST | `/api/v2/copy/spot-follower/settings` | -| `updateSpotFollowerTPSL()` | :closed_lock_with_key: | POST | `/api/v2/copy/spot-follower/setting-tpsl` | -| `getSpotFollowerTraders()` | :closed_lock_with_key: | GET | `/api/v2/copy/spot-follower/query-traders` | -| `getSpotFollowerCurrentTraderSymbols()` | :closed_lock_with_key: | GET | `/api/v2/copy/spot-follower/query-trader-symbols` | -| `getSpotFollowerSettings()` | :closed_lock_with_key: | GET | `/api/v2/copy/spot-follower/query-settings` | -| `getSpotFollowerHistoryOrders()` | :closed_lock_with_key: | GET | `/api/v2/copy/spot-follower/query-history-orders` | -| `getSpotFollowerOpenOrders()` | :closed_lock_with_key: | GET | `/api/v2/copy/spot-follower/query-current-orders` | -| `sellSpotFollower()` | :closed_lock_with_key: | POST | `/api/v2/copy/spot-follower/order-close-tracking` | -| `unfollowSpotTrader()` | :closed_lock_with_key: | POST | `/api/v2/copy/spot-follower/cancel-trader` | -| `getEarnSavingsProducts()` | :closed_lock_with_key: | GET | `/api/v2/earn/savings/product` | -| `getEarnSavingsAccount()` | :closed_lock_with_key: | GET | `/api/v2/earn/savings/account` | -| `getEarnSavingsAssets()` | :closed_lock_with_key: | GET | `/api/v2/earn/savings/assets` | -| `getEarnSavingsRecords()` | :closed_lock_with_key: | GET | `/api/v2/earn/savings/records` | -| `getEarnSavingsSubscription()` | :closed_lock_with_key: | GET | `/api/v2/earn/savings/subscribe-info` | -| `earnSubscribeSavings()` | :closed_lock_with_key: | POST | `/api/v2/earn/savings/subscribe` | -| `getEarnSavingsSubscriptionResult()` | :closed_lock_with_key: | GET | `/api/v2/earn/savings/subscribe-result` | -| `getEarnSavingsRedemptionResult()` | :closed_lock_with_key: | GET | `/api/v2/earn/savings/redeem-result` | -| `getEarnAccount()` | :closed_lock_with_key: | GET | `/api/v2/earn/account/assets` | -| `getSharkfinProducts()` | :closed_lock_with_key: | GET | `/api/v2/earn/sharkfin/product` | -| `getSharkfinAccount()` | :closed_lock_with_key: | GET | `/api/v2/earn/sharkfin/account` | -| `getSharkfinAssets()` | :closed_lock_with_key: | GET | `/api/v2/earn/sharkfin/assets` | -| `getSharkfinRecords()` | :closed_lock_with_key: | GET | `/api/v2/earn/sharkfin/records` | -| `getSharkfinSubscription()` | :closed_lock_with_key: | GET | `/api/v2/earn/sharkfin/subscribe-info` | -| `subscribeSharkfin()` | :closed_lock_with_key: | POST | `/api/v2/earn/sharkfin/subscribe` | -| `getSharkfinSubscriptionResult()` | :closed_lock_with_key: | GET | `/api/v2/earn/sharkfin/subscribe-result` | -| `getLoanCurrencies()` | | GET | `/api/v2/earn/loan/public/coinInfos` | -| `getLoanEstInterestAndBorrowable()` | | GET | `/api/v2/earn/loan/public/hour-interest` | -| `borrowLoan()` | :closed_lock_with_key: | POST | `/api/v2/earn/loan/borrow` | -| `getOngoingLoanOrders()` | :closed_lock_with_key: | GET | `/api/v2/earn/loan/ongoing-orders` | -| `repayLoan()` | :closed_lock_with_key: | POST | `/api/v2/earn/loan/repay` | -| `getRepayHistory()` | :closed_lock_with_key: | GET | `/api/v2/earn/loan/repay-history` | -| `updateLoanPledgeRate()` | :closed_lock_with_key: | POST | `/api/v2/earn/loan/revise-pledge` | -| `getLoanPledgeRateHistory()` | :closed_lock_with_key: | GET | `/api/v2/earn/loan/revise-history` | -| `getLoanHistory()` | :closed_lock_with_key: | GET | `/api/v2/earn/loan/borrow-history` | -| `getLoanDebts()` | :closed_lock_with_key: | GET | `/api/v2/earn/loan/debts` | -| `getLoanLiquidationRecords()` | :closed_lock_with_key: | GET | `/api/v2/earn/loan/reduces` | \ No newline at end of file +| [getAnnouncements()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L39) | | GET | `/api/v2/public/annoucements` | +| [getServerTime()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L49) | | GET | `/api/v2/public/time` | +| [getTradeRate()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L53) | :closed_lock_with_key: | GET | `/api/v2/common/trade-rate` | +| [getSpotTransactionRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L63) | :closed_lock_with_key: | GET | `/api/v2/tax/spot-record` | +| [getFuturesTransactionRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L67) | :closed_lock_with_key: | GET | `/api/v2/tax/future-record` | +| [getMarginTransactionRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L71) | :closed_lock_with_key: | GET | `/api/v2/tax/margin-record` | +| [getP2PTransactionRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L75) | :closed_lock_with_key: | GET | `/api/v2/tax/p2p-record` | +| [getP2PMerchantList()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L85) | :closed_lock_with_key: | GET | `/api/v2/p2p/merchantList` | +| [getP2PMerchantInfo()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L89) | :closed_lock_with_key: | GET | `/api/v2/p2p/merchantInfo` | +| [getP2PMerchantOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L93) | :closed_lock_with_key: | GET | `/api/v2/p2p/orderList` | +| [getP2PMerchantAdvertisementList()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L97) | :closed_lock_with_key: | GET | `/api/v2/p2p/advList` | +| [getSpotWhaleNetFlowData()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L107) | :closed_lock_with_key: | GET | `/api/v2/spot/market/whale-net-flow` | +| [getFuturesActiveTakerBuySellVolumeData()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L111) | | GET | `/api/v2/mix/market/taker-buy-sell` | +| [getFuturesActiveLongShortPositionData()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L117) | | GET | `/api/v2/mix/market/position-long-short` | +| [getFuturesLongShortRatio()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L123) | | GET | `/api/v2/mix/market/long-short-ratio` | +| [getMarginLoanGrowthRate()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L127) | | GET | `/api/v2/mix/market/loan-growth` | +| [getIsolatedMarginBorrowingRatio()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L131) | | GET | `/api/v2/mix/market/isolated-borrow-rate` | +| [getFuturesActiveBuySellVolumeData()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L135) | | GET | `/api/v2/mix/market/long-short` | +| [getSpotFundFlow()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L139) | | GET | `/api/v2/spot/market/fund-flow` | +| [getTradeDataSupportSymbols()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L143) | | GET | `/api/v2/spot/market/support-symbols` | +| [getSpotFundNetFlowData()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L147) | | GET | `/api/v2/spot/market/fund-net-flow` | +| [getFuturesActiveLongShortAccountData()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L151) | | GET | `/api/v2/mix/market/account-long-short` | +| [createVirtualSubaccount()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L163) | :closed_lock_with_key: | POST | `/api/v2/user/create-virtual-subaccount` | +| [modifyVirtualSubaccount()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L167) | :closed_lock_with_key: | POST | `/api/v2/user/modify-virtual-subaccount` | +| [batchCreateVirtualSubaccountAndAPIKey()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L171) | :closed_lock_with_key: | POST | `/api/v2/user/batch-create-subaccount-and-apikey` | +| [getVirtualSubaccounts()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L180) | :closed_lock_with_key: | GET | `/api/v2/user/virtual-subaccount-list` | +| [createVirtualSubaccountAPIKey()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L184) | :closed_lock_with_key: | POST | `/api/v2/user/create-virtual-subaccount-apikey` | +| [modifyVirtualSubaccountAPIKey()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L191) | :closed_lock_with_key: | POST | `/api/v2/user/modify-virtual-subaccount-apikey` | +| [getVirtualSubaccountAPIKeys()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L198) | :closed_lock_with_key: | GET | `/api/v2/user/virtual-subaccount-apikey-list` | +| [getFundingAssets()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L210) | :closed_lock_with_key: | GET | `/api/v2/account/funding-assets` | +| [getBotAccount()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L214) | :closed_lock_with_key: | GET | `/api/v2/account/bot-assets` | +| [getBalances()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L219) | :closed_lock_with_key: | GET | `/api/v2/account/all-account-balance` | +| [getConvertCoins()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L229) | :closed_lock_with_key: | GET | `/api/v2/convert/currencies` | +| [getConvertQuotedPrice()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L233) | :closed_lock_with_key: | GET | `/api/v2/convert/quoted-price` | +| [convert()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L237) | :closed_lock_with_key: | POST | `/api/v2/convert/trade` | +| [getConvertHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L241) | :closed_lock_with_key: | GET | `/api/v2/convert/convert-record` | +| [getConvertBGBCoins()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L251) | :closed_lock_with_key: | GET | `/api/v2/convert/bgb-convert-coin-list` | +| [convertBGB()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L255) | :closed_lock_with_key: | POST | `/api/v2/convert/bgb-convert` | +| [getConvertBGBHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L259) | :closed_lock_with_key: | GET | `/api/v2/convert/bgb-convert-records` | +| [getSpotCoinInfo()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L277) | :closed_lock_with_key: | GET | `/api/v2/spot/public/coins` | +| [getSpotSymbolInfo()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L281) | :closed_lock_with_key: | GET | `/api/v2/spot/public/symbols` | +| [getSpotVIPFeeRate()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L285) | :closed_lock_with_key: | GET | `/api/v2/spot/market/vip-fee-rate` | +| [getSpotTicker()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L289) | :closed_lock_with_key: | GET | `/api/v2/spot/market/tickers` | +| [getSpotMergeDepth()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L293) | :closed_lock_with_key: | GET | `/api/v2/spot/market/merge-depth` | +| [getSpotOrderBookDepth()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L297) | :closed_lock_with_key: | GET | `/api/v2/spot/market/orderbook` | +| [getSpotCandles()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L301) | :closed_lock_with_key: | GET | `/api/v2/spot/market/candles` | +| [getSpotHistoricCandles()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L305) | :closed_lock_with_key: | GET | `/api/v2/spot/market/history-candles` | +| [getSpotRecentTrades()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L309) | :closed_lock_with_key: | GET | `/api/v2/spot/market/fills` | +| [getSpotHistoricTrades()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L313) | :closed_lock_with_key: | GET | `/api/v2/spot/market/fills-history` | +| [spotSubmitOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L323) | :closed_lock_with_key: | POST | `/api/v2/spot/trade/place-order` | +| [spotCancelOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L327) | :closed_lock_with_key: | POST | `/api/v2/spot/trade/cancel-order` | +| [spotBatchSubmitOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L331) | :closed_lock_with_key: | POST | `/api/v2/spot/trade/batch-orders` | +| [spotBatchCancelOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L335) | :closed_lock_with_key: | POST | `/api/v2/spot/trade/batch-cancel-order` | +| [spotCancelSymbolOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L339) | :closed_lock_with_key: | POST | `/api/v2/spot/trade/cancel-symbol-order` | +| [getSpotOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L343) | :closed_lock_with_key: | GET | `/api/v2/spot/trade/orderInfo` | +| [getSpotOpenOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L347) | :closed_lock_with_key: | GET | `/api/v2/spot/trade/unfilled-orders` | +| [getSpotHistoricOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L351) | :closed_lock_with_key: | GET | `/api/v2/spot/trade/history-orders` | +| [getSpotFills()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L355) | :closed_lock_with_key: | GET | `/api/v2/spot/trade/fills` | +| [spotSubmitPlanOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L365) | :closed_lock_with_key: | POST | `/api/v2/spot/trade/place-plan-order` | +| [spotModifyPlanOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L369) | :closed_lock_with_key: | POST | `/api/v2/spot/trade/modify-plan-order` | +| [spotCancelPlanOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L373) | :closed_lock_with_key: | POST | `/api/v2/spot/trade/cancel-plan-order` | +| [getSpotCurrentPlanOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L377) | :closed_lock_with_key: | GET | `/api/v2/spot/trade/current-plan-order` | +| [getSpotPlanSubOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L381) | :closed_lock_with_key: | GET | `/api/v2/spot/trade/plan-sub-order` | +| [getSpotHistoricPlanOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L385) | :closed_lock_with_key: | GET | `/api/v2/spot/trade/history-plan-order` | +| [spotCancelPlanOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L389) | :closed_lock_with_key: | POST | `/api/v2/spot/trade/batch-cancel-plan-order` | +| [getSpotAccount()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L402) | :closed_lock_with_key: | GET | `/api/v2/spot/account/info` | +| [getSpotAccountAssets()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L406) | :closed_lock_with_key: | GET | `/api/v2/spot/account/assets` | +| [getSpotSubAccountAssets()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L410) | :closed_lock_with_key: | GET | `/api/v2/spot/account/subaccount-assets` | +| [spotModifyDepositAccount()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L414) | :closed_lock_with_key: | POST | `/api/v2/spot/wallet/modify-deposit-account` | +| [getSpotAccountBills()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L421) | :closed_lock_with_key: | GET | `/api/v2/spot/account/bills` | +| [spotTransfer()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L433) | :closed_lock_with_key: | POST | `/api/v2/spot/wallet/transfer` | +| [getSpotTransferableCoins()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L437) | :closed_lock_with_key: | GET | `/api/v2/spot/wallet/transfer-coin-info` | +| [spotSubTransfer()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L441) | :closed_lock_with_key: | POST | `/api/v2/spot/wallet/subaccount-transfer` | +| [getSpotTransferHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L445) | :closed_lock_with_key: | GET | `/api/v2/spot/account/transferRecords` | +| [spotSwitchBGBDeduct()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L449) | :closed_lock_with_key: | POST | `/api/v2/spot/account/switch-deduct` | +| [spotWithdraw()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L453) | :closed_lock_with_key: | POST | `/api/v2/spot/wallet/withdrawal` | +| [getSpotDepositAddress()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L457) | :closed_lock_with_key: | GET | `/api/v2/spot/wallet/deposit-address` | +| [getSpotSubDepositAddress()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L461) | :closed_lock_with_key: | GET | `/api/v2/spot/wallet/subaccount-deposit-address` | +| [getSpotDepositHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L468) | :closed_lock_with_key: | GET | `/api/v2/spot/wallet/deposit-records` | +| [getSpotBGBDeductInfo()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L472) | :closed_lock_with_key: | GET | `/api/v2/spot/account/deduct-info` | +| [spotCancelWithdrawal()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L476) | :closed_lock_with_key: | POST | `/api/v2/spot/wallet/cancel-withdrawal` | +| [getSpotWithdrawalHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L480) | :closed_lock_with_key: | GET | `/api/v2/spot/wallet/withdrawal-records` | +| [getSpotMainSubTransferRecord()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L484) | :closed_lock_with_key: | GET | `/api/v2/spot/account/sub-main-trans-record` | +| [getSubAccountDepositRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L491) | :closed_lock_with_key: | GET | `/api/v2/spot/wallet/subaccount-deposit-records` | +| [getFuturesVIPFeeRate()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L512) | | GET | `/api/v2/mix/market/vip-fee-rate` | +| [getFuturesTicker()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L516) | | GET | `/api/v2/mix/market/ticker` | +| [getFuturesAllTickers()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L520) | | GET | `/api/v2/mix/market/tickers` | +| [getFuturesMergeDepth()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L524) | | GET | `/api/v2/mix/market/merge-depth` | +| [getFuturesCandles()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L528) | | GET | `/api/v2/mix/market/candles` | +| [getFuturesHistoricCandles()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L534) | | GET | `/api/v2/mix/market/history-candles` | +| [getFuturesHistoricIndexPriceCandles()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L538) | | GET | `/api/v2/mix/market/history-index-candles` | +| [getFuturesHistoricMarkPriceCandles()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L544) | | GET | `/api/v2/mix/market/history-mark-candles` | +| [getFuturesRecentTrades()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L550) | | GET | `/api/v2/mix/market/fills` | +| [getFuturesHistoricTrades()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L554) | | GET | `/api/v2/mix/market/fills-history` | +| [getFuturesOpenInterest()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L558) | | GET | `/api/v2/mix/market/open-interest` | +| [getFuturesNextFundingTime()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L562) | | GET | `/api/v2/mix/market/funding-time` | +| [getFuturesSymbolPrice()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L566) | | GET | `/api/v2/mix/market/symbol-price` | +| [getFuturesHistoricFundingRates()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L570) | | GET | `/api/v2/mix/market/history-fund-rate` | +| [getFuturesCurrentFundingRate()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L574) | | GET | `/api/v2/mix/market/current-fund-rate` | +| [getFuturesContractConfig()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L578) | | GET | `/api/v2/mix/market/contracts` | +| [getFuturesAccountAsset()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L588) | :closed_lock_with_key: | GET | `/api/v2/mix/account/account` | +| [getFuturesAccountAssets()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L592) | :closed_lock_with_key: | GET | `/api/v2/mix/account/accounts` | +| [getFuturesSubAccountAssets()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L596) | :closed_lock_with_key: | GET | `/api/v2/mix/account/sub-account-assets` | +| [getFuturesOpenCount()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L600) | :closed_lock_with_key: | GET | `/api/v2/mix/account/open-count` | +| [setFuturesLeverage()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L604) | :closed_lock_with_key: | POST | `/api/v2/mix/account/set-leverage` | +| [setFuturesPositionAutoMargin()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L608) | :closed_lock_with_key: | POST | `/api/v2/mix/account/set-auto-margin` | +| [setFuturesPositionMargin()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L612) | :closed_lock_with_key: | POST | `/api/v2/mix/account/set-margin` | +| [setFuturesMarginMode()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L616) | :closed_lock_with_key: | POST | `/api/v2/mix/account/set-margin-mode` | +| [setFuturesPositionMode()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L620) | :closed_lock_with_key: | POST | `/api/v2/mix/account/set-position-mode` | +| [getFuturesAccountBills()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L624) | :closed_lock_with_key: | GET | `/api/v2/mix/account/bill` | +| [getFuturesPositionTier()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L636) | | GET | `/api/v2/mix/market/query-position-lever` | +| [getFuturesPosition()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L640) | :closed_lock_with_key: | GET | `/api/v2/mix/position/single-position` | +| [getFuturesPositions()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L644) | :closed_lock_with_key: | GET | `/api/v2/mix/position/all-position` | +| [getFuturesHistoricPositions()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L648) | :closed_lock_with_key: | GET | `/api/v2/mix/position/history-position` | +| [futuresSubmitOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L658) | :closed_lock_with_key: | POST | `/api/v2/mix/order/place-order` | +| [futuresCancelOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L662) | :closed_lock_with_key: | POST | `/api/v2/mix/order/cancel-order` | +| [futuresSubmitReversal()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L666) | :closed_lock_with_key: | POST | `/api/v2/mix/order/click-backhand` | +| [futuresBatchSubmitOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L670) | :closed_lock_with_key: | POST | `/api/v2/mix/order/batch-place-order` | +| [futuresModifyOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L674) | :closed_lock_with_key: | POST | `/api/v2/mix/order/modify-order` | +| [futuresBatchCancelOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L678) | :closed_lock_with_key: | POST | `/api/v2/mix/order/batch-cancel-orders` | +| [futuresFlashClosePositions()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L682) | :closed_lock_with_key: | POST | `/api/v2/mix/order/close-positions` | +| [getFuturesOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L686) | :closed_lock_with_key: | GET | `/api/v2/mix/order/detail` | +| [getFuturesFills()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L690) | :closed_lock_with_key: | GET | `/api/v2/mix/order/fills` | +| [getFuturesHistoricOrderFills()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L694) | :closed_lock_with_key: | GET | `/api/v2/mix/order/fill-history` | +| [getFuturesOpenOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L698) | :closed_lock_with_key: | GET | `/api/v2/mix/order/orders-pending` | +| [getFuturesHistoricOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L702) | :closed_lock_with_key: | GET | `/api/v2/mix/order/orders-history` | +| [futuresCancelAllOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L706) | :closed_lock_with_key: | POST | `/api/v2/mix/order/cancel-all-orders` | +| [futuresSubmitPlanSubOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L716) | :closed_lock_with_key: | POST | `/api/v2/mix/order/plan-sub-order` | +| [futuresSubmitTPSLOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L720) | :closed_lock_with_key: | POST | `/api/v2/mix/order/place-tpsl-order` | +| [futuresSubmitPlanOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L724) | :closed_lock_with_key: | POST | `/api/v2/mix/order/place-plan-order` | +| [futuresModifyTPSLPOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L728) | :closed_lock_with_key: | POST | `/api/v2/mix/order/modify-tpsl-order` | +| [futuresModifyPlanOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L732) | :closed_lock_with_key: | POST | `/api/v2/mix/order/modify-plan-order` | +| [futuresCancelPlanOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L736) | :closed_lock_with_key: | POST | `/api/v2/mix/order/cancel-plan-order` | +| [getFuturesPlanOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L740) | :closed_lock_with_key: | GET | `/api/v2/mix/order/orders-plan-pending` | +| [getFuturesHistoricPlanOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L744) | :closed_lock_with_key: | GET | `/api/v2/mix/order/orders-plan-history` | +| [modifySubaccountEmail()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L762) | :closed_lock_with_key: | POST | `/api/v2/broker/account/modify-subaccount-email` | +| [getBrokerInfo()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L769) | :closed_lock_with_key: | GET | `/api/v2/broker/account/info` | +| [createSubaccount()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L773) | :closed_lock_with_key: | POST | `/api/v2/broker/account/create-subaccount` | +| [getSubaccounts()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L777) | :closed_lock_with_key: | GET | `/api/v2/broker/account/subaccount-list` | +| [modifySubaccount()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L781) | :closed_lock_with_key: | POST | `/api/v2/broker/account/modify-subaccount` | +| [getSubaccountEmail()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L785) | :closed_lock_with_key: | GET | `/api/v2/broker/account/subaccount-email` | +| [getSubaccountSpotAssets()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L789) | :closed_lock_with_key: | GET | `/api/v2/broker/account/subaccount-spot-assets` | +| [getSubaccountFuturesAssets()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L796) | :closed_lock_with_key: | GET | `/api/v2/broker/account/subaccount-future-assets` | +| [createSubaccountDepositAddress()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L803) | :closed_lock_with_key: | POST | `/api/v2/broker/account/subaccount-address` | +| [subaccountWithdrawal()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L810) | :closed_lock_with_key: | POST | `/api/v2/broker/account/subaccount-withdrawal` | +| [subaccountSetAutoTransfer()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L817) | :closed_lock_with_key: | POST | `/api/v2/broker/account/set-subaccount-autotransfer` | +| [subaccountDepositRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L824) | :closed_lock_with_key: | POST | `/api/v2/broker/subaccount-deposit` | +| [subaccountWithdrawalRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L828) | :closed_lock_with_key: | POST | `/api/v2/broker/subaccount-withdrawal` | +| [createSubaccountApiKey()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L838) | :closed_lock_with_key: | POST | `/api/v2/broker/manage/create-subaccount-apikey` | +| [getSubaccountApiKey()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L845) | :closed_lock_with_key: | GET | `/api/v2/broker/manage/subaccount-apikey-list` | +| [modifySubaccountApiKey()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L852) | :closed_lock_with_key: | POST | `/api/v2/broker/manage/modify-subaccount-apikey` | +| [getMarginCurrencies()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L873) | | GET | `/api/v2/margin/currencies` | +| [getMarginBorrowHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L883) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/borrow-history` | +| [getMarginRepayHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L894) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/repay-history` | +| [getMarginInterestHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L905) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/interest-history` | +| [getMarginLiquidationHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L916) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/liquidation-history` | +| [getMarginFinancialHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L927) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/financial-records` | +| [getMarginAccountAssets()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L944) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/account/assets` | +| [marginBorrow()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L955) | :closed_lock_with_key: | POST | `/api/v2/margin/${marginType}/account/borrow` | +| [marginRepay()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L966) | :closed_lock_with_key: | POST | `/api/v2/margin/${marginType}/account/repay` | +| [getMarginRiskRate()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L977) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/account/risk-rate` | +| [getMarginMaxBorrowable()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L982) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/account/max-borrowable-amount` | +| [getMarginMaxTransferable()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L993) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/account/max-transfer-out-amount` | +| [getMarginInterestRateAndMaxBorrowable()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1004) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/interest-rate-and-limit` | +| [getMarginTierConfiguration()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1015) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/tier-data` | +| [marginFlashRepay()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1023) | :closed_lock_with_key: | POST | `/api/v2/margin/${marginType}/account/flash-repay` | +| [getMarginFlashRepayResult()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1034) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/account/query-flash-repay-status` | +| [marginSubmitOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1051) | :closed_lock_with_key: | POST | `/api/v2/margin/${marginType}/place-order` | +| [marginBatchSubmitOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1059) | :closed_lock_with_key: | POST | `/api/v2/margin/${marginType}/batch-place-order` | +| [marginCancelOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1070) | :closed_lock_with_key: | POST | `/api/v2/margin/${marginType}/cancel-order` | +| [marginBatchCancelOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1081) | :closed_lock_with_key: | POST | `/api/v2/margin/${marginType}/batch-cancel-order` | +| [getMarginOpenOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1092) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/open-orders` | +| [getMarginHistoricOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1100) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/history-orders` | +| [getMarginHistoricOrderFills()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1111) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/fills` | +| [getMarginLiquidationOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1119) | :closed_lock_with_key: | GET | `/api/v2/margin/${marginType}/liquidation-order` | +| [getFuturesTraderCurrentOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1146) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/order-current-track` | +| [getFuturesTraderHistoryOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1153) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/order-history-track` | +| [modifyFuturesTraderOrderTPSL()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1160) | :closed_lock_with_key: | POST | `/api/v2/copy/mix-trader/order-modify-tpsl` | +| [getFuturesTraderOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1167) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/order-total-detail` | +| [getFuturesTraderProfitHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1171) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/profit-history-summarys` | +| [getFuturesTraderProfitShareHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1175) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/profit-history-details` | +| [closeFuturesTraderOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1184) | :closed_lock_with_key: | POST | `/api/v2/copy/mix-trader/order-close-positions` | +| [getFuturesTraderProfitShare()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1191) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/profit-details` | +| [getFuturesTraderProfitShareGroup()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1195) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/profits-group-coin-date` | +| [getFuturesTraderSymbolSettings()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1202) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/config-query-symbols` | +| [updateFuturesTraderSymbolSettings()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1209) | :closed_lock_with_key: | POST | `/api/v2/copy/mix-trader/config-setting-symbols` | +| [updateFuturesTraderGlobalSettings()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1216) | :closed_lock_with_key: | POST | `/api/v2/copy/mix-trader/config-settings-base` | +| [getFuturesTraderFollowers()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1223) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-trader/config-query-followers` | +| [removeFuturesTraderFollower()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1230) | :closed_lock_with_key: | POST | `/api/v2/copy/mix-trader/config-remove-follower` | +| [getFuturesFollowerCurrentOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1245) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-follower/query-current-orders` | +| [getFuturesFollowerHistoryOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1252) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-follower/query-history-orders` | +| [updateFuturesFollowerTPSL()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1259) | :closed_lock_with_key: | POST | `/api/v2/copy/mix-follower/setting-tpsl` | +| [updateFuturesFollowerSettings()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1263) | :closed_lock_with_key: | POST | `/api/v2/copy/mix-follower/settings` | +| [getFuturesFollowerSettings()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1267) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-follower/query-settings` | +| [closeFuturesFollowerPositions()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1271) | :closed_lock_with_key: | POST | `/api/v2/copy/mix-follower/close-positions` | +| [getFuturesFollowerTraders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1278) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-follower/query-traders` | +| [getFuturesFollowerFollowLimit()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1282) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-follower/query-quantity-limit` | +| [unfollowFuturesTrader()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1289) | :closed_lock_with_key: | POST | `/api/v2/copy/mix-follower/cancel-trader` | +| [getBrokerTraders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1301) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-broker/query-traders` | +| [getBrokerTradersHistoricalOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1305) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-broker/query-history-traces` | +| [getBrokerTradersPendingOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1312) | :closed_lock_with_key: | GET | `/api/v2/copy/mix-broker/query-current-traces` | +| [getSpotTraderProfit()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1327) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-trader/profit-summarys` | +| [getSpotTraderHistoryProfit()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1331) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-trader/profit-history-details` | +| [getSpotTraderUnrealizedProfit()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1338) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-trader/profit-details` | +| [getSpotTraderOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1342) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-trader/order-total-detail` | +| [modifySpotTraderOrderTPSL()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1346) | :closed_lock_with_key: | POST | `/api/v2/copy/spot-trader/order-modify-tpsl` | +| [getSpotTraderHistoryOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1353) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-trader/order-history-track` | +| [getSpotTraderCurrentOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1360) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-trader/order-current-track` | +| [sellSpotTrader()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1367) | :closed_lock_with_key: | POST | `/api/v2/copy/spot-trader/order-close-tracking` | +| [getSpotTraderSymbolSettings()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1374) | :closed_lock_with_key: | POST | `/api/v2/copy/spot-trader/config-setting-symbols` | +| [removeSpotTraderFollowers()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1381) | :closed_lock_with_key: | POST | `/api/v2/copy/spot-trader/config-remove-follower` | +| [getSpotTraderConfiguration()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1388) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-trader/config-query-settings` | +| [getSpotTraderFollowers()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1392) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-trader/config-query-followers` | +| [cancelSpotFollowerOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1407) | :closed_lock_with_key: | POST | `/api/v2/copy/spot-follower/stop-order` | +| [updateSpotFollowerSettings()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1411) | :closed_lock_with_key: | POST | `/api/v2/copy/spot-follower/settings` | +| [updateSpotFollowerTPSL()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1415) | :closed_lock_with_key: | POST | `/api/v2/copy/spot-follower/setting-tpsl` | +| [getSpotFollowerTraders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1419) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-follower/query-traders` | +| [getSpotFollowerCurrentTraderSymbols()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1423) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-follower/query-trader-symbols` | +| [getSpotFollowerSettings()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1432) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-follower/query-settings` | +| [getSpotFollowerHistoryOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1436) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-follower/query-history-orders` | +| [getSpotFollowerOpenOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1443) | :closed_lock_with_key: | GET | `/api/v2/copy/spot-follower/query-current-orders` | +| [sellSpotFollower()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1450) | :closed_lock_with_key: | POST | `/api/v2/copy/spot-follower/order-close-tracking` | +| [unfollowSpotTrader()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1457) | :closed_lock_with_key: | POST | `/api/v2/copy/spot-follower/cancel-trader` | +| [getEarnSavingsProducts()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1469) | :closed_lock_with_key: | GET | `/api/v2/earn/savings/product` | +| [getEarnSavingsAccount()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1473) | :closed_lock_with_key: | GET | `/api/v2/earn/savings/account` | +| [getEarnSavingsAssets()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1477) | :closed_lock_with_key: | GET | `/api/v2/earn/savings/assets` | +| [getEarnSavingsRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1481) | :closed_lock_with_key: | GET | `/api/v2/earn/savings/records` | +| [getEarnSavingsSubscription()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1485) | :closed_lock_with_key: | GET | `/api/v2/earn/savings/subscribe-info` | +| [earnSubscribeSavings()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1489) | :closed_lock_with_key: | POST | `/api/v2/earn/savings/subscribe` | +| [getEarnSavingsSubscriptionResult()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1493) | :closed_lock_with_key: | GET | `/api/v2/earn/savings/subscribe-result` | +| [getEarnSavingsRedemptionResult()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1497) | :closed_lock_with_key: | GET | `/api/v2/earn/savings/redeem-result` | +| [getEarnAccount()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1509) | :closed_lock_with_key: | GET | `/api/v2/earn/account/assets` | +| [getSharkfinProducts()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1521) | :closed_lock_with_key: | GET | `/api/v2/earn/sharkfin/product` | +| [getSharkfinAccount()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1525) | :closed_lock_with_key: | GET | `/api/v2/earn/sharkfin/account` | +| [getSharkfinAssets()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1529) | :closed_lock_with_key: | GET | `/api/v2/earn/sharkfin/assets` | +| [getSharkfinRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1533) | :closed_lock_with_key: | GET | `/api/v2/earn/sharkfin/records` | +| [getSharkfinSubscription()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1537) | :closed_lock_with_key: | GET | `/api/v2/earn/sharkfin/subscribe-info` | +| [subscribeSharkfin()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1541) | :closed_lock_with_key: | POST | `/api/v2/earn/sharkfin/subscribe` | +| [getSharkfinSubscriptionResult()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1545) | :closed_lock_with_key: | GET | `/api/v2/earn/sharkfin/subscribe-result` | +| [getLoanCurrencies()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1557) | | GET | `/api/v2/earn/loan/public/coinInfos` | +| [getLoanEstInterestAndBorrowable()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1561) | | GET | `/api/v2/earn/loan/public/hour-interest` | +| [borrowLoan()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1565) | :closed_lock_with_key: | POST | `/api/v2/earn/loan/borrow` | +| [getOngoingLoanOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1569) | :closed_lock_with_key: | GET | `/api/v2/earn/loan/ongoing-orders` | +| [repayLoan()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1573) | :closed_lock_with_key: | POST | `/api/v2/earn/loan/repay` | +| [getRepayHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1577) | :closed_lock_with_key: | GET | `/api/v2/earn/loan/repay-history` | +| [updateLoanPledgeRate()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1581) | :closed_lock_with_key: | POST | `/api/v2/earn/loan/revise-pledge` | +| [getLoanPledgeRateHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1585) | :closed_lock_with_key: | GET | `/api/v2/earn/loan/revise-history` | +| [getLoanHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1589) | :closed_lock_with_key: | GET | `/api/v2/earn/loan/borrow-history` | +| [getLoanDebts()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1593) | :closed_lock_with_key: | GET | `/api/v2/earn/loan/debts` | +| [getLoanLiquidationRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1597) | :closed_lock_with_key: | GET | `/api/v2/earn/loan/reduces` | \ No newline at end of file diff --git a/examples/apidoc/RestClientV2/batchCreateVirtualSubaccountAndAPIKey.js b/examples/apidoc/RestClientV2/batchCreateVirtualSubaccountAndAPIKey.js new file mode 100644 index 0000000..0e9b582 --- /dev/null +++ b/examples/apidoc/RestClientV2/batchCreateVirtualSubaccountAndAPIKey.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/user/batch-create-subaccount-and-apikey + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L171 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.batchCreateVirtualSubaccountAndAPIKey(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/borrowLoan.js b/examples/apidoc/RestClientV2/borrowLoan.js new file mode 100644 index 0000000..c3efde5 --- /dev/null +++ b/examples/apidoc/RestClientV2/borrowLoan.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/earn/loan/borrow + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1565 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.borrowLoan(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/cancelSpotFollowerOrder.js b/examples/apidoc/RestClientV2/cancelSpotFollowerOrder.js new file mode 100644 index 0000000..11c4262 --- /dev/null +++ b/examples/apidoc/RestClientV2/cancelSpotFollowerOrder.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/spot-follower/stop-order + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1407 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.cancelSpotFollowerOrder(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/closeFuturesFollowerPositions.js b/examples/apidoc/RestClientV2/closeFuturesFollowerPositions.js new file mode 100644 index 0000000..1bda7ce --- /dev/null +++ b/examples/apidoc/RestClientV2/closeFuturesFollowerPositions.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/mix-follower/close-positions + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1271 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.closeFuturesFollowerPositions(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/closeFuturesTraderOrder.js b/examples/apidoc/RestClientV2/closeFuturesTraderOrder.js new file mode 100644 index 0000000..fb1bc97 --- /dev/null +++ b/examples/apidoc/RestClientV2/closeFuturesTraderOrder.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/mix-trader/order-close-positions + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1184 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.closeFuturesTraderOrder(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/convert.js b/examples/apidoc/RestClientV2/convert.js new file mode 100644 index 0000000..d6d51e6 --- /dev/null +++ b/examples/apidoc/RestClientV2/convert.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/convert/trade + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L237 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.convert(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/convertBGB.js b/examples/apidoc/RestClientV2/convertBGB.js new file mode 100644 index 0000000..b44534d --- /dev/null +++ b/examples/apidoc/RestClientV2/convertBGB.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/convert/bgb-convert + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L255 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.convertBGB(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/createSubaccount.js b/examples/apidoc/RestClientV2/createSubaccount.js new file mode 100644 index 0000000..b7e759b --- /dev/null +++ b/examples/apidoc/RestClientV2/createSubaccount.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/broker/account/create-subaccount + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L773 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.createSubaccount(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/createSubaccountApiKey.js b/examples/apidoc/RestClientV2/createSubaccountApiKey.js new file mode 100644 index 0000000..320870d --- /dev/null +++ b/examples/apidoc/RestClientV2/createSubaccountApiKey.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/broker/manage/create-subaccount-apikey + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L838 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.createSubaccountApiKey(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/createSubaccountDepositAddress.js b/examples/apidoc/RestClientV2/createSubaccountDepositAddress.js new file mode 100644 index 0000000..3b0f73e --- /dev/null +++ b/examples/apidoc/RestClientV2/createSubaccountDepositAddress.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/broker/account/subaccount-address + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L803 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.createSubaccountDepositAddress(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/createVirtualSubaccount.js b/examples/apidoc/RestClientV2/createVirtualSubaccount.js new file mode 100644 index 0000000..4749c44 --- /dev/null +++ b/examples/apidoc/RestClientV2/createVirtualSubaccount.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/user/create-virtual-subaccount + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L163 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.createVirtualSubaccount(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/createVirtualSubaccountAPIKey.js b/examples/apidoc/RestClientV2/createVirtualSubaccountAPIKey.js new file mode 100644 index 0000000..45d33fa --- /dev/null +++ b/examples/apidoc/RestClientV2/createVirtualSubaccountAPIKey.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/user/create-virtual-subaccount-apikey + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L184 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.createVirtualSubaccountAPIKey(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/earnSubscribeSavings.js b/examples/apidoc/RestClientV2/earnSubscribeSavings.js new file mode 100644 index 0000000..1536d0e --- /dev/null +++ b/examples/apidoc/RestClientV2/earnSubscribeSavings.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/earn/savings/subscribe + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1489 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.earnSubscribeSavings(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/futuresBatchCancelOrders.js b/examples/apidoc/RestClientV2/futuresBatchCancelOrders.js new file mode 100644 index 0000000..ef7d747 --- /dev/null +++ b/examples/apidoc/RestClientV2/futuresBatchCancelOrders.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/order/batch-cancel-orders + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L678 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.futuresBatchCancelOrders(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/futuresBatchSubmitOrders.js b/examples/apidoc/RestClientV2/futuresBatchSubmitOrders.js new file mode 100644 index 0000000..2472e00 --- /dev/null +++ b/examples/apidoc/RestClientV2/futuresBatchSubmitOrders.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/order/batch-place-order + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L670 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.futuresBatchSubmitOrders(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/futuresCancelAllOrders.js b/examples/apidoc/RestClientV2/futuresCancelAllOrders.js new file mode 100644 index 0000000..e5e5d31 --- /dev/null +++ b/examples/apidoc/RestClientV2/futuresCancelAllOrders.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/order/cancel-all-orders + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L706 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.futuresCancelAllOrders(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/futuresCancelOrder.js b/examples/apidoc/RestClientV2/futuresCancelOrder.js new file mode 100644 index 0000000..5764846 --- /dev/null +++ b/examples/apidoc/RestClientV2/futuresCancelOrder.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/order/cancel-order + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L662 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.futuresCancelOrder(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/futuresCancelPlanOrder.js b/examples/apidoc/RestClientV2/futuresCancelPlanOrder.js new file mode 100644 index 0000000..ac7d4f4 --- /dev/null +++ b/examples/apidoc/RestClientV2/futuresCancelPlanOrder.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/order/cancel-plan-order + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L736 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.futuresCancelPlanOrder(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/futuresFlashClosePositions.js b/examples/apidoc/RestClientV2/futuresFlashClosePositions.js new file mode 100644 index 0000000..69a174f --- /dev/null +++ b/examples/apidoc/RestClientV2/futuresFlashClosePositions.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/order/close-positions + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L682 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.futuresFlashClosePositions(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/futuresModifyOrder.js b/examples/apidoc/RestClientV2/futuresModifyOrder.js new file mode 100644 index 0000000..d91e88c --- /dev/null +++ b/examples/apidoc/RestClientV2/futuresModifyOrder.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/order/modify-order + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L674 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.futuresModifyOrder(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/futuresModifyPlanOrder.js b/examples/apidoc/RestClientV2/futuresModifyPlanOrder.js new file mode 100644 index 0000000..b15d8af --- /dev/null +++ b/examples/apidoc/RestClientV2/futuresModifyPlanOrder.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/order/modify-plan-order + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L732 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.futuresModifyPlanOrder(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/futuresModifyTPSLPOrder.js b/examples/apidoc/RestClientV2/futuresModifyTPSLPOrder.js new file mode 100644 index 0000000..d29e1cc --- /dev/null +++ b/examples/apidoc/RestClientV2/futuresModifyTPSLPOrder.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/order/modify-tpsl-order + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L728 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.futuresModifyTPSLPOrder(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/futuresSubmitOrder.js b/examples/apidoc/RestClientV2/futuresSubmitOrder.js new file mode 100644 index 0000000..4d8f57c --- /dev/null +++ b/examples/apidoc/RestClientV2/futuresSubmitOrder.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/order/place-order + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L658 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.futuresSubmitOrder(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/futuresSubmitPlanOrder.js b/examples/apidoc/RestClientV2/futuresSubmitPlanOrder.js new file mode 100644 index 0000000..85275e2 --- /dev/null +++ b/examples/apidoc/RestClientV2/futuresSubmitPlanOrder.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/order/place-plan-order + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L724 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.futuresSubmitPlanOrder(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/futuresSubmitPlanSubOrder.js b/examples/apidoc/RestClientV2/futuresSubmitPlanSubOrder.js new file mode 100644 index 0000000..761f39c --- /dev/null +++ b/examples/apidoc/RestClientV2/futuresSubmitPlanSubOrder.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/order/plan-sub-order + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L716 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.futuresSubmitPlanSubOrder(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/futuresSubmitReversal.js b/examples/apidoc/RestClientV2/futuresSubmitReversal.js new file mode 100644 index 0000000..d08fb42 --- /dev/null +++ b/examples/apidoc/RestClientV2/futuresSubmitReversal.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/order/click-backhand + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L666 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.futuresSubmitReversal(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/futuresSubmitTPSLOrder.js b/examples/apidoc/RestClientV2/futuresSubmitTPSLOrder.js new file mode 100644 index 0000000..3387442 --- /dev/null +++ b/examples/apidoc/RestClientV2/futuresSubmitTPSLOrder.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/order/place-tpsl-order + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L720 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.futuresSubmitTPSLOrder(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getAnnouncements.js b/examples/apidoc/RestClientV2/getAnnouncements.js new file mode 100644 index 0000000..3535048 --- /dev/null +++ b/examples/apidoc/RestClientV2/getAnnouncements.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/public/annoucements + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L39 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getAnnouncements(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getBalances.js b/examples/apidoc/RestClientV2/getBalances.js new file mode 100644 index 0000000..0c3595f --- /dev/null +++ b/examples/apidoc/RestClientV2/getBalances.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/account/all-account-balance + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L219 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getBalances(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getBotAccount.js b/examples/apidoc/RestClientV2/getBotAccount.js new file mode 100644 index 0000000..0853e79 --- /dev/null +++ b/examples/apidoc/RestClientV2/getBotAccount.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/account/bot-assets + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L214 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getBotAccount(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getBrokerInfo.js b/examples/apidoc/RestClientV2/getBrokerInfo.js new file mode 100644 index 0000000..97bf59d --- /dev/null +++ b/examples/apidoc/RestClientV2/getBrokerInfo.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/broker/account/info + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L769 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getBrokerInfo(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getBrokerTraders.js b/examples/apidoc/RestClientV2/getBrokerTraders.js new file mode 100644 index 0000000..12e6f3c --- /dev/null +++ b/examples/apidoc/RestClientV2/getBrokerTraders.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/mix-broker/query-traders + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1301 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getBrokerTraders(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getBrokerTradersHistoricalOrders.js b/examples/apidoc/RestClientV2/getBrokerTradersHistoricalOrders.js new file mode 100644 index 0000000..58b9c78 --- /dev/null +++ b/examples/apidoc/RestClientV2/getBrokerTradersHistoricalOrders.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/mix-broker/query-history-traces + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1305 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getBrokerTradersHistoricalOrders(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getBrokerTradersPendingOrders.js b/examples/apidoc/RestClientV2/getBrokerTradersPendingOrders.js new file mode 100644 index 0000000..50e7d1e --- /dev/null +++ b/examples/apidoc/RestClientV2/getBrokerTradersPendingOrders.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/mix-broker/query-current-traces + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1312 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getBrokerTradersPendingOrders(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getConvertBGBCoins.js b/examples/apidoc/RestClientV2/getConvertBGBCoins.js new file mode 100644 index 0000000..810c39c --- /dev/null +++ b/examples/apidoc/RestClientV2/getConvertBGBCoins.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/convert/bgb-convert-coin-list + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L251 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getConvertBGBCoins(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getConvertBGBHistory.js b/examples/apidoc/RestClientV2/getConvertBGBHistory.js new file mode 100644 index 0000000..1e8d6f6 --- /dev/null +++ b/examples/apidoc/RestClientV2/getConvertBGBHistory.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/convert/bgb-convert-records + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L259 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getConvertBGBHistory(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getConvertCoins.js b/examples/apidoc/RestClientV2/getConvertCoins.js new file mode 100644 index 0000000..af0bde4 --- /dev/null +++ b/examples/apidoc/RestClientV2/getConvertCoins.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/convert/currencies + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L229 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getConvertCoins(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getConvertHistory.js b/examples/apidoc/RestClientV2/getConvertHistory.js new file mode 100644 index 0000000..93405e5 --- /dev/null +++ b/examples/apidoc/RestClientV2/getConvertHistory.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/convert/convert-record + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L241 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getConvertHistory(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getConvertQuotedPrice.js b/examples/apidoc/RestClientV2/getConvertQuotedPrice.js new file mode 100644 index 0000000..bbe0b91 --- /dev/null +++ b/examples/apidoc/RestClientV2/getConvertQuotedPrice.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/convert/quoted-price + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L233 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getConvertQuotedPrice(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getEarnAccount.js b/examples/apidoc/RestClientV2/getEarnAccount.js new file mode 100644 index 0000000..151daf9 --- /dev/null +++ b/examples/apidoc/RestClientV2/getEarnAccount.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/earn/account/assets + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1509 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getEarnAccount(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getEarnSavingsAccount.js b/examples/apidoc/RestClientV2/getEarnSavingsAccount.js new file mode 100644 index 0000000..d689e23 --- /dev/null +++ b/examples/apidoc/RestClientV2/getEarnSavingsAccount.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/earn/savings/account + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1473 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getEarnSavingsAccount(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getEarnSavingsAssets.js b/examples/apidoc/RestClientV2/getEarnSavingsAssets.js new file mode 100644 index 0000000..c46957a --- /dev/null +++ b/examples/apidoc/RestClientV2/getEarnSavingsAssets.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/earn/savings/assets + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1477 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getEarnSavingsAssets(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getEarnSavingsProducts.js b/examples/apidoc/RestClientV2/getEarnSavingsProducts.js new file mode 100644 index 0000000..a65f229 --- /dev/null +++ b/examples/apidoc/RestClientV2/getEarnSavingsProducts.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/earn/savings/product + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1469 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getEarnSavingsProducts(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getEarnSavingsRecords.js b/examples/apidoc/RestClientV2/getEarnSavingsRecords.js new file mode 100644 index 0000000..936eb78 --- /dev/null +++ b/examples/apidoc/RestClientV2/getEarnSavingsRecords.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/earn/savings/records + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1481 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getEarnSavingsRecords(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getEarnSavingsRedemptionResult.js b/examples/apidoc/RestClientV2/getEarnSavingsRedemptionResult.js new file mode 100644 index 0000000..d6e3680 --- /dev/null +++ b/examples/apidoc/RestClientV2/getEarnSavingsRedemptionResult.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/earn/savings/redeem-result + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1497 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getEarnSavingsRedemptionResult(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getEarnSavingsSubscription.js b/examples/apidoc/RestClientV2/getEarnSavingsSubscription.js new file mode 100644 index 0000000..4f492b4 --- /dev/null +++ b/examples/apidoc/RestClientV2/getEarnSavingsSubscription.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/earn/savings/subscribe-info + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1485 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getEarnSavingsSubscription(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getEarnSavingsSubscriptionResult.js b/examples/apidoc/RestClientV2/getEarnSavingsSubscriptionResult.js new file mode 100644 index 0000000..f611024 --- /dev/null +++ b/examples/apidoc/RestClientV2/getEarnSavingsSubscriptionResult.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/earn/savings/subscribe-result + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1493 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getEarnSavingsSubscriptionResult(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFundingAssets.js b/examples/apidoc/RestClientV2/getFundingAssets.js new file mode 100644 index 0000000..bb42198 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFundingAssets.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/account/funding-assets + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L210 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFundingAssets(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesAccountAsset.js b/examples/apidoc/RestClientV2/getFuturesAccountAsset.js new file mode 100644 index 0000000..9de377b --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesAccountAsset.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/account/account + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L588 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesAccountAsset(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesAccountAssets.js b/examples/apidoc/RestClientV2/getFuturesAccountAssets.js new file mode 100644 index 0000000..b1a6bb8 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesAccountAssets.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/account/accounts + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L592 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesAccountAssets(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesAccountBills.js b/examples/apidoc/RestClientV2/getFuturesAccountBills.js new file mode 100644 index 0000000..71ca462 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesAccountBills.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/account/bill + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L624 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesAccountBills(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesActiveBuySellVolumeData.js b/examples/apidoc/RestClientV2/getFuturesActiveBuySellVolumeData.js new file mode 100644 index 0000000..c7fab2c --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesActiveBuySellVolumeData.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/market/long-short + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L135 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesActiveBuySellVolumeData(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesActiveLongShortAccountData.js b/examples/apidoc/RestClientV2/getFuturesActiveLongShortAccountData.js new file mode 100644 index 0000000..d73538e --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesActiveLongShortAccountData.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/market/account-long-short + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L151 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesActiveLongShortAccountData(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesActiveLongShortPositionData.js b/examples/apidoc/RestClientV2/getFuturesActiveLongShortPositionData.js new file mode 100644 index 0000000..1bb14d3 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesActiveLongShortPositionData.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/market/position-long-short + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L117 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesActiveLongShortPositionData(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesActiveTakerBuySellVolumeData.js b/examples/apidoc/RestClientV2/getFuturesActiveTakerBuySellVolumeData.js new file mode 100644 index 0000000..52f50e9 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesActiveTakerBuySellVolumeData.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/market/taker-buy-sell + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L111 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesActiveTakerBuySellVolumeData(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesAllTickers.js b/examples/apidoc/RestClientV2/getFuturesAllTickers.js new file mode 100644 index 0000000..26aa9dc --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesAllTickers.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/market/tickers + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L520 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesAllTickers(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesCandles.js b/examples/apidoc/RestClientV2/getFuturesCandles.js new file mode 100644 index 0000000..2fac5f9 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesCandles.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/market/candles + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L528 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesCandles(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesContractConfig.js b/examples/apidoc/RestClientV2/getFuturesContractConfig.js new file mode 100644 index 0000000..452dac0 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesContractConfig.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/market/contracts + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L578 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesContractConfig(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesCurrentFundingRate.js b/examples/apidoc/RestClientV2/getFuturesCurrentFundingRate.js new file mode 100644 index 0000000..102e6d4 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesCurrentFundingRate.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/market/current-fund-rate + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L574 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesCurrentFundingRate(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesFills.js b/examples/apidoc/RestClientV2/getFuturesFills.js new file mode 100644 index 0000000..6479a6f --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesFills.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/order/fills + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L690 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesFills(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesFollowerCurrentOrders.js b/examples/apidoc/RestClientV2/getFuturesFollowerCurrentOrders.js new file mode 100644 index 0000000..9b36c49 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesFollowerCurrentOrders.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/mix-follower/query-current-orders + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1245 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesFollowerCurrentOrders(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesFollowerFollowLimit.js b/examples/apidoc/RestClientV2/getFuturesFollowerFollowLimit.js new file mode 100644 index 0000000..fe6db8d --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesFollowerFollowLimit.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/mix-follower/query-quantity-limit + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1282 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesFollowerFollowLimit(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesFollowerHistoryOrders.js b/examples/apidoc/RestClientV2/getFuturesFollowerHistoryOrders.js new file mode 100644 index 0000000..eeec509 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesFollowerHistoryOrders.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/mix-follower/query-history-orders + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1252 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesFollowerHistoryOrders(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesFollowerSettings.js b/examples/apidoc/RestClientV2/getFuturesFollowerSettings.js new file mode 100644 index 0000000..3c83377 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesFollowerSettings.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/mix-follower/query-settings + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1267 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesFollowerSettings(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesFollowerTraders.js b/examples/apidoc/RestClientV2/getFuturesFollowerTraders.js new file mode 100644 index 0000000..9c678fd --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesFollowerTraders.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/mix-follower/query-traders + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1278 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesFollowerTraders(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricCandles.js b/examples/apidoc/RestClientV2/getFuturesHistoricCandles.js new file mode 100644 index 0000000..abd36e2 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesHistoricCandles.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/market/history-candles + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L534 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesHistoricCandles(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricFundingRates.js b/examples/apidoc/RestClientV2/getFuturesHistoricFundingRates.js new file mode 100644 index 0000000..c6881f2 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesHistoricFundingRates.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/market/history-fund-rate + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L570 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesHistoricFundingRates(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricIndexPriceCandles.js b/examples/apidoc/RestClientV2/getFuturesHistoricIndexPriceCandles.js new file mode 100644 index 0000000..82b4ee0 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesHistoricIndexPriceCandles.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/market/history-index-candles + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L538 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesHistoricIndexPriceCandles(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricMarkPriceCandles.js b/examples/apidoc/RestClientV2/getFuturesHistoricMarkPriceCandles.js new file mode 100644 index 0000000..190371c --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesHistoricMarkPriceCandles.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/market/history-mark-candles + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L544 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesHistoricMarkPriceCandles(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricOrderFills.js b/examples/apidoc/RestClientV2/getFuturesHistoricOrderFills.js new file mode 100644 index 0000000..75d653c --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesHistoricOrderFills.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/order/fill-history + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L694 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesHistoricOrderFills(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricOrders.js b/examples/apidoc/RestClientV2/getFuturesHistoricOrders.js new file mode 100644 index 0000000..e38b07c --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesHistoricOrders.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/order/orders-history + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L702 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesHistoricOrders(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricPlanOrders.js b/examples/apidoc/RestClientV2/getFuturesHistoricPlanOrders.js new file mode 100644 index 0000000..8379ab4 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesHistoricPlanOrders.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/order/orders-plan-history + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L744 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesHistoricPlanOrders(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricPositions.js b/examples/apidoc/RestClientV2/getFuturesHistoricPositions.js new file mode 100644 index 0000000..fc342b3 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesHistoricPositions.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/position/history-position + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L648 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesHistoricPositions(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricTrades.js b/examples/apidoc/RestClientV2/getFuturesHistoricTrades.js new file mode 100644 index 0000000..8523a83 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesHistoricTrades.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/market/fills-history + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L554 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesHistoricTrades(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesLongShortRatio.js b/examples/apidoc/RestClientV2/getFuturesLongShortRatio.js new file mode 100644 index 0000000..b24f791 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesLongShortRatio.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/market/long-short-ratio + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L123 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesLongShortRatio(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesMergeDepth.js b/examples/apidoc/RestClientV2/getFuturesMergeDepth.js new file mode 100644 index 0000000..667bfb1 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesMergeDepth.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/market/merge-depth + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L524 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesMergeDepth(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesNextFundingTime.js b/examples/apidoc/RestClientV2/getFuturesNextFundingTime.js new file mode 100644 index 0000000..3787017 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesNextFundingTime.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/market/funding-time + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L562 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesNextFundingTime(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesOpenCount.js b/examples/apidoc/RestClientV2/getFuturesOpenCount.js new file mode 100644 index 0000000..2ecbe99 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesOpenCount.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/account/open-count + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L600 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesOpenCount(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesOpenInterest.js b/examples/apidoc/RestClientV2/getFuturesOpenInterest.js new file mode 100644 index 0000000..f48707e --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesOpenInterest.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/market/open-interest + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L558 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesOpenInterest(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesOpenOrders.js b/examples/apidoc/RestClientV2/getFuturesOpenOrders.js new file mode 100644 index 0000000..e8f3d55 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesOpenOrders.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/order/orders-pending + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L698 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesOpenOrders(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesOrder.js b/examples/apidoc/RestClientV2/getFuturesOrder.js new file mode 100644 index 0000000..5f51130 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesOrder.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/order/detail + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L686 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesOrder(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesPlanOrders.js b/examples/apidoc/RestClientV2/getFuturesPlanOrders.js new file mode 100644 index 0000000..32c7cba --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesPlanOrders.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/order/orders-plan-pending + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L740 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesPlanOrders(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesPosition.js b/examples/apidoc/RestClientV2/getFuturesPosition.js new file mode 100644 index 0000000..bdf0a79 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesPosition.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/position/single-position + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L640 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesPosition(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesPositionTier.js b/examples/apidoc/RestClientV2/getFuturesPositionTier.js new file mode 100644 index 0000000..568e45d --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesPositionTier.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/market/query-position-lever + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L636 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesPositionTier(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesPositions.js b/examples/apidoc/RestClientV2/getFuturesPositions.js new file mode 100644 index 0000000..170250a --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesPositions.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/position/all-position + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L644 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesPositions(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesRecentTrades.js b/examples/apidoc/RestClientV2/getFuturesRecentTrades.js new file mode 100644 index 0000000..620f9ec --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesRecentTrades.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/market/fills + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L550 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesRecentTrades(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesSubAccountAssets.js b/examples/apidoc/RestClientV2/getFuturesSubAccountAssets.js new file mode 100644 index 0000000..d1c98e0 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesSubAccountAssets.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/account/sub-account-assets + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L596 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesSubAccountAssets(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesSymbolPrice.js b/examples/apidoc/RestClientV2/getFuturesSymbolPrice.js new file mode 100644 index 0000000..588a397 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesSymbolPrice.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/market/symbol-price + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L566 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesSymbolPrice(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesTicker.js b/examples/apidoc/RestClientV2/getFuturesTicker.js new file mode 100644 index 0000000..76a72d0 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesTicker.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/market/ticker + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L516 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesTicker(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesTraderCurrentOrder.js b/examples/apidoc/RestClientV2/getFuturesTraderCurrentOrder.js new file mode 100644 index 0000000..a9cc41f --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesTraderCurrentOrder.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/mix-trader/order-current-track + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1146 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesTraderCurrentOrder(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesTraderFollowers.js b/examples/apidoc/RestClientV2/getFuturesTraderFollowers.js new file mode 100644 index 0000000..bdcc8e1 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesTraderFollowers.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/mix-trader/config-query-followers + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1223 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesTraderFollowers(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesTraderHistoryOrders.js b/examples/apidoc/RestClientV2/getFuturesTraderHistoryOrders.js new file mode 100644 index 0000000..86bf2f5 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesTraderHistoryOrders.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/mix-trader/order-history-track + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1153 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesTraderHistoryOrders(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesTraderOrder.js b/examples/apidoc/RestClientV2/getFuturesTraderOrder.js new file mode 100644 index 0000000..1085fcd --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesTraderOrder.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/mix-trader/order-total-detail + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1167 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesTraderOrder(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesTraderProfitHistory.js b/examples/apidoc/RestClientV2/getFuturesTraderProfitHistory.js new file mode 100644 index 0000000..d5382e6 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesTraderProfitHistory.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/mix-trader/profit-history-summarys + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1171 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesTraderProfitHistory(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesTraderProfitShare.js b/examples/apidoc/RestClientV2/getFuturesTraderProfitShare.js new file mode 100644 index 0000000..b1d3ff2 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesTraderProfitShare.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/mix-trader/profit-details + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1191 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesTraderProfitShare(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesTraderProfitShareGroup.js b/examples/apidoc/RestClientV2/getFuturesTraderProfitShareGroup.js new file mode 100644 index 0000000..18e2bf5 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesTraderProfitShareGroup.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/mix-trader/profits-group-coin-date + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1195 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesTraderProfitShareGroup(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesTraderProfitShareHistory.js b/examples/apidoc/RestClientV2/getFuturesTraderProfitShareHistory.js new file mode 100644 index 0000000..1fdbe6c --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesTraderProfitShareHistory.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/mix-trader/profit-history-details + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1175 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesTraderProfitShareHistory(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesTraderSymbolSettings.js b/examples/apidoc/RestClientV2/getFuturesTraderSymbolSettings.js new file mode 100644 index 0000000..9606c70 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesTraderSymbolSettings.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/mix-trader/config-query-symbols + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1202 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesTraderSymbolSettings(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesTransactionRecords.js b/examples/apidoc/RestClientV2/getFuturesTransactionRecords.js new file mode 100644 index 0000000..ad2fd5d --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesTransactionRecords.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/tax/future-record + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L67 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesTransactionRecords(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getFuturesVIPFeeRate.js b/examples/apidoc/RestClientV2/getFuturesVIPFeeRate.js new file mode 100644 index 0000000..7b01da2 --- /dev/null +++ b/examples/apidoc/RestClientV2/getFuturesVIPFeeRate.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/market/vip-fee-rate + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L512 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesVIPFeeRate(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getIsolatedMarginBorrowingRatio.js b/examples/apidoc/RestClientV2/getIsolatedMarginBorrowingRatio.js new file mode 100644 index 0000000..4eadabb --- /dev/null +++ b/examples/apidoc/RestClientV2/getIsolatedMarginBorrowingRatio.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/market/isolated-borrow-rate + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L131 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getIsolatedMarginBorrowingRatio(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getLoanCurrencies.js b/examples/apidoc/RestClientV2/getLoanCurrencies.js new file mode 100644 index 0000000..c7b3952 --- /dev/null +++ b/examples/apidoc/RestClientV2/getLoanCurrencies.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/earn/loan/public/coinInfos + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1557 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getLoanCurrencies(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getLoanDebts.js b/examples/apidoc/RestClientV2/getLoanDebts.js new file mode 100644 index 0000000..231d68c --- /dev/null +++ b/examples/apidoc/RestClientV2/getLoanDebts.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/earn/loan/debts + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1593 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getLoanDebts(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getLoanEstInterestAndBorrowable.js b/examples/apidoc/RestClientV2/getLoanEstInterestAndBorrowable.js new file mode 100644 index 0000000..132ace0 --- /dev/null +++ b/examples/apidoc/RestClientV2/getLoanEstInterestAndBorrowable.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/earn/loan/public/hour-interest + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1561 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getLoanEstInterestAndBorrowable(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getLoanHistory.js b/examples/apidoc/RestClientV2/getLoanHistory.js new file mode 100644 index 0000000..3d154fd --- /dev/null +++ b/examples/apidoc/RestClientV2/getLoanHistory.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/earn/loan/borrow-history + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1589 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getLoanHistory(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getLoanLiquidationRecords.js b/examples/apidoc/RestClientV2/getLoanLiquidationRecords.js new file mode 100644 index 0000000..bd987fd --- /dev/null +++ b/examples/apidoc/RestClientV2/getLoanLiquidationRecords.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/earn/loan/reduces + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1597 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getLoanLiquidationRecords(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getLoanPledgeRateHistory.js b/examples/apidoc/RestClientV2/getLoanPledgeRateHistory.js new file mode 100644 index 0000000..ef55ca1 --- /dev/null +++ b/examples/apidoc/RestClientV2/getLoanPledgeRateHistory.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/earn/loan/revise-history + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1585 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getLoanPledgeRateHistory(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getMarginAccountAssets.js b/examples/apidoc/RestClientV2/getMarginAccountAssets.js new file mode 100644 index 0000000..4f55c70 --- /dev/null +++ b/examples/apidoc/RestClientV2/getMarginAccountAssets.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/margin/${marginType}/account/assets + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L944 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getMarginAccountAssets(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getMarginBorrowHistory.js b/examples/apidoc/RestClientV2/getMarginBorrowHistory.js new file mode 100644 index 0000000..1c15941 --- /dev/null +++ b/examples/apidoc/RestClientV2/getMarginBorrowHistory.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/margin/${marginType}/borrow-history + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L883 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getMarginBorrowHistory(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getMarginCurrencies.js b/examples/apidoc/RestClientV2/getMarginCurrencies.js new file mode 100644 index 0000000..3b5d5fd --- /dev/null +++ b/examples/apidoc/RestClientV2/getMarginCurrencies.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/margin/currencies + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L873 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getMarginCurrencies(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getMarginFinancialHistory.js b/examples/apidoc/RestClientV2/getMarginFinancialHistory.js new file mode 100644 index 0000000..7769846 --- /dev/null +++ b/examples/apidoc/RestClientV2/getMarginFinancialHistory.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/margin/${marginType}/financial-records + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L927 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getMarginFinancialHistory(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getMarginFlashRepayResult.js b/examples/apidoc/RestClientV2/getMarginFlashRepayResult.js new file mode 100644 index 0000000..b642cbb --- /dev/null +++ b/examples/apidoc/RestClientV2/getMarginFlashRepayResult.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/margin/${marginType}/account/query-flash-repay-status + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1034 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getMarginFlashRepayResult(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getMarginHistoricOrderFills.js b/examples/apidoc/RestClientV2/getMarginHistoricOrderFills.js new file mode 100644 index 0000000..14a5b02 --- /dev/null +++ b/examples/apidoc/RestClientV2/getMarginHistoricOrderFills.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/margin/${marginType}/fills + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1111 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getMarginHistoricOrderFills(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getMarginHistoricOrders.js b/examples/apidoc/RestClientV2/getMarginHistoricOrders.js new file mode 100644 index 0000000..45ae8cf --- /dev/null +++ b/examples/apidoc/RestClientV2/getMarginHistoricOrders.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/margin/${marginType}/history-orders + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1100 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getMarginHistoricOrders(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getMarginInterestHistory.js b/examples/apidoc/RestClientV2/getMarginInterestHistory.js new file mode 100644 index 0000000..2cd54ad --- /dev/null +++ b/examples/apidoc/RestClientV2/getMarginInterestHistory.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/margin/${marginType}/interest-history + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L905 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getMarginInterestHistory(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getMarginInterestRateAndMaxBorrowable.js b/examples/apidoc/RestClientV2/getMarginInterestRateAndMaxBorrowable.js new file mode 100644 index 0000000..94431a0 --- /dev/null +++ b/examples/apidoc/RestClientV2/getMarginInterestRateAndMaxBorrowable.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/margin/${marginType}/interest-rate-and-limit + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1004 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getMarginInterestRateAndMaxBorrowable(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getMarginLiquidationHistory.js b/examples/apidoc/RestClientV2/getMarginLiquidationHistory.js new file mode 100644 index 0000000..89df9d2 --- /dev/null +++ b/examples/apidoc/RestClientV2/getMarginLiquidationHistory.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/margin/${marginType}/liquidation-history + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L916 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getMarginLiquidationHistory(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getMarginLiquidationOrders.js b/examples/apidoc/RestClientV2/getMarginLiquidationOrders.js new file mode 100644 index 0000000..baf7016 --- /dev/null +++ b/examples/apidoc/RestClientV2/getMarginLiquidationOrders.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/margin/${marginType}/liquidation-order + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1119 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getMarginLiquidationOrders(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getMarginLoanGrowthRate.js b/examples/apidoc/RestClientV2/getMarginLoanGrowthRate.js new file mode 100644 index 0000000..5c209dd --- /dev/null +++ b/examples/apidoc/RestClientV2/getMarginLoanGrowthRate.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/market/loan-growth + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L127 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getMarginLoanGrowthRate(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getMarginMaxBorrowable.js b/examples/apidoc/RestClientV2/getMarginMaxBorrowable.js new file mode 100644 index 0000000..b55ce9f --- /dev/null +++ b/examples/apidoc/RestClientV2/getMarginMaxBorrowable.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/margin/${marginType}/account/max-borrowable-amount + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L982 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getMarginMaxBorrowable(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getMarginMaxTransferable.js b/examples/apidoc/RestClientV2/getMarginMaxTransferable.js new file mode 100644 index 0000000..7bb353f --- /dev/null +++ b/examples/apidoc/RestClientV2/getMarginMaxTransferable.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/margin/${marginType}/account/max-transfer-out-amount + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L993 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getMarginMaxTransferable(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getMarginOpenOrders.js b/examples/apidoc/RestClientV2/getMarginOpenOrders.js new file mode 100644 index 0000000..70de093 --- /dev/null +++ b/examples/apidoc/RestClientV2/getMarginOpenOrders.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/margin/${marginType}/open-orders + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1092 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getMarginOpenOrders(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getMarginRepayHistory.js b/examples/apidoc/RestClientV2/getMarginRepayHistory.js new file mode 100644 index 0000000..feb22c6 --- /dev/null +++ b/examples/apidoc/RestClientV2/getMarginRepayHistory.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/margin/${marginType}/repay-history + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L894 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getMarginRepayHistory(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getMarginRiskRate.js b/examples/apidoc/RestClientV2/getMarginRiskRate.js new file mode 100644 index 0000000..42c8b16 --- /dev/null +++ b/examples/apidoc/RestClientV2/getMarginRiskRate.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/margin/${marginType}/account/risk-rate + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L977 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getMarginRiskRate(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getMarginTierConfiguration.js b/examples/apidoc/RestClientV2/getMarginTierConfiguration.js new file mode 100644 index 0000000..9e68bc7 --- /dev/null +++ b/examples/apidoc/RestClientV2/getMarginTierConfiguration.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/margin/${marginType}/tier-data + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1015 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getMarginTierConfiguration(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getMarginTransactionRecords.js b/examples/apidoc/RestClientV2/getMarginTransactionRecords.js new file mode 100644 index 0000000..8d9c1d3 --- /dev/null +++ b/examples/apidoc/RestClientV2/getMarginTransactionRecords.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/tax/margin-record + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L71 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getMarginTransactionRecords(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getOngoingLoanOrders.js b/examples/apidoc/RestClientV2/getOngoingLoanOrders.js new file mode 100644 index 0000000..67f4166 --- /dev/null +++ b/examples/apidoc/RestClientV2/getOngoingLoanOrders.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/earn/loan/ongoing-orders + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1569 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getOngoingLoanOrders(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getP2PMerchantAdvertisementList.js b/examples/apidoc/RestClientV2/getP2PMerchantAdvertisementList.js new file mode 100644 index 0000000..6126578 --- /dev/null +++ b/examples/apidoc/RestClientV2/getP2PMerchantAdvertisementList.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/p2p/advList + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L97 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getP2PMerchantAdvertisementList(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getP2PMerchantInfo.js b/examples/apidoc/RestClientV2/getP2PMerchantInfo.js new file mode 100644 index 0000000..cd82525 --- /dev/null +++ b/examples/apidoc/RestClientV2/getP2PMerchantInfo.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/p2p/merchantInfo + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L89 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getP2PMerchantInfo(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getP2PMerchantList.js b/examples/apidoc/RestClientV2/getP2PMerchantList.js new file mode 100644 index 0000000..60e8a70 --- /dev/null +++ b/examples/apidoc/RestClientV2/getP2PMerchantList.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/p2p/merchantList + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L85 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getP2PMerchantList(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getP2PMerchantOrders.js b/examples/apidoc/RestClientV2/getP2PMerchantOrders.js new file mode 100644 index 0000000..49fa17f --- /dev/null +++ b/examples/apidoc/RestClientV2/getP2PMerchantOrders.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/p2p/orderList + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L93 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getP2PMerchantOrders(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getP2PTransactionRecords.js b/examples/apidoc/RestClientV2/getP2PTransactionRecords.js new file mode 100644 index 0000000..6520ee9 --- /dev/null +++ b/examples/apidoc/RestClientV2/getP2PTransactionRecords.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/tax/p2p-record + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L75 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getP2PTransactionRecords(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getRepayHistory.js b/examples/apidoc/RestClientV2/getRepayHistory.js new file mode 100644 index 0000000..e981221 --- /dev/null +++ b/examples/apidoc/RestClientV2/getRepayHistory.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/earn/loan/repay-history + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1577 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getRepayHistory(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getServerTime.js b/examples/apidoc/RestClientV2/getServerTime.js new file mode 100644 index 0000000..945551b --- /dev/null +++ b/examples/apidoc/RestClientV2/getServerTime.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/public/time + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L49 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getServerTime(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSharkfinAccount.js b/examples/apidoc/RestClientV2/getSharkfinAccount.js new file mode 100644 index 0000000..e88e677 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSharkfinAccount.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/earn/sharkfin/account + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1525 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSharkfinAccount(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSharkfinAssets.js b/examples/apidoc/RestClientV2/getSharkfinAssets.js new file mode 100644 index 0000000..1508b29 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSharkfinAssets.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/earn/sharkfin/assets + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1529 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSharkfinAssets(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSharkfinProducts.js b/examples/apidoc/RestClientV2/getSharkfinProducts.js new file mode 100644 index 0000000..eb3a26c --- /dev/null +++ b/examples/apidoc/RestClientV2/getSharkfinProducts.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/earn/sharkfin/product + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1521 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSharkfinProducts(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSharkfinRecords.js b/examples/apidoc/RestClientV2/getSharkfinRecords.js new file mode 100644 index 0000000..0432a68 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSharkfinRecords.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/earn/sharkfin/records + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1533 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSharkfinRecords(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSharkfinSubscription.js b/examples/apidoc/RestClientV2/getSharkfinSubscription.js new file mode 100644 index 0000000..8380123 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSharkfinSubscription.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/earn/sharkfin/subscribe-info + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1537 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSharkfinSubscription(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSharkfinSubscriptionResult.js b/examples/apidoc/RestClientV2/getSharkfinSubscriptionResult.js new file mode 100644 index 0000000..1c63a43 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSharkfinSubscriptionResult.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/earn/sharkfin/subscribe-result + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1545 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSharkfinSubscriptionResult(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotAccount.js b/examples/apidoc/RestClientV2/getSpotAccount.js new file mode 100644 index 0000000..0a81904 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotAccount.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/account/info + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L402 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotAccount(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotAccountAssets.js b/examples/apidoc/RestClientV2/getSpotAccountAssets.js new file mode 100644 index 0000000..cb9241e --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotAccountAssets.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/account/assets + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L406 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotAccountAssets(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotAccountBills.js b/examples/apidoc/RestClientV2/getSpotAccountBills.js new file mode 100644 index 0000000..fd43a28 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotAccountBills.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/account/bills + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L421 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotAccountBills(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotBGBDeductInfo.js b/examples/apidoc/RestClientV2/getSpotBGBDeductInfo.js new file mode 100644 index 0000000..620f0e4 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotBGBDeductInfo.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/account/deduct-info + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L472 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotBGBDeductInfo(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotCandles.js b/examples/apidoc/RestClientV2/getSpotCandles.js new file mode 100644 index 0000000..10748a2 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotCandles.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/market/candles + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L301 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotCandles(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotCoinInfo.js b/examples/apidoc/RestClientV2/getSpotCoinInfo.js new file mode 100644 index 0000000..52e9adb --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotCoinInfo.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/public/coins + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L277 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotCoinInfo(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotCurrentPlanOrders.js b/examples/apidoc/RestClientV2/getSpotCurrentPlanOrders.js new file mode 100644 index 0000000..c8ddec5 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotCurrentPlanOrders.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/trade/current-plan-order + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L377 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotCurrentPlanOrders(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotDepositAddress.js b/examples/apidoc/RestClientV2/getSpotDepositAddress.js new file mode 100644 index 0000000..a2f8f08 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotDepositAddress.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/wallet/deposit-address + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L457 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotDepositAddress(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotDepositHistory.js b/examples/apidoc/RestClientV2/getSpotDepositHistory.js new file mode 100644 index 0000000..0d1ff2b --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotDepositHistory.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/wallet/deposit-records + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L468 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotDepositHistory(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotFills.js b/examples/apidoc/RestClientV2/getSpotFills.js new file mode 100644 index 0000000..0ed8d91 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotFills.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/trade/fills + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L355 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotFills(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotFollowerCurrentTraderSymbols.js b/examples/apidoc/RestClientV2/getSpotFollowerCurrentTraderSymbols.js new file mode 100644 index 0000000..47bc570 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotFollowerCurrentTraderSymbols.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/spot-follower/query-trader-symbols + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1423 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotFollowerCurrentTraderSymbols(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotFollowerHistoryOrders.js b/examples/apidoc/RestClientV2/getSpotFollowerHistoryOrders.js new file mode 100644 index 0000000..fb18f53 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotFollowerHistoryOrders.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/spot-follower/query-history-orders + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1436 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotFollowerHistoryOrders(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotFollowerOpenOrders.js b/examples/apidoc/RestClientV2/getSpotFollowerOpenOrders.js new file mode 100644 index 0000000..b84414a --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotFollowerOpenOrders.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/spot-follower/query-current-orders + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1443 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotFollowerOpenOrders(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotFollowerSettings.js b/examples/apidoc/RestClientV2/getSpotFollowerSettings.js new file mode 100644 index 0000000..eef36da --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotFollowerSettings.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/spot-follower/query-settings + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1432 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotFollowerSettings(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotFollowerTraders.js b/examples/apidoc/RestClientV2/getSpotFollowerTraders.js new file mode 100644 index 0000000..8a31f48 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotFollowerTraders.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/spot-follower/query-traders + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1419 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotFollowerTraders(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotFundFlow.js b/examples/apidoc/RestClientV2/getSpotFundFlow.js new file mode 100644 index 0000000..a034dbf --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotFundFlow.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/market/fund-flow + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L139 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotFundFlow(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotFundNetFlowData.js b/examples/apidoc/RestClientV2/getSpotFundNetFlowData.js new file mode 100644 index 0000000..1432f6a --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotFundNetFlowData.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/market/fund-net-flow + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L147 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotFundNetFlowData(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotHistoricCandles.js b/examples/apidoc/RestClientV2/getSpotHistoricCandles.js new file mode 100644 index 0000000..e9ef8ff --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotHistoricCandles.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/market/history-candles + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L305 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotHistoricCandles(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotHistoricOrders.js b/examples/apidoc/RestClientV2/getSpotHistoricOrders.js new file mode 100644 index 0000000..8cfbaa0 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotHistoricOrders.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/trade/history-orders + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L351 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotHistoricOrders(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotHistoricPlanOrders.js b/examples/apidoc/RestClientV2/getSpotHistoricPlanOrders.js new file mode 100644 index 0000000..bffe500 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotHistoricPlanOrders.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/trade/history-plan-order + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L385 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotHistoricPlanOrders(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotHistoricTrades.js b/examples/apidoc/RestClientV2/getSpotHistoricTrades.js new file mode 100644 index 0000000..19ca2fe --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotHistoricTrades.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/market/fills-history + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L313 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotHistoricTrades(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotMainSubTransferRecord.js b/examples/apidoc/RestClientV2/getSpotMainSubTransferRecord.js new file mode 100644 index 0000000..c66b179 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotMainSubTransferRecord.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/account/sub-main-trans-record + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L484 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotMainSubTransferRecord(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotMergeDepth.js b/examples/apidoc/RestClientV2/getSpotMergeDepth.js new file mode 100644 index 0000000..3ddaf71 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotMergeDepth.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/market/merge-depth + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L293 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotMergeDepth(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotOpenOrders.js b/examples/apidoc/RestClientV2/getSpotOpenOrders.js new file mode 100644 index 0000000..5ff14ea --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotOpenOrders.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/trade/unfilled-orders + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L347 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotOpenOrders(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotOrder.js b/examples/apidoc/RestClientV2/getSpotOrder.js new file mode 100644 index 0000000..7c8cb9e --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotOrder.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/trade/orderInfo + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L343 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotOrder(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotOrderBookDepth.js b/examples/apidoc/RestClientV2/getSpotOrderBookDepth.js new file mode 100644 index 0000000..cc2c05c --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotOrderBookDepth.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/market/orderbook + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L297 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotOrderBookDepth(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotPlanSubOrder.js b/examples/apidoc/RestClientV2/getSpotPlanSubOrder.js new file mode 100644 index 0000000..7197c40 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotPlanSubOrder.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/trade/plan-sub-order + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L381 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotPlanSubOrder(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotRecentTrades.js b/examples/apidoc/RestClientV2/getSpotRecentTrades.js new file mode 100644 index 0000000..6ca8570 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotRecentTrades.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/market/fills + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L309 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotRecentTrades(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotSubAccountAssets.js b/examples/apidoc/RestClientV2/getSpotSubAccountAssets.js new file mode 100644 index 0000000..420d8bf --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotSubAccountAssets.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/account/subaccount-assets + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L410 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotSubAccountAssets(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotSubDepositAddress.js b/examples/apidoc/RestClientV2/getSpotSubDepositAddress.js new file mode 100644 index 0000000..8a3396c --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotSubDepositAddress.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/wallet/subaccount-deposit-address + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L461 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotSubDepositAddress(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotSymbolInfo.js b/examples/apidoc/RestClientV2/getSpotSymbolInfo.js new file mode 100644 index 0000000..4466e70 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotSymbolInfo.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/public/symbols + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L281 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotSymbolInfo(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotTicker.js b/examples/apidoc/RestClientV2/getSpotTicker.js new file mode 100644 index 0000000..729709c --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotTicker.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/market/tickers + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L289 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotTicker(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotTraderConfiguration.js b/examples/apidoc/RestClientV2/getSpotTraderConfiguration.js new file mode 100644 index 0000000..6ba0e55 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotTraderConfiguration.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/spot-trader/config-query-settings + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1388 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotTraderConfiguration(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotTraderCurrentOrders.js b/examples/apidoc/RestClientV2/getSpotTraderCurrentOrders.js new file mode 100644 index 0000000..6816b91 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotTraderCurrentOrders.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/spot-trader/order-current-track + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1360 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotTraderCurrentOrders(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotTraderFollowers.js b/examples/apidoc/RestClientV2/getSpotTraderFollowers.js new file mode 100644 index 0000000..71280ca --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotTraderFollowers.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/spot-trader/config-query-followers + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1392 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotTraderFollowers(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotTraderHistoryOrders.js b/examples/apidoc/RestClientV2/getSpotTraderHistoryOrders.js new file mode 100644 index 0000000..69eb0dc --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotTraderHistoryOrders.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/spot-trader/order-history-track + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1353 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotTraderHistoryOrders(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotTraderHistoryProfit.js b/examples/apidoc/RestClientV2/getSpotTraderHistoryProfit.js new file mode 100644 index 0000000..9b93dfc --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotTraderHistoryProfit.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/spot-trader/profit-history-details + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1331 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotTraderHistoryProfit(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotTraderOrder.js b/examples/apidoc/RestClientV2/getSpotTraderOrder.js new file mode 100644 index 0000000..4c4e038 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotTraderOrder.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/spot-trader/order-total-detail + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1342 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotTraderOrder(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotTraderProfit.js b/examples/apidoc/RestClientV2/getSpotTraderProfit.js new file mode 100644 index 0000000..a46ada6 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotTraderProfit.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/spot-trader/profit-summarys + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1327 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotTraderProfit(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotTraderSymbolSettings.js b/examples/apidoc/RestClientV2/getSpotTraderSymbolSettings.js new file mode 100644 index 0000000..719472f --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotTraderSymbolSettings.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/spot-trader/config-setting-symbols + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1374 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotTraderSymbolSettings(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotTraderUnrealizedProfit.js b/examples/apidoc/RestClientV2/getSpotTraderUnrealizedProfit.js new file mode 100644 index 0000000..b831b9e --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotTraderUnrealizedProfit.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/spot-trader/profit-details + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1338 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotTraderUnrealizedProfit(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotTransactionRecords.js b/examples/apidoc/RestClientV2/getSpotTransactionRecords.js new file mode 100644 index 0000000..56c92f9 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotTransactionRecords.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/tax/spot-record + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L63 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotTransactionRecords(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotTransferHistory.js b/examples/apidoc/RestClientV2/getSpotTransferHistory.js new file mode 100644 index 0000000..03ded7f --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotTransferHistory.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/account/transferRecords + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L445 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotTransferHistory(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotTransferableCoins.js b/examples/apidoc/RestClientV2/getSpotTransferableCoins.js new file mode 100644 index 0000000..82346f1 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotTransferableCoins.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/wallet/transfer-coin-info + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L437 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotTransferableCoins(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotVIPFeeRate.js b/examples/apidoc/RestClientV2/getSpotVIPFeeRate.js new file mode 100644 index 0000000..a01806b --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotVIPFeeRate.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/market/vip-fee-rate + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L285 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotVIPFeeRate(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotWhaleNetFlowData.js b/examples/apidoc/RestClientV2/getSpotWhaleNetFlowData.js new file mode 100644 index 0000000..9442a51 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotWhaleNetFlowData.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/market/whale-net-flow + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L107 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotWhaleNetFlowData(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSpotWithdrawalHistory.js b/examples/apidoc/RestClientV2/getSpotWithdrawalHistory.js new file mode 100644 index 0000000..e19e861 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSpotWithdrawalHistory.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/wallet/withdrawal-records + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L480 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotWithdrawalHistory(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSubAccountDepositRecords.js b/examples/apidoc/RestClientV2/getSubAccountDepositRecords.js new file mode 100644 index 0000000..cddedf9 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSubAccountDepositRecords.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/wallet/subaccount-deposit-records + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L491 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSubAccountDepositRecords(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSubaccountApiKey.js b/examples/apidoc/RestClientV2/getSubaccountApiKey.js new file mode 100644 index 0000000..54459e3 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSubaccountApiKey.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/broker/manage/subaccount-apikey-list + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L845 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSubaccountApiKey(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSubaccountEmail.js b/examples/apidoc/RestClientV2/getSubaccountEmail.js new file mode 100644 index 0000000..291a230 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSubaccountEmail.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/broker/account/subaccount-email + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L785 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSubaccountEmail(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSubaccountFuturesAssets.js b/examples/apidoc/RestClientV2/getSubaccountFuturesAssets.js new file mode 100644 index 0000000..ad25b8f --- /dev/null +++ b/examples/apidoc/RestClientV2/getSubaccountFuturesAssets.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/broker/account/subaccount-future-assets + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L796 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSubaccountFuturesAssets(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSubaccountSpotAssets.js b/examples/apidoc/RestClientV2/getSubaccountSpotAssets.js new file mode 100644 index 0000000..a851d7f --- /dev/null +++ b/examples/apidoc/RestClientV2/getSubaccountSpotAssets.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/broker/account/subaccount-spot-assets + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L789 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSubaccountSpotAssets(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getSubaccounts.js b/examples/apidoc/RestClientV2/getSubaccounts.js new file mode 100644 index 0000000..4446035 --- /dev/null +++ b/examples/apidoc/RestClientV2/getSubaccounts.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/broker/account/subaccount-list + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L777 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSubaccounts(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getTradeDataSupportSymbols.js b/examples/apidoc/RestClientV2/getTradeDataSupportSymbols.js new file mode 100644 index 0000000..a749263 --- /dev/null +++ b/examples/apidoc/RestClientV2/getTradeDataSupportSymbols.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/market/support-symbols + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L143 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getTradeDataSupportSymbols(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getTradeRate.js b/examples/apidoc/RestClientV2/getTradeRate.js new file mode 100644 index 0000000..9dfe80e --- /dev/null +++ b/examples/apidoc/RestClientV2/getTradeRate.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/common/trade-rate + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L53 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getTradeRate(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getVirtualSubaccountAPIKeys.js b/examples/apidoc/RestClientV2/getVirtualSubaccountAPIKeys.js new file mode 100644 index 0000000..7790692 --- /dev/null +++ b/examples/apidoc/RestClientV2/getVirtualSubaccountAPIKeys.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/user/virtual-subaccount-apikey-list + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L198 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getVirtualSubaccountAPIKeys(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/getVirtualSubaccounts.js b/examples/apidoc/RestClientV2/getVirtualSubaccounts.js new file mode 100644 index 0000000..7c8391a --- /dev/null +++ b/examples/apidoc/RestClientV2/getVirtualSubaccounts.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/user/virtual-subaccount-list + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L180 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getVirtualSubaccounts(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/marginBatchCancelOrders.js b/examples/apidoc/RestClientV2/marginBatchCancelOrders.js new file mode 100644 index 0000000..88d59c0 --- /dev/null +++ b/examples/apidoc/RestClientV2/marginBatchCancelOrders.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/margin/${marginType}/batch-cancel-order + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1081 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.marginBatchCancelOrders(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/marginBatchSubmitOrders.js b/examples/apidoc/RestClientV2/marginBatchSubmitOrders.js new file mode 100644 index 0000000..afb32fe --- /dev/null +++ b/examples/apidoc/RestClientV2/marginBatchSubmitOrders.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/margin/${marginType}/batch-place-order + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1059 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.marginBatchSubmitOrders(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/marginBorrow.js b/examples/apidoc/RestClientV2/marginBorrow.js new file mode 100644 index 0000000..f292223 --- /dev/null +++ b/examples/apidoc/RestClientV2/marginBorrow.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/margin/${marginType}/account/borrow + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L955 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.marginBorrow(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/marginCancelOrder.js b/examples/apidoc/RestClientV2/marginCancelOrder.js new file mode 100644 index 0000000..81dfd68 --- /dev/null +++ b/examples/apidoc/RestClientV2/marginCancelOrder.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/margin/${marginType}/cancel-order + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1070 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.marginCancelOrder(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/marginFlashRepay.js b/examples/apidoc/RestClientV2/marginFlashRepay.js new file mode 100644 index 0000000..587e1ac --- /dev/null +++ b/examples/apidoc/RestClientV2/marginFlashRepay.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/margin/${marginType}/account/flash-repay + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1023 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.marginFlashRepay(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/marginRepay.js b/examples/apidoc/RestClientV2/marginRepay.js new file mode 100644 index 0000000..7ea8ed0 --- /dev/null +++ b/examples/apidoc/RestClientV2/marginRepay.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/margin/${marginType}/account/repay + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L966 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.marginRepay(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/marginSubmitOrder.js b/examples/apidoc/RestClientV2/marginSubmitOrder.js new file mode 100644 index 0000000..e12412f --- /dev/null +++ b/examples/apidoc/RestClientV2/marginSubmitOrder.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/margin/${marginType}/place-order + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1051 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.marginSubmitOrder(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/modifyFuturesTraderOrderTPSL.js b/examples/apidoc/RestClientV2/modifyFuturesTraderOrderTPSL.js new file mode 100644 index 0000000..dad9425 --- /dev/null +++ b/examples/apidoc/RestClientV2/modifyFuturesTraderOrderTPSL.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/mix-trader/order-modify-tpsl + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1160 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.modifyFuturesTraderOrderTPSL(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/modifySpotTraderOrderTPSL.js b/examples/apidoc/RestClientV2/modifySpotTraderOrderTPSL.js new file mode 100644 index 0000000..683b269 --- /dev/null +++ b/examples/apidoc/RestClientV2/modifySpotTraderOrderTPSL.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/spot-trader/order-modify-tpsl + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1346 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.modifySpotTraderOrderTPSL(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/modifySubaccount.js b/examples/apidoc/RestClientV2/modifySubaccount.js new file mode 100644 index 0000000..758072f --- /dev/null +++ b/examples/apidoc/RestClientV2/modifySubaccount.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/broker/account/modify-subaccount + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L781 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.modifySubaccount(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/modifySubaccountApiKey.js b/examples/apidoc/RestClientV2/modifySubaccountApiKey.js new file mode 100644 index 0000000..314a70a --- /dev/null +++ b/examples/apidoc/RestClientV2/modifySubaccountApiKey.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/broker/manage/modify-subaccount-apikey + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L852 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.modifySubaccountApiKey(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/modifySubaccountEmail.js b/examples/apidoc/RestClientV2/modifySubaccountEmail.js new file mode 100644 index 0000000..854bdca --- /dev/null +++ b/examples/apidoc/RestClientV2/modifySubaccountEmail.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/broker/account/modify-subaccount-email + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L762 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.modifySubaccountEmail(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/modifyVirtualSubaccount.js b/examples/apidoc/RestClientV2/modifyVirtualSubaccount.js new file mode 100644 index 0000000..945f47e --- /dev/null +++ b/examples/apidoc/RestClientV2/modifyVirtualSubaccount.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/user/modify-virtual-subaccount + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L167 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.modifyVirtualSubaccount(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/modifyVirtualSubaccountAPIKey.js b/examples/apidoc/RestClientV2/modifyVirtualSubaccountAPIKey.js new file mode 100644 index 0000000..c9488a9 --- /dev/null +++ b/examples/apidoc/RestClientV2/modifyVirtualSubaccountAPIKey.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/user/modify-virtual-subaccount-apikey + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L191 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.modifyVirtualSubaccountAPIKey(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/removeFuturesTraderFollower.js b/examples/apidoc/RestClientV2/removeFuturesTraderFollower.js new file mode 100644 index 0000000..5efe7f2 --- /dev/null +++ b/examples/apidoc/RestClientV2/removeFuturesTraderFollower.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/mix-trader/config-remove-follower + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1230 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.removeFuturesTraderFollower(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/removeSpotTraderFollowers.js b/examples/apidoc/RestClientV2/removeSpotTraderFollowers.js new file mode 100644 index 0000000..c30361a --- /dev/null +++ b/examples/apidoc/RestClientV2/removeSpotTraderFollowers.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/spot-trader/config-remove-follower + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1381 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.removeSpotTraderFollowers(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/repayLoan.js b/examples/apidoc/RestClientV2/repayLoan.js new file mode 100644 index 0000000..dbc52f7 --- /dev/null +++ b/examples/apidoc/RestClientV2/repayLoan.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/earn/loan/repay + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1573 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.repayLoan(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/sellSpotFollower.js b/examples/apidoc/RestClientV2/sellSpotFollower.js new file mode 100644 index 0000000..51fea8a --- /dev/null +++ b/examples/apidoc/RestClientV2/sellSpotFollower.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/spot-follower/order-close-tracking + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1450 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.sellSpotFollower(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/sellSpotTrader.js b/examples/apidoc/RestClientV2/sellSpotTrader.js new file mode 100644 index 0000000..7fd1d36 --- /dev/null +++ b/examples/apidoc/RestClientV2/sellSpotTrader.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/spot-trader/order-close-tracking + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1367 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.sellSpotTrader(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/setFuturesLeverage.js b/examples/apidoc/RestClientV2/setFuturesLeverage.js new file mode 100644 index 0000000..c2981d6 --- /dev/null +++ b/examples/apidoc/RestClientV2/setFuturesLeverage.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/account/set-leverage + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L604 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.setFuturesLeverage(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/setFuturesMarginMode.js b/examples/apidoc/RestClientV2/setFuturesMarginMode.js new file mode 100644 index 0000000..219a5df --- /dev/null +++ b/examples/apidoc/RestClientV2/setFuturesMarginMode.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/account/set-margin-mode + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L616 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.setFuturesMarginMode(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/setFuturesPositionAutoMargin.js b/examples/apidoc/RestClientV2/setFuturesPositionAutoMargin.js new file mode 100644 index 0000000..f7d1b4c --- /dev/null +++ b/examples/apidoc/RestClientV2/setFuturesPositionAutoMargin.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/account/set-auto-margin + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L608 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.setFuturesPositionAutoMargin(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/setFuturesPositionMargin.js b/examples/apidoc/RestClientV2/setFuturesPositionMargin.js new file mode 100644 index 0000000..dd76eec --- /dev/null +++ b/examples/apidoc/RestClientV2/setFuturesPositionMargin.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/account/set-margin + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L612 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.setFuturesPositionMargin(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/setFuturesPositionMode.js b/examples/apidoc/RestClientV2/setFuturesPositionMode.js new file mode 100644 index 0000000..a57dc80 --- /dev/null +++ b/examples/apidoc/RestClientV2/setFuturesPositionMode.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/mix/account/set-position-mode + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L620 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.setFuturesPositionMode(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/spotBatchCancelOrders.js b/examples/apidoc/RestClientV2/spotBatchCancelOrders.js new file mode 100644 index 0000000..941789c --- /dev/null +++ b/examples/apidoc/RestClientV2/spotBatchCancelOrders.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/trade/batch-cancel-order + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L335 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.spotBatchCancelOrders(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/spotBatchSubmitOrders.js b/examples/apidoc/RestClientV2/spotBatchSubmitOrders.js new file mode 100644 index 0000000..bae71c0 --- /dev/null +++ b/examples/apidoc/RestClientV2/spotBatchSubmitOrders.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/trade/batch-orders + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L331 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.spotBatchSubmitOrders(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/spotCancelOrder.js b/examples/apidoc/RestClientV2/spotCancelOrder.js new file mode 100644 index 0000000..6e9a3cf --- /dev/null +++ b/examples/apidoc/RestClientV2/spotCancelOrder.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/trade/cancel-order + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L327 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.spotCancelOrder(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/spotCancelPlanOrder.js b/examples/apidoc/RestClientV2/spotCancelPlanOrder.js new file mode 100644 index 0000000..526236c --- /dev/null +++ b/examples/apidoc/RestClientV2/spotCancelPlanOrder.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/trade/cancel-plan-order + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L373 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.spotCancelPlanOrder(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/spotCancelPlanOrders.js b/examples/apidoc/RestClientV2/spotCancelPlanOrders.js new file mode 100644 index 0000000..b807035 --- /dev/null +++ b/examples/apidoc/RestClientV2/spotCancelPlanOrders.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/trade/batch-cancel-plan-order + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L389 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.spotCancelPlanOrders(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/spotCancelSymbolOrder.js b/examples/apidoc/RestClientV2/spotCancelSymbolOrder.js new file mode 100644 index 0000000..70ec7e2 --- /dev/null +++ b/examples/apidoc/RestClientV2/spotCancelSymbolOrder.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/trade/cancel-symbol-order + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L339 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.spotCancelSymbolOrder(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/spotCancelWithdrawal.js b/examples/apidoc/RestClientV2/spotCancelWithdrawal.js new file mode 100644 index 0000000..20b74a8 --- /dev/null +++ b/examples/apidoc/RestClientV2/spotCancelWithdrawal.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/wallet/cancel-withdrawal + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L476 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.spotCancelWithdrawal(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/spotModifyDepositAccount.js b/examples/apidoc/RestClientV2/spotModifyDepositAccount.js new file mode 100644 index 0000000..80af29e --- /dev/null +++ b/examples/apidoc/RestClientV2/spotModifyDepositAccount.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/wallet/modify-deposit-account + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L414 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.spotModifyDepositAccount(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/spotModifyPlanOrder.js b/examples/apidoc/RestClientV2/spotModifyPlanOrder.js new file mode 100644 index 0000000..1d48c59 --- /dev/null +++ b/examples/apidoc/RestClientV2/spotModifyPlanOrder.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/trade/modify-plan-order + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L369 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.spotModifyPlanOrder(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/spotSubTransfer.js b/examples/apidoc/RestClientV2/spotSubTransfer.js new file mode 100644 index 0000000..44d3ef6 --- /dev/null +++ b/examples/apidoc/RestClientV2/spotSubTransfer.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/wallet/subaccount-transfer + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L441 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.spotSubTransfer(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/spotSubmitOrder.js b/examples/apidoc/RestClientV2/spotSubmitOrder.js new file mode 100644 index 0000000..5e60c3d --- /dev/null +++ b/examples/apidoc/RestClientV2/spotSubmitOrder.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/trade/place-order + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L323 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.spotSubmitOrder(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/spotSubmitPlanOrder.js b/examples/apidoc/RestClientV2/spotSubmitPlanOrder.js new file mode 100644 index 0000000..d8dca90 --- /dev/null +++ b/examples/apidoc/RestClientV2/spotSubmitPlanOrder.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/trade/place-plan-order + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L365 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.spotSubmitPlanOrder(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/spotSwitchBGBDeduct.js b/examples/apidoc/RestClientV2/spotSwitchBGBDeduct.js new file mode 100644 index 0000000..50e44e9 --- /dev/null +++ b/examples/apidoc/RestClientV2/spotSwitchBGBDeduct.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/account/switch-deduct + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L449 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.spotSwitchBGBDeduct(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/spotTransfer.js b/examples/apidoc/RestClientV2/spotTransfer.js new file mode 100644 index 0000000..5a18f51 --- /dev/null +++ b/examples/apidoc/RestClientV2/spotTransfer.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/wallet/transfer + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L433 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.spotTransfer(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/spotWithdraw.js b/examples/apidoc/RestClientV2/spotWithdraw.js new file mode 100644 index 0000000..491f4a3 --- /dev/null +++ b/examples/apidoc/RestClientV2/spotWithdraw.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/spot/wallet/withdrawal + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L453 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.spotWithdraw(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/subaccountDepositRecords.js b/examples/apidoc/RestClientV2/subaccountDepositRecords.js new file mode 100644 index 0000000..77aaddf --- /dev/null +++ b/examples/apidoc/RestClientV2/subaccountDepositRecords.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/broker/subaccount-deposit + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L824 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.subaccountDepositRecords(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/subaccountSetAutoTransfer.js b/examples/apidoc/RestClientV2/subaccountSetAutoTransfer.js new file mode 100644 index 0000000..62b1bc2 --- /dev/null +++ b/examples/apidoc/RestClientV2/subaccountSetAutoTransfer.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/broker/account/set-subaccount-autotransfer + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L817 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.subaccountSetAutoTransfer(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/subaccountWithdrawal.js b/examples/apidoc/RestClientV2/subaccountWithdrawal.js new file mode 100644 index 0000000..af8595b --- /dev/null +++ b/examples/apidoc/RestClientV2/subaccountWithdrawal.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/broker/account/subaccount-withdrawal + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L810 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.subaccountWithdrawal(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/subaccountWithdrawalRecords.js b/examples/apidoc/RestClientV2/subaccountWithdrawalRecords.js new file mode 100644 index 0000000..1cd49b0 --- /dev/null +++ b/examples/apidoc/RestClientV2/subaccountWithdrawalRecords.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/broker/subaccount-withdrawal + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L828 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.subaccountWithdrawalRecords(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/subscribeSharkfin.js b/examples/apidoc/RestClientV2/subscribeSharkfin.js new file mode 100644 index 0000000..713ecdb --- /dev/null +++ b/examples/apidoc/RestClientV2/subscribeSharkfin.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/earn/sharkfin/subscribe + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1541 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.subscribeSharkfin(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/unfollowFuturesTrader.js b/examples/apidoc/RestClientV2/unfollowFuturesTrader.js new file mode 100644 index 0000000..edae2be --- /dev/null +++ b/examples/apidoc/RestClientV2/unfollowFuturesTrader.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/mix-follower/cancel-trader + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1289 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.unfollowFuturesTrader(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/unfollowSpotTrader.js b/examples/apidoc/RestClientV2/unfollowSpotTrader.js new file mode 100644 index 0000000..e510ab8 --- /dev/null +++ b/examples/apidoc/RestClientV2/unfollowSpotTrader.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/spot-follower/cancel-trader + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1457 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.unfollowSpotTrader(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/updateFuturesFollowerSettings.js b/examples/apidoc/RestClientV2/updateFuturesFollowerSettings.js new file mode 100644 index 0000000..28cb8ca --- /dev/null +++ b/examples/apidoc/RestClientV2/updateFuturesFollowerSettings.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/mix-follower/settings + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1263 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.updateFuturesFollowerSettings(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/updateFuturesFollowerTPSL.js b/examples/apidoc/RestClientV2/updateFuturesFollowerTPSL.js new file mode 100644 index 0000000..9f601cc --- /dev/null +++ b/examples/apidoc/RestClientV2/updateFuturesFollowerTPSL.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/mix-follower/setting-tpsl + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1259 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.updateFuturesFollowerTPSL(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/updateFuturesTraderGlobalSettings.js b/examples/apidoc/RestClientV2/updateFuturesTraderGlobalSettings.js new file mode 100644 index 0000000..49a20fb --- /dev/null +++ b/examples/apidoc/RestClientV2/updateFuturesTraderGlobalSettings.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/mix-trader/config-settings-base + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1216 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.updateFuturesTraderGlobalSettings(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/updateFuturesTraderSymbolSettings.js b/examples/apidoc/RestClientV2/updateFuturesTraderSymbolSettings.js new file mode 100644 index 0000000..aa24bd2 --- /dev/null +++ b/examples/apidoc/RestClientV2/updateFuturesTraderSymbolSettings.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/mix-trader/config-setting-symbols + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1209 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.updateFuturesTraderSymbolSettings(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/updateLoanPledgeRate.js b/examples/apidoc/RestClientV2/updateLoanPledgeRate.js new file mode 100644 index 0000000..7c32e8d --- /dev/null +++ b/examples/apidoc/RestClientV2/updateLoanPledgeRate.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/earn/loan/revise-pledge + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1581 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.updateLoanPledgeRate(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/updateSpotFollowerSettings.js b/examples/apidoc/RestClientV2/updateSpotFollowerSettings.js new file mode 100644 index 0000000..568e72a --- /dev/null +++ b/examples/apidoc/RestClientV2/updateSpotFollowerSettings.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/spot-follower/settings + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1411 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.updateSpotFollowerSettings(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV2/updateSpotFollowerTPSL.js b/examples/apidoc/RestClientV2/updateSpotFollowerTPSL.js new file mode 100644 index 0000000..e5272c4 --- /dev/null +++ b/examples/apidoc/RestClientV2/updateSpotFollowerTPSL.js @@ -0,0 +1,19 @@ +const { RestClientV2 } = require('bitget-api'); + + // ENDPOINT: /api/v2/copy/spot-follower/setting-tpsl + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L1415 + +const client = new RestClientV2({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.updateSpotFollowerTPSL(params) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + });