diff --git a/README.md b/README.md index 8b73c76..4e56018 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ npm install okx-api - Issues? Check the [issues tab](https://github.com/tiagosiebler/okx-api/issues). - Discuss & collaborate with other node devs? Join our [Node.js Algo Traders](https://t.me/nodetraders) engineering community on telegram. +- Follow our announcement channel for real-time updates on [X/Twitter](https://x.com/QuantSDKs) diff --git a/docs/endpointFunctionList.md b/docs/endpointFunctionList.md index e95279f..6e0f8d5 100644 --- a/docs/endpointFunctionList.md +++ b/docs/endpointFunctionList.md @@ -48,342 +48,344 @@ This table includes all endpoints from the official Exchange API docs and corres | Function | AUTH | HTTP Method | Endpoint | | -------- | :------: | :------: | -------- | -| [getAccountInstruments()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L295) | :closed_lock_with_key: | GET | `/api/v5/account/instruments` | -| [getBalance()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L301) | :closed_lock_with_key: | GET | `/api/v5/account/balance` | -| [getPositions()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L305) | :closed_lock_with_key: | GET | `/api/v5/account/positions` | -| [getPositionsHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L309) | :closed_lock_with_key: | GET | `/api/v5/account/positions-history` | -| [getAccountPositionRisk()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L315) | :closed_lock_with_key: | GET | `/api/v5/account/account-position-risk` | -| [getBills()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L324) | :closed_lock_with_key: | GET | `/api/v5/account/bills` | -| [getBillsArchive()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L329) | :closed_lock_with_key: | GET | `/api/v5/account/bills-archive` | -| [requestBillsHistoryDownloadLink()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L342) | :closed_lock_with_key: | POST | `/api/v5/account/bills-history-archive` | -| [getRequestedBillsHistoryLink()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L352) | :closed_lock_with_key: | GET | `/api/v5/account/bills-history-archive` | -| [getAccountConfiguration()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L359) | :closed_lock_with_key: | GET | `/api/v5/account/config` | -| [setPositionMode()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L363) | :closed_lock_with_key: | POST | `/api/v5/account/set-position-mode` | -| [setLeverage()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L367) | :closed_lock_with_key: | POST | `/api/v5/account/set-leverage` | -| [getMaxBuySellAmount()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L372) | :closed_lock_with_key: | GET | `/api/v5/account/max-size` | -| [getMaxAvailableTradableAmount()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L383) | :closed_lock_with_key: | GET | `/api/v5/account/max-avail-size` | -| [changePositionMargin()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L393) | :closed_lock_with_key: | POST | `/api/v5/account/position/margin-balance` | -| [getLeverage()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L402) | :closed_lock_with_key: | GET | `/api/v5/account/leverage-info` | -| [getLeverageV2()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L409) | :closed_lock_with_key: | GET | `/api/v5/account/leverage-info` | -| [getLeverageEstimatedInfo()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L417) | :closed_lock_with_key: | GET | `/api/v5/account/adjust-leverage-info` | -| [getMaxLoan()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L428) | :closed_lock_with_key: | GET | `/api/v5/account/max-loan` | -| [getFeeRates()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L444) | :closed_lock_with_key: | GET | `/api/v5/account/trade-fee` | -| [getFeeRatesV2()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L460) | :closed_lock_with_key: | GET | `/api/v5/account/trade-fee` | -| [getInterestAccrued()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L470) | :closed_lock_with_key: | GET | `/api/v5/account/interest-accrued` | -| [getInterestRate()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L482) | :closed_lock_with_key: | GET | `/api/v5/account/interest-rate` | -| [setGreeksDisplayType()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L486) | :closed_lock_with_key: | POST | `/api/v5/account/set-greeks` | -| [setIsolatedMode()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L490) | :closed_lock_with_key: | POST | `/api/v5/account/set-isolated-mode` | -| [getMaxWithdrawals()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L500) | :closed_lock_with_key: | GET | `/api/v5/account/max-withdrawal` | -| [getAccountRiskState()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L504) | :closed_lock_with_key: | GET | `/api/v5/account/risk-state` | -| [submitQuickMarginBorrowRepay()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L508) | :closed_lock_with_key: | POST | `/api/v5/account/quick-margin-borrow-repay` | -| [getQuickMarginBorrowRepayHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L517) | :closed_lock_with_key: | GET | `/api/v5/account/quick-margin-borrow-repay-history` | -| [borrowRepayVIPLoan()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L526) | :closed_lock_with_key: | POST | `/api/v5/account/borrow-repay` | -| [getVIPLoanBorrowRepayHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L540) | :closed_lock_with_key: | GET | `/api/v5/account/borrow-repay-history` | -| [getVIPInterestAccrued()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L544) | :closed_lock_with_key: | GET | `/api/v5/account/vip-interest-accrued` | -| [getVIPInterestDeducted()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L548) | :closed_lock_with_key: | GET | `/api/v5/account/vip-interest-deducted` | -| [getVIPLoanOrders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L554) | :closed_lock_with_key: | GET | `/api/v5/account/vip-loan-order-list` | -| [getVIPLoanOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L560) | :closed_lock_with_key: | GET | `/api/v5/account/vip-loan-order-detail` | -| [getBorrowInterestLimits()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L566) | :closed_lock_with_key: | GET | `/api/v5/account/interest-limits` | -| [getFixedLoanBorrowLimit()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L573) | :closed_lock_with_key: | GET | `/api/v5/account/fixed-loan/borrowing-limit` | -| [getFixedLoanBorrowQuote()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L577) | :closed_lock_with_key: | GET | `/api/v5/account/fixed-loan/borrowing-quote` | -| [submitFixedLoanBorrowOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L586) | :closed_lock_with_key: | POST | `/api/v5/account/fixed-loan/borrowing-order` | -| [updateFixedLoanBorrowOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L599) | :closed_lock_with_key: | POST | `/api/v5/account/fixed-loan/amend-borrowing-order` | -| [manualRenewFixedLoanBorrowOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L612) | :closed_lock_with_key: | POST | `/api/v5/account/fixed-loan/manual-reborrow` | -| [repayFixedLoanBorrowOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L626) | :closed_lock_with_key: | POST | `/api/v5/account/fixed-loan/repay-borrowing-order` | -| [getFixedLoanBorrowOrders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L637) | :closed_lock_with_key: | GET | `/api/v5/account/fixed-loan/borrowing-orders-list` | -| [manualBorrowRepay()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L646) | :closed_lock_with_key: | POST | `/api/v5/account/spot-manual-borrow-repay` | -| [setAutoRepay()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L660) | :closed_lock_with_key: | POST | `/api/v5/account/set-auto-repay` | -| [getBorrowRepayHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L668) | :closed_lock_with_key: | GET | `/api/v5/account/spot-borrow-repay-history` | -| [positionBuilder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L673) | :closed_lock_with_key: | POST | `/api/v5/account/position-builder` | -| [updateRiskOffsetAmount()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L677) | :closed_lock_with_key: | POST | `/api/v5/account/set-riskOffset-amt` | -| [getGreeks()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L689) | :closed_lock_with_key: | GET | `/api/v5/account/greeks` | -| [getPMLimitation()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L693) | :closed_lock_with_key: | GET | `/api/v5/account/position-tiers` | -| [updateRiskOffsetType()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L701) | :closed_lock_with_key: | POST | `/api/v5/account/set-riskOffset-type` | -| [activateOption()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L709) | :closed_lock_with_key: | POST | `/api/v5/account/activate-option` | -| [setAutoLoan()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L717) | :closed_lock_with_key: | POST | `/api/v5/account/set-auto-loan` | -| [setAccountMode()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L721) | :closed_lock_with_key: | POST | `/api/v5/account/set-account-level` | -| [resetMMPStatus()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L727) | :closed_lock_with_key: | POST | `/api/v5/account/mmp-reset` | -| [setMMPConfig()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L735) | :closed_lock_with_key: | POST | `/api/v5/account/mmp-config` | -| [getMMPConfig()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L739) | :closed_lock_with_key: | GET | `/api/v5/account/mmp-config` | -| [submitOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L749) | :closed_lock_with_key: | POST | `/api/v5/trade/order` | -| [submitMultipleOrders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L753) | :closed_lock_with_key: | POST | `/api/v5/trade/batch-orders` | -| [cancelOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L757) | :closed_lock_with_key: | POST | `/api/v5/trade/cancel-order` | -| [cancelMultipleOrders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L761) | :closed_lock_with_key: | POST | `/api/v5/trade/cancel-batch-orders` | -| [amendOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L767) | :closed_lock_with_key: | POST | `/api/v5/trade/amend-order` | -| [amendMultipleOrders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L771) | :closed_lock_with_key: | POST | `/api/v5/trade/amend-batch-orders` | -| [closePositions()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L775) | :closed_lock_with_key: | POST | `/api/v5/trade/close-position` | -| [getOrderDetails()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L779) | :closed_lock_with_key: | GET | `/api/v5/trade/order` | -| [getOrderList()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L783) | :closed_lock_with_key: | GET | `/api/v5/trade/orders-pending` | -| [getOrderHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L790) | :closed_lock_with_key: | GET | `/api/v5/trade/orders-history` | -| [getOrderHistoryArchive()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L797) | :closed_lock_with_key: | GET | `/api/v5/trade/orders-history-archive` | -| [getFills()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L806) | :closed_lock_with_key: | GET | `/api/v5/trade/fills` | -| [getFillsHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L813) | :closed_lock_with_key: | GET | `/api/v5/trade/fills-history` | -| [applyTransactionDetailsArchive()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L820) | :closed_lock_with_key: | POST | `/api/v5/trade/fills-archive` | -| [getTransactionDetailsArchiveLink()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L835) | :closed_lock_with_key: | GET | `/api/v5/trade/fills-archive` | -| [getEasyConvertCurrencies()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L843) | :closed_lock_with_key: | GET | `/api/v5/trade/easy-convert-currency-list` | -| [submitEasyConvert()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L854) | :closed_lock_with_key: | POST | `/api/v5/trade/easy-convert` | -| [getEasyConvertHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L865) | :closed_lock_with_key: | GET | `/api/v5/trade/easy-convert-history` | -| [getOneClickRepayCurrencyList()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L873) | :closed_lock_with_key: | GET | `/api/v5/trade/one-click-repay-currency-list` | -| [submitOneClickRepay()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L886) | :closed_lock_with_key: | POST | `/api/v5/trade/one-click-repay` | -| [getOneClickRepayHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L897) | :closed_lock_with_key: | GET | `/api/v5/trade/one-click-repay-history` | -| [cancelMassOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L901) | :closed_lock_with_key: | POST | `/api/v5/trade/mass-cancel` | -| [cancelAllAfter()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L909) | :closed_lock_with_key: | POST | `/api/v5/trade/cancel-all-after` | -| [getAccountRateLimit()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L916) | :closed_lock_with_key: | GET | `/api/v5/trade/account-rate-limit` | -| [submitOrderPrecheck()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L920) | :closed_lock_with_key: | POST | `/api/v5/trade/order-precheck` | -| [placeAlgoOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L930) | :closed_lock_with_key: | POST | `/api/v5/trade/order-algo` | -| [cancelAlgoOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L934) | :closed_lock_with_key: | POST | `/api/v5/trade/cancel-algos` | -| [amendAlgoOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L940) | :closed_lock_with_key: | POST | `/api/v5/trade/amend-algos` | -| [cancelAdvanceAlgoOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L946) | :closed_lock_with_key: | POST | `/api/v5/trade/cancel-advance-algos` | -| [getAlgoOrderDetails()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L952) | :closed_lock_with_key: | GET | `/api/v5/trade/order-algo` | -| [getAlgoOrderList()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L958) | :closed_lock_with_key: | GET | `/api/v5/trade/orders-algo-pending` | -| [getAlgoOrderHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L964) | :closed_lock_with_key: | GET | `/api/v5/trade/orders-algo-history` | -| [placeGridAlgoOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L976) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/grid/order-algo` | -| [amendGridAlgoOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L980) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/grid/amend-order-algo` | -| [stopGridAlgoOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L992) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/grid/stop-order-algo` | -| [closeGridContractPosition()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L996) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/grid/close-position` | -| [cancelGridContractCloseOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1002) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/grid/cancel-close-order` | -| [instantTriggerGridAlgoOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1012) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/grid/order-instant-trigger` | -| [getGridAlgoOrderList()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1024) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/grid/orders-algo-pending` | -| [getGridAlgoOrderHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1031) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/grid/orders-algo-history` | -| [getGridAlgoOrderDetails()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1038) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/grid/orders-algo-details` | -| [getGridAlgoSubOrders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1048) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/grid/sub-orders` | -| [getGridAlgoOrderPositions()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1069) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/grid/positions` | -| [spotGridWithdrawIncome()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1079) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/grid/withdraw-income` | -| [computeGridMarginBalance()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1085) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/grid/compute-margin-balance` | -| [adjustGridMarginBalance()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1097) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/grid/margin-balance` | -| [adjustGridInvestment()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1109) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/grid/adjust-investment` | -| [getGridAIParameter()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1120) | | GET | `/api/v5/tradingBot/grid/ai-param` | -| [computeGridMinInvestment()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1134) | | POST | `/api/v5/tradingBot/grid/min-investment` | -| [getRSIBackTesting()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1141) | | GET | `/api/v5/tradingBot/public/rsi-back-testing` | -| [getMaxGridQuantity()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1149) | | GET | `/api/v5/tradingBot/grid/grid-quantity` | -| [createSignal()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1163) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/signal/create-signal` | -| [getSignals()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1167) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/signal/signals` | -| [createSignalBot()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1171) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/signal/order-algo` | -| [cancelSignalBots()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1177) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/signal/stop-order-algo` | -| [updateSignalMargin()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1186) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/signal/margin-balance` | -| [updateSignalTPSL()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1194) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/signal/amendTPSL` | -| [setSignalInstruments()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1202) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/signal/set-instruments` | -| [getSignalBotOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1213) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/signal/orders-algo-details` | -| [getActiveSignalBot()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1223) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/signal/orders-algo-details` | -| [getSignalBotHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1230) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/signal/orders-algo-history` | -| [getSignalBotPositions()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1237) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/signal/positions` | -| [getSignalBotPositionHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1244) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/signal/positions-history` | -| [closeSignalBotPosition()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1253) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/signal/close-position` | -| [placeSignalBotSubOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1261) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/signal/sub-order` | -| [cancelSubOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1265) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/signal/cancel-sub-order` | -| [getSignalBotSubOrders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1272) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/signal/sub-orders` | -| [getSignalBotEventHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1276) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/signal/event-history` | -| [submitRecurringBuyOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1288) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/recurring/order-algo` | -| [amendRecurringBuyOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1294) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/recurring/amend-order-algo` | -| [stopRecurringBuyOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1303) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/recurring/stop-order-algo` | -| [getRecurringBuyOrders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1312) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/recurring/orders-algo-pending` | -| [getRecurringBuyOrderHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1321) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/recurring/orders-algo-history` | -| [getRecurringBuyOrderDetails()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1330) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/recurring/orders-algo-details` | -| [getRecurringBuySubOrders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1339) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/recurring/sub-orders` | -| [getCopytradingSubpositions()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1351) | :closed_lock_with_key: | GET | `/api/v5/copytrading/current-subpositions` | -| [getCopytradingSubpositionsHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1357) | :closed_lock_with_key: | GET | `/api/v5/copytrading/subpositions-history` | -| [submitCopytradingAlgoOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1363) | :closed_lock_with_key: | POST | `/api/v5/copytrading/algo-order` | -| [closeCopytradingSubposition()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1369) | :closed_lock_with_key: | POST | `/api/v5/copytrading/close-subposition` | -| [getCopytradingInstruments()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1378) | :closed_lock_with_key: | GET | `/api/v5/copytrading/instruments` | -| [setCopytradingInstruments()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1387) | :closed_lock_with_key: | POST | `/api/v5/copytrading/set-instruments` | -| [getCopytradingProfitDetails()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1399) | :closed_lock_with_key: | GET | `/api/v5/copytrading/profit-sharing-details` | -| [getCopytradingTotalProfit()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1408) | :closed_lock_with_key: | GET | `/api/v5/copytrading/total-profit-sharing` | -| [getCopytradingUnrealizedProfit()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1414) | :closed_lock_with_key: | GET | `/api/v5/copytrading/unrealized-profit-sharing-details` | -| [getCopytradingTotalUnrealizedProfit()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1423) | :closed_lock_with_key: | GET | `/api/v5/copytrading/total-unrealized-profit-sharing` | -| [applyCopytradingLeadTrading()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1435) | :closed_lock_with_key: | POST | `/api/v5/copytrading/apply-lead-trading` | -| [stopCopytradingLeadTrading()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1446) | :closed_lock_with_key: | POST | `/api/v5/copytrading/stop-lead-trading` | -| [updateCopytradingProfitSharing()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1454) | :closed_lock_with_key: | POST | `/api/v5/copytrading/amend-profit-sharing-ratio` | -| [getCopytradingAccount()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1468) | :closed_lock_with_key: | GET | `/api/v5/copytrading/config` | -| [setCopytradingFirstCopy()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1472) | :closed_lock_with_key: | POST | `/api/v5/copytrading/first-copy-settings` | -| [updateCopytradingCopySettings()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1480) | :closed_lock_with_key: | POST | `/api/v5/copytrading/amend-copy-settings` | -| [stopCopytradingCopy()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1488) | :closed_lock_with_key: | POST | `/api/v5/copytrading/stop-copy-trading` | -| [getCopytradingCopySettings()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1500) | :closed_lock_with_key: | GET | `/api/v5/copytrading/copy-settings` | -| [getCopytradingBatchLeverageInfo()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1507) | :closed_lock_with_key: | GET | `/api/v5/copytrading/batch-leverage-info` | -| [setCopytradingBatchLeverage()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1513) | :closed_lock_with_key: | POST | `/api/v5/copytrading/batch-set-leverage` | -| [getCopytradingMyLeadTraders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1519) | :closed_lock_with_key: | GET | `/api/v5/copytrading/current-lead-traders` | -| [getCopytradingLeadTradersHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1525) | :closed_lock_with_key: | GET | `/api/v5/copytrading/lead-traders-history` | -| [getCopytradingConfig()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1531) | | GET | `/api/v5/copytrading/public-config` | -| [getCopytradingLeadRanks()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1537) | | GET | `/api/v5/copytrading/public-lead-traders` | -| [getCopytradingLeadWeeklyPnl()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1543) | | GET | `/api/v5/copytrading/public-weekly-pnl` | -| [getCopytradingLeadDailyPnl()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1550) | | GET | `/api/v5/copytrading/public-pnl` | -| [getCopytradingLeadStats()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1556) | | GET | `/api/v5/copytrading/public-stats` | -| [getCopytradingLeadPreferences()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1562) | | GET | `/api/v5/copytrading/public-preference-currency` | -| [getCopytradingLeadOpenPositions()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1569) | | GET | `/api/v5/copytrading/public-current-subpositions` | -| [getCopytradingLeadPositionHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1575) | | GET | `/api/v5/copytrading/public-subpositions-history` | -| [getCopyTraders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1581) | | GET | `/api/v5/copytrading/public-copy-traders` | -| [getCopytradingLeadPrivateRanks()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1587) | :closed_lock_with_key: | GET | `/api/v5/copytrading/lead-traders` | -| [getCopytradingLeadPrivateWeeklyPnl()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1593) | :closed_lock_with_key: | GET | `/api/v5/copytrading/weekly-pnl` | -| [getCopytradingPLeadPrivateDailyPnl()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1600) | :closed_lock_with_key: | GET | `/api/v5/copytrading/pnl` | -| [geCopytradingLeadPrivateStats()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1606) | :closed_lock_with_key: | GET | `/api/v5/copytrading/stats` | -| [getCopytradingLeadPrivatePreferences()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1612) | :closed_lock_with_key: | GET | `/api/v5/copytrading/preference-currency` | -| [getCopytradingLeadPrivateOpenPositions()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1619) | :closed_lock_with_key: | GET | `/api/v5/copytrading/performance-current-subpositions` | -| [getCopytradingLeadPrivatePositionHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1628) | :closed_lock_with_key: | GET | `/api/v5/copytrading/performance-subpositions-history` | -| [getCopyTradersPrivate()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1637) | :closed_lock_with_key: | GET | `/api/v5/copytrading/copy-traders` | -| [getTickers()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1649) | | GET | `/api/v5/market/tickers` | -| [getTicker()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1656) | | GET | `/api/v5/market/ticker` | -| [getOrderBook()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1662) | | GET | `/api/v5/market/books` | -| [getFullOrderBook()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1666) | | GET | `/api/v5/market/books-full` | -| [getCandles()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1681) | | GET | `/api/v5/market/candles` | -| [getCandlesV2()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1693) | | GET | `/api/v5/market/candles` | -| [getHistoricCandles()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1705) | | GET | `/api/v5/market/history-candles` | -| [getHistoricCandlesV2()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1717) | | GET | `/api/v5/market/history-candles` | -| [getTrades()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1721) | | GET | `/api/v5/market/trades` | -| [getHistoricTrades()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1725) | | GET | `/api/v5/market/history-trades` | -| [getOptionTradesByInstrument()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1737) | | GET | `/api/v5/market/option/instrument-family-trades` | -| [getOptionTrades()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1743) | | GET | `/api/v5/public/option-trades` | -| [get24hrTotalVolume()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1747) | | GET | `/api/v5/market/platform-24-volume` | -| [getBlockCounterParties()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1757) | :closed_lock_with_key: | GET | `/api/v5/rfq/counterparties` | -| [createBlockRFQ()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1761) | :closed_lock_with_key: | POST | `/api/v5/rfq/create-rfq` | -| [cancelBlockRFQ()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1765) | :closed_lock_with_key: | POST | `/api/v5/rfq/cancel-rfq` | -| [cancelMultipleBlockRFQs()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1771) | :closed_lock_with_key: | POST | `/api/v5/rfq/cancel-batch-rfqs` | -| [cancelAllRFQs()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1777) | :closed_lock_with_key: | POST | `/api/v5/rfq/cancel-all-rfqs` | -| [executeBlockQuote()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1781) | :closed_lock_with_key: | POST | `/api/v5/rfq/execute-quote` | -| [getQuoteProducts()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1787) | :closed_lock_with_key: | GET | `/api/v5/rfq/maker-instrument-settings` | -| [updateBlockQuoteProducts()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1791) | :closed_lock_with_key: | POST | `/api/v5/rfq/maker-instrument-settings` | -| [resetBlockMmp()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1799) | :closed_lock_with_key: | POST | `/api/v5/rfq/mmp-reset` | -| [updateBlockMmpConfig()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1807) | :closed_lock_with_key: | POST | `/api/v5/rfq/mmp-config` | -| [getBlockMmpConfig()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1813) | :closed_lock_with_key: | GET | `/api/v5/rfq/mmp-config` | -| [createBlockQuote()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1816) | :closed_lock_with_key: | POST | `/api/v5/rfq/create-quote` | -| [cancelBlockQuote()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1822) | :closed_lock_with_key: | POST | `/api/v5/rfq/cancel-quote` | -| [cancelMultipleBlockQuotes()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1828) | :closed_lock_with_key: | POST | `/api/v5/rfq/cancel-batch-quotes` | -| [cancelAllBlockQuotes()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1834) | :closed_lock_with_key: | POST | `/api/v5/rfq/cancel-all-quotes` | -| [cancelAllBlockAfter()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1838) | :closed_lock_with_key: | POST | `/api/v5/rfq/cancel-all-after` | -| [getBlockRFQs()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1847) | :closed_lock_with_key: | GET | `/api/v5/rfq/rfqs` | -| [getBlockQuotes()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1851) | :closed_lock_with_key: | GET | `/api/v5/rfq/quotes` | -| [getBlockTrades()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1855) | :closed_lock_with_key: | GET | `/api/v5/rfq/trades` | -| [getPublicRFQBlockTrades()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1859) | | GET | `/api/v5/rfq/public-trades` | -| [getBlockTickers()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1863) | | GET | `/api/v5/market/block-tickers` | -| [getBlockTicker()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1867) | | GET | `/api/v5/market/block-ticker` | -| [getBlockPublicTrades()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1871) | | GET | `/api/v5/public/block-trades` | -| [submitSpreadOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1883) | :closed_lock_with_key: | POST | `/api/v5/sprd/order` | -| [cancelSpreadOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1889) | :closed_lock_with_key: | POST | `/api/v5/sprd/cancel-order` | -| [cancelAllSpreadOrders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1896) | :closed_lock_with_key: | POST | `/api/v5/sprd/mass-cancel` | -| [updateSpreadOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1904) | :closed_lock_with_key: | POST | `/api/v5/sprd/amend-order` | -| [getSpreadOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1910) | :closed_lock_with_key: | GET | `/api/v5/sprd/order` | -| [getSpreadActiveOrders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1917) | :closed_lock_with_key: | GET | `/api/v5/sprd/orders-pending` | -| [getSpreadOrdersRecent()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1923) | :closed_lock_with_key: | GET | `/api/v5/sprd/orders-history` | -| [getSpreadOrdersArchive()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1929) | :closed_lock_with_key: | GET | `/api/v5/sprd/orders-history-archive` | -| [getSpreadTrades()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1935) | :closed_lock_with_key: | GET | `/api/v5/sprd/trades` | -| [getSpreads()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1939) | | GET | `/api/v5/sprd/spreads` | -| [getSpreadOrderBook()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1943) | | GET | `/api/v5/sprd/books` | -| [getSpreadTicker()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1950) | | GET | `/api/v5/market/sprd-ticker` | -| [getSpreadPublicTrades()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1954) | | GET | `/api/v5/sprd/public-trades` | -| [getSpreadCandles()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1960) | | GET | `/api/v5/market/sprd-candles` | -| [getSpreadHistoryCandles()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1964) | | GET | `/api/v5/market/sprd-history-candles` | -| [cancelSpreadAllAfter()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1970) | :closed_lock_with_key: | POST | `/api/v5/sprd/cancel-all-after` | -| [getInstruments()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1985) | | GET | `/api/v5/public/instruments` | -| [getDeliveryExerciseHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1999) | | GET | `/api/v5/public/delivery-exercise-history` | -| [getOpenInterest()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2003) | | GET | `/api/v5/public/open-interest` | -| [getFundingRate()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2007) | | GET | `/api/v5/public/funding-rate` | -| [getFundingRateHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2011) | | GET | `/api/v5/public/funding-rate-history` | -| [getMinMaxLimitPrice()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2015) | | GET | `/api/v5/public/price-limit` | -| [getOptionMarketData()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2019) | | GET | `/api/v5/public/opt-summary` | -| [getEstimatedDeliveryExercisePrice()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2023) | | GET | `/api/v5/public/estimated-price` | -| [getDiscountRateAndInterestFreeQuota()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2027) | | GET | `/api/v5/public/discount-rate-interest-free-quota` | -| [getSystemTime()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2031) | | GET | `/api/v5/public/time` | -| [getMarkPrice()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2035) | | GET | `/api/v5/public/mark-price` | -| [getPositionTiers()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2039) | | GET | `/api/v5/public/position-tiers` | -| [getInterestRateAndLoanQuota()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2043) | | GET | `/api/v5/public/interest-rate-loan-quota` | -| [getVIPInterestRateAndLoanQuota()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2047) | | GET | `/api/v5/public/vip-interest-rate-loan-quota` | -| [getUnderlying()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2051) | | GET | `/api/v5/public/underlying` | -| [getInsuranceFund()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2055) | | GET | `/api/v5/public/insurance-fund` | -| [getUnitConvert()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2059) | | GET | `/api/v5/public/convert-contract-coin` | -| [getOptionTickBands()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2063) | | GET | `/api/v5/public/instrument-tick-bands` | -| [getPremiumHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2070) | | GET | `/api/v5/public/premium-history` | -| [getIndexTickers()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2074) | | GET | `/api/v5/market/index-tickers` | -| [getIndexCandles()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2089) | | GET | `/api/v5/market/index-candles` | -| [getIndexCandlesV2()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2101) | | GET | `/api/v5/market/index-candles` | -| [getHistoricIndexCandles()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2113) | | GET | `/api/v5/market/history-index-candles` | -| [getHistoricIndexCandlesV2()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2125) | | GET | `/api/v5/market/history-index-candles` | -| [getMarkPriceCandles()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2137) | | GET | `/api/v5/market/mark-price-candles` | -| [getMarkPriceCandlesV2()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2149) | | GET | `/api/v5/market/mark-price-candles` | -| [getHistoricMarkPriceCandles()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2161) | | GET | `/api/v5/market/historic-mark-price-candles` | -| [getHistoricMarkPriceCandlesV2()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2173) | | GET | `/api/v5/market/history-mark-price-candles` | -| [getOracle()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2179) | | GET | `/api/v5/market/open-oracle` | -| [getExchangeRate()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2183) | | GET | `/api/v5/market/exchange-rate` | -| [getIndexComponents()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2187) | | GET | `/api/v5/market/index-components` | -| [getEconomicCalendar()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2191) | :closed_lock_with_key: | GET | `/api/v5/public/economic-calendar` | -| [getPublicBlockTrades()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2200) | | GET | `/api/v5/market/block-trades` | -| [getLiquidationOrders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2207) | | GET | `/api/v5/public/liquidation-orders` | -| [getSupportCoin()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2217) | | GET | `/api/v5/rubik/stat/trading-data/support-coin` | -| [getOpenInterestHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2221) | | GET | `/api/v5/rubik/stat/contracts/open-interest-history` | -| [getTakerVolume()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2230) | | GET | `/api/v5/rubik/stat/taker-volume` | -| [getContractTakerVolume()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2240) | | GET | `/api/v5/rubik/stat/taker-volume-contract` | -| [getMarginLendingRatio()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2246) | | GET | `/api/v5/rubik/stat/margin/loan-ratio` | -| [getTopTradersAccountRatio()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2255) | | GET | `/api/v5/rubik/stat/contracts/long-short-account-ratio-contract-top-trader` | -| [getTopTradersContractPositionRatio()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2264) | | GET | `/api/v5/rubik/stat/contracts/long-short-position-ratio-contract-top-trader` | -| [getLongShortContractRatio()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2273) | | GET | `/api/v5/rubik/stat/contracts/long-short-account-ratio-contract` | -| [getLongShortRatio()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2282) | | GET | `/api/v5/rubik/stat/contracts/long-short-account-ratio` | -| [getContractsOpenInterestAndVolume()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2294) | | GET | `/api/v5/rubik/stat/contracts/open-interest-volume` | -| [getOptionsOpenInterestAndVolume()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2306) | | GET | `/api/v5/rubik/stat/option/open-interest-volume` | -| [getPutCallRatio()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2313) | | GET | `/api/v5/rubik/stat/option/open-interest-volume-ratio` | -| [getOpenInterestAndVolumeExpiry()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2323) | | GET | `/api/v5/rubik/stat/option/open-interest-volume-expiry` | -| [getOpenInterestAndVolumeStrike()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2333) | | GET | `/api/v5/rubik/stat/option/open-interest-volume-strike` | -| [getTakerFlow()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2344) | | GET | `/api/v5/rubik/stat/option/taker-block-volume` | -| [getCurrencies()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2354) | :closed_lock_with_key: | GET | `/api/v5/asset/currencies` | -| [getBalances()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2358) | :closed_lock_with_key: | GET | `/api/v5/asset/balances` | -| [getNonTradableAssets()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2362) | :closed_lock_with_key: | GET | `/api/v5/asset/non-tradable-assets` | -| [getAccountAssetValuation()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2366) | :closed_lock_with_key: | GET | `/api/v5/asset/asset-valuation` | -| [fundsTransfer()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2370) | :closed_lock_with_key: | POST | `/api/v5/asset/transfer` | -| [getFundsTransferState()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2375) | :closed_lock_with_key: | GET | `/api/v5/asset/transfer-state` | -| [getAssetBillsDetails()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2383) | :closed_lock_with_key: | GET | `/api/v5/asset/bills` | -| [getLightningDeposits()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2394) | :closed_lock_with_key: | GET | `/api/v5/asset/deposit-lightning` | -| [getDepositAddress()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2402) | :closed_lock_with_key: | GET | `/api/v5/asset/deposit-address` | -| [getDepositHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2406) | :closed_lock_with_key: | GET | `/api/v5/asset/deposit-history` | -| [submitWithdraw()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2410) | :closed_lock_with_key: | POST | `/api/v5/asset/withdrawal` | -| [submitWithdrawLightning()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2414) | :closed_lock_with_key: | POST | `/api/v5/asset/withdrawal-lightning` | -| [cancelWithdrawal()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2426) | :closed_lock_with_key: | POST | `/api/v5/asset/cancel-withdrawal` | -| [getWithdrawalHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2430) | :closed_lock_with_key: | GET | `/api/v5/asset/withdrawal-history` | -| [getDepositWithdrawStatus()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2434) | :closed_lock_with_key: | GET | `/api/v5/asset/deposit-withdraw-status` | -| [smallAssetsConvert()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2440) | :closed_lock_with_key: | POST | `/api/v5/asset/convert-dust-assets` | -| [getExchanges()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2444) | | GET | `/api/v5/asset/exchange-list` | -| [applyForMonthlyStatement()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2448) | :closed_lock_with_key: | POST | `/api/v5/asset/monthly-statement` | -| [getMonthlyStatement()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2452) | :closed_lock_with_key: | GET | `/api/v5/asset/monthly-statement` | -| [getConvertCurrencies()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2456) | :closed_lock_with_key: | GET | `/api/v5/asset/convert/currencies` | -| [getConvertCurrencyPair()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2460) | :closed_lock_with_key: | GET | `/api/v5/asset/convert/currency-pair` | -| [estimateConvertQuote()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2467) | :closed_lock_with_key: | POST | `/api/v5/asset/convert/estimate-quote` | -| [convertTrade()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2471) | :closed_lock_with_key: | POST | `/api/v5/asset/convert/trade` | -| [getConvertHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2475) | :closed_lock_with_key: | GET | `/api/v5/asset/convert/history` | -| [getSubAccountList()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2486) | :closed_lock_with_key: | GET | `/api/v5/users/subaccount/list` | -| [resetSubAccountAPIKey()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2491) | :closed_lock_with_key: | POST | `/api/v5/users/subaccount/modify-apikey` | -| [getSubAccountBalances()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2508) | :closed_lock_with_key: | GET | `/api/v5/account/subaccount/balances` | -| [getSubAccountFundingBalances()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2513) | :closed_lock_with_key: | GET | `/api/v5/asset/subaccount/balances` | -| [getSubAccountMaxWithdrawal()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2523) | :closed_lock_with_key: | GET | `/api/v5/account/subaccount/max-withdrawal` | -| [getSubAccountTransferHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2530) | :closed_lock_with_key: | GET | `/api/v5/asset/subaccount/bills` | -| [getManagedSubAccountTransferHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2541) | :closed_lock_with_key: | GET | `/api/v5/asset/subaccount/managed-subaccount-bills` | -| [transferSubAccountBalance()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2551) | :closed_lock_with_key: | POST | `/api/v5/asset/subaccount/transfer` | -| [setSubAccountTransferOutPermission()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2558) | :closed_lock_with_key: | POST | `/api/v5/users/subaccount/set-transfer-out` | -| [getSubAccountCustodyTradingList()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2569) | :closed_lock_with_key: | GET | `/api/v5/users/entrust-subaccount-list` | -| [setSubAccountLoanAllocation()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2575) | :closed_lock_with_key: | POST | `/api/v5/account/subaccount/set-loan-allocation` | -| [getSubAccountBorrowInterestAndLimit()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2588) | :closed_lock_with_key: | GET | `/api/v5/account/subaccount/interest-limits` | -| [getStakingOffers()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2605) | :closed_lock_with_key: | GET | `/api/v5/finance/staking-defi/offers` | -| [submitStake()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2614) | :closed_lock_with_key: | POST | `/api/v5/finance/staking-defi/purchase` | -| [redeemStake()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2630) | :closed_lock_with_key: | POST | `/api/v5/finance/staking-defi/redeem` | -| [cancelStakingRequest()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2643) | :closed_lock_with_key: | POST | `/api/v5/finance/staking-defi/cancel` | -| [getActiveStakingOrders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2654) | :closed_lock_with_key: | GET | `/api/v5/finance/staking-defi/orders-active` | -| [getStakingOrderHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2667) | :closed_lock_with_key: | GET | `/api/v5/finance/staking-defi/orders-history` | -| [purchaseETHStaking()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2687) | :closed_lock_with_key: | POST | `/api/v5/finance/staking-defi/eth/purchase` | -| [redeemETHStaking()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2694) | :closed_lock_with_key: | POST | `/api/v5/finance/staking-defi/eth/redeem` | -| [getETHStakingBalance()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2698) | :closed_lock_with_key: | GET | `/api/v5/finance/staking-defi/eth/balance` | -| [getETHStakingHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2702) | :closed_lock_with_key: | GET | `/api/v5/finance/staking-defi/eth/purchase-redeem-history` | -| [getAPYHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2715) | | GET | `/api/v5/finance/staking-defi/eth/apy-history` | -| [getSavingBalance()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2725) | :closed_lock_with_key: | GET | `/api/v5/finance/savings/balance` | -| [savingsPurchaseRedemption()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2729) | :closed_lock_with_key: | POST | `/api/v5/finance/savings/purchase-redempt` | -| [setLendingRate()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2743) | :closed_lock_with_key: | POST | `/api/v5/finance/savings/set-lending-rate` | -| [getLendingHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2750) | :closed_lock_with_key: | GET | `/api/v5/finance/savings/lending-history` | -| [getPublicBorrowInfo()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2754) | | GET | `/api/v5/finance/savings/lending-rate-summary` | -| [getPublicBorrowHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2758) | | GET | `/api/v5/finance/savings/lending-rate-history` | -| [getLendingOffers()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2768) | | GET | `/api/v5/finance/fixed-loan/lending-offers` | -| [getLendingAPYHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2772) | | GET | `/api/v5/finance/fixed-loan/lending-apy-history` | -| [getLendingVolume()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2776) | | GET | `/api/v5/finance/fixed-loan/pending-lending-volume` | -| [placeLendingOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2783) | :closed_lock_with_key: | POST | `/api/v5/finance/fixed-loan/lending-order` | -| [amendLendingOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2787) | :closed_lock_with_key: | POST | `/api/v5/finance/fixed-loan/lending-order` | -| [getLendingOrders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2791) | :closed_lock_with_key: | GET | `/api/v5/finance/fixed-loan/lending-orders-list` | -| [getLendingSubOrders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2798) | :closed_lock_with_key: | GET | `/api/v5/finance/fixed-loan/lending-sub-orders` | -| [getInviteeDetail()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2811) | :closed_lock_with_key: | GET | `/api/v5/affiliate/invitee/detail` | -| [getAffiliateRebateInfo()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2815) | :closed_lock_with_key: | GET | `/api/v5/users/partner/if-rebate` | -| [getSystemStatus()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2825) | | GET | `/api/v5/system/status` | -| [getBrokerAccountInformation()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2841) | :closed_lock_with_key: | GET | `/api/v5/broker/nd/info` | -| [createSubAccount()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2845) | :closed_lock_with_key: | POST | `/api/v5/broker/nd/create-subaccount` | -| [deleteSubAccount()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2854) | :closed_lock_with_key: | POST | `/api/v5/broker/nd/delete-subaccount` | -| [createSubAccountAPIKey()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2858) | :closed_lock_with_key: | POST | `/api/v5/broker/nd/subaccount/apikey` | \ No newline at end of file +| [getAccountInstruments()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L296) | :closed_lock_with_key: | GET | `/api/v5/account/instruments` | +| [getBalance()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L302) | :closed_lock_with_key: | GET | `/api/v5/account/balance` | +| [getPositions()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L306) | :closed_lock_with_key: | GET | `/api/v5/account/positions` | +| [getPositionsHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L310) | :closed_lock_with_key: | GET | `/api/v5/account/positions-history` | +| [getAccountPositionRisk()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L316) | :closed_lock_with_key: | GET | `/api/v5/account/account-position-risk` | +| [getBills()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L325) | :closed_lock_with_key: | GET | `/api/v5/account/bills` | +| [getBillsArchive()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L330) | :closed_lock_with_key: | GET | `/api/v5/account/bills-archive` | +| [requestBillsHistoryDownloadLink()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L343) | :closed_lock_with_key: | POST | `/api/v5/account/bills-history-archive` | +| [getRequestedBillsHistoryLink()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L353) | :closed_lock_with_key: | GET | `/api/v5/account/bills-history-archive` | +| [getAccountConfiguration()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L360) | :closed_lock_with_key: | GET | `/api/v5/account/config` | +| [setPositionMode()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L364) | :closed_lock_with_key: | POST | `/api/v5/account/set-position-mode` | +| [setLeverage()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L368) | :closed_lock_with_key: | POST | `/api/v5/account/set-leverage` | +| [getMaxBuySellAmount()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L373) | :closed_lock_with_key: | GET | `/api/v5/account/max-size` | +| [getMaxAvailableTradableAmount()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L384) | :closed_lock_with_key: | GET | `/api/v5/account/max-avail-size` | +| [changePositionMargin()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L394) | :closed_lock_with_key: | POST | `/api/v5/account/position/margin-balance` | +| [getLeverage()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L403) | :closed_lock_with_key: | GET | `/api/v5/account/leverage-info` | +| [getLeverageV2()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L410) | :closed_lock_with_key: | GET | `/api/v5/account/leverage-info` | +| [getLeverageEstimatedInfo()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L418) | :closed_lock_with_key: | GET | `/api/v5/account/adjust-leverage-info` | +| [getMaxLoan()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L429) | :closed_lock_with_key: | GET | `/api/v5/account/max-loan` | +| [getFeeRates()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L445) | :closed_lock_with_key: | GET | `/api/v5/account/trade-fee` | +| [getFeeRatesV2()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L461) | :closed_lock_with_key: | GET | `/api/v5/account/trade-fee` | +| [getInterestAccrued()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L471) | :closed_lock_with_key: | GET | `/api/v5/account/interest-accrued` | +| [getInterestRate()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L483) | :closed_lock_with_key: | GET | `/api/v5/account/interest-rate` | +| [setGreeksDisplayType()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L487) | :closed_lock_with_key: | POST | `/api/v5/account/set-greeks` | +| [setIsolatedMode()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L491) | :closed_lock_with_key: | POST | `/api/v5/account/set-isolated-mode` | +| [getMaxWithdrawals()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L501) | :closed_lock_with_key: | GET | `/api/v5/account/max-withdrawal` | +| [getAccountRiskState()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L505) | :closed_lock_with_key: | GET | `/api/v5/account/risk-state` | +| [submitQuickMarginBorrowRepay()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L509) | :closed_lock_with_key: | POST | `/api/v5/account/quick-margin-borrow-repay` | +| [getQuickMarginBorrowRepayHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L518) | :closed_lock_with_key: | GET | `/api/v5/account/quick-margin-borrow-repay-history` | +| [borrowRepayVIPLoan()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L527) | :closed_lock_with_key: | POST | `/api/v5/account/borrow-repay` | +| [getVIPLoanBorrowRepayHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L541) | :closed_lock_with_key: | GET | `/api/v5/account/borrow-repay-history` | +| [getVIPInterestAccrued()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L545) | :closed_lock_with_key: | GET | `/api/v5/account/vip-interest-accrued` | +| [getVIPInterestDeducted()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L549) | :closed_lock_with_key: | GET | `/api/v5/account/vip-interest-deducted` | +| [getVIPLoanOrders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L555) | :closed_lock_with_key: | GET | `/api/v5/account/vip-loan-order-list` | +| [getVIPLoanOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L561) | :closed_lock_with_key: | GET | `/api/v5/account/vip-loan-order-detail` | +| [getBorrowInterestLimits()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L567) | :closed_lock_with_key: | GET | `/api/v5/account/interest-limits` | +| [getFixedLoanBorrowLimit()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L574) | :closed_lock_with_key: | GET | `/api/v5/account/fixed-loan/borrowing-limit` | +| [getFixedLoanBorrowQuote()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L578) | :closed_lock_with_key: | GET | `/api/v5/account/fixed-loan/borrowing-quote` | +| [submitFixedLoanBorrowOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L587) | :closed_lock_with_key: | POST | `/api/v5/account/fixed-loan/borrowing-order` | +| [updateFixedLoanBorrowOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L600) | :closed_lock_with_key: | POST | `/api/v5/account/fixed-loan/amend-borrowing-order` | +| [manualRenewFixedLoanBorrowOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L613) | :closed_lock_with_key: | POST | `/api/v5/account/fixed-loan/manual-reborrow` | +| [repayFixedLoanBorrowOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L627) | :closed_lock_with_key: | POST | `/api/v5/account/fixed-loan/repay-borrowing-order` | +| [convertFixedLoanToMarketLoan()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L638) | :closed_lock_with_key: | POST | `/api/v5/account/fixed-loan/convert-to-market-loan` | +| [reduceFixedLoanLiabilities()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L649) | :closed_lock_with_key: | POST | `/api/v5/account/fixed-loan/reduce-liabilities` | +| [getFixedLoanBorrowOrders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L664) | :closed_lock_with_key: | GET | `/api/v5/account/fixed-loan/borrowing-orders-list` | +| [manualBorrowRepay()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L673) | :closed_lock_with_key: | POST | `/api/v5/account/spot-manual-borrow-repay` | +| [setAutoRepay()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L687) | :closed_lock_with_key: | POST | `/api/v5/account/set-auto-repay` | +| [getBorrowRepayHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L695) | :closed_lock_with_key: | GET | `/api/v5/account/spot-borrow-repay-history` | +| [positionBuilder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L700) | :closed_lock_with_key: | POST | `/api/v5/account/position-builder` | +| [updateRiskOffsetAmount()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L704) | :closed_lock_with_key: | POST | `/api/v5/account/set-riskOffset-amt` | +| [getGreeks()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L716) | :closed_lock_with_key: | GET | `/api/v5/account/greeks` | +| [getPMLimitation()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L720) | :closed_lock_with_key: | GET | `/api/v5/account/position-tiers` | +| [updateRiskOffsetType()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L728) | :closed_lock_with_key: | POST | `/api/v5/account/set-riskOffset-type` | +| [activateOption()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L736) | :closed_lock_with_key: | POST | `/api/v5/account/activate-option` | +| [setAutoLoan()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L744) | :closed_lock_with_key: | POST | `/api/v5/account/set-auto-loan` | +| [setAccountMode()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L748) | :closed_lock_with_key: | POST | `/api/v5/account/set-account-level` | +| [resetMMPStatus()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L754) | :closed_lock_with_key: | POST | `/api/v5/account/mmp-reset` | +| [setMMPConfig()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L762) | :closed_lock_with_key: | POST | `/api/v5/account/mmp-config` | +| [getMMPConfig()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L766) | :closed_lock_with_key: | GET | `/api/v5/account/mmp-config` | +| [submitOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L776) | :closed_lock_with_key: | POST | `/api/v5/trade/order` | +| [submitMultipleOrders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L780) | :closed_lock_with_key: | POST | `/api/v5/trade/batch-orders` | +| [cancelOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L784) | :closed_lock_with_key: | POST | `/api/v5/trade/cancel-order` | +| [cancelMultipleOrders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L788) | :closed_lock_with_key: | POST | `/api/v5/trade/cancel-batch-orders` | +| [amendOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L794) | :closed_lock_with_key: | POST | `/api/v5/trade/amend-order` | +| [amendMultipleOrders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L798) | :closed_lock_with_key: | POST | `/api/v5/trade/amend-batch-orders` | +| [closePositions()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L802) | :closed_lock_with_key: | POST | `/api/v5/trade/close-position` | +| [getOrderDetails()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L806) | :closed_lock_with_key: | GET | `/api/v5/trade/order` | +| [getOrderList()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L810) | :closed_lock_with_key: | GET | `/api/v5/trade/orders-pending` | +| [getOrderHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L817) | :closed_lock_with_key: | GET | `/api/v5/trade/orders-history` | +| [getOrderHistoryArchive()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L824) | :closed_lock_with_key: | GET | `/api/v5/trade/orders-history-archive` | +| [getFills()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L833) | :closed_lock_with_key: | GET | `/api/v5/trade/fills` | +| [getFillsHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L840) | :closed_lock_with_key: | GET | `/api/v5/trade/fills-history` | +| [getEasyConvertCurrencies()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L845) | :closed_lock_with_key: | GET | `/api/v5/trade/easy-convert-currency-list` | +| [submitEasyConvert()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L856) | :closed_lock_with_key: | POST | `/api/v5/trade/easy-convert` | +| [getEasyConvertHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L867) | :closed_lock_with_key: | GET | `/api/v5/trade/easy-convert-history` | +| [getOneClickRepayCurrencyList()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L875) | :closed_lock_with_key: | GET | `/api/v5/trade/one-click-repay-currency-list` | +| [submitOneClickRepay()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L888) | :closed_lock_with_key: | POST | `/api/v5/trade/one-click-repay` | +| [getOneClickRepayHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L899) | :closed_lock_with_key: | GET | `/api/v5/trade/one-click-repay-history` | +| [cancelMassOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L903) | :closed_lock_with_key: | POST | `/api/v5/trade/mass-cancel` | +| [cancelAllAfter()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L915) | :closed_lock_with_key: | POST | `/api/v5/trade/cancel-all-after` | +| [getAccountRateLimit()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L922) | :closed_lock_with_key: | GET | `/api/v5/trade/account-rate-limit` | +| [submitOrderPrecheck()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L926) | :closed_lock_with_key: | POST | `/api/v5/trade/order-precheck` | +| [placeAlgoOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L936) | :closed_lock_with_key: | POST | `/api/v5/trade/order-algo` | +| [cancelAlgoOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L940) | :closed_lock_with_key: | POST | `/api/v5/trade/cancel-algos` | +| [amendAlgoOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L946) | :closed_lock_with_key: | POST | `/api/v5/trade/amend-algos` | +| [cancelAdvanceAlgoOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L952) | :closed_lock_with_key: | POST | `/api/v5/trade/cancel-advance-algos` | +| [getAlgoOrderDetails()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L958) | :closed_lock_with_key: | GET | `/api/v5/trade/order-algo` | +| [getAlgoOrderList()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L964) | :closed_lock_with_key: | GET | `/api/v5/trade/orders-algo-pending` | +| [getAlgoOrderHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L970) | :closed_lock_with_key: | GET | `/api/v5/trade/orders-algo-history` | +| [placeGridAlgoOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L982) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/grid/order-algo` | +| [amendGridAlgoOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L986) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/grid/amend-order-algo` | +| [stopGridAlgoOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L998) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/grid/stop-order-algo` | +| [closeGridContractPosition()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1002) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/grid/close-position` | +| [cancelGridContractCloseOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1008) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/grid/cancel-close-order` | +| [instantTriggerGridAlgoOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1018) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/grid/order-instant-trigger` | +| [getGridAlgoOrderList()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1030) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/grid/orders-algo-pending` | +| [getGridAlgoOrderHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1037) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/grid/orders-algo-history` | +| [getGridAlgoOrderDetails()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1044) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/grid/orders-algo-details` | +| [getGridAlgoSubOrders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1054) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/grid/sub-orders` | +| [getGridAlgoOrderPositions()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1075) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/grid/positions` | +| [spotGridWithdrawIncome()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1085) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/grid/withdraw-income` | +| [computeGridMarginBalance()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1091) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/grid/compute-margin-balance` | +| [adjustGridMarginBalance()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1103) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/grid/margin-balance` | +| [adjustGridInvestment()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1115) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/grid/adjust-investment` | +| [getGridAIParameter()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1126) | | GET | `/api/v5/tradingBot/grid/ai-param` | +| [computeGridMinInvestment()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1140) | | POST | `/api/v5/tradingBot/grid/min-investment` | +| [getRSIBackTesting()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1147) | | GET | `/api/v5/tradingBot/public/rsi-back-testing` | +| [getMaxGridQuantity()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1155) | | GET | `/api/v5/tradingBot/grid/grid-quantity` | +| [createSignal()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1169) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/signal/create-signal` | +| [getSignals()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1173) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/signal/signals` | +| [createSignalBot()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1177) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/signal/order-algo` | +| [cancelSignalBots()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1183) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/signal/stop-order-algo` | +| [updateSignalMargin()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1192) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/signal/margin-balance` | +| [updateSignalTPSL()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1200) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/signal/amendTPSL` | +| [setSignalInstruments()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1208) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/signal/set-instruments` | +| [getSignalBotOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1219) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/signal/orders-algo-details` | +| [getActiveSignalBot()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1229) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/signal/orders-algo-details` | +| [getSignalBotHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1236) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/signal/orders-algo-history` | +| [getSignalBotPositions()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1243) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/signal/positions` | +| [getSignalBotPositionHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1250) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/signal/positions-history` | +| [closeSignalBotPosition()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1259) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/signal/close-position` | +| [placeSignalBotSubOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1267) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/signal/sub-order` | +| [cancelSubOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1271) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/signal/cancel-sub-order` | +| [getSignalBotSubOrders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1278) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/signal/sub-orders` | +| [getSignalBotEventHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1282) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/signal/event-history` | +| [submitRecurringBuyOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1294) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/recurring/order-algo` | +| [amendRecurringBuyOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1300) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/recurring/amend-order-algo` | +| [stopRecurringBuyOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1309) | :closed_lock_with_key: | POST | `/api/v5/tradingBot/recurring/stop-order-algo` | +| [getRecurringBuyOrders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1318) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/recurring/orders-algo-pending` | +| [getRecurringBuyOrderHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1327) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/recurring/orders-algo-history` | +| [getRecurringBuyOrderDetails()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1336) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/recurring/orders-algo-details` | +| [getRecurringBuySubOrders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1345) | :closed_lock_with_key: | GET | `/api/v5/tradingBot/recurring/sub-orders` | +| [getCopytradingSubpositions()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1357) | :closed_lock_with_key: | GET | `/api/v5/copytrading/current-subpositions` | +| [getCopytradingSubpositionsHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1363) | :closed_lock_with_key: | GET | `/api/v5/copytrading/subpositions-history` | +| [submitCopytradingAlgoOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1369) | :closed_lock_with_key: | POST | `/api/v5/copytrading/algo-order` | +| [closeCopytradingSubposition()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1375) | :closed_lock_with_key: | POST | `/api/v5/copytrading/close-subposition` | +| [getCopytradingInstruments()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1384) | :closed_lock_with_key: | GET | `/api/v5/copytrading/instruments` | +| [setCopytradingInstruments()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1393) | :closed_lock_with_key: | POST | `/api/v5/copytrading/set-instruments` | +| [getCopytradingProfitDetails()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1405) | :closed_lock_with_key: | GET | `/api/v5/copytrading/profit-sharing-details` | +| [getCopytradingTotalProfit()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1414) | :closed_lock_with_key: | GET | `/api/v5/copytrading/total-profit-sharing` | +| [getCopytradingUnrealizedProfit()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1420) | :closed_lock_with_key: | GET | `/api/v5/copytrading/unrealized-profit-sharing-details` | +| [getCopytradingTotalUnrealizedProfit()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1429) | :closed_lock_with_key: | GET | `/api/v5/copytrading/total-unrealized-profit-sharing` | +| [applyCopytradingLeadTrading()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1441) | :closed_lock_with_key: | POST | `/api/v5/copytrading/apply-lead-trading` | +| [stopCopytradingLeadTrading()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1452) | :closed_lock_with_key: | POST | `/api/v5/copytrading/stop-lead-trading` | +| [updateCopytradingProfitSharing()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1460) | :closed_lock_with_key: | POST | `/api/v5/copytrading/amend-profit-sharing-ratio` | +| [getCopytradingAccount()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1474) | :closed_lock_with_key: | GET | `/api/v5/copytrading/config` | +| [setCopytradingFirstCopy()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1478) | :closed_lock_with_key: | POST | `/api/v5/copytrading/first-copy-settings` | +| [updateCopytradingCopySettings()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1486) | :closed_lock_with_key: | POST | `/api/v5/copytrading/amend-copy-settings` | +| [stopCopytradingCopy()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1494) | :closed_lock_with_key: | POST | `/api/v5/copytrading/stop-copy-trading` | +| [getCopytradingCopySettings()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1506) | :closed_lock_with_key: | GET | `/api/v5/copytrading/copy-settings` | +| [getCopytradingBatchLeverageInfo()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1513) | :closed_lock_with_key: | GET | `/api/v5/copytrading/batch-leverage-info` | +| [setCopytradingBatchLeverage()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1519) | :closed_lock_with_key: | POST | `/api/v5/copytrading/batch-set-leverage` | +| [getCopytradingMyLeadTraders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1525) | :closed_lock_with_key: | GET | `/api/v5/copytrading/current-lead-traders` | +| [getCopytradingLeadTradersHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1531) | :closed_lock_with_key: | GET | `/api/v5/copytrading/lead-traders-history` | +| [getCopytradingConfig()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1537) | | GET | `/api/v5/copytrading/public-config` | +| [getCopytradingLeadRanks()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1543) | | GET | `/api/v5/copytrading/public-lead-traders` | +| [getCopytradingLeadWeeklyPnl()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1549) | | GET | `/api/v5/copytrading/public-weekly-pnl` | +| [getCopytradingLeadDailyPnl()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1556) | | GET | `/api/v5/copytrading/public-pnl` | +| [getCopytradingLeadStats()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1562) | | GET | `/api/v5/copytrading/public-stats` | +| [getCopytradingLeadPreferences()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1568) | | GET | `/api/v5/copytrading/public-preference-currency` | +| [getCopytradingLeadOpenPositions()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1575) | | GET | `/api/v5/copytrading/public-current-subpositions` | +| [getCopytradingLeadPositionHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1581) | | GET | `/api/v5/copytrading/public-subpositions-history` | +| [getCopyTraders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1587) | | GET | `/api/v5/copytrading/public-copy-traders` | +| [getCopytradingLeadPrivateRanks()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1593) | :closed_lock_with_key: | GET | `/api/v5/copytrading/lead-traders` | +| [getCopytradingLeadPrivateWeeklyPnl()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1599) | :closed_lock_with_key: | GET | `/api/v5/copytrading/weekly-pnl` | +| [getCopytradingPLeadPrivateDailyPnl()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1606) | :closed_lock_with_key: | GET | `/api/v5/copytrading/pnl` | +| [geCopytradingLeadPrivateStats()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1612) | :closed_lock_with_key: | GET | `/api/v5/copytrading/stats` | +| [getCopytradingLeadPrivatePreferences()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1618) | :closed_lock_with_key: | GET | `/api/v5/copytrading/preference-currency` | +| [getCopytradingLeadPrivateOpenPositions()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1625) | :closed_lock_with_key: | GET | `/api/v5/copytrading/performance-current-subpositions` | +| [getCopytradingLeadPrivatePositionHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1634) | :closed_lock_with_key: | GET | `/api/v5/copytrading/performance-subpositions-history` | +| [getCopyTradersPrivate()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1643) | :closed_lock_with_key: | GET | `/api/v5/copytrading/copy-traders` | +| [getTickers()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1655) | | GET | `/api/v5/market/tickers` | +| [getTicker()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1662) | | GET | `/api/v5/market/ticker` | +| [getOrderBook()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1668) | | GET | `/api/v5/market/books` | +| [getFullOrderBook()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1672) | | GET | `/api/v5/market/books-full` | +| [getCandles()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1687) | | GET | `/api/v5/market/candles` | +| [getCandlesV2()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1699) | | GET | `/api/v5/market/candles` | +| [getHistoricCandles()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1711) | | GET | `/api/v5/market/history-candles` | +| [getHistoricCandlesV2()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1723) | | GET | `/api/v5/market/history-candles` | +| [getTrades()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1727) | | GET | `/api/v5/market/trades` | +| [getHistoricTrades()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1731) | | GET | `/api/v5/market/history-trades` | +| [getOptionTradesByInstrument()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1743) | | GET | `/api/v5/market/option/instrument-family-trades` | +| [getOptionTrades()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1749) | | GET | `/api/v5/public/option-trades` | +| [get24hrTotalVolume()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1753) | | GET | `/api/v5/market/platform-24-volume` | +| [getBlockCounterParties()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1763) | :closed_lock_with_key: | GET | `/api/v5/rfq/counterparties` | +| [createBlockRFQ()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1767) | :closed_lock_with_key: | POST | `/api/v5/rfq/create-rfq` | +| [cancelBlockRFQ()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1771) | :closed_lock_with_key: | POST | `/api/v5/rfq/cancel-rfq` | +| [cancelMultipleBlockRFQs()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1777) | :closed_lock_with_key: | POST | `/api/v5/rfq/cancel-batch-rfqs` | +| [cancelAllRFQs()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1783) | :closed_lock_with_key: | POST | `/api/v5/rfq/cancel-all-rfqs` | +| [executeBlockQuote()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1787) | :closed_lock_with_key: | POST | `/api/v5/rfq/execute-quote` | +| [getQuoteProducts()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1793) | :closed_lock_with_key: | GET | `/api/v5/rfq/maker-instrument-settings` | +| [updateBlockQuoteProducts()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1797) | :closed_lock_with_key: | POST | `/api/v5/rfq/maker-instrument-settings` | +| [resetBlockMmp()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1805) | :closed_lock_with_key: | POST | `/api/v5/rfq/mmp-reset` | +| [updateBlockMmpConfig()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1813) | :closed_lock_with_key: | POST | `/api/v5/rfq/mmp-config` | +| [getBlockMmpConfig()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1819) | :closed_lock_with_key: | GET | `/api/v5/rfq/mmp-config` | +| [createBlockQuote()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1822) | :closed_lock_with_key: | POST | `/api/v5/rfq/create-quote` | +| [cancelBlockQuote()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1828) | :closed_lock_with_key: | POST | `/api/v5/rfq/cancel-quote` | +| [cancelMultipleBlockQuotes()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1834) | :closed_lock_with_key: | POST | `/api/v5/rfq/cancel-batch-quotes` | +| [cancelAllBlockQuotes()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1840) | :closed_lock_with_key: | POST | `/api/v5/rfq/cancel-all-quotes` | +| [cancelAllBlockAfter()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1844) | :closed_lock_with_key: | POST | `/api/v5/rfq/cancel-all-after` | +| [getBlockRFQs()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1853) | :closed_lock_with_key: | GET | `/api/v5/rfq/rfqs` | +| [getBlockQuotes()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1857) | :closed_lock_with_key: | GET | `/api/v5/rfq/quotes` | +| [getBlockTrades()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1861) | :closed_lock_with_key: | GET | `/api/v5/rfq/trades` | +| [getPublicRFQBlockTrades()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1865) | | GET | `/api/v5/rfq/public-trades` | +| [getBlockTickers()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1869) | | GET | `/api/v5/market/block-tickers` | +| [getBlockTicker()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1873) | | GET | `/api/v5/market/block-ticker` | +| [getBlockPublicTrades()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1877) | | GET | `/api/v5/public/block-trades` | +| [submitSpreadOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1889) | :closed_lock_with_key: | POST | `/api/v5/sprd/order` | +| [cancelSpreadOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1895) | :closed_lock_with_key: | POST | `/api/v5/sprd/cancel-order` | +| [cancelAllSpreadOrders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1902) | :closed_lock_with_key: | POST | `/api/v5/sprd/mass-cancel` | +| [updateSpreadOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1910) | :closed_lock_with_key: | POST | `/api/v5/sprd/amend-order` | +| [getSpreadOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1916) | :closed_lock_with_key: | GET | `/api/v5/sprd/order` | +| [getSpreadActiveOrders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1923) | :closed_lock_with_key: | GET | `/api/v5/sprd/orders-pending` | +| [getSpreadOrdersRecent()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1929) | :closed_lock_with_key: | GET | `/api/v5/sprd/orders-history` | +| [getSpreadOrdersArchive()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1935) | :closed_lock_with_key: | GET | `/api/v5/sprd/orders-history-archive` | +| [getSpreadTrades()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1941) | :closed_lock_with_key: | GET | `/api/v5/sprd/trades` | +| [getSpreads()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1945) | | GET | `/api/v5/sprd/spreads` | +| [getSpreadOrderBook()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1949) | | GET | `/api/v5/sprd/books` | +| [getSpreadTicker()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1956) | | GET | `/api/v5/market/sprd-ticker` | +| [getSpreadPublicTrades()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1960) | | GET | `/api/v5/sprd/public-trades` | +| [getSpreadCandles()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1966) | | GET | `/api/v5/market/sprd-candles` | +| [getSpreadHistoryCandles()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1970) | | GET | `/api/v5/market/sprd-history-candles` | +| [cancelSpreadAllAfter()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1976) | :closed_lock_with_key: | POST | `/api/v5/sprd/cancel-all-after` | +| [getInstruments()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1991) | | GET | `/api/v5/public/instruments` | +| [getDeliveryExerciseHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2005) | | GET | `/api/v5/public/delivery-exercise-history` | +| [getOpenInterest()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2009) | | GET | `/api/v5/public/open-interest` | +| [getFundingRate()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2013) | | GET | `/api/v5/public/funding-rate` | +| [getFundingRateHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2017) | | GET | `/api/v5/public/funding-rate-history` | +| [getMinMaxLimitPrice()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2021) | | GET | `/api/v5/public/price-limit` | +| [getOptionMarketData()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2025) | | GET | `/api/v5/public/opt-summary` | +| [getEstimatedDeliveryExercisePrice()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2029) | | GET | `/api/v5/public/estimated-price` | +| [getDiscountRateAndInterestFreeQuota()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2033) | | GET | `/api/v5/public/discount-rate-interest-free-quota` | +| [getSystemTime()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2037) | | GET | `/api/v5/public/time` | +| [getMarkPrice()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2041) | | GET | `/api/v5/public/mark-price` | +| [getPositionTiers()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2045) | | GET | `/api/v5/public/position-tiers` | +| [getInterestRateAndLoanQuota()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2049) | | GET | `/api/v5/public/interest-rate-loan-quota` | +| [getVIPInterestRateAndLoanQuota()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2053) | | GET | `/api/v5/public/vip-interest-rate-loan-quota` | +| [getUnderlying()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2057) | | GET | `/api/v5/public/underlying` | +| [getInsuranceFund()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2061) | | GET | `/api/v5/public/insurance-fund` | +| [getUnitConvert()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2065) | | GET | `/api/v5/public/convert-contract-coin` | +| [getOptionTickBands()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2069) | | GET | `/api/v5/public/instrument-tick-bands` | +| [getPremiumHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2076) | | GET | `/api/v5/public/premium-history` | +| [getIndexTickers()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2080) | | GET | `/api/v5/market/index-tickers` | +| [getIndexCandles()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2095) | | GET | `/api/v5/market/index-candles` | +| [getIndexCandlesV2()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2107) | | GET | `/api/v5/market/index-candles` | +| [getHistoricIndexCandles()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2119) | | GET | `/api/v5/market/history-index-candles` | +| [getHistoricIndexCandlesV2()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2131) | | GET | `/api/v5/market/history-index-candles` | +| [getMarkPriceCandles()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2143) | | GET | `/api/v5/market/mark-price-candles` | +| [getMarkPriceCandlesV2()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2155) | | GET | `/api/v5/market/mark-price-candles` | +| [getHistoricMarkPriceCandles()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2167) | | GET | `/api/v5/market/historic-mark-price-candles` | +| [getHistoricMarkPriceCandlesV2()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2179) | | GET | `/api/v5/market/history-mark-price-candles` | +| [getOracle()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2185) | | GET | `/api/v5/market/open-oracle` | +| [getExchangeRate()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2189) | | GET | `/api/v5/market/exchange-rate` | +| [getIndexComponents()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2193) | | GET | `/api/v5/market/index-components` | +| [getEconomicCalendar()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2197) | :closed_lock_with_key: | GET | `/api/v5/public/economic-calendar` | +| [getPublicBlockTrades()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2206) | | GET | `/api/v5/market/block-trades` | +| [getLiquidationOrders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2213) | | GET | `/api/v5/public/liquidation-orders` | +| [getSupportCoin()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2223) | | GET | `/api/v5/rubik/stat/trading-data/support-coin` | +| [getOpenInterestHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2227) | | GET | `/api/v5/rubik/stat/contracts/open-interest-history` | +| [getTakerVolume()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2236) | | GET | `/api/v5/rubik/stat/taker-volume` | +| [getContractTakerVolume()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2246) | | GET | `/api/v5/rubik/stat/taker-volume-contract` | +| [getMarginLendingRatio()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2252) | | GET | `/api/v5/rubik/stat/margin/loan-ratio` | +| [getTopTradersAccountRatio()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2261) | | GET | `/api/v5/rubik/stat/contracts/long-short-account-ratio-contract-top-trader` | +| [getTopTradersContractPositionRatio()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2270) | | GET | `/api/v5/rubik/stat/contracts/long-short-position-ratio-contract-top-trader` | +| [getLongShortContractRatio()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2279) | | GET | `/api/v5/rubik/stat/contracts/long-short-account-ratio-contract` | +| [getLongShortRatio()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2288) | | GET | `/api/v5/rubik/stat/contracts/long-short-account-ratio` | +| [getContractsOpenInterestAndVolume()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2300) | | GET | `/api/v5/rubik/stat/contracts/open-interest-volume` | +| [getOptionsOpenInterestAndVolume()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2312) | | GET | `/api/v5/rubik/stat/option/open-interest-volume` | +| [getPutCallRatio()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2319) | | GET | `/api/v5/rubik/stat/option/open-interest-volume-ratio` | +| [getOpenInterestAndVolumeExpiry()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2329) | | GET | `/api/v5/rubik/stat/option/open-interest-volume-expiry` | +| [getOpenInterestAndVolumeStrike()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2339) | | GET | `/api/v5/rubik/stat/option/open-interest-volume-strike` | +| [getTakerFlow()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2350) | | GET | `/api/v5/rubik/stat/option/taker-block-volume` | +| [getCurrencies()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2360) | :closed_lock_with_key: | GET | `/api/v5/asset/currencies` | +| [getBalances()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2364) | :closed_lock_with_key: | GET | `/api/v5/asset/balances` | +| [getNonTradableAssets()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2368) | :closed_lock_with_key: | GET | `/api/v5/asset/non-tradable-assets` | +| [getAccountAssetValuation()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2372) | :closed_lock_with_key: | GET | `/api/v5/asset/asset-valuation` | +| [fundsTransfer()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2376) | :closed_lock_with_key: | POST | `/api/v5/asset/transfer` | +| [getFundsTransferState()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2381) | :closed_lock_with_key: | GET | `/api/v5/asset/transfer-state` | +| [getAssetBillsDetails()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2389) | :closed_lock_with_key: | GET | `/api/v5/asset/bills` | +| [getLightningDeposits()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2400) | :closed_lock_with_key: | GET | `/api/v5/asset/deposit-lightning` | +| [getDepositAddress()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2408) | :closed_lock_with_key: | GET | `/api/v5/asset/deposit-address` | +| [getDepositHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2412) | :closed_lock_with_key: | GET | `/api/v5/asset/deposit-history` | +| [submitWithdraw()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2416) | :closed_lock_with_key: | POST | `/api/v5/asset/withdrawal` | +| [submitWithdrawLightning()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2420) | :closed_lock_with_key: | POST | `/api/v5/asset/withdrawal-lightning` | +| [cancelWithdrawal()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2432) | :closed_lock_with_key: | POST | `/api/v5/asset/cancel-withdrawal` | +| [getWithdrawalHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2436) | :closed_lock_with_key: | GET | `/api/v5/asset/withdrawal-history` | +| [getDepositWithdrawStatus()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2440) | :closed_lock_with_key: | GET | `/api/v5/asset/deposit-withdraw-status` | +| [smallAssetsConvert()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2446) | :closed_lock_with_key: | POST | `/api/v5/asset/convert-dust-assets` | +| [getExchanges()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2450) | | GET | `/api/v5/asset/exchange-list` | +| [applyForMonthlyStatement()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2454) | :closed_lock_with_key: | POST | `/api/v5/asset/monthly-statement` | +| [getMonthlyStatement()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2458) | :closed_lock_with_key: | GET | `/api/v5/asset/monthly-statement` | +| [getConvertCurrencies()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2462) | :closed_lock_with_key: | GET | `/api/v5/asset/convert/currencies` | +| [getConvertCurrencyPair()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2466) | :closed_lock_with_key: | GET | `/api/v5/asset/convert/currency-pair` | +| [estimateConvertQuote()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2473) | :closed_lock_with_key: | POST | `/api/v5/asset/convert/estimate-quote` | +| [convertTrade()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2477) | :closed_lock_with_key: | POST | `/api/v5/asset/convert/trade` | +| [getConvertHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2481) | :closed_lock_with_key: | GET | `/api/v5/asset/convert/history` | +| [getSubAccountList()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2492) | :closed_lock_with_key: | GET | `/api/v5/users/subaccount/list` | +| [resetSubAccountAPIKey()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2497) | :closed_lock_with_key: | POST | `/api/v5/users/subaccount/modify-apikey` | +| [getSubAccountBalances()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2514) | :closed_lock_with_key: | GET | `/api/v5/account/subaccount/balances` | +| [getSubAccountFundingBalances()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2519) | :closed_lock_with_key: | GET | `/api/v5/asset/subaccount/balances` | +| [getSubAccountMaxWithdrawal()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2529) | :closed_lock_with_key: | GET | `/api/v5/account/subaccount/max-withdrawal` | +| [getSubAccountTransferHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2536) | :closed_lock_with_key: | GET | `/api/v5/asset/subaccount/bills` | +| [getManagedSubAccountTransferHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2547) | :closed_lock_with_key: | GET | `/api/v5/asset/subaccount/managed-subaccount-bills` | +| [transferSubAccountBalance()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2557) | :closed_lock_with_key: | POST | `/api/v5/asset/subaccount/transfer` | +| [setSubAccountTransferOutPermission()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2564) | :closed_lock_with_key: | POST | `/api/v5/users/subaccount/set-transfer-out` | +| [getSubAccountCustodyTradingList()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2575) | :closed_lock_with_key: | GET | `/api/v5/users/entrust-subaccount-list` | +| [setSubAccountLoanAllocation()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2581) | :closed_lock_with_key: | POST | `/api/v5/account/subaccount/set-loan-allocation` | +| [getSubAccountBorrowInterestAndLimit()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2594) | :closed_lock_with_key: | GET | `/api/v5/account/subaccount/interest-limits` | +| [getStakingOffers()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2611) | :closed_lock_with_key: | GET | `/api/v5/finance/staking-defi/offers` | +| [submitStake()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2620) | :closed_lock_with_key: | POST | `/api/v5/finance/staking-defi/purchase` | +| [redeemStake()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2636) | :closed_lock_with_key: | POST | `/api/v5/finance/staking-defi/redeem` | +| [cancelStakingRequest()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2649) | :closed_lock_with_key: | POST | `/api/v5/finance/staking-defi/cancel` | +| [getActiveStakingOrders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2660) | :closed_lock_with_key: | GET | `/api/v5/finance/staking-defi/orders-active` | +| [getStakingOrderHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2673) | :closed_lock_with_key: | GET | `/api/v5/finance/staking-defi/orders-history` | +| [purchaseETHStaking()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2693) | :closed_lock_with_key: | POST | `/api/v5/finance/staking-defi/eth/purchase` | +| [redeemETHStaking()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2700) | :closed_lock_with_key: | POST | `/api/v5/finance/staking-defi/eth/redeem` | +| [getETHStakingBalance()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2704) | :closed_lock_with_key: | GET | `/api/v5/finance/staking-defi/eth/balance` | +| [getETHStakingHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2708) | :closed_lock_with_key: | GET | `/api/v5/finance/staking-defi/eth/purchase-redeem-history` | +| [getAPYHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2721) | | GET | `/api/v5/finance/staking-defi/eth/apy-history` | +| [getSavingBalance()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2731) | :closed_lock_with_key: | GET | `/api/v5/finance/savings/balance` | +| [savingsPurchaseRedemption()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2735) | :closed_lock_with_key: | POST | `/api/v5/finance/savings/purchase-redempt` | +| [setLendingRate()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2749) | :closed_lock_with_key: | POST | `/api/v5/finance/savings/set-lending-rate` | +| [getLendingHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2756) | :closed_lock_with_key: | GET | `/api/v5/finance/savings/lending-history` | +| [getPublicBorrowInfo()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2760) | | GET | `/api/v5/finance/savings/lending-rate-summary` | +| [getPublicBorrowHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2764) | | GET | `/api/v5/finance/savings/lending-rate-history` | +| [getLendingOffers()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2774) | | GET | `/api/v5/finance/fixed-loan/lending-offers` | +| [getLendingAPYHistory()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2778) | | GET | `/api/v5/finance/fixed-loan/lending-apy-history` | +| [getLendingVolume()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2782) | | GET | `/api/v5/finance/fixed-loan/pending-lending-volume` | +| [placeLendingOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2789) | :closed_lock_with_key: | POST | `/api/v5/finance/fixed-loan/lending-order` | +| [amendLendingOrder()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2793) | :closed_lock_with_key: | POST | `/api/v5/finance/fixed-loan/lending-order` | +| [getLendingOrders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2797) | :closed_lock_with_key: | GET | `/api/v5/finance/fixed-loan/lending-orders-list` | +| [getLendingSubOrders()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2804) | :closed_lock_with_key: | GET | `/api/v5/finance/fixed-loan/lending-sub-orders` | +| [getInviteeDetail()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2817) | :closed_lock_with_key: | GET | `/api/v5/affiliate/invitee/detail` | +| [getAffiliateRebateInfo()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2821) | :closed_lock_with_key: | GET | `/api/v5/users/partner/if-rebate` | +| [getSystemStatus()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2831) | | GET | `/api/v5/system/status` | +| [getAnnouncements()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2843) | | GET | `/api/v5/support/announcements` | +| [getAnnouncementTypes()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2852) | | GET | `/api/v5/support/announcement-types` | +| [getBrokerAccountInformation()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2871) | :closed_lock_with_key: | GET | `/api/v5/broker/nd/info` | +| [createSubAccount()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2875) | :closed_lock_with_key: | POST | `/api/v5/broker/nd/create-subaccount` | +| [deleteSubAccount()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2884) | :closed_lock_with_key: | POST | `/api/v5/broker/nd/delete-subaccount` | +| [createSubAccountAPIKey()](https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2888) | :closed_lock_with_key: | POST | `/api/v5/broker/nd/subaccount/apikey` | \ No newline at end of file diff --git a/examples/apidoc/RestClient/activateOption.js b/examples/apidoc/RestClient/activateOption.js index ed0d78f..a949791 100644 --- a/examples/apidoc/RestClient/activateOption.js +++ b/examples/apidoc/RestClient/activateOption.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/activate-option // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L709 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L736 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.activateOption(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/adjustGridInvestment.js b/examples/apidoc/RestClient/adjustGridInvestment.js index ea099f6..3378124 100644 --- a/examples/apidoc/RestClient/adjustGridInvestment.js +++ b/examples/apidoc/RestClient/adjustGridInvestment.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/grid/adjust-investment // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1109 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1115 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.adjustGridInvestment(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/adjustGridMarginBalance.js b/examples/apidoc/RestClient/adjustGridMarginBalance.js index 15da3c4..8dfc170 100644 --- a/examples/apidoc/RestClient/adjustGridMarginBalance.js +++ b/examples/apidoc/RestClient/adjustGridMarginBalance.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/grid/margin-balance // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1097 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1103 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.adjustGridMarginBalance(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/amendAlgoOrder.js b/examples/apidoc/RestClient/amendAlgoOrder.js index 1fb9039..22d7d03 100644 --- a/examples/apidoc/RestClient/amendAlgoOrder.js +++ b/examples/apidoc/RestClient/amendAlgoOrder.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/trade/amend-algos // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L940 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L946 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.amendAlgoOrder(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/amendGridAlgoOrder.js b/examples/apidoc/RestClient/amendGridAlgoOrder.js index 8d82408..7a90a06 100644 --- a/examples/apidoc/RestClient/amendGridAlgoOrder.js +++ b/examples/apidoc/RestClient/amendGridAlgoOrder.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/grid/amend-order-algo // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L980 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L986 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.amendGridAlgoOrder(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/amendLendingOrder.js b/examples/apidoc/RestClient/amendLendingOrder.js index afd1d93..014693c 100644 --- a/examples/apidoc/RestClient/amendLendingOrder.js +++ b/examples/apidoc/RestClient/amendLendingOrder.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/finance/fixed-loan/lending-order // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2787 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2793 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.amendLendingOrder(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/amendMultipleOrders.js b/examples/apidoc/RestClient/amendMultipleOrders.js index c7d4a53..18ec58c 100644 --- a/examples/apidoc/RestClient/amendMultipleOrders.js +++ b/examples/apidoc/RestClient/amendMultipleOrders.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/trade/amend-batch-orders // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L771 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L798 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.amendMultipleOrders(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/amendOrder.js b/examples/apidoc/RestClient/amendOrder.js index c60015c..99966bd 100644 --- a/examples/apidoc/RestClient/amendOrder.js +++ b/examples/apidoc/RestClient/amendOrder.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/trade/amend-order // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L767 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L794 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.amendOrder(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/amendRecurringBuyOrder.js b/examples/apidoc/RestClient/amendRecurringBuyOrder.js index 0e257a3..f1a8206 100644 --- a/examples/apidoc/RestClient/amendRecurringBuyOrder.js +++ b/examples/apidoc/RestClient/amendRecurringBuyOrder.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/recurring/amend-order-algo // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1294 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1300 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.amendRecurringBuyOrder(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/applyCopytradingLeadTrading.js b/examples/apidoc/RestClient/applyCopytradingLeadTrading.js index d723fc3..b0b8071 100644 --- a/examples/apidoc/RestClient/applyCopytradingLeadTrading.js +++ b/examples/apidoc/RestClient/applyCopytradingLeadTrading.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/apply-lead-trading // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1435 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1441 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.applyCopytradingLeadTrading(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/applyForMonthlyStatement.js b/examples/apidoc/RestClient/applyForMonthlyStatement.js index 6eaa444..1638ea3 100644 --- a/examples/apidoc/RestClient/applyForMonthlyStatement.js +++ b/examples/apidoc/RestClient/applyForMonthlyStatement.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/asset/monthly-statement // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2448 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2454 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.applyForMonthlyStatement(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/borrowRepayVIPLoan.js b/examples/apidoc/RestClient/borrowRepayVIPLoan.js index 3c00057..680193c 100644 --- a/examples/apidoc/RestClient/borrowRepayVIPLoan.js +++ b/examples/apidoc/RestClient/borrowRepayVIPLoan.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/borrow-repay // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L526 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L527 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.borrowRepayVIPLoan(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/cancelAdvanceAlgoOrder.js b/examples/apidoc/RestClient/cancelAdvanceAlgoOrder.js index c95e083..d362761 100644 --- a/examples/apidoc/RestClient/cancelAdvanceAlgoOrder.js +++ b/examples/apidoc/RestClient/cancelAdvanceAlgoOrder.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/trade/cancel-advance-algos // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L946 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L952 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.cancelAdvanceAlgoOrder(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/cancelAlgoOrder.js b/examples/apidoc/RestClient/cancelAlgoOrder.js index ac9147f..198e17b 100644 --- a/examples/apidoc/RestClient/cancelAlgoOrder.js +++ b/examples/apidoc/RestClient/cancelAlgoOrder.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/trade/cancel-algos // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L934 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L940 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.cancelAlgoOrder(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/cancelAllAfter.js b/examples/apidoc/RestClient/cancelAllAfter.js index 8dfb1f1..75e03bf 100644 --- a/examples/apidoc/RestClient/cancelAllAfter.js +++ b/examples/apidoc/RestClient/cancelAllAfter.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/trade/cancel-all-after // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L909 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L915 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.cancelAllAfter(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/cancelAllBlockAfter.js b/examples/apidoc/RestClient/cancelAllBlockAfter.js index 723b7df..e20034e 100644 --- a/examples/apidoc/RestClient/cancelAllBlockAfter.js +++ b/examples/apidoc/RestClient/cancelAllBlockAfter.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rfq/cancel-all-after // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1838 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1844 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.cancelAllBlockAfter(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/cancelAllBlockQuotes.js b/examples/apidoc/RestClient/cancelAllBlockQuotes.js index 94c8199..75fb545 100644 --- a/examples/apidoc/RestClient/cancelAllBlockQuotes.js +++ b/examples/apidoc/RestClient/cancelAllBlockQuotes.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rfq/cancel-all-quotes // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1834 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1840 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.cancelAllBlockQuotes(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/cancelAllRFQs.js b/examples/apidoc/RestClient/cancelAllRFQs.js index 6b77ed4..5a1d075 100644 --- a/examples/apidoc/RestClient/cancelAllRFQs.js +++ b/examples/apidoc/RestClient/cancelAllRFQs.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rfq/cancel-all-rfqs // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1777 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1783 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.cancelAllRFQs(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/cancelAllSpreadOrders.js b/examples/apidoc/RestClient/cancelAllSpreadOrders.js index 168b02b..8694dca 100644 --- a/examples/apidoc/RestClient/cancelAllSpreadOrders.js +++ b/examples/apidoc/RestClient/cancelAllSpreadOrders.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/sprd/mass-cancel // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1896 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1902 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.cancelAllSpreadOrders(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/cancelBlockQuote.js b/examples/apidoc/RestClient/cancelBlockQuote.js index b6775dd..d47e1f1 100644 --- a/examples/apidoc/RestClient/cancelBlockQuote.js +++ b/examples/apidoc/RestClient/cancelBlockQuote.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rfq/cancel-quote // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1822 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1828 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.cancelBlockQuote(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/cancelBlockRFQ.js b/examples/apidoc/RestClient/cancelBlockRFQ.js index 927eda9..3d8744f 100644 --- a/examples/apidoc/RestClient/cancelBlockRFQ.js +++ b/examples/apidoc/RestClient/cancelBlockRFQ.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rfq/cancel-rfq // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1765 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1771 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.cancelBlockRFQ(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/cancelGridContractCloseOrder.js b/examples/apidoc/RestClient/cancelGridContractCloseOrder.js index 2885064..e8c5173 100644 --- a/examples/apidoc/RestClient/cancelGridContractCloseOrder.js +++ b/examples/apidoc/RestClient/cancelGridContractCloseOrder.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/grid/cancel-close-order // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1002 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1008 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.cancelGridContractCloseOrder(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/cancelMassOrder.js b/examples/apidoc/RestClient/cancelMassOrder.js index 1ff91a8..0b7e946 100644 --- a/examples/apidoc/RestClient/cancelMassOrder.js +++ b/examples/apidoc/RestClient/cancelMassOrder.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/trade/mass-cancel // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L901 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L903 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.cancelMassOrder(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/cancelMultipleBlockQuotes.js b/examples/apidoc/RestClient/cancelMultipleBlockQuotes.js index 989aa0a..f4436c7 100644 --- a/examples/apidoc/RestClient/cancelMultipleBlockQuotes.js +++ b/examples/apidoc/RestClient/cancelMultipleBlockQuotes.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rfq/cancel-batch-quotes // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1828 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1834 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.cancelMultipleBlockQuotes(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/cancelMultipleBlockRFQs.js b/examples/apidoc/RestClient/cancelMultipleBlockRFQs.js index 8750720..02428bb 100644 --- a/examples/apidoc/RestClient/cancelMultipleBlockRFQs.js +++ b/examples/apidoc/RestClient/cancelMultipleBlockRFQs.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rfq/cancel-batch-rfqs // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1771 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1777 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.cancelMultipleBlockRFQs(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/cancelMultipleOrders.js b/examples/apidoc/RestClient/cancelMultipleOrders.js index 65530ac..77721db 100644 --- a/examples/apidoc/RestClient/cancelMultipleOrders.js +++ b/examples/apidoc/RestClient/cancelMultipleOrders.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/trade/cancel-batch-orders // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L761 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L788 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.cancelMultipleOrders(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/cancelOrder.js b/examples/apidoc/RestClient/cancelOrder.js index 923ce1b..7de6fa1 100644 --- a/examples/apidoc/RestClient/cancelOrder.js +++ b/examples/apidoc/RestClient/cancelOrder.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/trade/cancel-order // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L757 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L784 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.cancelOrder(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/cancelSignalBots.js b/examples/apidoc/RestClient/cancelSignalBots.js index 90246d6..5488568 100644 --- a/examples/apidoc/RestClient/cancelSignalBots.js +++ b/examples/apidoc/RestClient/cancelSignalBots.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/signal/stop-order-algo // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1177 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1183 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.cancelSignalBots(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/cancelSpreadAllAfter.js b/examples/apidoc/RestClient/cancelSpreadAllAfter.js index 400aa02..66d7db5 100644 --- a/examples/apidoc/RestClient/cancelSpreadAllAfter.js +++ b/examples/apidoc/RestClient/cancelSpreadAllAfter.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/sprd/cancel-all-after // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1970 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1976 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.cancelSpreadAllAfter(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/cancelSpreadOrder.js b/examples/apidoc/RestClient/cancelSpreadOrder.js index 58e6d43..316f4c1 100644 --- a/examples/apidoc/RestClient/cancelSpreadOrder.js +++ b/examples/apidoc/RestClient/cancelSpreadOrder.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/sprd/cancel-order // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1889 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1895 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.cancelSpreadOrder(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/cancelStakingRequest.js b/examples/apidoc/RestClient/cancelStakingRequest.js index d18cd16..55f3ad9 100644 --- a/examples/apidoc/RestClient/cancelStakingRequest.js +++ b/examples/apidoc/RestClient/cancelStakingRequest.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/finance/staking-defi/cancel // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2643 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2649 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.cancelStakingRequest(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/cancelSubOrder.js b/examples/apidoc/RestClient/cancelSubOrder.js index 19b204c..49d65f5 100644 --- a/examples/apidoc/RestClient/cancelSubOrder.js +++ b/examples/apidoc/RestClient/cancelSubOrder.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/signal/cancel-sub-order // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1265 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1271 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.cancelSubOrder(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/cancelWithdrawal.js b/examples/apidoc/RestClient/cancelWithdrawal.js index 78de67c..0c70fde 100644 --- a/examples/apidoc/RestClient/cancelWithdrawal.js +++ b/examples/apidoc/RestClient/cancelWithdrawal.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/asset/cancel-withdrawal // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2426 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2432 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.cancelWithdrawal(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/changePositionMargin.js b/examples/apidoc/RestClient/changePositionMargin.js index 943a471..587ac70 100644 --- a/examples/apidoc/RestClient/changePositionMargin.js +++ b/examples/apidoc/RestClient/changePositionMargin.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/position/margin-balance // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L393 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L394 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.changePositionMargin(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/closeCopytradingSubposition.js b/examples/apidoc/RestClient/closeCopytradingSubposition.js index b4f286c..6973f4c 100644 --- a/examples/apidoc/RestClient/closeCopytradingSubposition.js +++ b/examples/apidoc/RestClient/closeCopytradingSubposition.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/close-subposition // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1369 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1375 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.closeCopytradingSubposition(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/closeGridContractPosition.js b/examples/apidoc/RestClient/closeGridContractPosition.js index 76955d3..4ddf226 100644 --- a/examples/apidoc/RestClient/closeGridContractPosition.js +++ b/examples/apidoc/RestClient/closeGridContractPosition.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/grid/close-position // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L996 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1002 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.closeGridContractPosition(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/closePositions.js b/examples/apidoc/RestClient/closePositions.js index 657566e..84e5b1b 100644 --- a/examples/apidoc/RestClient/closePositions.js +++ b/examples/apidoc/RestClient/closePositions.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/trade/close-position // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L775 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L802 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.closePositions(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/closeSignalBotPosition.js b/examples/apidoc/RestClient/closeSignalBotPosition.js index 75d9621..34a23e8 100644 --- a/examples/apidoc/RestClient/closeSignalBotPosition.js +++ b/examples/apidoc/RestClient/closeSignalBotPosition.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/signal/close-position // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1253 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1259 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.closeSignalBotPosition(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/computeGridMarginBalance.js b/examples/apidoc/RestClient/computeGridMarginBalance.js index 9a22f38..02b1d66 100644 --- a/examples/apidoc/RestClient/computeGridMarginBalance.js +++ b/examples/apidoc/RestClient/computeGridMarginBalance.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/grid/compute-margin-balance // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1085 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1091 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.computeGridMarginBalance(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/computeGridMinInvestment.js b/examples/apidoc/RestClient/computeGridMinInvestment.js index dfc97e3..1e54e00 100644 --- a/examples/apidoc/RestClient/computeGridMinInvestment.js +++ b/examples/apidoc/RestClient/computeGridMinInvestment.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/grid/min-investment // METHOD: POST // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1134 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1140 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.computeGridMinInvestment(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/convertFixedLoanToMarketLoan.js b/examples/apidoc/RestClient/convertFixedLoanToMarketLoan.js new file mode 100644 index 0000000..84c9f03 --- /dev/null +++ b/examples/apidoc/RestClient/convertFixedLoanToMarketLoan.js @@ -0,0 +1,21 @@ +const { RestClient } = require('okx-api'); + + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" + // ENDPOINT: /api/v5/account/fixed-loan/convert-to-market-loan + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L638 + +const client = new RestClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.convertFixedLoanToMarketLoan(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClient/convertTrade.js b/examples/apidoc/RestClient/convertTrade.js index f0b18df..c786690 100644 --- a/examples/apidoc/RestClient/convertTrade.js +++ b/examples/apidoc/RestClient/convertTrade.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/asset/convert/trade // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2471 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2477 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.convertTrade(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/createBlockQuote.js b/examples/apidoc/RestClient/createBlockQuote.js index 72ef187..3f23334 100644 --- a/examples/apidoc/RestClient/createBlockQuote.js +++ b/examples/apidoc/RestClient/createBlockQuote.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rfq/create-quote // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1816 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1822 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.createBlockQuote(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/createBlockRFQ.js b/examples/apidoc/RestClient/createBlockRFQ.js index 5200320..48a757d 100644 --- a/examples/apidoc/RestClient/createBlockRFQ.js +++ b/examples/apidoc/RestClient/createBlockRFQ.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rfq/create-rfq // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1761 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1767 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.createBlockRFQ(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/createSignal.js b/examples/apidoc/RestClient/createSignal.js index dbff5f4..da43173 100644 --- a/examples/apidoc/RestClient/createSignal.js +++ b/examples/apidoc/RestClient/createSignal.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/signal/create-signal // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1163 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1169 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.createSignal(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/createSignalBot.js b/examples/apidoc/RestClient/createSignalBot.js index 2b59186..6e76006 100644 --- a/examples/apidoc/RestClient/createSignalBot.js +++ b/examples/apidoc/RestClient/createSignalBot.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/signal/order-algo // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1171 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1177 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.createSignalBot(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/createSubAccount.js b/examples/apidoc/RestClient/createSubAccount.js index c8e4b7e..1fef0cb 100644 --- a/examples/apidoc/RestClient/createSubAccount.js +++ b/examples/apidoc/RestClient/createSubAccount.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/broker/nd/create-subaccount // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2845 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2875 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.createSubAccount(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/createSubAccountAPIKey.js b/examples/apidoc/RestClient/createSubAccountAPIKey.js index 27dd254..ac2d5e1 100644 --- a/examples/apidoc/RestClient/createSubAccountAPIKey.js +++ b/examples/apidoc/RestClient/createSubAccountAPIKey.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/broker/nd/subaccount/apikey // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2858 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2888 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.createSubAccountAPIKey(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/deleteSubAccount.js b/examples/apidoc/RestClient/deleteSubAccount.js index f522569..079fc93 100644 --- a/examples/apidoc/RestClient/deleteSubAccount.js +++ b/examples/apidoc/RestClient/deleteSubAccount.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/broker/nd/delete-subaccount // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2854 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2884 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.deleteSubAccount(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/estimateConvertQuote.js b/examples/apidoc/RestClient/estimateConvertQuote.js index 2d110e9..d145972 100644 --- a/examples/apidoc/RestClient/estimateConvertQuote.js +++ b/examples/apidoc/RestClient/estimateConvertQuote.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/asset/convert/estimate-quote // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2467 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2473 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.estimateConvertQuote(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/executeBlockQuote.js b/examples/apidoc/RestClient/executeBlockQuote.js index d3613dc..93f136d 100644 --- a/examples/apidoc/RestClient/executeBlockQuote.js +++ b/examples/apidoc/RestClient/executeBlockQuote.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rfq/execute-quote // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1781 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1787 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.executeBlockQuote(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/fundsTransfer.js b/examples/apidoc/RestClient/fundsTransfer.js index 31ba2c0..bc7f8dd 100644 --- a/examples/apidoc/RestClient/fundsTransfer.js +++ b/examples/apidoc/RestClient/fundsTransfer.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/asset/transfer // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2370 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2376 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.fundsTransfer(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/geCopytradingLeadPrivateStats.js b/examples/apidoc/RestClient/geCopytradingLeadPrivateStats.js index 26c99b6..950bafd 100644 --- a/examples/apidoc/RestClient/geCopytradingLeadPrivateStats.js +++ b/examples/apidoc/RestClient/geCopytradingLeadPrivateStats.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/stats // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1606 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1612 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.geCopytradingLeadPrivateStats(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/get24hrTotalVolume.js b/examples/apidoc/RestClient/get24hrTotalVolume.js index 23df558..3f0c561 100644 --- a/examples/apidoc/RestClient/get24hrTotalVolume.js +++ b/examples/apidoc/RestClient/get24hrTotalVolume.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/market/platform-24-volume // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1747 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1753 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.get24hrTotalVolume(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getAPYHistory.js b/examples/apidoc/RestClient/getAPYHistory.js index 46a7121..e72b0b7 100644 --- a/examples/apidoc/RestClient/getAPYHistory.js +++ b/examples/apidoc/RestClient/getAPYHistory.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/finance/staking-defi/eth/apy-history // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2715 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2721 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getAPYHistory(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getAccountAssetValuation.js b/examples/apidoc/RestClient/getAccountAssetValuation.js index 527b926..e32df39 100644 --- a/examples/apidoc/RestClient/getAccountAssetValuation.js +++ b/examples/apidoc/RestClient/getAccountAssetValuation.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/asset/asset-valuation // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2366 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2372 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getAccountAssetValuation(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getAccountConfiguration.js b/examples/apidoc/RestClient/getAccountConfiguration.js index b07cf6d..7a4395f 100644 --- a/examples/apidoc/RestClient/getAccountConfiguration.js +++ b/examples/apidoc/RestClient/getAccountConfiguration.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/config // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L359 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L360 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getAccountConfiguration(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getAccountInstruments.js b/examples/apidoc/RestClient/getAccountInstruments.js index 1439fb5..6cd5b4f 100644 --- a/examples/apidoc/RestClient/getAccountInstruments.js +++ b/examples/apidoc/RestClient/getAccountInstruments.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/instruments // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L295 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L296 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getAccountInstruments(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getAccountPositionRisk.js b/examples/apidoc/RestClient/getAccountPositionRisk.js index 62b10e2..7f9eedc 100644 --- a/examples/apidoc/RestClient/getAccountPositionRisk.js +++ b/examples/apidoc/RestClient/getAccountPositionRisk.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/account-position-risk // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L315 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L316 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getAccountPositionRisk(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getAccountRateLimit.js b/examples/apidoc/RestClient/getAccountRateLimit.js index 99f60df..8cde06f 100644 --- a/examples/apidoc/RestClient/getAccountRateLimit.js +++ b/examples/apidoc/RestClient/getAccountRateLimit.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/trade/account-rate-limit // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L916 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L922 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getAccountRateLimit(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getAccountRiskState.js b/examples/apidoc/RestClient/getAccountRiskState.js index 067768e..b713f29 100644 --- a/examples/apidoc/RestClient/getAccountRiskState.js +++ b/examples/apidoc/RestClient/getAccountRiskState.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/risk-state // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L504 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L505 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getAccountRiskState(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getActiveSignalBot.js b/examples/apidoc/RestClient/getActiveSignalBot.js index f6eddf6..aec4112 100644 --- a/examples/apidoc/RestClient/getActiveSignalBot.js +++ b/examples/apidoc/RestClient/getActiveSignalBot.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/signal/orders-algo-details // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1223 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1229 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getActiveSignalBot(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getActiveStakingOrders.js b/examples/apidoc/RestClient/getActiveStakingOrders.js index a8751ff..dddabbf 100644 --- a/examples/apidoc/RestClient/getActiveStakingOrders.js +++ b/examples/apidoc/RestClient/getActiveStakingOrders.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/finance/staking-defi/orders-active // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2654 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2660 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getActiveStakingOrders(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getAffiliateRebateInfo.js b/examples/apidoc/RestClient/getAffiliateRebateInfo.js index 3907342..9463abe 100644 --- a/examples/apidoc/RestClient/getAffiliateRebateInfo.js +++ b/examples/apidoc/RestClient/getAffiliateRebateInfo.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/users/partner/if-rebate // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2815 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2821 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getAffiliateRebateInfo(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getAlgoOrderDetails.js b/examples/apidoc/RestClient/getAlgoOrderDetails.js index 27423fe..20e4649 100644 --- a/examples/apidoc/RestClient/getAlgoOrderDetails.js +++ b/examples/apidoc/RestClient/getAlgoOrderDetails.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/trade/order-algo // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L952 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L958 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getAlgoOrderDetails(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getAlgoOrderHistory.js b/examples/apidoc/RestClient/getAlgoOrderHistory.js index 2907c5a..eff6e65 100644 --- a/examples/apidoc/RestClient/getAlgoOrderHistory.js +++ b/examples/apidoc/RestClient/getAlgoOrderHistory.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/trade/orders-algo-history // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L964 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L970 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getAlgoOrderHistory(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getAlgoOrderList.js b/examples/apidoc/RestClient/getAlgoOrderList.js index 2f46309..af5f738 100644 --- a/examples/apidoc/RestClient/getAlgoOrderList.js +++ b/examples/apidoc/RestClient/getAlgoOrderList.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/trade/orders-algo-pending // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L958 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L964 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getAlgoOrderList(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getAnnouncementTypes.js b/examples/apidoc/RestClient/getAnnouncementTypes.js new file mode 100644 index 0000000..730c172 --- /dev/null +++ b/examples/apidoc/RestClient/getAnnouncementTypes.js @@ -0,0 +1,21 @@ +const { RestClient } = require('okx-api'); + + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" + // ENDPOINT: /api/v5/support/announcement-types + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2852 + +const client = new RestClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getAnnouncementTypes(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClient/getAnnouncements.js b/examples/apidoc/RestClient/getAnnouncements.js new file mode 100644 index 0000000..b4fd5b2 --- /dev/null +++ b/examples/apidoc/RestClient/getAnnouncements.js @@ -0,0 +1,21 @@ +const { RestClient } = require('okx-api'); + + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" + // ENDPOINT: /api/v5/support/announcements + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2843 + +const client = new RestClient({ + 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/RestClient/getAssetBillsDetails.js b/examples/apidoc/RestClient/getAssetBillsDetails.js index 1547866..afd7613 100644 --- a/examples/apidoc/RestClient/getAssetBillsDetails.js +++ b/examples/apidoc/RestClient/getAssetBillsDetails.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/asset/bills // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2383 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2389 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getAssetBillsDetails(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getBalance.js b/examples/apidoc/RestClient/getBalance.js index 1548181..fc7e6c3 100644 --- a/examples/apidoc/RestClient/getBalance.js +++ b/examples/apidoc/RestClient/getBalance.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/balance // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L301 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L302 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getBalance(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getBalances.js b/examples/apidoc/RestClient/getBalances.js index 71c9c52..540313f 100644 --- a/examples/apidoc/RestClient/getBalances.js +++ b/examples/apidoc/RestClient/getBalances.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/asset/balances // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2358 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2364 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getBalances(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getBills.js b/examples/apidoc/RestClient/getBills.js index ea6e291..2f0da6b 100644 --- a/examples/apidoc/RestClient/getBills.js +++ b/examples/apidoc/RestClient/getBills.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/bills // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L324 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L325 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getBills(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getBillsArchive.js b/examples/apidoc/RestClient/getBillsArchive.js index 902762b..92bd351 100644 --- a/examples/apidoc/RestClient/getBillsArchive.js +++ b/examples/apidoc/RestClient/getBillsArchive.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/bills-archive // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L329 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L330 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getBillsArchive(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getBlockCounterParties.js b/examples/apidoc/RestClient/getBlockCounterParties.js index c2ebcd6..34319ce 100644 --- a/examples/apidoc/RestClient/getBlockCounterParties.js +++ b/examples/apidoc/RestClient/getBlockCounterParties.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rfq/counterparties // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1757 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1763 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getBlockCounterParties(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getBlockMmpConfig.js b/examples/apidoc/RestClient/getBlockMmpConfig.js index 85fbf85..eb3acac 100644 --- a/examples/apidoc/RestClient/getBlockMmpConfig.js +++ b/examples/apidoc/RestClient/getBlockMmpConfig.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rfq/mmp-config // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1813 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1819 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getBlockMmpConfig(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getBlockPublicTrades.js b/examples/apidoc/RestClient/getBlockPublicTrades.js index edac84b..f41425b 100644 --- a/examples/apidoc/RestClient/getBlockPublicTrades.js +++ b/examples/apidoc/RestClient/getBlockPublicTrades.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/public/block-trades // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1871 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1877 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getBlockPublicTrades(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getBlockQuotes.js b/examples/apidoc/RestClient/getBlockQuotes.js index 804763e..69c7fae 100644 --- a/examples/apidoc/RestClient/getBlockQuotes.js +++ b/examples/apidoc/RestClient/getBlockQuotes.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rfq/quotes // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1851 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1857 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getBlockQuotes(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getBlockRFQs.js b/examples/apidoc/RestClient/getBlockRFQs.js index 421610f..7b2ab66 100644 --- a/examples/apidoc/RestClient/getBlockRFQs.js +++ b/examples/apidoc/RestClient/getBlockRFQs.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rfq/rfqs // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1847 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1853 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getBlockRFQs(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getBlockTicker.js b/examples/apidoc/RestClient/getBlockTicker.js index e6e76dc..20afad9 100644 --- a/examples/apidoc/RestClient/getBlockTicker.js +++ b/examples/apidoc/RestClient/getBlockTicker.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/market/block-ticker // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1867 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1873 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getBlockTicker(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getBlockTickers.js b/examples/apidoc/RestClient/getBlockTickers.js index 2036afb..8f7913f 100644 --- a/examples/apidoc/RestClient/getBlockTickers.js +++ b/examples/apidoc/RestClient/getBlockTickers.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/market/block-tickers // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1863 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1869 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getBlockTickers(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getBlockTrades.js b/examples/apidoc/RestClient/getBlockTrades.js index afb2f84..4614cf2 100644 --- a/examples/apidoc/RestClient/getBlockTrades.js +++ b/examples/apidoc/RestClient/getBlockTrades.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rfq/trades // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1855 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1861 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getBlockTrades(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getBorrowInterestLimits.js b/examples/apidoc/RestClient/getBorrowInterestLimits.js index 70ab8a5..be53892 100644 --- a/examples/apidoc/RestClient/getBorrowInterestLimits.js +++ b/examples/apidoc/RestClient/getBorrowInterestLimits.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/interest-limits // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L566 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L567 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getBorrowInterestLimits(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getBorrowRepayHistory.js b/examples/apidoc/RestClient/getBorrowRepayHistory.js index 5b58219..678fd9c 100644 --- a/examples/apidoc/RestClient/getBorrowRepayHistory.js +++ b/examples/apidoc/RestClient/getBorrowRepayHistory.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/spot-borrow-repay-history // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L668 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L695 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getBorrowRepayHistory(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getBrokerAccountInformation.js b/examples/apidoc/RestClient/getBrokerAccountInformation.js index d96cbc6..28d2434 100644 --- a/examples/apidoc/RestClient/getBrokerAccountInformation.js +++ b/examples/apidoc/RestClient/getBrokerAccountInformation.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/broker/nd/info // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2841 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2871 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getBrokerAccountInformation(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getCandles.js b/examples/apidoc/RestClient/getCandles.js index 95819f8..b1716da 100644 --- a/examples/apidoc/RestClient/getCandles.js +++ b/examples/apidoc/RestClient/getCandles.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/market/candles // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1681 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1687 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getCandles(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getCandlesV2.js b/examples/apidoc/RestClient/getCandlesV2.js index 520e3be..7d00b8e 100644 --- a/examples/apidoc/RestClient/getCandlesV2.js +++ b/examples/apidoc/RestClient/getCandlesV2.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/market/candles // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1693 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1699 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getCandlesV2(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getContractTakerVolume.js b/examples/apidoc/RestClient/getContractTakerVolume.js index 8c888cb..9fcec21 100644 --- a/examples/apidoc/RestClient/getContractTakerVolume.js +++ b/examples/apidoc/RestClient/getContractTakerVolume.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rubik/stat/taker-volume-contract // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2240 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2246 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getContractTakerVolume(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getContractsOpenInterestAndVolume.js b/examples/apidoc/RestClient/getContractsOpenInterestAndVolume.js index 96695fe..edabbec 100644 --- a/examples/apidoc/RestClient/getContractsOpenInterestAndVolume.js +++ b/examples/apidoc/RestClient/getContractsOpenInterestAndVolume.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rubik/stat/contracts/open-interest-volume // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2294 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2300 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getContractsOpenInterestAndVolume(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getConvertCurrencies.js b/examples/apidoc/RestClient/getConvertCurrencies.js index 805fec4..0e5065a 100644 --- a/examples/apidoc/RestClient/getConvertCurrencies.js +++ b/examples/apidoc/RestClient/getConvertCurrencies.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/asset/convert/currencies // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2456 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2462 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getConvertCurrencies(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getConvertCurrencyPair.js b/examples/apidoc/RestClient/getConvertCurrencyPair.js index abbcf16..f8bc82b 100644 --- a/examples/apidoc/RestClient/getConvertCurrencyPair.js +++ b/examples/apidoc/RestClient/getConvertCurrencyPair.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/asset/convert/currency-pair // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2460 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2466 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getConvertCurrencyPair(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getConvertHistory.js b/examples/apidoc/RestClient/getConvertHistory.js index 0d90500..77a416c 100644 --- a/examples/apidoc/RestClient/getConvertHistory.js +++ b/examples/apidoc/RestClient/getConvertHistory.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/asset/convert/history // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2475 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2481 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getConvertHistory(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getCopyTraders.js b/examples/apidoc/RestClient/getCopyTraders.js index bfb982b..05152b9 100644 --- a/examples/apidoc/RestClient/getCopyTraders.js +++ b/examples/apidoc/RestClient/getCopyTraders.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/public-copy-traders // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1581 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1587 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getCopyTraders(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getCopyTradersPrivate.js b/examples/apidoc/RestClient/getCopyTradersPrivate.js index 8810022..4fcde18 100644 --- a/examples/apidoc/RestClient/getCopyTradersPrivate.js +++ b/examples/apidoc/RestClient/getCopyTradersPrivate.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/copy-traders // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1637 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1643 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getCopyTradersPrivate(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getCopytradingAccount.js b/examples/apidoc/RestClient/getCopytradingAccount.js index f0cb93d..4fee621 100644 --- a/examples/apidoc/RestClient/getCopytradingAccount.js +++ b/examples/apidoc/RestClient/getCopytradingAccount.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/config // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1468 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1474 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getCopytradingAccount(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getCopytradingBatchLeverageInfo.js b/examples/apidoc/RestClient/getCopytradingBatchLeverageInfo.js index a6ccfde..8fb8fb8 100644 --- a/examples/apidoc/RestClient/getCopytradingBatchLeverageInfo.js +++ b/examples/apidoc/RestClient/getCopytradingBatchLeverageInfo.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/batch-leverage-info // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1507 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1513 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getCopytradingBatchLeverageInfo(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getCopytradingConfig.js b/examples/apidoc/RestClient/getCopytradingConfig.js index fdd5c5a..58ba1aa 100644 --- a/examples/apidoc/RestClient/getCopytradingConfig.js +++ b/examples/apidoc/RestClient/getCopytradingConfig.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/public-config // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1531 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1537 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getCopytradingConfig(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getCopytradingCopySettings.js b/examples/apidoc/RestClient/getCopytradingCopySettings.js index 4886fc0..8d9aaa6 100644 --- a/examples/apidoc/RestClient/getCopytradingCopySettings.js +++ b/examples/apidoc/RestClient/getCopytradingCopySettings.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/copy-settings // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1500 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1506 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getCopytradingCopySettings(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getCopytradingInstruments.js b/examples/apidoc/RestClient/getCopytradingInstruments.js index 88b83ba..43f1fa5 100644 --- a/examples/apidoc/RestClient/getCopytradingInstruments.js +++ b/examples/apidoc/RestClient/getCopytradingInstruments.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/instruments // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1378 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1384 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getCopytradingInstruments(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getCopytradingLeadDailyPnl.js b/examples/apidoc/RestClient/getCopytradingLeadDailyPnl.js index 0f0cbaa..4dec81e 100644 --- a/examples/apidoc/RestClient/getCopytradingLeadDailyPnl.js +++ b/examples/apidoc/RestClient/getCopytradingLeadDailyPnl.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/public-pnl // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1550 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1556 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getCopytradingLeadDailyPnl(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getCopytradingLeadOpenPositions.js b/examples/apidoc/RestClient/getCopytradingLeadOpenPositions.js index c29097c..da474c8 100644 --- a/examples/apidoc/RestClient/getCopytradingLeadOpenPositions.js +++ b/examples/apidoc/RestClient/getCopytradingLeadOpenPositions.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/public-current-subpositions // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1569 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1575 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getCopytradingLeadOpenPositions(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getCopytradingLeadPositionHistory.js b/examples/apidoc/RestClient/getCopytradingLeadPositionHistory.js index e35a6d1..5a71de6 100644 --- a/examples/apidoc/RestClient/getCopytradingLeadPositionHistory.js +++ b/examples/apidoc/RestClient/getCopytradingLeadPositionHistory.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/public-subpositions-history // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1575 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1581 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getCopytradingLeadPositionHistory(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getCopytradingLeadPreferences.js b/examples/apidoc/RestClient/getCopytradingLeadPreferences.js index 53e58b3..3ed1cb6 100644 --- a/examples/apidoc/RestClient/getCopytradingLeadPreferences.js +++ b/examples/apidoc/RestClient/getCopytradingLeadPreferences.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/public-preference-currency // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1562 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1568 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getCopytradingLeadPreferences(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getCopytradingLeadPrivateOpenPositions.js b/examples/apidoc/RestClient/getCopytradingLeadPrivateOpenPositions.js index 9435afa..fdef437 100644 --- a/examples/apidoc/RestClient/getCopytradingLeadPrivateOpenPositions.js +++ b/examples/apidoc/RestClient/getCopytradingLeadPrivateOpenPositions.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/performance-current-subpositions // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1619 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1625 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getCopytradingLeadPrivateOpenPositions(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getCopytradingLeadPrivatePositionHistory.js b/examples/apidoc/RestClient/getCopytradingLeadPrivatePositionHistory.js index e7306f6..57a2054 100644 --- a/examples/apidoc/RestClient/getCopytradingLeadPrivatePositionHistory.js +++ b/examples/apidoc/RestClient/getCopytradingLeadPrivatePositionHistory.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/performance-subpositions-history // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1628 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1634 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getCopytradingLeadPrivatePositionHistory(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getCopytradingLeadPrivatePreferences.js b/examples/apidoc/RestClient/getCopytradingLeadPrivatePreferences.js index fa70f6b..b955d1e 100644 --- a/examples/apidoc/RestClient/getCopytradingLeadPrivatePreferences.js +++ b/examples/apidoc/RestClient/getCopytradingLeadPrivatePreferences.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/preference-currency // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1612 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1618 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getCopytradingLeadPrivatePreferences(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getCopytradingLeadPrivateRanks.js b/examples/apidoc/RestClient/getCopytradingLeadPrivateRanks.js index 34b6ef3..6894b57 100644 --- a/examples/apidoc/RestClient/getCopytradingLeadPrivateRanks.js +++ b/examples/apidoc/RestClient/getCopytradingLeadPrivateRanks.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/lead-traders // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1587 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1593 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getCopytradingLeadPrivateRanks(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getCopytradingLeadPrivateWeeklyPnl.js b/examples/apidoc/RestClient/getCopytradingLeadPrivateWeeklyPnl.js index fa9c49e..5742d3a 100644 --- a/examples/apidoc/RestClient/getCopytradingLeadPrivateWeeklyPnl.js +++ b/examples/apidoc/RestClient/getCopytradingLeadPrivateWeeklyPnl.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/weekly-pnl // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1593 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1599 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getCopytradingLeadPrivateWeeklyPnl(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getCopytradingLeadRanks.js b/examples/apidoc/RestClient/getCopytradingLeadRanks.js index 628a617..c9008ed 100644 --- a/examples/apidoc/RestClient/getCopytradingLeadRanks.js +++ b/examples/apidoc/RestClient/getCopytradingLeadRanks.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/public-lead-traders // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1537 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1543 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getCopytradingLeadRanks(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getCopytradingLeadStats.js b/examples/apidoc/RestClient/getCopytradingLeadStats.js index cef7f8c..20f2069 100644 --- a/examples/apidoc/RestClient/getCopytradingLeadStats.js +++ b/examples/apidoc/RestClient/getCopytradingLeadStats.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/public-stats // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1556 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1562 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getCopytradingLeadStats(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getCopytradingLeadTradersHistory.js b/examples/apidoc/RestClient/getCopytradingLeadTradersHistory.js index e469879..94e046f 100644 --- a/examples/apidoc/RestClient/getCopytradingLeadTradersHistory.js +++ b/examples/apidoc/RestClient/getCopytradingLeadTradersHistory.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/lead-traders-history // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1525 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1531 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getCopytradingLeadTradersHistory(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getCopytradingLeadWeeklyPnl.js b/examples/apidoc/RestClient/getCopytradingLeadWeeklyPnl.js index 8acaf2b..93334f2 100644 --- a/examples/apidoc/RestClient/getCopytradingLeadWeeklyPnl.js +++ b/examples/apidoc/RestClient/getCopytradingLeadWeeklyPnl.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/public-weekly-pnl // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1543 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1549 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getCopytradingLeadWeeklyPnl(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getCopytradingMyLeadTraders.js b/examples/apidoc/RestClient/getCopytradingMyLeadTraders.js index 1a82f3b..2963a17 100644 --- a/examples/apidoc/RestClient/getCopytradingMyLeadTraders.js +++ b/examples/apidoc/RestClient/getCopytradingMyLeadTraders.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/current-lead-traders // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1519 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1525 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getCopytradingMyLeadTraders(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getCopytradingPLeadPrivateDailyPnl.js b/examples/apidoc/RestClient/getCopytradingPLeadPrivateDailyPnl.js index 499209f..b08930d 100644 --- a/examples/apidoc/RestClient/getCopytradingPLeadPrivateDailyPnl.js +++ b/examples/apidoc/RestClient/getCopytradingPLeadPrivateDailyPnl.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/pnl // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1600 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1606 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getCopytradingPLeadPrivateDailyPnl(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getCopytradingProfitDetails.js b/examples/apidoc/RestClient/getCopytradingProfitDetails.js index 43a17cf..de7b804 100644 --- a/examples/apidoc/RestClient/getCopytradingProfitDetails.js +++ b/examples/apidoc/RestClient/getCopytradingProfitDetails.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/profit-sharing-details // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1399 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1405 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getCopytradingProfitDetails(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getCopytradingSubpositions.js b/examples/apidoc/RestClient/getCopytradingSubpositions.js index ca570e8..98decbc 100644 --- a/examples/apidoc/RestClient/getCopytradingSubpositions.js +++ b/examples/apidoc/RestClient/getCopytradingSubpositions.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/current-subpositions // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1351 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1357 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getCopytradingSubpositions(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getCopytradingSubpositionsHistory.js b/examples/apidoc/RestClient/getCopytradingSubpositionsHistory.js index 6cf18da..1b8e5de 100644 --- a/examples/apidoc/RestClient/getCopytradingSubpositionsHistory.js +++ b/examples/apidoc/RestClient/getCopytradingSubpositionsHistory.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/subpositions-history // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1357 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1363 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getCopytradingSubpositionsHistory(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getCopytradingTotalProfit.js b/examples/apidoc/RestClient/getCopytradingTotalProfit.js index 612ced3..153d202 100644 --- a/examples/apidoc/RestClient/getCopytradingTotalProfit.js +++ b/examples/apidoc/RestClient/getCopytradingTotalProfit.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/total-profit-sharing // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1408 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1414 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getCopytradingTotalProfit(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getCopytradingTotalUnrealizedProfit.js b/examples/apidoc/RestClient/getCopytradingTotalUnrealizedProfit.js index b75743e..751183a 100644 --- a/examples/apidoc/RestClient/getCopytradingTotalUnrealizedProfit.js +++ b/examples/apidoc/RestClient/getCopytradingTotalUnrealizedProfit.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/total-unrealized-profit-sharing // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1423 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1429 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getCopytradingTotalUnrealizedProfit(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getCopytradingUnrealizedProfit.js b/examples/apidoc/RestClient/getCopytradingUnrealizedProfit.js index 29c83c9..fb6c6a1 100644 --- a/examples/apidoc/RestClient/getCopytradingUnrealizedProfit.js +++ b/examples/apidoc/RestClient/getCopytradingUnrealizedProfit.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/unrealized-profit-sharing-details // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1414 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1420 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getCopytradingUnrealizedProfit(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getCurrencies.js b/examples/apidoc/RestClient/getCurrencies.js index 67e148e..885db16 100644 --- a/examples/apidoc/RestClient/getCurrencies.js +++ b/examples/apidoc/RestClient/getCurrencies.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/asset/currencies // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2354 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2360 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getCurrencies(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getDeliveryExerciseHistory.js b/examples/apidoc/RestClient/getDeliveryExerciseHistory.js index 1642535..a573a1b 100644 --- a/examples/apidoc/RestClient/getDeliveryExerciseHistory.js +++ b/examples/apidoc/RestClient/getDeliveryExerciseHistory.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/public/delivery-exercise-history // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1999 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2005 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getDeliveryExerciseHistory(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getDepositAddress.js b/examples/apidoc/RestClient/getDepositAddress.js index a37520b..5e1711b 100644 --- a/examples/apidoc/RestClient/getDepositAddress.js +++ b/examples/apidoc/RestClient/getDepositAddress.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/asset/deposit-address // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2402 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2408 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getDepositAddress(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getDepositHistory.js b/examples/apidoc/RestClient/getDepositHistory.js index e7e7b85..02aa3fb 100644 --- a/examples/apidoc/RestClient/getDepositHistory.js +++ b/examples/apidoc/RestClient/getDepositHistory.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/asset/deposit-history // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2406 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2412 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getDepositHistory(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getDepositWithdrawStatus.js b/examples/apidoc/RestClient/getDepositWithdrawStatus.js index 740ff12..ffc2983 100644 --- a/examples/apidoc/RestClient/getDepositWithdrawStatus.js +++ b/examples/apidoc/RestClient/getDepositWithdrawStatus.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/asset/deposit-withdraw-status // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2434 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2440 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getDepositWithdrawStatus(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getDiscountRateAndInterestFreeQuota.js b/examples/apidoc/RestClient/getDiscountRateAndInterestFreeQuota.js index bdc92d1..8d67425 100644 --- a/examples/apidoc/RestClient/getDiscountRateAndInterestFreeQuota.js +++ b/examples/apidoc/RestClient/getDiscountRateAndInterestFreeQuota.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/public/discount-rate-interest-free-quota // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2027 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2033 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getDiscountRateAndInterestFreeQuota(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getETHStakingBalance.js b/examples/apidoc/RestClient/getETHStakingBalance.js index f24d502..a129ef8 100644 --- a/examples/apidoc/RestClient/getETHStakingBalance.js +++ b/examples/apidoc/RestClient/getETHStakingBalance.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/finance/staking-defi/eth/balance // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2698 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2704 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getETHStakingBalance(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getETHStakingHistory.js b/examples/apidoc/RestClient/getETHStakingHistory.js index d44eaf4..459b11e 100644 --- a/examples/apidoc/RestClient/getETHStakingHistory.js +++ b/examples/apidoc/RestClient/getETHStakingHistory.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/finance/staking-defi/eth/purchase-redeem-history // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2702 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2708 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getETHStakingHistory(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getEasyConvertCurrencies.js b/examples/apidoc/RestClient/getEasyConvertCurrencies.js index b2b2c9a..73aaf17 100644 --- a/examples/apidoc/RestClient/getEasyConvertCurrencies.js +++ b/examples/apidoc/RestClient/getEasyConvertCurrencies.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/trade/easy-convert-currency-list // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L843 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L845 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getEasyConvertCurrencies(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getEasyConvertHistory.js b/examples/apidoc/RestClient/getEasyConvertHistory.js index 13cbe74..ce68f89 100644 --- a/examples/apidoc/RestClient/getEasyConvertHistory.js +++ b/examples/apidoc/RestClient/getEasyConvertHistory.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/trade/easy-convert-history // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L865 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L867 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getEasyConvertHistory(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getEconomicCalendar.js b/examples/apidoc/RestClient/getEconomicCalendar.js index 405de05..30bc204 100644 --- a/examples/apidoc/RestClient/getEconomicCalendar.js +++ b/examples/apidoc/RestClient/getEconomicCalendar.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/public/economic-calendar // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2191 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2197 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getEconomicCalendar(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getEstimatedDeliveryExercisePrice.js b/examples/apidoc/RestClient/getEstimatedDeliveryExercisePrice.js index 8ad3f09..1f5e838 100644 --- a/examples/apidoc/RestClient/getEstimatedDeliveryExercisePrice.js +++ b/examples/apidoc/RestClient/getEstimatedDeliveryExercisePrice.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/public/estimated-price // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2023 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2029 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getEstimatedDeliveryExercisePrice(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getExchangeRate.js b/examples/apidoc/RestClient/getExchangeRate.js index 83428d9..5d5b55b 100644 --- a/examples/apidoc/RestClient/getExchangeRate.js +++ b/examples/apidoc/RestClient/getExchangeRate.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/market/exchange-rate // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2183 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2189 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getExchangeRate(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getExchanges.js b/examples/apidoc/RestClient/getExchanges.js index 2c2a6b0..a85547a 100644 --- a/examples/apidoc/RestClient/getExchanges.js +++ b/examples/apidoc/RestClient/getExchanges.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/asset/exchange-list // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2444 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2450 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getExchanges(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getFeeRates.js b/examples/apidoc/RestClient/getFeeRates.js index be71d9c..7d8578d 100644 --- a/examples/apidoc/RestClient/getFeeRates.js +++ b/examples/apidoc/RestClient/getFeeRates.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/trade-fee // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L444 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L445 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getFeeRates(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getFeeRatesV2.js b/examples/apidoc/RestClient/getFeeRatesV2.js index 6a6c123..514295f 100644 --- a/examples/apidoc/RestClient/getFeeRatesV2.js +++ b/examples/apidoc/RestClient/getFeeRatesV2.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/trade-fee // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L460 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L461 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getFeeRatesV2(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getFills.js b/examples/apidoc/RestClient/getFills.js index 2f9f07b..98af44f 100644 --- a/examples/apidoc/RestClient/getFills.js +++ b/examples/apidoc/RestClient/getFills.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/trade/fills // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L806 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L833 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getFills(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getFillsHistory.js b/examples/apidoc/RestClient/getFillsHistory.js index 69ffb52..f74522e 100644 --- a/examples/apidoc/RestClient/getFillsHistory.js +++ b/examples/apidoc/RestClient/getFillsHistory.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/trade/fills-history // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L813 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L840 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getFillsHistory(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getFixedLoanBorrowLimit.js b/examples/apidoc/RestClient/getFixedLoanBorrowLimit.js index 5cb6831..689f7b7 100644 --- a/examples/apidoc/RestClient/getFixedLoanBorrowLimit.js +++ b/examples/apidoc/RestClient/getFixedLoanBorrowLimit.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/fixed-loan/borrowing-limit // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L573 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L574 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getFixedLoanBorrowLimit(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getFixedLoanBorrowOrders.js b/examples/apidoc/RestClient/getFixedLoanBorrowOrders.js index ede8383..5ebde58 100644 --- a/examples/apidoc/RestClient/getFixedLoanBorrowOrders.js +++ b/examples/apidoc/RestClient/getFixedLoanBorrowOrders.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/fixed-loan/borrowing-orders-list // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L637 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L664 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getFixedLoanBorrowOrders(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getFixedLoanBorrowQuote.js b/examples/apidoc/RestClient/getFixedLoanBorrowQuote.js index ba74b17..a3c178d 100644 --- a/examples/apidoc/RestClient/getFixedLoanBorrowQuote.js +++ b/examples/apidoc/RestClient/getFixedLoanBorrowQuote.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/fixed-loan/borrowing-quote // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L577 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L578 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getFixedLoanBorrowQuote(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getFullOrderBook.js b/examples/apidoc/RestClient/getFullOrderBook.js index 4c00abd..f948655 100644 --- a/examples/apidoc/RestClient/getFullOrderBook.js +++ b/examples/apidoc/RestClient/getFullOrderBook.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/market/books-full // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1666 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1672 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getFullOrderBook(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getFundingRate.js b/examples/apidoc/RestClient/getFundingRate.js index 0f90a52..6dd3b0b 100644 --- a/examples/apidoc/RestClient/getFundingRate.js +++ b/examples/apidoc/RestClient/getFundingRate.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/public/funding-rate // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2007 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2013 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getFundingRate(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getFundingRateHistory.js b/examples/apidoc/RestClient/getFundingRateHistory.js index e461785..04150a5 100644 --- a/examples/apidoc/RestClient/getFundingRateHistory.js +++ b/examples/apidoc/RestClient/getFundingRateHistory.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/public/funding-rate-history // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2011 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2017 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getFundingRateHistory(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getFundsTransferState.js b/examples/apidoc/RestClient/getFundsTransferState.js index 2bb11f6..670e3e3 100644 --- a/examples/apidoc/RestClient/getFundsTransferState.js +++ b/examples/apidoc/RestClient/getFundsTransferState.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/asset/transfer-state // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2375 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2381 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getFundsTransferState(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getGreeks.js b/examples/apidoc/RestClient/getGreeks.js index cca9bc9..d927f95 100644 --- a/examples/apidoc/RestClient/getGreeks.js +++ b/examples/apidoc/RestClient/getGreeks.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/greeks // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L689 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L716 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getGreeks(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getGridAIParameter.js b/examples/apidoc/RestClient/getGridAIParameter.js index b61a207..426c688 100644 --- a/examples/apidoc/RestClient/getGridAIParameter.js +++ b/examples/apidoc/RestClient/getGridAIParameter.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/grid/ai-param // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1120 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1126 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getGridAIParameter(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getGridAlgoOrderDetails.js b/examples/apidoc/RestClient/getGridAlgoOrderDetails.js index b7ae068..3a8b65f 100644 --- a/examples/apidoc/RestClient/getGridAlgoOrderDetails.js +++ b/examples/apidoc/RestClient/getGridAlgoOrderDetails.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/grid/orders-algo-details // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1038 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1044 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getGridAlgoOrderDetails(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getGridAlgoOrderHistory.js b/examples/apidoc/RestClient/getGridAlgoOrderHistory.js index 24241ce..e11b6f3 100644 --- a/examples/apidoc/RestClient/getGridAlgoOrderHistory.js +++ b/examples/apidoc/RestClient/getGridAlgoOrderHistory.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/grid/orders-algo-history // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1031 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1037 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getGridAlgoOrderHistory(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getGridAlgoOrderList.js b/examples/apidoc/RestClient/getGridAlgoOrderList.js index 8592d54..979d9d3 100644 --- a/examples/apidoc/RestClient/getGridAlgoOrderList.js +++ b/examples/apidoc/RestClient/getGridAlgoOrderList.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/grid/orders-algo-pending // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1024 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1030 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getGridAlgoOrderList(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getGridAlgoOrderPositions.js b/examples/apidoc/RestClient/getGridAlgoOrderPositions.js index c881829..f5a3a00 100644 --- a/examples/apidoc/RestClient/getGridAlgoOrderPositions.js +++ b/examples/apidoc/RestClient/getGridAlgoOrderPositions.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/grid/positions // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1069 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1075 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getGridAlgoOrderPositions(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getGridAlgoSubOrders.js b/examples/apidoc/RestClient/getGridAlgoSubOrders.js index 2b9afcc..e945035 100644 --- a/examples/apidoc/RestClient/getGridAlgoSubOrders.js +++ b/examples/apidoc/RestClient/getGridAlgoSubOrders.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/grid/sub-orders // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1048 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1054 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getGridAlgoSubOrders(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getHistoricCandles.js b/examples/apidoc/RestClient/getHistoricCandles.js index e0efda3..58fa07b 100644 --- a/examples/apidoc/RestClient/getHistoricCandles.js +++ b/examples/apidoc/RestClient/getHistoricCandles.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/market/history-candles // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1705 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1711 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getHistoricCandles(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getHistoricCandlesV2.js b/examples/apidoc/RestClient/getHistoricCandlesV2.js index 24384f5..2458eaf 100644 --- a/examples/apidoc/RestClient/getHistoricCandlesV2.js +++ b/examples/apidoc/RestClient/getHistoricCandlesV2.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/market/history-candles // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1717 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1723 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getHistoricCandlesV2(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getHistoricIndexCandles.js b/examples/apidoc/RestClient/getHistoricIndexCandles.js index 9585c4b..9c4cdb3 100644 --- a/examples/apidoc/RestClient/getHistoricIndexCandles.js +++ b/examples/apidoc/RestClient/getHistoricIndexCandles.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/market/history-index-candles // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2113 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2119 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getHistoricIndexCandles(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getHistoricIndexCandlesV2.js b/examples/apidoc/RestClient/getHistoricIndexCandlesV2.js index 20c794b..46f92c0 100644 --- a/examples/apidoc/RestClient/getHistoricIndexCandlesV2.js +++ b/examples/apidoc/RestClient/getHistoricIndexCandlesV2.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/market/history-index-candles // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2125 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2131 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getHistoricIndexCandlesV2(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getHistoricMarkPriceCandles.js b/examples/apidoc/RestClient/getHistoricMarkPriceCandles.js index b2eaeb7..2c759f7 100644 --- a/examples/apidoc/RestClient/getHistoricMarkPriceCandles.js +++ b/examples/apidoc/RestClient/getHistoricMarkPriceCandles.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/market/historic-mark-price-candles // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2161 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2167 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getHistoricMarkPriceCandles(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getHistoricMarkPriceCandlesV2.js b/examples/apidoc/RestClient/getHistoricMarkPriceCandlesV2.js index 1d75375..a05ff4e 100644 --- a/examples/apidoc/RestClient/getHistoricMarkPriceCandlesV2.js +++ b/examples/apidoc/RestClient/getHistoricMarkPriceCandlesV2.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/market/history-mark-price-candles // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2173 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2179 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getHistoricMarkPriceCandlesV2(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getHistoricTrades.js b/examples/apidoc/RestClient/getHistoricTrades.js index 4099c45..5489755 100644 --- a/examples/apidoc/RestClient/getHistoricTrades.js +++ b/examples/apidoc/RestClient/getHistoricTrades.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/market/history-trades // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1725 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1731 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getHistoricTrades(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getIndexCandles.js b/examples/apidoc/RestClient/getIndexCandles.js index 00155b6..53caae7 100644 --- a/examples/apidoc/RestClient/getIndexCandles.js +++ b/examples/apidoc/RestClient/getIndexCandles.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/market/index-candles // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2089 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2095 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getIndexCandles(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getIndexCandlesV2.js b/examples/apidoc/RestClient/getIndexCandlesV2.js index 27e285e..081dfb6 100644 --- a/examples/apidoc/RestClient/getIndexCandlesV2.js +++ b/examples/apidoc/RestClient/getIndexCandlesV2.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/market/index-candles // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2101 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2107 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getIndexCandlesV2(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getIndexComponents.js b/examples/apidoc/RestClient/getIndexComponents.js index 5548dc8..8236ca0 100644 --- a/examples/apidoc/RestClient/getIndexComponents.js +++ b/examples/apidoc/RestClient/getIndexComponents.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/market/index-components // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2187 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2193 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getIndexComponents(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getIndexTickers.js b/examples/apidoc/RestClient/getIndexTickers.js index 24d75a6..fc8d22f 100644 --- a/examples/apidoc/RestClient/getIndexTickers.js +++ b/examples/apidoc/RestClient/getIndexTickers.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/market/index-tickers // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2074 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2080 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getIndexTickers(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getInstruments.js b/examples/apidoc/RestClient/getInstruments.js index 00ae502..a74eb4b 100644 --- a/examples/apidoc/RestClient/getInstruments.js +++ b/examples/apidoc/RestClient/getInstruments.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/public/instruments // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1985 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1991 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getInstruments(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getInsuranceFund.js b/examples/apidoc/RestClient/getInsuranceFund.js index dc85fa1..35b35bc 100644 --- a/examples/apidoc/RestClient/getInsuranceFund.js +++ b/examples/apidoc/RestClient/getInsuranceFund.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/public/insurance-fund // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2055 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2061 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getInsuranceFund(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getInterestAccrued.js b/examples/apidoc/RestClient/getInterestAccrued.js index 66ec370..0ea5763 100644 --- a/examples/apidoc/RestClient/getInterestAccrued.js +++ b/examples/apidoc/RestClient/getInterestAccrued.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/interest-accrued // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L470 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L471 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getInterestAccrued(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getInterestRate.js b/examples/apidoc/RestClient/getInterestRate.js index 9517c16..7622fde 100644 --- a/examples/apidoc/RestClient/getInterestRate.js +++ b/examples/apidoc/RestClient/getInterestRate.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/interest-rate // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L482 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L483 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getInterestRate(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getInterestRateAndLoanQuota.js b/examples/apidoc/RestClient/getInterestRateAndLoanQuota.js index 64c837e..76ad0cb 100644 --- a/examples/apidoc/RestClient/getInterestRateAndLoanQuota.js +++ b/examples/apidoc/RestClient/getInterestRateAndLoanQuota.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/public/interest-rate-loan-quota // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2043 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2049 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getInterestRateAndLoanQuota(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getInviteeDetail.js b/examples/apidoc/RestClient/getInviteeDetail.js index 8d6bb41..920c22f 100644 --- a/examples/apidoc/RestClient/getInviteeDetail.js +++ b/examples/apidoc/RestClient/getInviteeDetail.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/affiliate/invitee/detail // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2811 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2817 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getInviteeDetail(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getLendingAPYHistory.js b/examples/apidoc/RestClient/getLendingAPYHistory.js index 8cadeda..44587dd 100644 --- a/examples/apidoc/RestClient/getLendingAPYHistory.js +++ b/examples/apidoc/RestClient/getLendingAPYHistory.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/finance/fixed-loan/lending-apy-history // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2772 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2778 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getLendingAPYHistory(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getLendingHistory.js b/examples/apidoc/RestClient/getLendingHistory.js index 86b9923..a01ce72 100644 --- a/examples/apidoc/RestClient/getLendingHistory.js +++ b/examples/apidoc/RestClient/getLendingHistory.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/finance/savings/lending-history // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2750 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2756 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getLendingHistory(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getLendingOffers.js b/examples/apidoc/RestClient/getLendingOffers.js index 885b362..f052a5b 100644 --- a/examples/apidoc/RestClient/getLendingOffers.js +++ b/examples/apidoc/RestClient/getLendingOffers.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/finance/fixed-loan/lending-offers // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2768 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2774 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getLendingOffers(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getLendingOrders.js b/examples/apidoc/RestClient/getLendingOrders.js index 6eedef7..fd830d0 100644 --- a/examples/apidoc/RestClient/getLendingOrders.js +++ b/examples/apidoc/RestClient/getLendingOrders.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/finance/fixed-loan/lending-orders-list // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2791 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2797 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getLendingOrders(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getLendingSubOrders.js b/examples/apidoc/RestClient/getLendingSubOrders.js index c840848..ae6a60c 100644 --- a/examples/apidoc/RestClient/getLendingSubOrders.js +++ b/examples/apidoc/RestClient/getLendingSubOrders.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/finance/fixed-loan/lending-sub-orders // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2798 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2804 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getLendingSubOrders(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getLendingVolume.js b/examples/apidoc/RestClient/getLendingVolume.js index 9972d82..4b843a9 100644 --- a/examples/apidoc/RestClient/getLendingVolume.js +++ b/examples/apidoc/RestClient/getLendingVolume.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/finance/fixed-loan/pending-lending-volume // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2776 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2782 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getLendingVolume(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getLeverage.js b/examples/apidoc/RestClient/getLeverage.js index a1c33d5..9cdd32a 100644 --- a/examples/apidoc/RestClient/getLeverage.js +++ b/examples/apidoc/RestClient/getLeverage.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/leverage-info // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L402 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L403 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getLeverage(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getLeverageEstimatedInfo.js b/examples/apidoc/RestClient/getLeverageEstimatedInfo.js index a541bab..4165045 100644 --- a/examples/apidoc/RestClient/getLeverageEstimatedInfo.js +++ b/examples/apidoc/RestClient/getLeverageEstimatedInfo.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/adjust-leverage-info // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L417 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L418 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getLeverageEstimatedInfo(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getLeverageV2.js b/examples/apidoc/RestClient/getLeverageV2.js index 4c0b5fd..9f79561 100644 --- a/examples/apidoc/RestClient/getLeverageV2.js +++ b/examples/apidoc/RestClient/getLeverageV2.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/leverage-info // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L409 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L410 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getLeverageV2(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getLightningDeposits.js b/examples/apidoc/RestClient/getLightningDeposits.js index 1415a42..7b92484 100644 --- a/examples/apidoc/RestClient/getLightningDeposits.js +++ b/examples/apidoc/RestClient/getLightningDeposits.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/asset/deposit-lightning // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2394 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2400 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getLightningDeposits(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getLiquidationOrders.js b/examples/apidoc/RestClient/getLiquidationOrders.js index df2967f..2d55e08 100644 --- a/examples/apidoc/RestClient/getLiquidationOrders.js +++ b/examples/apidoc/RestClient/getLiquidationOrders.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/public/liquidation-orders // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2207 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2213 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getLiquidationOrders(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getLongShortContractRatio.js b/examples/apidoc/RestClient/getLongShortContractRatio.js index 2a555a8..895bbfd 100644 --- a/examples/apidoc/RestClient/getLongShortContractRatio.js +++ b/examples/apidoc/RestClient/getLongShortContractRatio.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rubik/stat/contracts/long-short-account-ratio-contract // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2273 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2279 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getLongShortContractRatio(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getLongShortRatio.js b/examples/apidoc/RestClient/getLongShortRatio.js index 0961862..170b358 100644 --- a/examples/apidoc/RestClient/getLongShortRatio.js +++ b/examples/apidoc/RestClient/getLongShortRatio.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rubik/stat/contracts/long-short-account-ratio // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2282 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2288 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getLongShortRatio(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getMMPConfig.js b/examples/apidoc/RestClient/getMMPConfig.js index 421e2b4..21e1ea4 100644 --- a/examples/apidoc/RestClient/getMMPConfig.js +++ b/examples/apidoc/RestClient/getMMPConfig.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/mmp-config // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L739 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L766 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getMMPConfig(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getManagedSubAccountTransferHistory.js b/examples/apidoc/RestClient/getManagedSubAccountTransferHistory.js index 227075a..9142f7a 100644 --- a/examples/apidoc/RestClient/getManagedSubAccountTransferHistory.js +++ b/examples/apidoc/RestClient/getManagedSubAccountTransferHistory.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/asset/subaccount/managed-subaccount-bills // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2541 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2547 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getManagedSubAccountTransferHistory(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getMarginLendingRatio.js b/examples/apidoc/RestClient/getMarginLendingRatio.js index 17308d1..5a2135a 100644 --- a/examples/apidoc/RestClient/getMarginLendingRatio.js +++ b/examples/apidoc/RestClient/getMarginLendingRatio.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rubik/stat/margin/loan-ratio // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2246 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2252 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getMarginLendingRatio(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getMarkPrice.js b/examples/apidoc/RestClient/getMarkPrice.js index b0949ab..bb562e5 100644 --- a/examples/apidoc/RestClient/getMarkPrice.js +++ b/examples/apidoc/RestClient/getMarkPrice.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/public/mark-price // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2035 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2041 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getMarkPrice(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getMarkPriceCandles.js b/examples/apidoc/RestClient/getMarkPriceCandles.js index 287e22a..511b95d 100644 --- a/examples/apidoc/RestClient/getMarkPriceCandles.js +++ b/examples/apidoc/RestClient/getMarkPriceCandles.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/market/mark-price-candles // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2137 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2143 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getMarkPriceCandles(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getMarkPriceCandlesV2.js b/examples/apidoc/RestClient/getMarkPriceCandlesV2.js index 8731d03..388b3c8 100644 --- a/examples/apidoc/RestClient/getMarkPriceCandlesV2.js +++ b/examples/apidoc/RestClient/getMarkPriceCandlesV2.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/market/mark-price-candles // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2149 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2155 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getMarkPriceCandlesV2(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getMaxAvailableTradableAmount.js b/examples/apidoc/RestClient/getMaxAvailableTradableAmount.js index 99c5449..b0a2aca 100644 --- a/examples/apidoc/RestClient/getMaxAvailableTradableAmount.js +++ b/examples/apidoc/RestClient/getMaxAvailableTradableAmount.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/max-avail-size // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L383 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L384 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getMaxAvailableTradableAmount(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getMaxBuySellAmount.js b/examples/apidoc/RestClient/getMaxBuySellAmount.js index 001127e..d927983 100644 --- a/examples/apidoc/RestClient/getMaxBuySellAmount.js +++ b/examples/apidoc/RestClient/getMaxBuySellAmount.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/max-size // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L372 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L373 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getMaxBuySellAmount(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getMaxGridQuantity.js b/examples/apidoc/RestClient/getMaxGridQuantity.js index 73f3d24..0716d89 100644 --- a/examples/apidoc/RestClient/getMaxGridQuantity.js +++ b/examples/apidoc/RestClient/getMaxGridQuantity.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/grid/grid-quantity // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1149 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1155 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getMaxGridQuantity(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getMaxLoan.js b/examples/apidoc/RestClient/getMaxLoan.js index 30d37de..71db3be 100644 --- a/examples/apidoc/RestClient/getMaxLoan.js +++ b/examples/apidoc/RestClient/getMaxLoan.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/max-loan // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L428 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L429 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getMaxLoan(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getMaxWithdrawals.js b/examples/apidoc/RestClient/getMaxWithdrawals.js index 352c7c9..c173c3e 100644 --- a/examples/apidoc/RestClient/getMaxWithdrawals.js +++ b/examples/apidoc/RestClient/getMaxWithdrawals.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/max-withdrawal // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L500 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L501 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getMaxWithdrawals(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getMinMaxLimitPrice.js b/examples/apidoc/RestClient/getMinMaxLimitPrice.js index 495a030..2f058e6 100644 --- a/examples/apidoc/RestClient/getMinMaxLimitPrice.js +++ b/examples/apidoc/RestClient/getMinMaxLimitPrice.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/public/price-limit // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2015 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2021 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getMinMaxLimitPrice(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getMonthlyStatement.js b/examples/apidoc/RestClient/getMonthlyStatement.js index d4dcd0e..3dd0492 100644 --- a/examples/apidoc/RestClient/getMonthlyStatement.js +++ b/examples/apidoc/RestClient/getMonthlyStatement.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/asset/monthly-statement // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2452 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2458 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getMonthlyStatement(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getNonTradableAssets.js b/examples/apidoc/RestClient/getNonTradableAssets.js index bf6ce0e..91aa1cf 100644 --- a/examples/apidoc/RestClient/getNonTradableAssets.js +++ b/examples/apidoc/RestClient/getNonTradableAssets.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/asset/non-tradable-assets // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2362 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2368 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getNonTradableAssets(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getOneClickRepayCurrencyList.js b/examples/apidoc/RestClient/getOneClickRepayCurrencyList.js index 22b51a1..05969a9 100644 --- a/examples/apidoc/RestClient/getOneClickRepayCurrencyList.js +++ b/examples/apidoc/RestClient/getOneClickRepayCurrencyList.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/trade/one-click-repay-currency-list // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L873 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L875 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getOneClickRepayCurrencyList(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getOneClickRepayHistory.js b/examples/apidoc/RestClient/getOneClickRepayHistory.js index 62cc478..c928c24 100644 --- a/examples/apidoc/RestClient/getOneClickRepayHistory.js +++ b/examples/apidoc/RestClient/getOneClickRepayHistory.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/trade/one-click-repay-history // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L897 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L899 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getOneClickRepayHistory(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getOpenInterest.js b/examples/apidoc/RestClient/getOpenInterest.js index e6d1218..d41205a 100644 --- a/examples/apidoc/RestClient/getOpenInterest.js +++ b/examples/apidoc/RestClient/getOpenInterest.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/public/open-interest // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2003 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2009 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getOpenInterest(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getOpenInterestAndVolumeExpiry.js b/examples/apidoc/RestClient/getOpenInterestAndVolumeExpiry.js index 79cb06e..0a4d682 100644 --- a/examples/apidoc/RestClient/getOpenInterestAndVolumeExpiry.js +++ b/examples/apidoc/RestClient/getOpenInterestAndVolumeExpiry.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rubik/stat/option/open-interest-volume-expiry // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2323 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2329 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getOpenInterestAndVolumeExpiry(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getOpenInterestAndVolumeStrike.js b/examples/apidoc/RestClient/getOpenInterestAndVolumeStrike.js index 2b37ebc..cc9fca7 100644 --- a/examples/apidoc/RestClient/getOpenInterestAndVolumeStrike.js +++ b/examples/apidoc/RestClient/getOpenInterestAndVolumeStrike.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rubik/stat/option/open-interest-volume-strike // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2333 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2339 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getOpenInterestAndVolumeStrike(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getOpenInterestHistory.js b/examples/apidoc/RestClient/getOpenInterestHistory.js index 4109deb..5b842c8 100644 --- a/examples/apidoc/RestClient/getOpenInterestHistory.js +++ b/examples/apidoc/RestClient/getOpenInterestHistory.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rubik/stat/contracts/open-interest-history // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2221 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2227 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getOpenInterestHistory(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getOptionMarketData.js b/examples/apidoc/RestClient/getOptionMarketData.js index ec35a5b..9933c66 100644 --- a/examples/apidoc/RestClient/getOptionMarketData.js +++ b/examples/apidoc/RestClient/getOptionMarketData.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/public/opt-summary // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2019 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2025 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getOptionMarketData(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getOptionTickBands.js b/examples/apidoc/RestClient/getOptionTickBands.js index 7b46ae2..eb001d7 100644 --- a/examples/apidoc/RestClient/getOptionTickBands.js +++ b/examples/apidoc/RestClient/getOptionTickBands.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/public/instrument-tick-bands // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2063 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2069 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getOptionTickBands(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getOptionTrades.js b/examples/apidoc/RestClient/getOptionTrades.js index c39e9d5..a18907a 100644 --- a/examples/apidoc/RestClient/getOptionTrades.js +++ b/examples/apidoc/RestClient/getOptionTrades.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/public/option-trades // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1743 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1749 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getOptionTrades(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getOptionTradesByInstrument.js b/examples/apidoc/RestClient/getOptionTradesByInstrument.js index b48816d..2d70ee9 100644 --- a/examples/apidoc/RestClient/getOptionTradesByInstrument.js +++ b/examples/apidoc/RestClient/getOptionTradesByInstrument.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/market/option/instrument-family-trades // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1737 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1743 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getOptionTradesByInstrument(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getOptionsOpenInterestAndVolume.js b/examples/apidoc/RestClient/getOptionsOpenInterestAndVolume.js index e0d80fb..acaa22f 100644 --- a/examples/apidoc/RestClient/getOptionsOpenInterestAndVolume.js +++ b/examples/apidoc/RestClient/getOptionsOpenInterestAndVolume.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rubik/stat/option/open-interest-volume // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2306 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2312 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getOptionsOpenInterestAndVolume(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getOracle.js b/examples/apidoc/RestClient/getOracle.js index 78f4b2b..948638c 100644 --- a/examples/apidoc/RestClient/getOracle.js +++ b/examples/apidoc/RestClient/getOracle.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/market/open-oracle // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2179 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2185 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getOracle(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getOrderBook.js b/examples/apidoc/RestClient/getOrderBook.js index 6e5142d..d864eb2 100644 --- a/examples/apidoc/RestClient/getOrderBook.js +++ b/examples/apidoc/RestClient/getOrderBook.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/market/books // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1662 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1668 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getOrderBook(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getOrderDetails.js b/examples/apidoc/RestClient/getOrderDetails.js index 43591b9..8a64a2e 100644 --- a/examples/apidoc/RestClient/getOrderDetails.js +++ b/examples/apidoc/RestClient/getOrderDetails.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/trade/order // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L779 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L806 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getOrderDetails(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getOrderHistory.js b/examples/apidoc/RestClient/getOrderHistory.js index fa185bc..c956078 100644 --- a/examples/apidoc/RestClient/getOrderHistory.js +++ b/examples/apidoc/RestClient/getOrderHistory.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/trade/orders-history // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L790 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L817 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getOrderHistory(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getOrderHistoryArchive.js b/examples/apidoc/RestClient/getOrderHistoryArchive.js index 1170968..098365e 100644 --- a/examples/apidoc/RestClient/getOrderHistoryArchive.js +++ b/examples/apidoc/RestClient/getOrderHistoryArchive.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/trade/orders-history-archive // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L797 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L824 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getOrderHistoryArchive(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getOrderList.js b/examples/apidoc/RestClient/getOrderList.js index 08eb080..24f357b 100644 --- a/examples/apidoc/RestClient/getOrderList.js +++ b/examples/apidoc/RestClient/getOrderList.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/trade/orders-pending // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L783 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L810 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getOrderList(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getPMLimitation.js b/examples/apidoc/RestClient/getPMLimitation.js index 8f5e477..7417cdc 100644 --- a/examples/apidoc/RestClient/getPMLimitation.js +++ b/examples/apidoc/RestClient/getPMLimitation.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/position-tiers // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L693 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L720 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getPMLimitation(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getPositionTiers.js b/examples/apidoc/RestClient/getPositionTiers.js index 7c3d896..fa3d303 100644 --- a/examples/apidoc/RestClient/getPositionTiers.js +++ b/examples/apidoc/RestClient/getPositionTiers.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/public/position-tiers // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2039 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2045 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getPositionTiers(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getPositions.js b/examples/apidoc/RestClient/getPositions.js index 8ea2436..d418c6e 100644 --- a/examples/apidoc/RestClient/getPositions.js +++ b/examples/apidoc/RestClient/getPositions.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/positions // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L305 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L306 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getPositions(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getPositionsHistory.js b/examples/apidoc/RestClient/getPositionsHistory.js index 98c357a..e5e8699 100644 --- a/examples/apidoc/RestClient/getPositionsHistory.js +++ b/examples/apidoc/RestClient/getPositionsHistory.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/positions-history // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L309 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L310 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getPositionsHistory(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getPremiumHistory.js b/examples/apidoc/RestClient/getPremiumHistory.js index 98c947e..ff9dbc3 100644 --- a/examples/apidoc/RestClient/getPremiumHistory.js +++ b/examples/apidoc/RestClient/getPremiumHistory.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/public/premium-history // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2070 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2076 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getPremiumHistory(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getPublicBlockTrades.js b/examples/apidoc/RestClient/getPublicBlockTrades.js index 71c051b..47ebff8 100644 --- a/examples/apidoc/RestClient/getPublicBlockTrades.js +++ b/examples/apidoc/RestClient/getPublicBlockTrades.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/market/block-trades // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2200 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2206 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getPublicBlockTrades(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getPublicBorrowHistory.js b/examples/apidoc/RestClient/getPublicBorrowHistory.js index cc2f804..21f70e7 100644 --- a/examples/apidoc/RestClient/getPublicBorrowHistory.js +++ b/examples/apidoc/RestClient/getPublicBorrowHistory.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/finance/savings/lending-rate-history // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2758 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2764 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getPublicBorrowHistory(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getPublicBorrowInfo.js b/examples/apidoc/RestClient/getPublicBorrowInfo.js index 63b42fe..cd4bdfe 100644 --- a/examples/apidoc/RestClient/getPublicBorrowInfo.js +++ b/examples/apidoc/RestClient/getPublicBorrowInfo.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/finance/savings/lending-rate-summary // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2754 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2760 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getPublicBorrowInfo(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getPublicRFQBlockTrades.js b/examples/apidoc/RestClient/getPublicRFQBlockTrades.js index ef0ae3b..a46c0e7 100644 --- a/examples/apidoc/RestClient/getPublicRFQBlockTrades.js +++ b/examples/apidoc/RestClient/getPublicRFQBlockTrades.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rfq/public-trades // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1859 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1865 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getPublicRFQBlockTrades(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getPutCallRatio.js b/examples/apidoc/RestClient/getPutCallRatio.js index 9e66a3c..c6ae2a8 100644 --- a/examples/apidoc/RestClient/getPutCallRatio.js +++ b/examples/apidoc/RestClient/getPutCallRatio.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rubik/stat/option/open-interest-volume-ratio // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2313 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2319 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getPutCallRatio(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getQuickMarginBorrowRepayHistory.js b/examples/apidoc/RestClient/getQuickMarginBorrowRepayHistory.js index f28d32a..a9fa8f3 100644 --- a/examples/apidoc/RestClient/getQuickMarginBorrowRepayHistory.js +++ b/examples/apidoc/RestClient/getQuickMarginBorrowRepayHistory.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/quick-margin-borrow-repay-history // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L517 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L518 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getQuickMarginBorrowRepayHistory(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getQuoteProducts.js b/examples/apidoc/RestClient/getQuoteProducts.js index 34d7289..3b5add3 100644 --- a/examples/apidoc/RestClient/getQuoteProducts.js +++ b/examples/apidoc/RestClient/getQuoteProducts.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rfq/maker-instrument-settings // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1787 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1793 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getQuoteProducts(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getRSIBackTesting.js b/examples/apidoc/RestClient/getRSIBackTesting.js index 89d7fb3..f94533d 100644 --- a/examples/apidoc/RestClient/getRSIBackTesting.js +++ b/examples/apidoc/RestClient/getRSIBackTesting.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/public/rsi-back-testing // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1141 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1147 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getRSIBackTesting(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getRecurringBuyOrderDetails.js b/examples/apidoc/RestClient/getRecurringBuyOrderDetails.js index af2a7d0..8583c3c 100644 --- a/examples/apidoc/RestClient/getRecurringBuyOrderDetails.js +++ b/examples/apidoc/RestClient/getRecurringBuyOrderDetails.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/recurring/orders-algo-details // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1330 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1336 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getRecurringBuyOrderDetails(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getRecurringBuyOrderHistory.js b/examples/apidoc/RestClient/getRecurringBuyOrderHistory.js index 2e0cc49..b2c1b12 100644 --- a/examples/apidoc/RestClient/getRecurringBuyOrderHistory.js +++ b/examples/apidoc/RestClient/getRecurringBuyOrderHistory.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/recurring/orders-algo-history // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1321 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1327 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getRecurringBuyOrderHistory(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getRecurringBuyOrders.js b/examples/apidoc/RestClient/getRecurringBuyOrders.js index 3643b67..6094149 100644 --- a/examples/apidoc/RestClient/getRecurringBuyOrders.js +++ b/examples/apidoc/RestClient/getRecurringBuyOrders.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/recurring/orders-algo-pending // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1312 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1318 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getRecurringBuyOrders(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getRecurringBuySubOrders.js b/examples/apidoc/RestClient/getRecurringBuySubOrders.js index 98f0243..275e455 100644 --- a/examples/apidoc/RestClient/getRecurringBuySubOrders.js +++ b/examples/apidoc/RestClient/getRecurringBuySubOrders.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/recurring/sub-orders // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1339 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1345 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getRecurringBuySubOrders(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getRequestedBillsHistoryLink.js b/examples/apidoc/RestClient/getRequestedBillsHistoryLink.js index 677b58a..fd9b32f 100644 --- a/examples/apidoc/RestClient/getRequestedBillsHistoryLink.js +++ b/examples/apidoc/RestClient/getRequestedBillsHistoryLink.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/bills-history-archive // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L352 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L353 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getRequestedBillsHistoryLink(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getSavingBalance.js b/examples/apidoc/RestClient/getSavingBalance.js index 98c143f..780498c 100644 --- a/examples/apidoc/RestClient/getSavingBalance.js +++ b/examples/apidoc/RestClient/getSavingBalance.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/finance/savings/balance // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2725 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2731 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getSavingBalance(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getSignalBotEventHistory.js b/examples/apidoc/RestClient/getSignalBotEventHistory.js index c064f1a..e441c66 100644 --- a/examples/apidoc/RestClient/getSignalBotEventHistory.js +++ b/examples/apidoc/RestClient/getSignalBotEventHistory.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/signal/event-history // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1276 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1282 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getSignalBotEventHistory(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getSignalBotHistory.js b/examples/apidoc/RestClient/getSignalBotHistory.js index 5f1c63d..6db19e3 100644 --- a/examples/apidoc/RestClient/getSignalBotHistory.js +++ b/examples/apidoc/RestClient/getSignalBotHistory.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/signal/orders-algo-history // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1230 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1236 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getSignalBotHistory(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getSignalBotOrder.js b/examples/apidoc/RestClient/getSignalBotOrder.js index 11c6577..855e56d 100644 --- a/examples/apidoc/RestClient/getSignalBotOrder.js +++ b/examples/apidoc/RestClient/getSignalBotOrder.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/signal/orders-algo-details // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1213 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1219 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getSignalBotOrder(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getSignalBotPositionHistory.js b/examples/apidoc/RestClient/getSignalBotPositionHistory.js index 77abaf8..df1dc44 100644 --- a/examples/apidoc/RestClient/getSignalBotPositionHistory.js +++ b/examples/apidoc/RestClient/getSignalBotPositionHistory.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/signal/positions-history // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1244 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1250 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getSignalBotPositionHistory(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getSignalBotPositions.js b/examples/apidoc/RestClient/getSignalBotPositions.js index 6346e35..75668f1 100644 --- a/examples/apidoc/RestClient/getSignalBotPositions.js +++ b/examples/apidoc/RestClient/getSignalBotPositions.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/signal/positions // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1237 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1243 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getSignalBotPositions(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getSignalBotSubOrders.js b/examples/apidoc/RestClient/getSignalBotSubOrders.js index 8538c8d..9400cdd 100644 --- a/examples/apidoc/RestClient/getSignalBotSubOrders.js +++ b/examples/apidoc/RestClient/getSignalBotSubOrders.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/signal/sub-orders // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1272 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1278 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getSignalBotSubOrders(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getSignals.js b/examples/apidoc/RestClient/getSignals.js index e926a62..9f26c98 100644 --- a/examples/apidoc/RestClient/getSignals.js +++ b/examples/apidoc/RestClient/getSignals.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/signal/signals // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1167 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1173 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getSignals(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getSpreadActiveOrders.js b/examples/apidoc/RestClient/getSpreadActiveOrders.js index 6f5f5af..c4ee7df 100644 --- a/examples/apidoc/RestClient/getSpreadActiveOrders.js +++ b/examples/apidoc/RestClient/getSpreadActiveOrders.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/sprd/orders-pending // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1917 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1923 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getSpreadActiveOrders(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getSpreadCandles.js b/examples/apidoc/RestClient/getSpreadCandles.js index 345eb36..7aa16c1 100644 --- a/examples/apidoc/RestClient/getSpreadCandles.js +++ b/examples/apidoc/RestClient/getSpreadCandles.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/market/sprd-candles // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1960 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1966 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getSpreadCandles(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getSpreadHistoryCandles.js b/examples/apidoc/RestClient/getSpreadHistoryCandles.js index c84a997..199e4c5 100644 --- a/examples/apidoc/RestClient/getSpreadHistoryCandles.js +++ b/examples/apidoc/RestClient/getSpreadHistoryCandles.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/market/sprd-history-candles // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1964 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1970 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getSpreadHistoryCandles(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getSpreadOrder.js b/examples/apidoc/RestClient/getSpreadOrder.js index d29ecca..a142671 100644 --- a/examples/apidoc/RestClient/getSpreadOrder.js +++ b/examples/apidoc/RestClient/getSpreadOrder.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/sprd/order // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1910 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1916 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getSpreadOrder(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getSpreadOrderBook.js b/examples/apidoc/RestClient/getSpreadOrderBook.js index 9a3d841..f0bcffa 100644 --- a/examples/apidoc/RestClient/getSpreadOrderBook.js +++ b/examples/apidoc/RestClient/getSpreadOrderBook.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/sprd/books // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1943 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1949 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getSpreadOrderBook(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getSpreadOrdersArchive.js b/examples/apidoc/RestClient/getSpreadOrdersArchive.js index 1c253e9..b5e26f1 100644 --- a/examples/apidoc/RestClient/getSpreadOrdersArchive.js +++ b/examples/apidoc/RestClient/getSpreadOrdersArchive.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/sprd/orders-history-archive // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1929 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1935 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getSpreadOrdersArchive(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getSpreadOrdersRecent.js b/examples/apidoc/RestClient/getSpreadOrdersRecent.js index 3664fc0..e7d01f2 100644 --- a/examples/apidoc/RestClient/getSpreadOrdersRecent.js +++ b/examples/apidoc/RestClient/getSpreadOrdersRecent.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/sprd/orders-history // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1923 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1929 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getSpreadOrdersRecent(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getSpreadPublicTrades.js b/examples/apidoc/RestClient/getSpreadPublicTrades.js index cd24cce..440a641 100644 --- a/examples/apidoc/RestClient/getSpreadPublicTrades.js +++ b/examples/apidoc/RestClient/getSpreadPublicTrades.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/sprd/public-trades // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1954 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1960 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getSpreadPublicTrades(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getSpreadTicker.js b/examples/apidoc/RestClient/getSpreadTicker.js index 59cdea1..b1269d3 100644 --- a/examples/apidoc/RestClient/getSpreadTicker.js +++ b/examples/apidoc/RestClient/getSpreadTicker.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/market/sprd-ticker // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1950 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1956 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getSpreadTicker(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getSpreadTrades.js b/examples/apidoc/RestClient/getSpreadTrades.js index 93d41b7..3f774f6 100644 --- a/examples/apidoc/RestClient/getSpreadTrades.js +++ b/examples/apidoc/RestClient/getSpreadTrades.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/sprd/trades // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1935 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1941 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getSpreadTrades(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getSpreads.js b/examples/apidoc/RestClient/getSpreads.js index 4c0a7e0..18bf47f 100644 --- a/examples/apidoc/RestClient/getSpreads.js +++ b/examples/apidoc/RestClient/getSpreads.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/sprd/spreads // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1939 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1945 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getSpreads(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getStakingOffers.js b/examples/apidoc/RestClient/getStakingOffers.js index 5388a3c..89bd7a1 100644 --- a/examples/apidoc/RestClient/getStakingOffers.js +++ b/examples/apidoc/RestClient/getStakingOffers.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/finance/staking-defi/offers // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2605 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2611 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getStakingOffers(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getStakingOrderHistory.js b/examples/apidoc/RestClient/getStakingOrderHistory.js index 19f70b0..4b521a5 100644 --- a/examples/apidoc/RestClient/getStakingOrderHistory.js +++ b/examples/apidoc/RestClient/getStakingOrderHistory.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/finance/staking-defi/orders-history // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2667 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2673 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getStakingOrderHistory(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getSubAccountBalances.js b/examples/apidoc/RestClient/getSubAccountBalances.js index 40e4993..11c9361 100644 --- a/examples/apidoc/RestClient/getSubAccountBalances.js +++ b/examples/apidoc/RestClient/getSubAccountBalances.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/subaccount/balances // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2508 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2514 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getSubAccountBalances(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getSubAccountBorrowInterestAndLimit.js b/examples/apidoc/RestClient/getSubAccountBorrowInterestAndLimit.js index 1e2646f..563eebb 100644 --- a/examples/apidoc/RestClient/getSubAccountBorrowInterestAndLimit.js +++ b/examples/apidoc/RestClient/getSubAccountBorrowInterestAndLimit.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/subaccount/interest-limits // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2588 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2594 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getSubAccountBorrowInterestAndLimit(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getSubAccountCustodyTradingList.js b/examples/apidoc/RestClient/getSubAccountCustodyTradingList.js index 5e0ab60..6630c0f 100644 --- a/examples/apidoc/RestClient/getSubAccountCustodyTradingList.js +++ b/examples/apidoc/RestClient/getSubAccountCustodyTradingList.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/users/entrust-subaccount-list // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2569 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2575 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getSubAccountCustodyTradingList(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getSubAccountFundingBalances.js b/examples/apidoc/RestClient/getSubAccountFundingBalances.js index 17423bb..f9d483d 100644 --- a/examples/apidoc/RestClient/getSubAccountFundingBalances.js +++ b/examples/apidoc/RestClient/getSubAccountFundingBalances.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/asset/subaccount/balances // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2513 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2519 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getSubAccountFundingBalances(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getSubAccountList.js b/examples/apidoc/RestClient/getSubAccountList.js index 96bba87..398040b 100644 --- a/examples/apidoc/RestClient/getSubAccountList.js +++ b/examples/apidoc/RestClient/getSubAccountList.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/users/subaccount/list // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2486 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2492 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getSubAccountList(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getSubAccountMaxWithdrawal.js b/examples/apidoc/RestClient/getSubAccountMaxWithdrawal.js index 0a87858..2b74d22 100644 --- a/examples/apidoc/RestClient/getSubAccountMaxWithdrawal.js +++ b/examples/apidoc/RestClient/getSubAccountMaxWithdrawal.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/subaccount/max-withdrawal // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2523 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2529 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getSubAccountMaxWithdrawal(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getSubAccountTransferHistory.js b/examples/apidoc/RestClient/getSubAccountTransferHistory.js index 568a215..a1256e8 100644 --- a/examples/apidoc/RestClient/getSubAccountTransferHistory.js +++ b/examples/apidoc/RestClient/getSubAccountTransferHistory.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/asset/subaccount/bills // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2530 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2536 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getSubAccountTransferHistory(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getSupportCoin.js b/examples/apidoc/RestClient/getSupportCoin.js index c96cc46..a03ea12 100644 --- a/examples/apidoc/RestClient/getSupportCoin.js +++ b/examples/apidoc/RestClient/getSupportCoin.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rubik/stat/trading-data/support-coin // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2217 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2223 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getSupportCoin(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getSystemStatus.js b/examples/apidoc/RestClient/getSystemStatus.js index 34bd930..3d6cd02 100644 --- a/examples/apidoc/RestClient/getSystemStatus.js +++ b/examples/apidoc/RestClient/getSystemStatus.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/system/status // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2825 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2831 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getSystemStatus(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getSystemTime.js b/examples/apidoc/RestClient/getSystemTime.js index 75c80d5..a105586 100644 --- a/examples/apidoc/RestClient/getSystemTime.js +++ b/examples/apidoc/RestClient/getSystemTime.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/public/time // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2031 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2037 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getSystemTime(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getTakerFlow.js b/examples/apidoc/RestClient/getTakerFlow.js index 98bcb1b..0539beb 100644 --- a/examples/apidoc/RestClient/getTakerFlow.js +++ b/examples/apidoc/RestClient/getTakerFlow.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rubik/stat/option/taker-block-volume // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2344 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2350 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getTakerFlow(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getTakerVolume.js b/examples/apidoc/RestClient/getTakerVolume.js index 5880b2c..e09d06c 100644 --- a/examples/apidoc/RestClient/getTakerVolume.js +++ b/examples/apidoc/RestClient/getTakerVolume.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rubik/stat/taker-volume // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2230 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2236 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getTakerVolume(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getTicker.js b/examples/apidoc/RestClient/getTicker.js index 3f3efe6..2a5ce0e 100644 --- a/examples/apidoc/RestClient/getTicker.js +++ b/examples/apidoc/RestClient/getTicker.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/market/ticker // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1656 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1662 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getTicker(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getTickers.js b/examples/apidoc/RestClient/getTickers.js index e5991fa..b3067f5 100644 --- a/examples/apidoc/RestClient/getTickers.js +++ b/examples/apidoc/RestClient/getTickers.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/market/tickers // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1649 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1655 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getTickers(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getTopTradersAccountRatio.js b/examples/apidoc/RestClient/getTopTradersAccountRatio.js index 03cce90..4d23b71 100644 --- a/examples/apidoc/RestClient/getTopTradersAccountRatio.js +++ b/examples/apidoc/RestClient/getTopTradersAccountRatio.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rubik/stat/contracts/long-short-account-ratio-contract-top-trader // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2255 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2261 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getTopTradersAccountRatio(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getTopTradersContractPositionRatio.js b/examples/apidoc/RestClient/getTopTradersContractPositionRatio.js index 7f8e680..242fe57 100644 --- a/examples/apidoc/RestClient/getTopTradersContractPositionRatio.js +++ b/examples/apidoc/RestClient/getTopTradersContractPositionRatio.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rubik/stat/contracts/long-short-position-ratio-contract-top-trader // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2264 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2270 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getTopTradersContractPositionRatio(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getTrades.js b/examples/apidoc/RestClient/getTrades.js index 4b2e65e..1a910eb 100644 --- a/examples/apidoc/RestClient/getTrades.js +++ b/examples/apidoc/RestClient/getTrades.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/market/trades // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1721 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1727 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getTrades(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getUnderlying.js b/examples/apidoc/RestClient/getUnderlying.js index c058e8b..88e5894 100644 --- a/examples/apidoc/RestClient/getUnderlying.js +++ b/examples/apidoc/RestClient/getUnderlying.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/public/underlying // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2051 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2057 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getUnderlying(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getUnitConvert.js b/examples/apidoc/RestClient/getUnitConvert.js index 1cb76ac..fa074cb 100644 --- a/examples/apidoc/RestClient/getUnitConvert.js +++ b/examples/apidoc/RestClient/getUnitConvert.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/public/convert-contract-coin // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2059 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2065 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getUnitConvert(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getVIPInterestAccrued.js b/examples/apidoc/RestClient/getVIPInterestAccrued.js index 9ec2c80..e63c7e6 100644 --- a/examples/apidoc/RestClient/getVIPInterestAccrued.js +++ b/examples/apidoc/RestClient/getVIPInterestAccrued.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/vip-interest-accrued // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L544 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L545 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getVIPInterestAccrued(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getVIPInterestDeducted.js b/examples/apidoc/RestClient/getVIPInterestDeducted.js index b88c1dd..3cfaf84 100644 --- a/examples/apidoc/RestClient/getVIPInterestDeducted.js +++ b/examples/apidoc/RestClient/getVIPInterestDeducted.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/vip-interest-deducted // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L548 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L549 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getVIPInterestDeducted(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getVIPInterestRateAndLoanQuota.js b/examples/apidoc/RestClient/getVIPInterestRateAndLoanQuota.js index 27ac9b3..f9c4c50 100644 --- a/examples/apidoc/RestClient/getVIPInterestRateAndLoanQuota.js +++ b/examples/apidoc/RestClient/getVIPInterestRateAndLoanQuota.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/public/vip-interest-rate-loan-quota // METHOD: GET // PUBLIC: YES - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2047 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2053 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getVIPInterestRateAndLoanQuota(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getVIPLoanBorrowRepayHistory.js b/examples/apidoc/RestClient/getVIPLoanBorrowRepayHistory.js index 80ca39b..5079cf0 100644 --- a/examples/apidoc/RestClient/getVIPLoanBorrowRepayHistory.js +++ b/examples/apidoc/RestClient/getVIPLoanBorrowRepayHistory.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/borrow-repay-history // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L540 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L541 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getVIPLoanBorrowRepayHistory(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getVIPLoanOrder.js b/examples/apidoc/RestClient/getVIPLoanOrder.js index 0efb708..619bcdb 100644 --- a/examples/apidoc/RestClient/getVIPLoanOrder.js +++ b/examples/apidoc/RestClient/getVIPLoanOrder.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/vip-loan-order-detail // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L560 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L561 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getVIPLoanOrder(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getVIPLoanOrders.js b/examples/apidoc/RestClient/getVIPLoanOrders.js index 8b1be80..a97db84 100644 --- a/examples/apidoc/RestClient/getVIPLoanOrders.js +++ b/examples/apidoc/RestClient/getVIPLoanOrders.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/vip-loan-order-list // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L554 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L555 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getVIPLoanOrders(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/getWithdrawalHistory.js b/examples/apidoc/RestClient/getWithdrawalHistory.js index e6d6cac..e82f664 100644 --- a/examples/apidoc/RestClient/getWithdrawalHistory.js +++ b/examples/apidoc/RestClient/getWithdrawalHistory.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/asset/withdrawal-history // METHOD: GET // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2430 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2436 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.getWithdrawalHistory(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/instantTriggerGridAlgoOrder.js b/examples/apidoc/RestClient/instantTriggerGridAlgoOrder.js index c6a460a..d282e6e 100644 --- a/examples/apidoc/RestClient/instantTriggerGridAlgoOrder.js +++ b/examples/apidoc/RestClient/instantTriggerGridAlgoOrder.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/grid/order-instant-trigger // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1012 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1018 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.instantTriggerGridAlgoOrder(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/manualBorrowRepay.js b/examples/apidoc/RestClient/manualBorrowRepay.js index 87db499..453c30c 100644 --- a/examples/apidoc/RestClient/manualBorrowRepay.js +++ b/examples/apidoc/RestClient/manualBorrowRepay.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/spot-manual-borrow-repay // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L646 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L673 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.manualBorrowRepay(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/manualRenewFixedLoanBorrowOrder.js b/examples/apidoc/RestClient/manualRenewFixedLoanBorrowOrder.js index e28f881..fe0d735 100644 --- a/examples/apidoc/RestClient/manualRenewFixedLoanBorrowOrder.js +++ b/examples/apidoc/RestClient/manualRenewFixedLoanBorrowOrder.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/fixed-loan/manual-reborrow // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L612 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L613 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.manualRenewFixedLoanBorrowOrder(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/placeAlgoOrder.js b/examples/apidoc/RestClient/placeAlgoOrder.js index a136de6..b084a56 100644 --- a/examples/apidoc/RestClient/placeAlgoOrder.js +++ b/examples/apidoc/RestClient/placeAlgoOrder.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/trade/order-algo // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L930 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L936 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.placeAlgoOrder(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/placeGridAlgoOrder.js b/examples/apidoc/RestClient/placeGridAlgoOrder.js index 8ff47ff..5e08398 100644 --- a/examples/apidoc/RestClient/placeGridAlgoOrder.js +++ b/examples/apidoc/RestClient/placeGridAlgoOrder.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/grid/order-algo // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L976 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L982 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.placeGridAlgoOrder(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/placeLendingOrder.js b/examples/apidoc/RestClient/placeLendingOrder.js index e6c433a..1ea2533 100644 --- a/examples/apidoc/RestClient/placeLendingOrder.js +++ b/examples/apidoc/RestClient/placeLendingOrder.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/finance/fixed-loan/lending-order // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2783 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2789 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.placeLendingOrder(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/placeSignalBotSubOrder.js b/examples/apidoc/RestClient/placeSignalBotSubOrder.js index 03bc58e..04d059b 100644 --- a/examples/apidoc/RestClient/placeSignalBotSubOrder.js +++ b/examples/apidoc/RestClient/placeSignalBotSubOrder.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/signal/sub-order // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1261 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1267 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.placeSignalBotSubOrder(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/positionBuilder.js b/examples/apidoc/RestClient/positionBuilder.js index 515cf1d..762dd2e 100644 --- a/examples/apidoc/RestClient/positionBuilder.js +++ b/examples/apidoc/RestClient/positionBuilder.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/position-builder // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L673 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L700 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.positionBuilder(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/purchaseETHStaking.js b/examples/apidoc/RestClient/purchaseETHStaking.js index aef081f..582cf89 100644 --- a/examples/apidoc/RestClient/purchaseETHStaking.js +++ b/examples/apidoc/RestClient/purchaseETHStaking.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/finance/staking-defi/eth/purchase // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2687 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2693 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.purchaseETHStaking(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/redeemETHStaking.js b/examples/apidoc/RestClient/redeemETHStaking.js index 616d384..2222dd2 100644 --- a/examples/apidoc/RestClient/redeemETHStaking.js +++ b/examples/apidoc/RestClient/redeemETHStaking.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/finance/staking-defi/eth/redeem // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2694 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2700 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.redeemETHStaking(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/redeemStake.js b/examples/apidoc/RestClient/redeemStake.js index 3f28f0d..dbde487 100644 --- a/examples/apidoc/RestClient/redeemStake.js +++ b/examples/apidoc/RestClient/redeemStake.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/finance/staking-defi/redeem // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2630 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2636 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.redeemStake(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/reduceFixedLoanLiabilities.js b/examples/apidoc/RestClient/reduceFixedLoanLiabilities.js new file mode 100644 index 0000000..60cf827 --- /dev/null +++ b/examples/apidoc/RestClient/reduceFixedLoanLiabilities.js @@ -0,0 +1,21 @@ +const { RestClient } = require('okx-api'); + + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" + // ENDPOINT: /api/v5/account/fixed-loan/reduce-liabilities + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L649 + +const client = new RestClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.reduceFixedLoanLiabilities(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClient/repayFixedLoanBorrowOrder.js b/examples/apidoc/RestClient/repayFixedLoanBorrowOrder.js index a7a85d8..0265d0c 100644 --- a/examples/apidoc/RestClient/repayFixedLoanBorrowOrder.js +++ b/examples/apidoc/RestClient/repayFixedLoanBorrowOrder.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/fixed-loan/repay-borrowing-order // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L626 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L627 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.repayFixedLoanBorrowOrder(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/requestBillsHistoryDownloadLink.js b/examples/apidoc/RestClient/requestBillsHistoryDownloadLink.js index 10072ba..141ffed 100644 --- a/examples/apidoc/RestClient/requestBillsHistoryDownloadLink.js +++ b/examples/apidoc/RestClient/requestBillsHistoryDownloadLink.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/bills-history-archive // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L342 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L343 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.requestBillsHistoryDownloadLink(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/resetBlockMmp.js b/examples/apidoc/RestClient/resetBlockMmp.js index 03ecd63..fca8628 100644 --- a/examples/apidoc/RestClient/resetBlockMmp.js +++ b/examples/apidoc/RestClient/resetBlockMmp.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rfq/mmp-reset // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1799 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1805 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.resetBlockMmp(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/resetMMPStatus.js b/examples/apidoc/RestClient/resetMMPStatus.js index 52d0761..6f7d425 100644 --- a/examples/apidoc/RestClient/resetMMPStatus.js +++ b/examples/apidoc/RestClient/resetMMPStatus.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/mmp-reset // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L727 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L754 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.resetMMPStatus(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/resetSubAccountAPIKey.js b/examples/apidoc/RestClient/resetSubAccountAPIKey.js index 65c1fa2..fb26553 100644 --- a/examples/apidoc/RestClient/resetSubAccountAPIKey.js +++ b/examples/apidoc/RestClient/resetSubAccountAPIKey.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/users/subaccount/modify-apikey // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2491 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2497 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.resetSubAccountAPIKey(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/savingsPurchaseRedemption.js b/examples/apidoc/RestClient/savingsPurchaseRedemption.js index 3d97361..af9e087 100644 --- a/examples/apidoc/RestClient/savingsPurchaseRedemption.js +++ b/examples/apidoc/RestClient/savingsPurchaseRedemption.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/finance/savings/purchase-redempt // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2729 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2735 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.savingsPurchaseRedemption(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/setAccountMode.js b/examples/apidoc/RestClient/setAccountMode.js index 6e913f1..26fa1e3 100644 --- a/examples/apidoc/RestClient/setAccountMode.js +++ b/examples/apidoc/RestClient/setAccountMode.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/set-account-level // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L721 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L748 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.setAccountMode(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/setAutoLoan.js b/examples/apidoc/RestClient/setAutoLoan.js index ffb77c2..6010569 100644 --- a/examples/apidoc/RestClient/setAutoLoan.js +++ b/examples/apidoc/RestClient/setAutoLoan.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/set-auto-loan // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L717 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L744 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.setAutoLoan(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/setAutoRepay.js b/examples/apidoc/RestClient/setAutoRepay.js index 000ef09..d012292 100644 --- a/examples/apidoc/RestClient/setAutoRepay.js +++ b/examples/apidoc/RestClient/setAutoRepay.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/set-auto-repay // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L660 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L687 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.setAutoRepay(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/setCopytradingBatchLeverage.js b/examples/apidoc/RestClient/setCopytradingBatchLeverage.js index bfcd5c4..7ff1515 100644 --- a/examples/apidoc/RestClient/setCopytradingBatchLeverage.js +++ b/examples/apidoc/RestClient/setCopytradingBatchLeverage.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/batch-set-leverage // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1513 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1519 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.setCopytradingBatchLeverage(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/setCopytradingFirstCopy.js b/examples/apidoc/RestClient/setCopytradingFirstCopy.js index 4200ad1..224f9b7 100644 --- a/examples/apidoc/RestClient/setCopytradingFirstCopy.js +++ b/examples/apidoc/RestClient/setCopytradingFirstCopy.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/first-copy-settings // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1472 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1478 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.setCopytradingFirstCopy(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/setCopytradingInstruments.js b/examples/apidoc/RestClient/setCopytradingInstruments.js index f25ad3b..80ef9ed 100644 --- a/examples/apidoc/RestClient/setCopytradingInstruments.js +++ b/examples/apidoc/RestClient/setCopytradingInstruments.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/set-instruments // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1387 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1393 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.setCopytradingInstruments(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/setGreeksDisplayType.js b/examples/apidoc/RestClient/setGreeksDisplayType.js index 1ac8ed6..d4b4a19 100644 --- a/examples/apidoc/RestClient/setGreeksDisplayType.js +++ b/examples/apidoc/RestClient/setGreeksDisplayType.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/set-greeks // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L486 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L487 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.setGreeksDisplayType(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/setIsolatedMode.js b/examples/apidoc/RestClient/setIsolatedMode.js index ee984bc..014659a 100644 --- a/examples/apidoc/RestClient/setIsolatedMode.js +++ b/examples/apidoc/RestClient/setIsolatedMode.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/set-isolated-mode // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L490 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L491 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.setIsolatedMode(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/setLendingRate.js b/examples/apidoc/RestClient/setLendingRate.js index 9b8eaf2..9fc63ec 100644 --- a/examples/apidoc/RestClient/setLendingRate.js +++ b/examples/apidoc/RestClient/setLendingRate.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/finance/savings/set-lending-rate // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2743 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2749 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.setLendingRate(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/setLeverage.js b/examples/apidoc/RestClient/setLeverage.js index 5fb9959..5d93f71 100644 --- a/examples/apidoc/RestClient/setLeverage.js +++ b/examples/apidoc/RestClient/setLeverage.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/set-leverage // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L367 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L368 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.setLeverage(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/setMMPConfig.js b/examples/apidoc/RestClient/setMMPConfig.js index 61cd9f8..2c5142d 100644 --- a/examples/apidoc/RestClient/setMMPConfig.js +++ b/examples/apidoc/RestClient/setMMPConfig.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/mmp-config // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L735 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L762 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.setMMPConfig(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/setPositionMode.js b/examples/apidoc/RestClient/setPositionMode.js index 29d0dc0..f79cfe6 100644 --- a/examples/apidoc/RestClient/setPositionMode.js +++ b/examples/apidoc/RestClient/setPositionMode.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/set-position-mode // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L363 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L364 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.setPositionMode(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/setSignalInstruments.js b/examples/apidoc/RestClient/setSignalInstruments.js index aa292ce..cafb525 100644 --- a/examples/apidoc/RestClient/setSignalInstruments.js +++ b/examples/apidoc/RestClient/setSignalInstruments.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/signal/set-instruments // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1202 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1208 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.setSignalInstruments(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/setSubAccountLoanAllocation.js b/examples/apidoc/RestClient/setSubAccountLoanAllocation.js index 3102cd7..ba5469a 100644 --- a/examples/apidoc/RestClient/setSubAccountLoanAllocation.js +++ b/examples/apidoc/RestClient/setSubAccountLoanAllocation.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/subaccount/set-loan-allocation // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2575 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2581 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.setSubAccountLoanAllocation(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/setSubAccountTransferOutPermission.js b/examples/apidoc/RestClient/setSubAccountTransferOutPermission.js index dbc2e40..ecf2eab 100644 --- a/examples/apidoc/RestClient/setSubAccountTransferOutPermission.js +++ b/examples/apidoc/RestClient/setSubAccountTransferOutPermission.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/users/subaccount/set-transfer-out // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2558 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2564 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.setSubAccountTransferOutPermission(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/smallAssetsConvert.js b/examples/apidoc/RestClient/smallAssetsConvert.js index b665713..1c685c2 100644 --- a/examples/apidoc/RestClient/smallAssetsConvert.js +++ b/examples/apidoc/RestClient/smallAssetsConvert.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/asset/convert-dust-assets // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2440 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2446 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.smallAssetsConvert(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/spotGridWithdrawIncome.js b/examples/apidoc/RestClient/spotGridWithdrawIncome.js index 9662a00..caa96d7 100644 --- a/examples/apidoc/RestClient/spotGridWithdrawIncome.js +++ b/examples/apidoc/RestClient/spotGridWithdrawIncome.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/grid/withdraw-income // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1079 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1085 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.spotGridWithdrawIncome(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/stopCopytradingCopy.js b/examples/apidoc/RestClient/stopCopytradingCopy.js index de9f104..18ef0ea 100644 --- a/examples/apidoc/RestClient/stopCopytradingCopy.js +++ b/examples/apidoc/RestClient/stopCopytradingCopy.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/stop-copy-trading // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1488 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1494 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.stopCopytradingCopy(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/stopCopytradingLeadTrading.js b/examples/apidoc/RestClient/stopCopytradingLeadTrading.js index 949020b..0bda04c 100644 --- a/examples/apidoc/RestClient/stopCopytradingLeadTrading.js +++ b/examples/apidoc/RestClient/stopCopytradingLeadTrading.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/stop-lead-trading // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1446 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1452 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.stopCopytradingLeadTrading(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/stopGridAlgoOrder.js b/examples/apidoc/RestClient/stopGridAlgoOrder.js index 5fd0cfd..d9b78a0 100644 --- a/examples/apidoc/RestClient/stopGridAlgoOrder.js +++ b/examples/apidoc/RestClient/stopGridAlgoOrder.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/grid/stop-order-algo // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L992 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L998 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.stopGridAlgoOrder(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/stopRecurringBuyOrder.js b/examples/apidoc/RestClient/stopRecurringBuyOrder.js index 96d37c2..de84062 100644 --- a/examples/apidoc/RestClient/stopRecurringBuyOrder.js +++ b/examples/apidoc/RestClient/stopRecurringBuyOrder.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/recurring/stop-order-algo // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1303 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1309 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.stopRecurringBuyOrder(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/submitCopytradingAlgoOrder.js b/examples/apidoc/RestClient/submitCopytradingAlgoOrder.js index b9a5808..e1ab674 100644 --- a/examples/apidoc/RestClient/submitCopytradingAlgoOrder.js +++ b/examples/apidoc/RestClient/submitCopytradingAlgoOrder.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/algo-order // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1363 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1369 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.submitCopytradingAlgoOrder(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/submitEasyConvert.js b/examples/apidoc/RestClient/submitEasyConvert.js index a5d71ae..4e56d98 100644 --- a/examples/apidoc/RestClient/submitEasyConvert.js +++ b/examples/apidoc/RestClient/submitEasyConvert.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/trade/easy-convert // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L854 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L856 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.submitEasyConvert(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/submitFixedLoanBorrowOrder.js b/examples/apidoc/RestClient/submitFixedLoanBorrowOrder.js index 46e1e41..a7f62cd 100644 --- a/examples/apidoc/RestClient/submitFixedLoanBorrowOrder.js +++ b/examples/apidoc/RestClient/submitFixedLoanBorrowOrder.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/fixed-loan/borrowing-order // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L586 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L587 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.submitFixedLoanBorrowOrder(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/submitMultipleOrders.js b/examples/apidoc/RestClient/submitMultipleOrders.js index c2f5c46..3cda35c 100644 --- a/examples/apidoc/RestClient/submitMultipleOrders.js +++ b/examples/apidoc/RestClient/submitMultipleOrders.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/trade/batch-orders // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L753 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L780 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.submitMultipleOrders(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/submitOneClickRepay.js b/examples/apidoc/RestClient/submitOneClickRepay.js index baa5f64..85c5366 100644 --- a/examples/apidoc/RestClient/submitOneClickRepay.js +++ b/examples/apidoc/RestClient/submitOneClickRepay.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/trade/one-click-repay // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L886 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L888 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.submitOneClickRepay(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/submitOrder.js b/examples/apidoc/RestClient/submitOrder.js index ba3a1ab..a65738e 100644 --- a/examples/apidoc/RestClient/submitOrder.js +++ b/examples/apidoc/RestClient/submitOrder.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/trade/order // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L749 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L776 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.submitOrder(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/submitOrderPrecheck.js b/examples/apidoc/RestClient/submitOrderPrecheck.js index 5c4fda0..31ba894 100644 --- a/examples/apidoc/RestClient/submitOrderPrecheck.js +++ b/examples/apidoc/RestClient/submitOrderPrecheck.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/trade/order-precheck // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L920 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L926 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.submitOrderPrecheck(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/submitQuickMarginBorrowRepay.js b/examples/apidoc/RestClient/submitQuickMarginBorrowRepay.js index 5b71f46..1970bc7 100644 --- a/examples/apidoc/RestClient/submitQuickMarginBorrowRepay.js +++ b/examples/apidoc/RestClient/submitQuickMarginBorrowRepay.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/quick-margin-borrow-repay // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L508 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L509 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.submitQuickMarginBorrowRepay(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/submitRecurringBuyOrder.js b/examples/apidoc/RestClient/submitRecurringBuyOrder.js index c6bd9a3..6ae53ff 100644 --- a/examples/apidoc/RestClient/submitRecurringBuyOrder.js +++ b/examples/apidoc/RestClient/submitRecurringBuyOrder.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/recurring/order-algo // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1288 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1294 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.submitRecurringBuyOrder(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/submitSpreadOrder.js b/examples/apidoc/RestClient/submitSpreadOrder.js index 1624fa2..9f13669 100644 --- a/examples/apidoc/RestClient/submitSpreadOrder.js +++ b/examples/apidoc/RestClient/submitSpreadOrder.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/sprd/order // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1883 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1889 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.submitSpreadOrder(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/submitStake.js b/examples/apidoc/RestClient/submitStake.js index f6054e4..9bd7481 100644 --- a/examples/apidoc/RestClient/submitStake.js +++ b/examples/apidoc/RestClient/submitStake.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/finance/staking-defi/purchase // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2614 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2620 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.submitStake(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/submitWithdraw.js b/examples/apidoc/RestClient/submitWithdraw.js index eb6387a..953d890 100644 --- a/examples/apidoc/RestClient/submitWithdraw.js +++ b/examples/apidoc/RestClient/submitWithdraw.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/asset/withdrawal // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2410 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2416 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.submitWithdraw(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/submitWithdrawLightning.js b/examples/apidoc/RestClient/submitWithdrawLightning.js index 903b3cc..d44e290 100644 --- a/examples/apidoc/RestClient/submitWithdrawLightning.js +++ b/examples/apidoc/RestClient/submitWithdrawLightning.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/asset/withdrawal-lightning // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2414 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2420 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.submitWithdrawLightning(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/transferSubAccountBalance.js b/examples/apidoc/RestClient/transferSubAccountBalance.js index d8b63af..485949f 100644 --- a/examples/apidoc/RestClient/transferSubAccountBalance.js +++ b/examples/apidoc/RestClient/transferSubAccountBalance.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/asset/subaccount/transfer // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2551 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L2557 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.transferSubAccountBalance(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/updateBlockMmpConfig.js b/examples/apidoc/RestClient/updateBlockMmpConfig.js index 8454da4..993ca56 100644 --- a/examples/apidoc/RestClient/updateBlockMmpConfig.js +++ b/examples/apidoc/RestClient/updateBlockMmpConfig.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rfq/mmp-config // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1807 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1813 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.updateBlockMmpConfig(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/updateBlockQuoteProducts.js b/examples/apidoc/RestClient/updateBlockQuoteProducts.js index 035bc1e..9169946 100644 --- a/examples/apidoc/RestClient/updateBlockQuoteProducts.js +++ b/examples/apidoc/RestClient/updateBlockQuoteProducts.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/rfq/maker-instrument-settings // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1791 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1797 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.updateBlockQuoteProducts(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/updateCopytradingCopySettings.js b/examples/apidoc/RestClient/updateCopytradingCopySettings.js index 874140f..6bfa919 100644 --- a/examples/apidoc/RestClient/updateCopytradingCopySettings.js +++ b/examples/apidoc/RestClient/updateCopytradingCopySettings.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/amend-copy-settings // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1480 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1486 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.updateCopytradingCopySettings(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/updateCopytradingProfitSharing.js b/examples/apidoc/RestClient/updateCopytradingProfitSharing.js index bfbfb44..7b03159 100644 --- a/examples/apidoc/RestClient/updateCopytradingProfitSharing.js +++ b/examples/apidoc/RestClient/updateCopytradingProfitSharing.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/copytrading/amend-profit-sharing-ratio // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1454 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1460 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.updateCopytradingProfitSharing(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/updateFixedLoanBorrowOrder.js b/examples/apidoc/RestClient/updateFixedLoanBorrowOrder.js index 65189c8..92905c7 100644 --- a/examples/apidoc/RestClient/updateFixedLoanBorrowOrder.js +++ b/examples/apidoc/RestClient/updateFixedLoanBorrowOrder.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/fixed-loan/amend-borrowing-order // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L599 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L600 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.updateFixedLoanBorrowOrder(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/updateRiskOffsetAmount.js b/examples/apidoc/RestClient/updateRiskOffsetAmount.js index 01e1d21..84fad85 100644 --- a/examples/apidoc/RestClient/updateRiskOffsetAmount.js +++ b/examples/apidoc/RestClient/updateRiskOffsetAmount.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/set-riskOffset-amt // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L677 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L704 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.updateRiskOffsetAmount(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/updateRiskOffsetType.js b/examples/apidoc/RestClient/updateRiskOffsetType.js index b5d41eb..763a8aa 100644 --- a/examples/apidoc/RestClient/updateRiskOffsetType.js +++ b/examples/apidoc/RestClient/updateRiskOffsetType.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/account/set-riskOffset-type // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L701 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L728 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.updateRiskOffsetType(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/updateSignalMargin.js b/examples/apidoc/RestClient/updateSignalMargin.js index 571414d..a4b765c 100644 --- a/examples/apidoc/RestClient/updateSignalMargin.js +++ b/examples/apidoc/RestClient/updateSignalMargin.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/signal/margin-balance // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1186 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1192 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.updateSignalMargin(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/updateSignalTPSL.js b/examples/apidoc/RestClient/updateSignalTPSL.js index 4eb75c5..9944206 100644 --- a/examples/apidoc/RestClient/updateSignalTPSL.js +++ b/examples/apidoc/RestClient/updateSignalTPSL.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/tradingBot/signal/amendTPSL // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1194 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1200 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.updateSignalTPSL(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/examples/apidoc/RestClient/updateSpreadOrder.js b/examples/apidoc/RestClient/updateSpreadOrder.js index 3b510c6..d073db0 100644 --- a/examples/apidoc/RestClient/updateSpreadOrder.js +++ b/examples/apidoc/RestClient/updateSpreadOrder.js @@ -1,9 +1,11 @@ const { RestClient } = require('okx-api'); + // This example shows how to call this OKX API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "okx-api" for OKX exchange + // This OKX API SDK is available on npm via "npm install okx-api" // ENDPOINT: /api/v5/sprd/amend-order // METHOD: POST // PUBLIC: NO - // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1904 + // Link to function: https://github.com/tiagosiebler/okx-api/blob/master/src/rest-client.ts#L1910 const client = new RestClient({ apiKey: 'insert_api_key_here', @@ -11,9 +13,9 @@ const client = new RestClient({ }); client.updateSpreadOrder(params) - .then(response => { + .then((response) => { console.log(response); }) - .catch(error => { + .catch((error) => { console.error(error); }); diff --git a/package-lock.json b/package-lock.json index 00cfd71..cb691b8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "okx-api", - "version": "1.4.7", + "version": "1.4.8", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "okx-api", - "version": "1.4.7", + "version": "1.4.8", "license": "MIT", "dependencies": { "axios": "^1.6.7", diff --git a/package.json b/package.json index 7e6260b..7ad6197 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "okx-api", - "version": "1.4.7", + "version": "1.4.8", "description": "Complete & robust Node.js SDK for OKX's REST APIs and WebSockets, with TypeScript & end-to-end tests", "main": "lib/index.js", "types": "lib/index.d.ts",