feat(): added latency check, updated example
This commit is contained in:
@@ -48,162 +48,161 @@ This table includes all endpoints from the official Exchange API docs and corres
|
||||
|
||||
| Function | AUTH | HTTP Method | Endpoint |
|
||||
| -------- | :------: | :------: | -------- |
|
||||
| [fetchServerTime()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L208) | | GET | `/v5/market/time` |
|
||||
| [getServerTime()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L213) | | GET | `/v5/market/time` |
|
||||
| [requestDemoTradingFunds()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L219) | :closed_lock_with_key: | POST | `/v5/account/demo-apply-money` |
|
||||
| [getKline()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L234) | | GET | `/v5/market/kline` |
|
||||
| [getMarkPriceKline()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L249) | | GET | `/v5/market/mark-price-kline` |
|
||||
| [getIndexPriceKline()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L264) | | GET | `/v5/market/index-price-kline` |
|
||||
| [getPremiumIndexPriceKline()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L279) | | GET | `/v5/market/premium-index-price-kline` |
|
||||
| [getOrderbook()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L305) | | GET | `/v5/market/orderbook` |
|
||||
| [getTickers()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L311) | | GET | `/v5/market/tickers` |
|
||||
| [getFundingRateHistory()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L349) | | GET | `/v5/market/funding/history` |
|
||||
| [getPublicTradingHistory()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L364) | | GET | `/v5/market/recent-trade` |
|
||||
| [getOpenInterest()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L377) | | GET | `/v5/market/open-interest` |
|
||||
| [getHistoricalVolatility()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L387) | | GET | `/v5/market/historical-volatility` |
|
||||
| [getInsurance()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L398) | | GET | `/v5/market/insurance` |
|
||||
| [getRiskLimit()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L409) | | GET | `/v5/market/risk-limit` |
|
||||
| [getOptionDeliveryPrice()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L424) | | GET | `/v5/market/delivery-price` |
|
||||
| [getDeliveryPrice()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L437) | | GET | `/v5/market/delivery-price` |
|
||||
| [getLongShortRatio()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L443) | | GET | `/v5/market/account-ratio` |
|
||||
| [submitOrder()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L455) | :closed_lock_with_key: | POST | `/v5/order/create` |
|
||||
| [amendOrder()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L461) | :closed_lock_with_key: | POST | `/v5/order/amend` |
|
||||
| [cancelOrder()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L467) | :closed_lock_with_key: | POST | `/v5/order/cancel` |
|
||||
| [getActiveOrders()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L476) | :closed_lock_with_key: | GET | `/v5/order/realtime` |
|
||||
| [cancelAllOrders()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L482) | :closed_lock_with_key: | POST | `/v5/order/cancel-all` |
|
||||
| [getHistoricOrders()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L493) | :closed_lock_with_key: | GET | `/v5/order/history` |
|
||||
| [batchSubmitOrders()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L511) | :closed_lock_with_key: | POST | `/v5/order/create-batch` |
|
||||
| [batchAmendOrders()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L531) | :closed_lock_with_key: | POST | `/v5/order/amend-batch` |
|
||||
| [batchCancelOrders()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L551) | :closed_lock_with_key: | POST | `/v5/order/cancel-batch` |
|
||||
| [getSpotBorrowCheck()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L568) | :closed_lock_with_key: | GET | `/v5/order/spot-borrow-check` |
|
||||
| [setDisconnectCancelAllWindow()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L589) | :closed_lock_with_key: | POST | `/v5/order/disconnected-cancel-all` |
|
||||
| [setDisconnectCancelAllWindowV2()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L607) | :closed_lock_with_key: | POST | `/v5/order/disconnected-cancel-all` |
|
||||
| [getPositionInfo()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L631) | :closed_lock_with_key: | GET | `/v5/position/list` |
|
||||
| [setLeverage()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L646) | :closed_lock_with_key: | POST | `/v5/position/set-leverage` |
|
||||
| [switchIsolatedMargin()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L659) | :closed_lock_with_key: | POST | `/v5/position/switch-isolated` |
|
||||
| [setTPSLMode()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L672) | :closed_lock_with_key: | POST | `/v5/position/set-tpsl-mode` |
|
||||
| [switchPositionMode()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L687) | :closed_lock_with_key: | POST | `/v5/position/switch-mode` |
|
||||
| [setRiskLimit()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L700) | :closed_lock_with_key: | POST | `/v5/position/set-risk-limit` |
|
||||
| [setTradingStop()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L715) | :closed_lock_with_key: | POST | `/v5/position/trading-stop` |
|
||||
| [setAutoAddMargin()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L726) | :closed_lock_with_key: | POST | `/v5/position/set-auto-add-margin` |
|
||||
| [addOrReduceMargin()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L738) | :closed_lock_with_key: | POST | `/v5/position/add-margin` |
|
||||
| [getExecutionList()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L750) | :closed_lock_with_key: | GET | `/v5/execution/list` |
|
||||
| [getClosedPnL()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L762) | :closed_lock_with_key: | GET | `/v5/position/closed-pnl` |
|
||||
| [movePosition()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L781) | :closed_lock_with_key: | POST | `/v5/position/move-positions` |
|
||||
| [getMovePositionHistory()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L792) | :closed_lock_with_key: | GET | `/v5/position/move-history` |
|
||||
| [confirmNewRiskLimit()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L811) | :closed_lock_with_key: | POST | `/v5/position/confirm-pending-mmr` |
|
||||
| [getPreUpgradeOrderHistory()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L831) | :closed_lock_with_key: | GET | `/v5/pre-upgrade/order/history` |
|
||||
| [getPreUpgradeTradeHistory()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L846) | :closed_lock_with_key: | GET | `/v5/pre-upgrade/execution/list` |
|
||||
| [getPreUpgradeClosedPnl()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L857) | :closed_lock_with_key: | GET | `/v5/pre-upgrade/position/closed-pnl` |
|
||||
| [getPreUpgradeTransactions()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L871) | :closed_lock_with_key: | GET | `/v5/pre-upgrade/account/transaction-log` |
|
||||
| [getPreUpgradeOptionDeliveryRecord()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L888) | :closed_lock_with_key: | GET | `/v5/pre-upgrade/asset/delivery-record` |
|
||||
| [getPreUpgradeUSDCSessionSettlements()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L902) | :closed_lock_with_key: | GET | `/v5/pre-upgrade/asset/settlement-record` |
|
||||
| [getWalletBalance()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L923) | :closed_lock_with_key: | GET | `/v5/account/wallet-balance` |
|
||||
| [upgradeToUnifiedAccount()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L934) | :closed_lock_with_key: | POST | `/v5/account/upgrade-to-uta` |
|
||||
| [getBorrowHistory()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L945) | :closed_lock_with_key: | GET | `/v5/account/borrow-history` |
|
||||
| [repayLiability()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L959) | :closed_lock_with_key: | POST | `/v5/account/quick-repayment` |
|
||||
| [setCollateralCoin()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L968) | :closed_lock_with_key: | POST | `/v5/account/set-collateral-switch` |
|
||||
| [batchSetCollateralCoin()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L974) | :closed_lock_with_key: | POST | `/v5/account/set-collateral-switch-batch` |
|
||||
| [getCollateralInfo()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L984) | :closed_lock_with_key: | GET | `/v5/account/collateral-info` |
|
||||
| [getCoinGreeks()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L993) | :closed_lock_with_key: | GET | `/v5/asset/coin-greeks` |
|
||||
| [getFeeRate()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1006) | :closed_lock_with_key: | GET | `/v5/account/fee-rate` |
|
||||
| [getAccountInfo()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1015) | :closed_lock_with_key: | GET | `/v5/account/info` |
|
||||
| [getTransactionLog()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1022) | :closed_lock_with_key: | GET | `/v5/account/transaction-log` |
|
||||
| [getClassicTransactionLogs()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1033) | :closed_lock_with_key: | GET | `/v5/account/contract-transaction-log` |
|
||||
| [getSMPGroup()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1044) | :closed_lock_with_key: | GET | `/v5/account/smp-group` |
|
||||
| [setMarginMode()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1057) | :closed_lock_with_key: | POST | `/v5/account/set-margin-mode` |
|
||||
| [setSpotHedging()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1074) | :closed_lock_with_key: | POST | `/v5/account/set-hedging-mode` |
|
||||
| [setMMP()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1083) | :closed_lock_with_key: | POST | `/v5/account/mmp-modify` |
|
||||
| [resetMMP()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1090) | :closed_lock_with_key: | POST | `/v5/account/mmp-reset` |
|
||||
| [getMMPState()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1097) | :closed_lock_with_key: | GET | `/v5/account/mmp-state` |
|
||||
| [getDCPInfo()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1112) | :closed_lock_with_key: | GET | `/v5/account/query-dcp-info` |
|
||||
| [getCoinExchangeRecords()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1127) | :closed_lock_with_key: | GET | `/v5/asset/exchange/order-record` |
|
||||
| [getDeliveryRecord()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1141) | :closed_lock_with_key: | GET | `/v5/asset/delivery-record` |
|
||||
| [getSettlementRecords()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1152) | :closed_lock_with_key: | GET | `/v5/asset/settlement-record` |
|
||||
| [getAssetInfo()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1166) | :closed_lock_with_key: | GET | `/v5/asset/transfer/query-asset-info` |
|
||||
| [getAllCoinsBalance()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1177) | :closed_lock_with_key: | GET | `/v5/asset/transfer/query-account-coins-balance` |
|
||||
| [getCoinBalance()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1191) | :closed_lock_with_key: | GET | `/v5/asset/transfer/query-account-coin-balance` |
|
||||
| [getTransferableCoinList()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1203) | :closed_lock_with_key: | GET | `/v5/asset/transfer/query-transfer-coin-list` |
|
||||
| [createInternalTransfer()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1219) | :closed_lock_with_key: | POST | `/v5/asset/transfer/inter-transfer` |
|
||||
| [getInternalTransferRecords()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1238) | :closed_lock_with_key: | GET | `/v5/asset/transfer/query-inter-transfer-list` |
|
||||
| [getSubUID()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1252) | :closed_lock_with_key: | GET | `/v5/asset/transfer/query-sub-member-list` |
|
||||
| [enableUniversalTransferForSubUIDs()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1272) | :closed_lock_with_key: | POST | `/v5/asset/transfer/save-transfer-sub-member` |
|
||||
| [createUniversalTransfer()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1283) | :closed_lock_with_key: | POST | `/v5/asset/transfer/universal-transfer` |
|
||||
| [getUniversalTransferRecords()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1295) | :closed_lock_with_key: | GET | `/v5/asset/transfer/query-universal-transfer-list` |
|
||||
| [getAllowedDepositCoinInfo()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1308) | | GET | `/v5/asset/deposit/query-allowed-list` |
|
||||
| [setDepositAccount()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1322) | :closed_lock_with_key: | POST | `/v5/asset/deposit/deposit-to-account` |
|
||||
| [getDepositRecords()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1338) | :closed_lock_with_key: | GET | `/v5/asset/deposit/query-record` |
|
||||
| [getSubAccountDepositRecords()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1353) | :closed_lock_with_key: | GET | `/v5/asset/deposit/query-sub-member-record` |
|
||||
| [getInternalDepositRecords()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1369) | :closed_lock_with_key: | GET | `/v5/asset/deposit/query-internal-record` |
|
||||
| [getMasterDepositAddress()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1381) | :closed_lock_with_key: | GET | `/v5/asset/deposit/query-address` |
|
||||
| [getSubDepositAddress()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1394) | :closed_lock_with_key: | GET | `/v5/asset/deposit/query-sub-member-address` |
|
||||
| [querySubMemberAddress()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1412) | :closed_lock_with_key: | GET | `/v5/asset/deposit/query-sub-member-address` |
|
||||
| [getCoinInfo()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1427) | :closed_lock_with_key: | GET | `/v5/asset/coin/query-info` |
|
||||
| [getWithdrawalRecords()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1439) | :closed_lock_with_key: | GET | `/v5/asset/withdraw/query-record` |
|
||||
| [getWithdrawableAmount()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1448) | :closed_lock_with_key: | GET | `/v5/asset/withdraw/withdrawable-amount` |
|
||||
| [getExchangeEntities()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1459) | :closed_lock_with_key: | GET | `/v5/asset/withdraw/vasp/list` |
|
||||
| [submitWithdrawal()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1472) | :closed_lock_with_key: | POST | `/v5/asset/withdraw/create` |
|
||||
| [cancelWithdrawal()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1483) | :closed_lock_with_key: | POST | `/v5/asset/withdraw/cancel` |
|
||||
| [getConvertCoins()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1492) | :closed_lock_with_key: | GET | `/v5/asset/exchange/query-coin-list` |
|
||||
| [requestConvertQuote()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1503) | :closed_lock_with_key: | POST | `/v5/asset/exchange/quote-apply` |
|
||||
| [confirmConvertQuote()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1512) | :closed_lock_with_key: | POST | `/v5/asset/exchange/convert-execute` |
|
||||
| [getConvertStatus()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1524) | :closed_lock_with_key: | GET | `/v5/asset/exchange/convert-result-query` |
|
||||
| [getConvertHistory()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1543) | :closed_lock_with_key: | GET | `/v5/asset/exchange/query-convert-history` |
|
||||
| [createSubMember()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1563) | :closed_lock_with_key: | POST | `/v5/user/create-sub-member` |
|
||||
| [createSubUIDAPIKey()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1575) | :closed_lock_with_key: | POST | `/v5/user/create-sub-api` |
|
||||
| [getSubUIDList()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1584) | :closed_lock_with_key: | GET | `/v5/user/query-sub-members` |
|
||||
| [getSubUIDListUnlimited()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1593) | :closed_lock_with_key: | GET | `/v5/user/submembers` |
|
||||
| [getSubAccountAllApiKeys()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1608) | :closed_lock_with_key: | GET | `/v5/user/sub-apikeys` |
|
||||
| [setSubUIDFrozenState()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1620) | :closed_lock_with_key: | POST | `/v5/user/frozen-sub-member` |
|
||||
| [getQueryApiKey()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1633) | :closed_lock_with_key: | GET | `/v5/user/query-api` |
|
||||
| [getUIDWalletType()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1637) | :closed_lock_with_key: | GET | `/v5/user/query-api` |
|
||||
| [updateMasterApiKey()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1654) | :closed_lock_with_key: | POST | `/v5/user/update-api` |
|
||||
| [updateSubApiKey()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1668) | :closed_lock_with_key: | POST | `/v5/user/update-sub-api` |
|
||||
| [deleteMasterApiKey()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1683) | :closed_lock_with_key: | POST | `/v5/user/delete-api` |
|
||||
| [deleteSubApiKey()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1697) | :closed_lock_with_key: | POST | `/v5/user/delete-sub-api` |
|
||||
| [deleteSubMember()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1710) | :closed_lock_with_key: | POST | `/v5/user/del-submember` |
|
||||
| [getAffiliateUserInfo()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1726) | :closed_lock_with_key: | GET | `/v5/user/aff-customer-info` |
|
||||
| [getLeveragedTokenInfo()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1741) | | GET | `/v5/spot-lever-token/info` |
|
||||
| [getLeveragedTokenMarket()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1750) | | GET | `/v5/spot-lever-token/reference` |
|
||||
| [purchaseSpotLeveragedToken()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1759) | :closed_lock_with_key: | POST | `/v5/spot-lever-token/purchase` |
|
||||
| [redeemSpotLeveragedToken()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1768) | :closed_lock_with_key: | POST | `/v5/spot-lever-token/redeem` |
|
||||
| [getSpotLeveragedTokenOrderHistory()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1777) | :closed_lock_with_key: | GET | `/v5/spot-lever-token/order-record` |
|
||||
| [getVIPMarginData()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1799) | | GET | `/v5/spot-margin-trade/data` |
|
||||
| [getHistoricalInterestRate()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1810) | :closed_lock_with_key: | GET | `/v5/spot-margin-trade/interest-rate-history` |
|
||||
| [toggleSpotMarginTrade()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1837) | :closed_lock_with_key: | POST | `/v5/spot-margin-trade/switch-mode` |
|
||||
| [setSpotMarginLeverage()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1849) | :closed_lock_with_key: | POST | `/v5/spot-margin-trade/set-leverage` |
|
||||
| [getSpotMarginState()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1858) | :closed_lock_with_key: | GET | `/v5/spot-margin-trade/state` |
|
||||
| [getSpotMarginCoinInfo()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1871) | :closed_lock_with_key: | GET | `/v5/spot-cross-margin-trade/pledge-token` |
|
||||
| [getSpotMarginBorrowableCoinInfo()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1888) | :closed_lock_with_key: | GET | `/v5/spot-cross-margin-trade/borrow-token` |
|
||||
| [getSpotMarginInterestAndQuota()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1905) | :closed_lock_with_key: | GET | `/v5/spot-cross-margin-trade/loan-info` |
|
||||
| [getSpotMarginLoanAccountInfo()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1923) | :closed_lock_with_key: | GET | `/v5/spot-cross-margin-trade/account` |
|
||||
| [spotMarginBorrow()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1947) | :closed_lock_with_key: | POST | `/v5/spot-cross-margin-trade/loan` |
|
||||
| [spotMarginRepay()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1958) | :closed_lock_with_key: | POST | `/v5/spot-cross-margin-trade/repay` |
|
||||
| [getSpotMarginBorrowOrderDetail()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1973) | :closed_lock_with_key: | GET | `/v5/spot-cross-margin-trade/orders` |
|
||||
| [getSpotMarginRepaymentOrderDetail()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2002) | :closed_lock_with_key: | GET | `/v5/spot-cross-margin-trade/repay-history` |
|
||||
| [toggleSpotCrossMarginTrade()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2031) | :closed_lock_with_key: | POST | `/v5/spot-cross-margin-trade/switch` |
|
||||
| [getCollateralCoins()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2048) | | GET | `/v5/crypto-loan/collateral-data` |
|
||||
| [getBorrowableCoins()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2064) | | GET | `/v5/crypto-loan/loanable-data` |
|
||||
| [getAccountBorrowCollateralLimit()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2081) | :closed_lock_with_key: | GET | `/v5/crypto-loan/borrowable-collateralisable-number` |
|
||||
| [borrowCryptoLoan()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2100) | :closed_lock_with_key: | POST | `/v5/crypto-loan/borrow` |
|
||||
| [repayCryptoLoan()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2119) | :closed_lock_with_key: | POST | `/v5/crypto-loan/repay` |
|
||||
| [getUnpaidLoanOrders()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2133) | :closed_lock_with_key: | GET | `/v5/crypto-loan/ongoing-orders` |
|
||||
| [getRepaymentHistory()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2152) | :closed_lock_with_key: | GET | `/v5/crypto-loan/repayment-history` |
|
||||
| [getCompletedLoanOrderHistory()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2170) | :closed_lock_with_key: | GET | `/v5/crypto-loan/borrow-history` |
|
||||
| [getMaxAllowedReductionCollateralAmount()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2187) | :closed_lock_with_key: | GET | `/v5/crypto-loan/max-collateral-amount` |
|
||||
| [adjustCollateralAmount()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2204) | :closed_lock_with_key: | POST | `/v5/crypto-loan/adjust-ltv` |
|
||||
| [getLoanLTVAdjustmentHistory()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2226) | :closed_lock_with_key: | GET | `/v5/crypto-loan/adjustment-history` |
|
||||
| [getInstitutionalLendingProductInfo()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2246) | | GET | `/v5/ins-loan/product-infos` |
|
||||
| [getInstitutionalLendingMarginCoinInfo()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2256) | | GET | `/v5/ins-loan/ensure-tokens` |
|
||||
| [getInstitutionalLendingMarginCoinInfoWithConversionRate()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2265) | | GET | `/v5/ins-loan/ensure-tokens-convert` |
|
||||
| [getInstitutionalLendingLoanOrders()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2274) | :closed_lock_with_key: | GET | `/v5/ins-loan/loan-order` |
|
||||
| [getInstitutionalLendingRepayOrders()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2286) | :closed_lock_with_key: | GET | `/v5/ins-loan/repaid-history` |
|
||||
| [getInstitutionalLendingLTV()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2298) | :closed_lock_with_key: | GET | `/v5/ins-loan/ltv` |
|
||||
| [getInstitutionalLendingLTVWithLadderConversionRate()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2307) | :closed_lock_with_key: | GET | `/v5/ins-loan/ltv-convert` |
|
||||
| [bindOrUnbindUID()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2322) | :closed_lock_with_key: | POST | `/v5/ins-loan/association-uid` |
|
||||
| [getExchangeBrokerEarnings()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2346) | :closed_lock_with_key: | GET | `/v5/broker/earnings-info` |
|
||||
| [getExchangeBrokerAccountInfo()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2359) | :closed_lock_with_key: | GET | `/v5/broker/account-info` |
|
||||
| [getBrokerSubAccountDeposits()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2375) | :closed_lock_with_key: | GET | `/v5/broker/asset/query-sub-member-deposit-record` |
|
||||
| [getBrokerVoucherSpec()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2390) | :closed_lock_with_key: | POST | `/v5/broker/award/info` |
|
||||
| [issueBrokerVoucher()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2402) | :closed_lock_with_key: | POST | `/v5/broker/award/distribute-award` |
|
||||
| [getBrokerIssuedVoucher()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2414) | :closed_lock_with_key: | POST | `/v5/broker/award/distribution-record` |
|
||||
| [fetchServerTime()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L276) | | GET | `/v5/market/time` |
|
||||
| [requestDemoTradingFunds()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L287) | :closed_lock_with_key: | POST | `/v5/account/demo-apply-money` |
|
||||
| [getKline()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L302) | | GET | `/v5/market/kline` |
|
||||
| [getMarkPriceKline()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L317) | | GET | `/v5/market/mark-price-kline` |
|
||||
| [getIndexPriceKline()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L332) | | GET | `/v5/market/index-price-kline` |
|
||||
| [getPremiumIndexPriceKline()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L347) | | GET | `/v5/market/premium-index-price-kline` |
|
||||
| [getOrderbook()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L373) | | GET | `/v5/market/orderbook` |
|
||||
| [getTickers()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L379) | | GET | `/v5/market/tickers` |
|
||||
| [getFundingRateHistory()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L417) | | GET | `/v5/market/funding/history` |
|
||||
| [getPublicTradingHistory()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L432) | | GET | `/v5/market/recent-trade` |
|
||||
| [getOpenInterest()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L445) | | GET | `/v5/market/open-interest` |
|
||||
| [getHistoricalVolatility()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L455) | | GET | `/v5/market/historical-volatility` |
|
||||
| [getInsurance()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L466) | | GET | `/v5/market/insurance` |
|
||||
| [getRiskLimit()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L477) | | GET | `/v5/market/risk-limit` |
|
||||
| [getOptionDeliveryPrice()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L492) | | GET | `/v5/market/delivery-price` |
|
||||
| [getDeliveryPrice()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L505) | | GET | `/v5/market/delivery-price` |
|
||||
| [getLongShortRatio()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L511) | | GET | `/v5/market/account-ratio` |
|
||||
| [submitOrder()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L523) | :closed_lock_with_key: | POST | `/v5/order/create` |
|
||||
| [amendOrder()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L529) | :closed_lock_with_key: | POST | `/v5/order/amend` |
|
||||
| [cancelOrder()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L535) | :closed_lock_with_key: | POST | `/v5/order/cancel` |
|
||||
| [getActiveOrders()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L544) | :closed_lock_with_key: | GET | `/v5/order/realtime` |
|
||||
| [cancelAllOrders()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L550) | :closed_lock_with_key: | POST | `/v5/order/cancel-all` |
|
||||
| [getHistoricOrders()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L561) | :closed_lock_with_key: | GET | `/v5/order/history` |
|
||||
| [batchSubmitOrders()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L579) | :closed_lock_with_key: | POST | `/v5/order/create-batch` |
|
||||
| [batchAmendOrders()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L599) | :closed_lock_with_key: | POST | `/v5/order/amend-batch` |
|
||||
| [batchCancelOrders()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L619) | :closed_lock_with_key: | POST | `/v5/order/cancel-batch` |
|
||||
| [getSpotBorrowCheck()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L636) | :closed_lock_with_key: | GET | `/v5/order/spot-borrow-check` |
|
||||
| [setDisconnectCancelAllWindow()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L657) | :closed_lock_with_key: | POST | `/v5/order/disconnected-cancel-all` |
|
||||
| [setDisconnectCancelAllWindowV2()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L675) | :closed_lock_with_key: | POST | `/v5/order/disconnected-cancel-all` |
|
||||
| [getPositionInfo()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L699) | :closed_lock_with_key: | GET | `/v5/position/list` |
|
||||
| [setLeverage()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L714) | :closed_lock_with_key: | POST | `/v5/position/set-leverage` |
|
||||
| [switchIsolatedMargin()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L727) | :closed_lock_with_key: | POST | `/v5/position/switch-isolated` |
|
||||
| [setTPSLMode()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L740) | :closed_lock_with_key: | POST | `/v5/position/set-tpsl-mode` |
|
||||
| [switchPositionMode()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L755) | :closed_lock_with_key: | POST | `/v5/position/switch-mode` |
|
||||
| [setRiskLimit()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L768) | :closed_lock_with_key: | POST | `/v5/position/set-risk-limit` |
|
||||
| [setTradingStop()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L783) | :closed_lock_with_key: | POST | `/v5/position/trading-stop` |
|
||||
| [setAutoAddMargin()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L794) | :closed_lock_with_key: | POST | `/v5/position/set-auto-add-margin` |
|
||||
| [addOrReduceMargin()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L806) | :closed_lock_with_key: | POST | `/v5/position/add-margin` |
|
||||
| [getExecutionList()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L818) | :closed_lock_with_key: | GET | `/v5/execution/list` |
|
||||
| [getClosedPnL()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L830) | :closed_lock_with_key: | GET | `/v5/position/closed-pnl` |
|
||||
| [movePosition()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L849) | :closed_lock_with_key: | POST | `/v5/position/move-positions` |
|
||||
| [getMovePositionHistory()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L860) | :closed_lock_with_key: | GET | `/v5/position/move-history` |
|
||||
| [confirmNewRiskLimit()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L879) | :closed_lock_with_key: | POST | `/v5/position/confirm-pending-mmr` |
|
||||
| [getPreUpgradeOrderHistory()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L899) | :closed_lock_with_key: | GET | `/v5/pre-upgrade/order/history` |
|
||||
| [getPreUpgradeTradeHistory()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L914) | :closed_lock_with_key: | GET | `/v5/pre-upgrade/execution/list` |
|
||||
| [getPreUpgradeClosedPnl()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L925) | :closed_lock_with_key: | GET | `/v5/pre-upgrade/position/closed-pnl` |
|
||||
| [getPreUpgradeTransactions()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L939) | :closed_lock_with_key: | GET | `/v5/pre-upgrade/account/transaction-log` |
|
||||
| [getPreUpgradeOptionDeliveryRecord()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L956) | :closed_lock_with_key: | GET | `/v5/pre-upgrade/asset/delivery-record` |
|
||||
| [getPreUpgradeUSDCSessionSettlements()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L970) | :closed_lock_with_key: | GET | `/v5/pre-upgrade/asset/settlement-record` |
|
||||
| [getWalletBalance()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L991) | :closed_lock_with_key: | GET | `/v5/account/wallet-balance` |
|
||||
| [upgradeToUnifiedAccount()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1002) | :closed_lock_with_key: | POST | `/v5/account/upgrade-to-uta` |
|
||||
| [getBorrowHistory()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1013) | :closed_lock_with_key: | GET | `/v5/account/borrow-history` |
|
||||
| [repayLiability()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1027) | :closed_lock_with_key: | POST | `/v5/account/quick-repayment` |
|
||||
| [setCollateralCoin()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1036) | :closed_lock_with_key: | POST | `/v5/account/set-collateral-switch` |
|
||||
| [batchSetCollateralCoin()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1042) | :closed_lock_with_key: | POST | `/v5/account/set-collateral-switch-batch` |
|
||||
| [getCollateralInfo()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1052) | :closed_lock_with_key: | GET | `/v5/account/collateral-info` |
|
||||
| [getCoinGreeks()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1061) | :closed_lock_with_key: | GET | `/v5/asset/coin-greeks` |
|
||||
| [getFeeRate()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1074) | :closed_lock_with_key: | GET | `/v5/account/fee-rate` |
|
||||
| [getAccountInfo()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1083) | :closed_lock_with_key: | GET | `/v5/account/info` |
|
||||
| [getTransactionLog()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1090) | :closed_lock_with_key: | GET | `/v5/account/transaction-log` |
|
||||
| [getClassicTransactionLogs()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1101) | :closed_lock_with_key: | GET | `/v5/account/contract-transaction-log` |
|
||||
| [getSMPGroup()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1112) | :closed_lock_with_key: | GET | `/v5/account/smp-group` |
|
||||
| [setMarginMode()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1125) | :closed_lock_with_key: | POST | `/v5/account/set-margin-mode` |
|
||||
| [setSpotHedging()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1142) | :closed_lock_with_key: | POST | `/v5/account/set-hedging-mode` |
|
||||
| [setMMP()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1151) | :closed_lock_with_key: | POST | `/v5/account/mmp-modify` |
|
||||
| [resetMMP()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1158) | :closed_lock_with_key: | POST | `/v5/account/mmp-reset` |
|
||||
| [getMMPState()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1165) | :closed_lock_with_key: | GET | `/v5/account/mmp-state` |
|
||||
| [getDCPInfo()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1180) | :closed_lock_with_key: | GET | `/v5/account/query-dcp-info` |
|
||||
| [getCoinExchangeRecords()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1195) | :closed_lock_with_key: | GET | `/v5/asset/exchange/order-record` |
|
||||
| [getDeliveryRecord()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1209) | :closed_lock_with_key: | GET | `/v5/asset/delivery-record` |
|
||||
| [getSettlementRecords()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1220) | :closed_lock_with_key: | GET | `/v5/asset/settlement-record` |
|
||||
| [getAssetInfo()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1234) | :closed_lock_with_key: | GET | `/v5/asset/transfer/query-asset-info` |
|
||||
| [getAllCoinsBalance()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1245) | :closed_lock_with_key: | GET | `/v5/asset/transfer/query-account-coins-balance` |
|
||||
| [getCoinBalance()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1259) | :closed_lock_with_key: | GET | `/v5/asset/transfer/query-account-coin-balance` |
|
||||
| [getTransferableCoinList()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1271) | :closed_lock_with_key: | GET | `/v5/asset/transfer/query-transfer-coin-list` |
|
||||
| [createInternalTransfer()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1287) | :closed_lock_with_key: | POST | `/v5/asset/transfer/inter-transfer` |
|
||||
| [getInternalTransferRecords()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1306) | :closed_lock_with_key: | GET | `/v5/asset/transfer/query-inter-transfer-list` |
|
||||
| [getSubUID()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1320) | :closed_lock_with_key: | GET | `/v5/asset/transfer/query-sub-member-list` |
|
||||
| [enableUniversalTransferForSubUIDs()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1340) | :closed_lock_with_key: | POST | `/v5/asset/transfer/save-transfer-sub-member` |
|
||||
| [createUniversalTransfer()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1351) | :closed_lock_with_key: | POST | `/v5/asset/transfer/universal-transfer` |
|
||||
| [getUniversalTransferRecords()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1363) | :closed_lock_with_key: | GET | `/v5/asset/transfer/query-universal-transfer-list` |
|
||||
| [getAllowedDepositCoinInfo()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1376) | | GET | `/v5/asset/deposit/query-allowed-list` |
|
||||
| [setDepositAccount()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1390) | :closed_lock_with_key: | POST | `/v5/asset/deposit/deposit-to-account` |
|
||||
| [getDepositRecords()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1406) | :closed_lock_with_key: | GET | `/v5/asset/deposit/query-record` |
|
||||
| [getSubAccountDepositRecords()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1421) | :closed_lock_with_key: | GET | `/v5/asset/deposit/query-sub-member-record` |
|
||||
| [getInternalDepositRecords()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1437) | :closed_lock_with_key: | GET | `/v5/asset/deposit/query-internal-record` |
|
||||
| [getMasterDepositAddress()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1449) | :closed_lock_with_key: | GET | `/v5/asset/deposit/query-address` |
|
||||
| [getSubDepositAddress()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1462) | :closed_lock_with_key: | GET | `/v5/asset/deposit/query-sub-member-address` |
|
||||
| [querySubMemberAddress()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1480) | :closed_lock_with_key: | GET | `/v5/asset/deposit/query-sub-member-address` |
|
||||
| [getCoinInfo()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1495) | :closed_lock_with_key: | GET | `/v5/asset/coin/query-info` |
|
||||
| [getWithdrawalRecords()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1507) | :closed_lock_with_key: | GET | `/v5/asset/withdraw/query-record` |
|
||||
| [getWithdrawableAmount()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1516) | :closed_lock_with_key: | GET | `/v5/asset/withdraw/withdrawable-amount` |
|
||||
| [getExchangeEntities()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1527) | :closed_lock_with_key: | GET | `/v5/asset/withdraw/vasp/list` |
|
||||
| [submitWithdrawal()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1540) | :closed_lock_with_key: | POST | `/v5/asset/withdraw/create` |
|
||||
| [cancelWithdrawal()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1551) | :closed_lock_with_key: | POST | `/v5/asset/withdraw/cancel` |
|
||||
| [getConvertCoins()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1560) | :closed_lock_with_key: | GET | `/v5/asset/exchange/query-coin-list` |
|
||||
| [requestConvertQuote()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1571) | :closed_lock_with_key: | POST | `/v5/asset/exchange/quote-apply` |
|
||||
| [confirmConvertQuote()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1580) | :closed_lock_with_key: | POST | `/v5/asset/exchange/convert-execute` |
|
||||
| [getConvertStatus()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1592) | :closed_lock_with_key: | GET | `/v5/asset/exchange/convert-result-query` |
|
||||
| [getConvertHistory()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1611) | :closed_lock_with_key: | GET | `/v5/asset/exchange/query-convert-history` |
|
||||
| [createSubMember()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1631) | :closed_lock_with_key: | POST | `/v5/user/create-sub-member` |
|
||||
| [createSubUIDAPIKey()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1643) | :closed_lock_with_key: | POST | `/v5/user/create-sub-api` |
|
||||
| [getSubUIDList()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1652) | :closed_lock_with_key: | GET | `/v5/user/query-sub-members` |
|
||||
| [getSubUIDListUnlimited()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1661) | :closed_lock_with_key: | GET | `/v5/user/submembers` |
|
||||
| [getSubAccountAllApiKeys()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1676) | :closed_lock_with_key: | GET | `/v5/user/sub-apikeys` |
|
||||
| [setSubUIDFrozenState()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1688) | :closed_lock_with_key: | POST | `/v5/user/frozen-sub-member` |
|
||||
| [getQueryApiKey()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1701) | :closed_lock_with_key: | GET | `/v5/user/query-api` |
|
||||
| [getUIDWalletType()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1705) | :closed_lock_with_key: | GET | `/v5/user/query-api` |
|
||||
| [updateMasterApiKey()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1722) | :closed_lock_with_key: | POST | `/v5/user/update-api` |
|
||||
| [updateSubApiKey()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1736) | :closed_lock_with_key: | POST | `/v5/user/update-sub-api` |
|
||||
| [deleteMasterApiKey()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1751) | :closed_lock_with_key: | POST | `/v5/user/delete-api` |
|
||||
| [deleteSubApiKey()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1765) | :closed_lock_with_key: | POST | `/v5/user/delete-sub-api` |
|
||||
| [deleteSubMember()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1778) | :closed_lock_with_key: | POST | `/v5/user/del-submember` |
|
||||
| [getAffiliateUserInfo()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1794) | :closed_lock_with_key: | GET | `/v5/user/aff-customer-info` |
|
||||
| [getLeveragedTokenInfo()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1809) | | GET | `/v5/spot-lever-token/info` |
|
||||
| [getLeveragedTokenMarket()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1818) | | GET | `/v5/spot-lever-token/reference` |
|
||||
| [purchaseSpotLeveragedToken()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1827) | :closed_lock_with_key: | POST | `/v5/spot-lever-token/purchase` |
|
||||
| [redeemSpotLeveragedToken()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1836) | :closed_lock_with_key: | POST | `/v5/spot-lever-token/redeem` |
|
||||
| [getSpotLeveragedTokenOrderHistory()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1845) | :closed_lock_with_key: | GET | `/v5/spot-lever-token/order-record` |
|
||||
| [getVIPMarginData()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1867) | | GET | `/v5/spot-margin-trade/data` |
|
||||
| [getHistoricalInterestRate()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1878) | :closed_lock_with_key: | GET | `/v5/spot-margin-trade/interest-rate-history` |
|
||||
| [toggleSpotMarginTrade()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1905) | :closed_lock_with_key: | POST | `/v5/spot-margin-trade/switch-mode` |
|
||||
| [setSpotMarginLeverage()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1917) | :closed_lock_with_key: | POST | `/v5/spot-margin-trade/set-leverage` |
|
||||
| [getSpotMarginState()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1926) | :closed_lock_with_key: | GET | `/v5/spot-margin-trade/state` |
|
||||
| [getSpotMarginCoinInfo()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1939) | :closed_lock_with_key: | GET | `/v5/spot-cross-margin-trade/pledge-token` |
|
||||
| [getSpotMarginBorrowableCoinInfo()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1956) | :closed_lock_with_key: | GET | `/v5/spot-cross-margin-trade/borrow-token` |
|
||||
| [getSpotMarginInterestAndQuota()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1973) | :closed_lock_with_key: | GET | `/v5/spot-cross-margin-trade/loan-info` |
|
||||
| [getSpotMarginLoanAccountInfo()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L1991) | :closed_lock_with_key: | GET | `/v5/spot-cross-margin-trade/account` |
|
||||
| [spotMarginBorrow()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2015) | :closed_lock_with_key: | POST | `/v5/spot-cross-margin-trade/loan` |
|
||||
| [spotMarginRepay()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2026) | :closed_lock_with_key: | POST | `/v5/spot-cross-margin-trade/repay` |
|
||||
| [getSpotMarginBorrowOrderDetail()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2041) | :closed_lock_with_key: | GET | `/v5/spot-cross-margin-trade/orders` |
|
||||
| [getSpotMarginRepaymentOrderDetail()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2070) | :closed_lock_with_key: | GET | `/v5/spot-cross-margin-trade/repay-history` |
|
||||
| [toggleSpotCrossMarginTrade()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2099) | :closed_lock_with_key: | POST | `/v5/spot-cross-margin-trade/switch` |
|
||||
| [getCollateralCoins()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2116) | | GET | `/v5/crypto-loan/collateral-data` |
|
||||
| [getBorrowableCoins()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2132) | | GET | `/v5/crypto-loan/loanable-data` |
|
||||
| [getAccountBorrowCollateralLimit()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2149) | :closed_lock_with_key: | GET | `/v5/crypto-loan/borrowable-collateralisable-number` |
|
||||
| [borrowCryptoLoan()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2168) | :closed_lock_with_key: | POST | `/v5/crypto-loan/borrow` |
|
||||
| [repayCryptoLoan()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2187) | :closed_lock_with_key: | POST | `/v5/crypto-loan/repay` |
|
||||
| [getUnpaidLoanOrders()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2201) | :closed_lock_with_key: | GET | `/v5/crypto-loan/ongoing-orders` |
|
||||
| [getRepaymentHistory()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2220) | :closed_lock_with_key: | GET | `/v5/crypto-loan/repayment-history` |
|
||||
| [getCompletedLoanOrderHistory()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2238) | :closed_lock_with_key: | GET | `/v5/crypto-loan/borrow-history` |
|
||||
| [getMaxAllowedReductionCollateralAmount()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2255) | :closed_lock_with_key: | GET | `/v5/crypto-loan/max-collateral-amount` |
|
||||
| [adjustCollateralAmount()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2272) | :closed_lock_with_key: | POST | `/v5/crypto-loan/adjust-ltv` |
|
||||
| [getLoanLTVAdjustmentHistory()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2294) | :closed_lock_with_key: | GET | `/v5/crypto-loan/adjustment-history` |
|
||||
| [getInstitutionalLendingProductInfo()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2314) | | GET | `/v5/ins-loan/product-infos` |
|
||||
| [getInstitutionalLendingMarginCoinInfo()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2324) | | GET | `/v5/ins-loan/ensure-tokens` |
|
||||
| [getInstitutionalLendingMarginCoinInfoWithConversionRate()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2333) | | GET | `/v5/ins-loan/ensure-tokens-convert` |
|
||||
| [getInstitutionalLendingLoanOrders()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2342) | :closed_lock_with_key: | GET | `/v5/ins-loan/loan-order` |
|
||||
| [getInstitutionalLendingRepayOrders()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2354) | :closed_lock_with_key: | GET | `/v5/ins-loan/repaid-history` |
|
||||
| [getInstitutionalLendingLTV()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2366) | :closed_lock_with_key: | GET | `/v5/ins-loan/ltv` |
|
||||
| [getInstitutionalLendingLTVWithLadderConversionRate()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2375) | :closed_lock_with_key: | GET | `/v5/ins-loan/ltv-convert` |
|
||||
| [bindOrUnbindUID()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2390) | :closed_lock_with_key: | POST | `/v5/ins-loan/association-uid` |
|
||||
| [getExchangeBrokerEarnings()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2414) | :closed_lock_with_key: | GET | `/v5/broker/earnings-info` |
|
||||
| [getExchangeBrokerAccountInfo()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2427) | :closed_lock_with_key: | GET | `/v5/broker/account-info` |
|
||||
| [getBrokerSubAccountDeposits()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2443) | :closed_lock_with_key: | GET | `/v5/broker/asset/query-sub-member-deposit-record` |
|
||||
| [getBrokerVoucherSpec()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2458) | :closed_lock_with_key: | POST | `/v5/broker/award/info` |
|
||||
| [issueBrokerVoucher()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2470) | :closed_lock_with_key: | POST | `/v5/broker/award/distribute-award` |
|
||||
| [getBrokerIssuedVoucher()](https://github.com/tiagosiebler/bybit-api/blob/master/src/rest-client-v5.ts#L2482) | :closed_lock_with_key: | POST | `/v5/broker/award/distribution-record` |
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "bybit-api",
|
||||
"version": "3.10.20",
|
||||
"version": "3.10.21",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "bybit-api",
|
||||
"version": "3.10.20",
|
||||
"version": "3.10.21",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"axios": "^1.6.6",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "bybit-api",
|
||||
"version": "3.10.20",
|
||||
"version": "3.10.21",
|
||||
"description": "Complete & robust Node.js SDK for Bybit's REST APIs and WebSockets, with TypeScript & strong end to end tests.",
|
||||
"main": "lib/index.js",
|
||||
"types": "lib/index.d.ts",
|
||||
|
||||
@@ -201,6 +201,74 @@ import BaseRestClient from './util/BaseRestClient';
|
||||
* https://bybit-exchange.github.io/docs/v5/intro
|
||||
*/
|
||||
export class RestClientV5 extends BaseRestClient {
|
||||
/**
|
||||
*
|
||||
****** Custom SDK APIs
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* This method is used to get the latency and time sync between the client and the server.
|
||||
* This is not official API endpoint and is only used for internal testing purposes.
|
||||
* Use this method to check the latency and time sync between the client and the server.
|
||||
* Final values might vary slightly, but it should be within few ms difference.
|
||||
* If you have any suggestions or improvements to this measurement, please create an issue or pull request on GitHub.
|
||||
*/
|
||||
async fetchLatencySummary(): Promise<any> {
|
||||
const clientTimeReqStart = Date.now();
|
||||
const serverTime = await this.getServerTime();
|
||||
const clientTimeReqEnd = Date.now();
|
||||
|
||||
const serverTimeMs = serverTime.time;
|
||||
const roundTripTime = clientTimeReqEnd - clientTimeReqStart;
|
||||
const estimatedOneWayLatency = Math.floor(roundTripTime / 2);
|
||||
|
||||
// Adjust server time by adding estimated one-way latency
|
||||
const adjustedServerTime = serverTimeMs + estimatedOneWayLatency;
|
||||
|
||||
// Calculate time difference between adjusted server time and local time
|
||||
const timeDifference = adjustedServerTime - clientTimeReqEnd;
|
||||
|
||||
const result = {
|
||||
localTime: clientTimeReqEnd,
|
||||
serverTime: serverTimeMs,
|
||||
roundTripTime,
|
||||
estimatedOneWayLatency,
|
||||
adjustedServerTime,
|
||||
timeDifference,
|
||||
};
|
||||
|
||||
console.log('Time synchronization results:');
|
||||
console.log(result);
|
||||
|
||||
console.log(
|
||||
`Your approximate latency to exchange server:
|
||||
One way: ${estimatedOneWayLatency}ms.
|
||||
Round trip: ${roundTripTime}ms.
|
||||
`,
|
||||
);
|
||||
|
||||
if (timeDifference > 500) {
|
||||
console.warn(
|
||||
`WARNING! Time difference between server and client clock is greater than 500ms. It is currently ${timeDifference}ms.
|
||||
Consider adjusting your system clock to avoid unwanted clock sync errors!
|
||||
Visit https://github.com/tiagosiebler/awesome-crypto-examples/wiki/Timestamp-for-this-request-is-outside-of-the-recvWindow for more information`,
|
||||
);
|
||||
} else {
|
||||
console.log(
|
||||
`Time difference between server and client clock is within acceptable range of 500ms. It is currently ${timeDifference}ms.`,
|
||||
);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
****** Misc Bybit APIs
|
||||
*
|
||||
*/
|
||||
|
||||
getClientType() {
|
||||
return REST_CLIENT_TYPE_ENUM.v3;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user