From b9689767d9a4c0588f25183a0c63e0943a2f9f86 Mon Sep 17 00:00:00 2001 From: JJ-Cro Date: Tue, 1 Jul 2025 12:18:35 +0200 Subject: [PATCH 01/57] feat(): initial rest client v3, added public endpoints and types. --- src/rest-client-v3.ts | 248 ++++++++++++++++++++++++++++++++ src/types/request/index.ts | 2 + src/types/request/v3/public.ts | 107 ++++++++++++++ src/types/response/index.ts | 2 + src/types/response/v3/public.ts | 168 ++++++++++++++++++++++ src/util/requestUtils.ts | 1 + 6 files changed, 528 insertions(+) create mode 100644 src/rest-client-v3.ts create mode 100644 src/types/request/v3/public.ts create mode 100644 src/types/response/v3/public.ts diff --git a/src/rest-client-v3.ts b/src/rest-client-v3.ts new file mode 100644 index 0000000..482f89e --- /dev/null +++ b/src/rest-client-v3.ts @@ -0,0 +1,248 @@ +import { + APIResponse, + CandlestickV3, + ContractOiV3, + CurrentFundingRateV3, + DiscountRateV3, + FillV3, + GetCandlesRequestV3, + GetContractsOiRequestV3, + GetCurrentFundingRateRequestV3, + GetFillsRequestV3, + GetHistoryCandlesRequestV3, + GetHistoryFundingRateRequestV3, + GetInstrumentsRequestV3, + GetMarginLoansRequestV3, + GetOpenInterestRequestV3, + GetOrderBookRequestV3, + GetPositionTierRequestV3, + GetRiskReserveRequestV3, + GetTickersRequestV3, + HistoryFundingRateV3, + InstrumentV3, + MarginLoanV3, + OpenInterestV3, + OrderBookV3, + PositionTierV3, + RiskReserveV3, + TickerV3, +} from './types'; +import { REST_CLIENT_TYPE_ENUM } from './util'; +import BaseRestClient from './util/BaseRestClient'; + +/** + * REST API client for all V3 endpoints + */ +export class RestClientV3 extends BaseRestClient { + getClientType() { + return REST_CLIENT_TYPE_ENUM.v3; + } + + /** + * + * Custom SDK functions + * + */ + + /** + * 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 { + const clientTimeReqStart = Date.now(); + const serverTime = await this.getServerTime(); + const clientTimeReqEnd = Date.now(); + console.log('serverTime', serverTime); + + const serverTimeMs = Number(serverTime.data.serverTime); + 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; + } + + async fetchServerTime(): Promise { + const res = await this.getServerTime(); + return Number(res.data.serverTime); + } + + /** + * + * Public endpoints + * + */ + + getServerTime(): Promise< + APIResponse<{ + serverTime: string; + }> + > { + return this.get('/api/v3/public/time'); + } + + /** + * + * Market Data endpoints + * + */ + + /** + * Get Recent Public Fills + */ + getFills(params: GetFillsRequestV3): Promise> { + return this.get('/api/v3/market/fills', params); + } + + /** + * Get Kline/Candlestick + */ + getCandles( + params: GetCandlesRequestV3, + ): Promise> { + return this.get('/api/v3/market/candles', params); + } + + /** + * Get Kline/Candlestick History + */ + getHistoryCandles( + params: GetHistoryCandlesRequestV3, + ): Promise> { + return this.get('/api/v3/market/history-candles', params); + } + + /** + * Get Open Interest Limit + */ + getContractsOi( + params: GetContractsOiRequestV3, + ): Promise> { + return this.get('/api/v3/market/oi-limit', params); + } + + /** + * Get Current Funding Rate + */ + getCurrentFundingRate( + params: GetCurrentFundingRateRequestV3, + ): Promise> { + return this.get('/api/v3/market/current-fund-rate', params); + } + + /** + * Get Discount Rate + */ + getDiscountRate(): Promise> { + return this.get('/api/v3/market/discount-rate'); + } + + /** + * Get Funding Rate History + */ + getHistoryFundingRate( + params: GetHistoryFundingRateRequestV3, + ): Promise> { + return this.get('/api/v3/market/history-fund-rate', params); + } + + /** + * Get Margin Loan + */ + getMarginLoans( + params: GetMarginLoansRequestV3, + ): Promise> { + return this.get('/api/v3/market/margin-loans', params); + } + + /** + * Get Open Interest + */ + getOpenInterest( + params: GetOpenInterestRequestV3, + ): Promise> { + return this.get('/api/v3/market/open-interest', params); + } + + /** + * Get Position Tier + */ + getPositionTier( + params: GetPositionTierRequestV3, + ): Promise> { + return this.get('/api/v3/market/position-tier', params); + } + + /** + * Get Risk Reserve + */ + getRiskReserve( + params: GetRiskReserveRequestV3, + ): Promise> { + return this.get('/api/v3/market/risk-reserve', params); + } + + /** + * Get Instruments + */ + getInstruments( + params: GetInstrumentsRequestV3, + ): Promise> { + return this.get('/api/v3/market/instruments', params); + } + + /** + * Get OrderBook + */ + getOrderBook( + params: GetOrderBookRequestV3, + ): Promise> { + return this.get('/api/v3/market/orderbook', params); + } + + /** + * Get Tickers + */ + getTickers(params: GetTickersRequestV3): Promise> { + return this.get('/api/v3/market/tickers', params); + } +} diff --git a/src/types/request/index.ts b/src/types/request/index.ts index 1cf44db..6a6387b 100644 --- a/src/types/request/index.ts +++ b/src/types/request/index.ts @@ -9,3 +9,5 @@ export * from './v2/earn'; export * from './v2/futures'; export * from './v2/margin'; export * from './v2/spot'; +export * from './v3/public'; + diff --git a/src/types/request/v3/public.ts b/src/types/request/v3/public.ts new file mode 100644 index 0000000..32870e4 --- /dev/null +++ b/src/types/request/v3/public.ts @@ -0,0 +1,107 @@ +export interface GetFillsRequestV3 { + category: + | 'SPOT' + | 'MARGIN' + | 'USDT-FUTURES' + | 'COIN-FUTURES' + | 'USDC-FUTURES'; + symbol?: string; + limit?: string; +} + +export interface GetCandlesRequestV3 { + category: 'SPOT' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + symbol: string; + interval: + | '1m' + | '3m' + | '5m' + | '15m' + | '30m' + | '1H' + | '4H' + | '6H' + | '12H' + | '1D'; + startTime?: string; + endTime?: string; + type?: 'MARKET' | 'MARK' | 'INDEX'; + limit?: string; +} + +export interface GetHistoryCandlesRequestV3 { + category: 'SPOT' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + symbol: string; + interval: + | '1m' + | '3m' + | '5m' + | '15m' + | '30m' + | '1H' + | '4H' + | '6H' + | '12H' + | '1D'; + startTime?: string; + endTime?: string; + type?: 'MARKET' | 'MARK' | 'INDEX'; + limit?: string; +} + +export interface GetContractsOiRequestV3 { + symbol?: string; + category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; +} + +export interface GetCurrentFundingRateRequestV3 { + symbol: string; +} + +export interface GetHistoryFundingRateRequestV3 { + category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + symbol: string; + cursor?: string; + limit?: string; +} + +export interface GetMarginLoansRequestV3 { + coin: string; +} + +export interface GetOpenInterestRequestV3 { + category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + symbol?: string; +} + +export interface GetPositionTierRequestV3 { + category: 'MARGIN' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + symbol?: string; + coin?: string; +} + +export interface GetRiskReserveRequestV3 { + category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + symbol: string; +} + +export interface GetInstrumentsRequestV3 { + category: + | 'SPOT' + | 'MARGIN' + | 'USDT-FUTURES' + | 'COIN-FUTURES' + | 'USDC-FUTURES'; + symbol?: string; +} + +export interface GetOrderBookRequestV3 { + category: 'SPOT' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + symbol: string; + limit?: string; +} + +export interface GetTickersRequestV3 { + category: 'SPOT' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + symbol?: string; +} diff --git a/src/types/response/index.ts b/src/types/response/index.ts index c0a4a58..d286663 100644 --- a/src/types/response/index.ts +++ b/src/types/response/index.ts @@ -8,3 +8,5 @@ export * from './v2/earn'; export * from './v2/futures'; export * from './v2/margin'; export * from './v2/spot'; +export * from './v3/public'; + diff --git a/src/types/response/v3/public.ts b/src/types/response/v3/public.ts new file mode 100644 index 0000000..2baf5a7 --- /dev/null +++ b/src/types/response/v3/public.ts @@ -0,0 +1,168 @@ +export interface FillV3 { + execId: string; + price: string; + size: string; + side: 'sell' | 'buy'; + ts: string; +} + +export interface CandlestickV3 extends Array { + 0: string; // timestamp + 1: string; // open price + 2: string; // high price + 3: string; // low price + 4: string; // close price + 5: string; // volume + 6: string; // turnover +} + +export interface ContractOiV3 { + symbol: string; + notionalValue: string; + totalNotionalValue: string; +} + +export interface CurrentFundingRateV3 { + symbol: string; + fundingRate: string; + fundingRateInterval: string; + nextUpdate: string; + minFundingRate: string; + maxFundingRate: string; +} + +export interface DiscountRateTierV3 { + tierStartValue: string; + discountRate: string; +} + +export interface DiscountRateV3 { + coin: string; + list: DiscountRateTierV3[]; +} + +export interface HistoryFundingRateV3 { + symbol: string; + fundingRate: string; + fundingRateTimestamp: string; +} + +export interface MarginLoanV3 { + dailyInterest: string; + annualInterest: string; + limit: string; +} + +export interface OpenInterestItemV3 { + symbol: string; + openInterest: string; +} + +export interface OpenInterestV3 { + list: OpenInterestItemV3[]; + ts: string; +} + +export interface PositionTierV3 { + tier: string; + minTierValue: string; + maxTierValue: string; + leverage: string; + mmr: string; +} + +export interface RiskReserveRecordV3 { + type: 'in' | 'out'; + amount: string; + ts: string; +} + +export interface RiskReserveV3 { + totalBalance: string; + coin: string; + riskReserveRecords: RiskReserveRecordV3[]; +} + +export interface InstrumentV3 { + symbol: string; + category: + | 'SPOT' + | 'MARGIN' + | 'USDT-FUTURES' + | 'COIN-FUTURES' + | 'USDC-FUTURES'; + baseCoin: string; + quoteCoin: string; + buyLimitPriceRatio: string; + sellLimitPriceRatio: string; + feeRateUpRatio: string; + minOrderQty: string; + maxOrderQty: string; + pricePrecision: string; + quantityPrecision: string; + quotePrecision: string; + minOrderAmount: string; + maxSymbolOrderNum: string; + maxProductOrderNum: string; + status: 'listed' | 'online' | 'limit_open' | 'offline' | 'restrictedAPI'; + offTime: string; + limitOpenTime: string; + maintainTime: string; + areaSymbol?: string; + + // Futures specific fields + makerFeeRate?: string; + takerFeeRate?: string; + openCostUpRatio?: string; + priceMultiplier?: string; + quantityMultiplier?: string; + symbolType?: 'perpetual' | 'delivery'; + maxPositionNum?: string; + deliveryTime?: string; + deliveryStartTime?: string; + deliveryPeriod?: string; + launchTime?: string; + fundInterval?: string; + minLeverage?: string; + maxLeverage?: string; + + // Margin specific fields + isIsolatedBaseBorrowable?: 'YES' | 'NO'; + isIsolatedQuotedBorrowable?: 'YES' | 'NO'; + warningRiskRatio?: string; + liquidationRiskRatio?: string; + maxCrossedLeverage?: string; + maxIsolatedLeverage?: string; + userMinBorrow?: string; +} + +export interface OrderBookV3 { + a: string[][]; // asks - [price, size] + b: string[][]; // bids - [price, size] + ts: string; +} + +export interface TickerV3 { + category: 'SPOT' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + symbol: string; + lastPrice: string; + openPrice24h: string; + highPrice24h: string; + lowPrice24h: string; + ask1Price: string; + bid1Price: string; + bid1Size: string; + ask1Size: string; + price24hPcnt: string; + volume24h: string; + turnover24h: string; + + // Futures specific fields + indexPrice?: string; + markPrice?: string; + fundingRate?: string; + openInterest?: string; + deliveryStartTime?: string; + deliveryTime?: string; + deliveryStatus?: string; +} diff --git a/src/util/requestUtils.ts b/src/util/requestUtils.ts index e4ed446..60282ef 100644 --- a/src/util/requestUtils.ts +++ b/src/util/requestUtils.ts @@ -106,4 +106,5 @@ export const REST_CLIENT_TYPE_ENUM = { futures: 'futures', broker: 'broker', v2: 'v2', + v3: 'v3', } as const; From d8e524c3e5c8688ca5f889416e145095153d8c9e Mon Sep 17 00:00:00 2001 From: JJ-Cro Date: Tue, 1 Jul 2025 12:39:46 +0200 Subject: [PATCH 02/57] feat(): add account, subaccount and transfer endpoints and types --- src/rest-client-v3.ts | 215 +++++++++++++++++++++++++++++++ src/types/request/index.ts | 1 + src/types/request/v3/account.ts | 113 ++++++++++++++++ src/types/response/index.ts | 1 + src/types/response/v3/account.ts | 190 +++++++++++++++++++++++++++ 5 files changed, 520 insertions(+) create mode 100644 src/types/request/v3/account.ts create mode 100644 src/types/response/v3/account.ts diff --git a/src/rest-client-v3.ts b/src/rest-client-v3.ts index 482f89e..514260d 100644 --- a/src/rest-client-v3.ts +++ b/src/rest-client-v3.ts @@ -1,14 +1,27 @@ +/* eslint-disable prettier/prettier */ import { + AccountAssetsV3, + AccountSettingsV3, APIResponse, CandlestickV3, ContractOiV3, + ConvertRecordsResponseV3, + CreateSubAccountApiKeyRequestV3, + CreateSubAccountApiKeyResponseV3, + CreateSubAccountRequestV3, + CreateSubAccountResponseV3, CurrentFundingRateV3, + DeleteSubAccountApiKeyRequestV3, DiscountRateV3, FillV3, + FinancialRecordsResponseV3, + FreezeSubAccountRequestV3, GetCandlesRequestV3, GetContractsOiRequestV3, + GetConvertRecordsRequestV3, GetCurrentFundingRateRequestV3, GetFillsRequestV3, + GetFinancialRecordsRequestV3, GetHistoryCandlesRequestV3, GetHistoryFundingRateRequestV3, GetInstrumentsRequestV3, @@ -17,15 +30,33 @@ import { GetOrderBookRequestV3, GetPositionTierRequestV3, GetRiskReserveRequestV3, + GetSubAccountApiKeysRequestV3, + GetSubAccountApiKeysResponseV3, + GetSubAccountListRequestV3, + GetSubAccountListResponseV3, + GetSubTransferRecordsRequestV3, + GetSubTransferRecordsResponseV3, GetTickersRequestV3, + GetTransferableCoinsRequestV3, HistoryFundingRateV3, InstrumentV3, MarginLoanV3, OpenInterestV3, OrderBookV3, + PaymentCoinsResponseV3, PositionTierV3, + RepayableCoinsResponseV3, + RepayRequestV3, + RepayResponseV3, RiskReserveV3, + SetLeverageRequestV3, + SubAccountTransferRequestV3, + SubAccountTransferResponseV3, TickerV3, + TransferRequestV3, + TransferResponseV3, + UpdateSubAccountApiKeyRequestV3, + UpdateSubAccountApiKeyResponseV3, } from './types'; import { REST_CLIENT_TYPE_ENUM } from './util'; import BaseRestClient from './util/BaseRestClient'; @@ -120,6 +151,190 @@ export class RestClientV3 extends BaseRestClient { return this.get('/api/v3/public/time'); } + /** + * + * Account Management endpoints + * + */ + + /** + * Set Leverage + */ + setLeverage(params: SetLeverageRequestV3): Promise> { + return this.postPrivate('/api/v3/account/set-leverage', params); + } + + /** + * Set Holding Mode + */ + setHoldMode(params: { + holdMode: 'one_way_mode' | 'hedge_mode'; + }): Promise> { + return this.postPrivate('/api/v3/account/set-hold-mode', params); + } + + /** + * Get Account Info + */ + getAccountSettings(): Promise> { + return this.getPrivate('/api/v3/account/settings'); + } + + /** + * Get Account Assets + */ + getAccountAssets(): Promise> { + return this.getPrivate('/api/v3/account/assets'); + } + + /** + * Get Convert Records + */ + getConvertRecords( + params: GetConvertRecordsRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/account/convert-records', params); + } + + /** + * Get Financial Records + */ + getFinancialRecords( + params: GetFinancialRecordsRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/account/financial-records', params); + } + + /** + * Get Payment Coins + */ + getPaymentCoins(): Promise> { + return this.getPrivate('/api/v3/account/payment-coins'); + } + + /** + * Get Repayable Coins + */ + getRepayableCoins(): Promise> { + return this.getPrivate('/api/v3/account/repayable-coins'); + } + + /** + * Repay + */ + submitRepay(params: RepayRequestV3): Promise> { + return this.postPrivate('/api/v3/account/repay', params); + } + + /** + * + * Sub-account Management endpoints + * + */ + + /** + * Create Sub-account API Key + */ + createSubAccountApiKey( + params: CreateSubAccountApiKeyRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/user/create-sub-api', params); + } + + /** + * Delete Sub-account API Key + */ + deleteSubAccountApiKey( + params: DeleteSubAccountApiKeyRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/user/delete-sub-api', params); + } + + /** + * Get Sub-account API Keys + */ + getSubAccountApiKeys( + params: GetSubAccountApiKeysRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/user/sub-api-list', params); + } + + /** + * Modify Sub-account API Key + */ + updateSubAccountApiKey( + params: UpdateSubAccountApiKeyRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/user/update-sub-api', params); + } + + /** + * Create Sub-account + */ + createSubAccount( + params: CreateSubAccountRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/user/create-sub', params); + } + + /** + * Freeze/Unfreeze Sub-account + */ + freezeSubAccount( + params: FreezeSubAccountRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/user/freeze-sub', params); + } + + /** + * Get Sub-account List + */ + getSubAccountList( + params?: GetSubAccountListRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/user/sub-list', params); + } + + /** + * + * Transfer endpoints + * + */ + + /** + * Transfer + */ + submitTransfer(params: TransferRequestV3): Promise> { + return this.postPrivate('/api/v3/account/transfer', params); + } + + /** + * Get Transferable Coins + */ + getTransferableCoins( + params: GetTransferableCoinsRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/account/transferable-coins', params); + } + + /** + * Get Main-Sub Transfer Records + */ + getSubTransferRecords( + params?: GetSubTransferRecordsRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/account/sub-transfer-record', params); + } + + /** + * Main-Sub Account Transfer + */ + subAccountTransfer( + params: SubAccountTransferRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/account/sub-transfer', params); + } + /** * * Market Data endpoints diff --git a/src/types/request/index.ts b/src/types/request/index.ts index 6a6387b..2b74cec 100644 --- a/src/types/request/index.ts +++ b/src/types/request/index.ts @@ -9,5 +9,6 @@ export * from './v2/earn'; export * from './v2/futures'; export * from './v2/margin'; export * from './v2/spot'; +export * from './v3/account'; export * from './v3/public'; diff --git a/src/types/request/v3/account.ts b/src/types/request/v3/account.ts new file mode 100644 index 0000000..e77448d --- /dev/null +++ b/src/types/request/v3/account.ts @@ -0,0 +1,113 @@ +// Account Management Request Types + +export interface SetLeverageRequestV3 { + category: 'MARGIN' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + symbol?: string; + leverage: string; + coin?: string; + posSide?: 'long' | 'short'; +} + +export interface GetConvertRecordsRequestV3 { + fromCoin: string; + toCoin: string; + startTime?: string; + endTime?: string; + limit?: string; + cursor?: string; +} + +export interface GetFinancialRecordsRequestV3 { + category: 'SPOT' | 'MARGIN' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + coin?: string; + startTime?: string; + endTime?: string; + limit?: string; + cursor?: string; +} + +export interface RepayRequestV3 { + repayableCoinList: string[]; + paymentCoinList: string[]; +} + +// Sub-account Management Request Types + +export interface CreateSubAccountApiKeyRequestV3 { + subUid: string; + note: string; + type: 'read_write' | 'read_only'; + passphrase: string; + permissions: string[]; + ips: string[]; +} + +export interface DeleteSubAccountApiKeyRequestV3 { + apiKey: string; +} + +export interface GetSubAccountApiKeysRequestV3 { + subUid: string; + limit?: string; + cursor?: string; +} + +export interface UpdateSubAccountApiKeyRequestV3 { + apiKey: string; + passphrase: string; + type?: 'read_write' | 'read_only'; + permissions?: string[]; + ips?: string[]; +} + +export interface CreateSubAccountRequestV3 { + username: string; + accountMode?: 'classic' | 'unified'; + note?: string; +} + +export interface FreezeSubAccountRequestV3 { + subUid: string; + operation: 'freeze' | 'unfreeze'; +} + +export interface GetSubAccountListRequestV3 { + limit?: string; + cursor?: string; +} + +// Transfer Request Types + +export interface TransferRequestV3 { + fromType: 'spot' | 'p2p' | 'coin-futures' | 'usdt-futures' | 'usdc-futures' | 'crossed-margin' | 'isolated-margin' | 'uta'; + toType: 'spot' | 'p2p' | 'coin-futures' | 'usdt-futures' | 'usdc-futures' | 'crossed-margin' | 'isolated-margin' | 'uta'; + amount: string; + coin: string; + symbol?: string; +} + +export interface GetTransferableCoinsRequestV3 { + fromType: 'spot' | 'p2p' | 'coin-futures' | 'usdt-futures' | 'usdc-futures' | 'crossed-margin' | 'isolated-margin' | 'uta'; + toType: 'spot' | 'p2p' | 'coin-futures' | 'usdt-futures' | 'usdc-futures' | 'crossed-margin' | 'isolated-margin' | 'uta'; +} + +export interface GetSubTransferRecordsRequestV3 { + subUid?: string; + role?: 'initiator' | 'receiver'; + coin?: string; + startTime?: string; + endTime?: string; + clientOid?: string; + limit?: string; + cursor?: string; +} + +export interface SubAccountTransferRequestV3 { + fromType: 'spot' | 'p2p' | 'usdt_futures' | 'coin_futures' | 'usdc_futures' | 'crossed_margin' | 'uta'; + toType: 'spot' | 'p2p' | 'usdt_futures' | 'coin_futures' | 'usdc_futures' | 'crossed_margin' | 'uta'; + amount: string; + coin: string; + fromUserId: string; + toUserId: string; + clientOid: string; +} diff --git a/src/types/response/index.ts b/src/types/response/index.ts index d286663..da4469b 100644 --- a/src/types/response/index.ts +++ b/src/types/response/index.ts @@ -8,5 +8,6 @@ export * from './v2/earn'; export * from './v2/futures'; export * from './v2/margin'; export * from './v2/spot'; +export * from './v3/account'; export * from './v3/public'; diff --git a/src/types/response/v3/account.ts b/src/types/response/v3/account.ts new file mode 100644 index 0000000..f6bea56 --- /dev/null +++ b/src/types/response/v3/account.ts @@ -0,0 +1,190 @@ +// Account Management Response Types +export interface AccountSymbolConfigV3 { + category: string; + symbol: string; + marginMode: string; + leverage: string; +} + +export interface AccountCoinConfigV3 { + coin: string; + leverage: string; +} + +export interface AccountSettingsV3 { + assetMode: string; + holdMode: string; + symbolConfigList: AccountSymbolConfigV3[]; + coinConfigList: AccountCoinConfigV3[]; +} + +export interface AccountAssetV3 { + coin: string; + equity: string; + usdValue: string; + balance: string; + available: string; + debt: string; + locked: string; +} + +export interface AccountAssetsV3 { + accountEquity: string; + usdtEquity: string; + btcEquity: string; + unrealisedPnl: string; + usdtUnrealisedPnl: string; + btcUnrealizedPnl: string; + effEquity: string; + mmr: string; + imr: string; + mgnRatio: string; + positionMgnRatio: string; + assets: AccountAssetV3[]; +} + +export interface ConvertRecordV3 { + fromCoin: string; + fromCoinSize: string; + toCoin: string; + toCoinSize: string; + price: string; + ts: string; +} + +export interface ConvertRecordsResponseV3 { + list: ConvertRecordV3[]; + cursor: string; +} + +export interface FinancialRecordV3 { + category: string; + id: string; + symbol: string; + coin: string; + type: string; + amount: string; + fee: string; + balance: string; + ts: string; +} + +export interface FinancialRecordsResponseV3 { + list: FinancialRecordV3[]; + cursor: string; +} + +export interface PaymentCoinV3 { + coin: string; + size: string; + amount: string; +} +export interface PaymentCoinsResponseV3 { + paymentCoinList: PaymentCoinV3[]; + maxSelection: string; +} + +export interface RepayableCoinV3 { + coin: string; + size: string; + amount: string; +} + +export interface RepayableCoinsResponseV3 { + repayableCoinList: RepayableCoinV3[]; + maxSelection: string; +} + +export interface RepayResponseV3 { + result: string; + repayAmount: string; +} + +// Sub-account Management Response Types + +export interface CreateSubAccountApiKeyResponseV3 { + note: string; + apiKey: string; + secret: string; + type: string; + permissions: string[]; + ips: string[]; +} +export interface SubAccountApiKeyV3 { + apiKey: string; + note: string; + type: string; + permissions: string[]; + ips: string[]; + ts?: string; +} + +export interface GetSubAccountApiKeysResponseV3 { + items: SubAccountApiKeyV3[]; + hasNext: boolean; + cursor: string; +} + +export interface UpdateSubAccountApiKeyResponseV3 { + note: string; + apiKey: string; + type: string; + permissions: string[]; + ips: string[]; +} + +export interface CreateSubAccountResponseV3 { + username: string; + subUid: string; + status: string; + note: string; + createdTime: string; + updatedTime: string; +} + +export interface SubAccountV3 { + subUid: string; + username: string; + status: string; + accountMode: string; + type: string; + note: string; + createdTime: string; + updatedTime: string; +} + +export interface GetSubAccountListResponseV3 { + list: SubAccountV3[]; + hasNext: boolean; + cursor: string; +} + +// Transfer Response Types + +export interface TransferResponseV3 { + transferId: string; +} + +export interface SubTransferRecordV3 { + transferId: string; + fromType: string; + toType: string; + amount: string; + coin: string; + fromUserId: string; + toUserId: string; + status: string; + clientOid: string; + createdTime: string; + updatedTime: string; +} + +export interface GetSubTransferRecordsResponseV3 { + items: SubTransferRecordV3[]; + cursor: string; +} + +export interface SubAccountTransferResponseV3 { + transferId: string; + clientOid: string; +} From 0bf31761a5f33eb80b15e6a31ea90fcbc2e82ad9 Mon Sep 17 00:00:00 2001 From: JJ-Cro Date: Tue, 1 Jul 2025 13:03:45 +0200 Subject: [PATCH 03/57] feat(): added loan endpoints and types for v3 client --- src/rest-client-v3.ts | 104 +++++++++++++++++++++++++++++++- src/types/request/index.ts | 1 + src/types/request/v3/account.ts | 65 +++++++++++++++++--- src/types/request/v3/loan.ts | 38 ++++++++++++ src/types/response/index.ts | 1 + src/types/response/v3/loan.ts | 104 ++++++++++++++++++++++++++++++++ 6 files changed, 305 insertions(+), 8 deletions(-) create mode 100644 src/types/request/v3/loan.ts create mode 100644 src/types/response/v3/loan.ts diff --git a/src/rest-client-v3.ts b/src/rest-client-v3.ts index 514260d..e5fbae1 100644 --- a/src/rest-client-v3.ts +++ b/src/rest-client-v3.ts @@ -3,6 +3,8 @@ import { AccountAssetsV3, AccountSettingsV3, APIResponse, + BindUidRequestV3, + BindUidResponseV3, CandlestickV3, ContractOiV3, ConvertRecordsResponseV3, @@ -13,6 +15,7 @@ import { CurrentFundingRateV3, DeleteSubAccountApiKeyRequestV3, DiscountRateV3, + EnsureCoinsResponseV3, FillV3, FinancialRecordsResponseV3, FreezeSubAccountRequestV3, @@ -20,15 +23,20 @@ import { GetContractsOiRequestV3, GetConvertRecordsRequestV3, GetCurrentFundingRateRequestV3, + GetEnsureCoinsRequestV3, GetFillsRequestV3, GetFinancialRecordsRequestV3, GetHistoryCandlesRequestV3, GetHistoryFundingRateRequestV3, GetInstrumentsRequestV3, + GetLoanOrderRequestV3, + GetLTVConvertRequestV3, GetMarginLoansRequestV3, GetOpenInterestRequestV3, GetOrderBookRequestV3, GetPositionTierRequestV3, + GetProductInfosRequestV3, + GetRepaidHistoryRequestV3, GetRiskReserveRequestV3, GetSubAccountApiKeysRequestV3, GetSubAccountApiKeysResponseV3, @@ -36,27 +44,36 @@ import { GetSubAccountListResponseV3, GetSubTransferRecordsRequestV3, GetSubTransferRecordsResponseV3, + GetSymbolsRequestV3, GetTickersRequestV3, GetTransferableCoinsRequestV3, + GetTransferedRequestV3, HistoryFundingRateV3, InstrumentV3, + LoanOrderV3, + LTVConvertResponseV3, MarginLoanV3, OpenInterestV3, OrderBookV3, PaymentCoinsResponseV3, PositionTierV3, + ProductInfosResponseV3, + RepaidHistoryItemV3, RepayableCoinsResponseV3, RepayRequestV3, RepayResponseV3, RiskReserveV3, + RiskUnitResponseV3, SetLeverageRequestV3, SubAccountTransferRequestV3, SubAccountTransferResponseV3, + SymbolsResponseV3, TickerV3, + TransferedResponseV3, TransferRequestV3, TransferResponseV3, UpdateSubAccountApiKeyRequestV3, - UpdateSubAccountApiKeyResponseV3, + UpdateSubAccountApiKeyResponseV3 } from './types'; import { REST_CLIENT_TYPE_ENUM } from './util'; import BaseRestClient from './util/BaseRestClient'; @@ -460,4 +477,89 @@ export class RestClientV3 extends BaseRestClient { getTickers(params: GetTickersRequestV3): Promise> { return this.get('/api/v3/market/tickers', params); } + + /** + * + * Loan endpoints + * + */ + + /** + * Get Transferred Quantity + */ + getLoanTransfered( + params: GetTransferedRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/ins-loan/transfered', params); + } + + /** + * Get Trade Symbols + */ + getLoanSymbols( + params: GetSymbolsRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/ins-loan/symbols', params); + } + + /** + * Get Risk Unit + */ + getLoanRiskUnit(): Promise> { + return this.getPrivate('/api/v3/ins-loan/risk-unit'); + } + + /** + * Get Repayment Orders + */ + getLoanRepaidHistory( + params?: GetRepaidHistoryRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/ins-loan/repaid-history', params); + } + + /** + * Get Product Info + */ + getLoanProductInfo( + params: GetProductInfosRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/ins-loan/product-infos', params); + } + + /** + * Get Loan Orders + */ + getLoanOrder( + params?: GetLoanOrderRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/ins-loan/loan-order', params); + } + + /** + * Get Margin Coin Info + */ + getLoanMarginCoinInfo( + params: GetEnsureCoinsRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/ins-loan/ensure-coins-convert', params); + } + + /** + * Bind/Unbind UID to Risk Unit + */ + bindLoanUid(params: BindUidRequestV3): Promise> { + return this.postPrivate('/api/v3/ins-loan/bind-uid', params); + } + + /** + * Get LTV + */ + getLoanLTVConvert( + params?: GetLTVConvertRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/ins-loan/ltv-convert', params); + } + + } diff --git a/src/types/request/index.ts b/src/types/request/index.ts index 2b74cec..d181f82 100644 --- a/src/types/request/index.ts +++ b/src/types/request/index.ts @@ -10,5 +10,6 @@ export * from './v2/futures'; export * from './v2/margin'; export * from './v2/spot'; export * from './v3/account'; +export * from './v3/loan'; export * from './v3/public'; diff --git a/src/types/request/v3/account.ts b/src/types/request/v3/account.ts index e77448d..d14cc2b 100644 --- a/src/types/request/v3/account.ts +++ b/src/types/request/v3/account.ts @@ -18,7 +18,12 @@ export interface GetConvertRecordsRequestV3 { } export interface GetFinancialRecordsRequestV3 { - category: 'SPOT' | 'MARGIN' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + category: + | 'SPOT' + | 'MARGIN' + | 'USDT-FUTURES' + | 'COIN-FUTURES' + | 'USDC-FUTURES'; coin?: string; startTime?: string; endTime?: string; @@ -79,16 +84,48 @@ export interface GetSubAccountListRequestV3 { // Transfer Request Types export interface TransferRequestV3 { - fromType: 'spot' | 'p2p' | 'coin-futures' | 'usdt-futures' | 'usdc-futures' | 'crossed-margin' | 'isolated-margin' | 'uta'; - toType: 'spot' | 'p2p' | 'coin-futures' | 'usdt-futures' | 'usdc-futures' | 'crossed-margin' | 'isolated-margin' | 'uta'; + fromType: + | 'spot' + | 'p2p' + | 'coin-futures' + | 'usdt-futures' + | 'usdc-futures' + | 'crossed-margin' + | 'isolated-margin' + | 'uta'; + toType: + | 'spot' + | 'p2p' + | 'coin-futures' + | 'usdt-futures' + | 'usdc-futures' + | 'crossed-margin' + | 'isolated-margin' + | 'uta'; amount: string; coin: string; symbol?: string; } export interface GetTransferableCoinsRequestV3 { - fromType: 'spot' | 'p2p' | 'coin-futures' | 'usdt-futures' | 'usdc-futures' | 'crossed-margin' | 'isolated-margin' | 'uta'; - toType: 'spot' | 'p2p' | 'coin-futures' | 'usdt-futures' | 'usdc-futures' | 'crossed-margin' | 'isolated-margin' | 'uta'; + fromType: + | 'spot' + | 'p2p' + | 'coin-futures' + | 'usdt-futures' + | 'usdc-futures' + | 'crossed-margin' + | 'isolated-margin' + | 'uta'; + toType: + | 'spot' + | 'p2p' + | 'coin-futures' + | 'usdt-futures' + | 'usdc-futures' + | 'crossed-margin' + | 'isolated-margin' + | 'uta'; } export interface GetSubTransferRecordsRequestV3 { @@ -103,8 +140,22 @@ export interface GetSubTransferRecordsRequestV3 { } export interface SubAccountTransferRequestV3 { - fromType: 'spot' | 'p2p' | 'usdt_futures' | 'coin_futures' | 'usdc_futures' | 'crossed_margin' | 'uta'; - toType: 'spot' | 'p2p' | 'usdt_futures' | 'coin_futures' | 'usdc_futures' | 'crossed_margin' | 'uta'; + fromType: + | 'spot' + | 'p2p' + | 'usdt_futures' + | 'coin_futures' + | 'usdc_futures' + | 'crossed_margin' + | 'uta'; + toType: + | 'spot' + | 'p2p' + | 'usdt_futures' + | 'coin_futures' + | 'usdc_futures' + | 'crossed_margin' + | 'uta'; amount: string; coin: string; fromUserId: string; diff --git a/src/types/request/v3/loan.ts b/src/types/request/v3/loan.ts new file mode 100644 index 0000000..f7ddd48 --- /dev/null +++ b/src/types/request/v3/loan.ts @@ -0,0 +1,38 @@ +export interface GetTransferedRequestV3 { + userId?: string; + coin: string; +} + +export interface GetSymbolsRequestV3 { + productId: string; +} + +export interface GetRepaidHistoryRequestV3 { + startTime?: string; + endTime?: string; + limit?: string; +} + +export interface GetProductInfosRequestV3 { + productId: string; +} + +export interface GetLoanOrderRequestV3 { + orderId?: string; + startTime?: string; + endTime?: string; +} + +export interface GetEnsureCoinsRequestV3 { + productId: string; +} + +export interface BindUidRequestV3 { + riskUnitId?: string; + uid: string; + operate: 'bind' | 'unbind'; +} + +export interface GetLTVConvertRequestV3 { + riskUnitId?: string; +} diff --git a/src/types/response/index.ts b/src/types/response/index.ts index da4469b..fcdb515 100644 --- a/src/types/response/index.ts +++ b/src/types/response/index.ts @@ -9,5 +9,6 @@ export * from './v2/futures'; export * from './v2/margin'; export * from './v2/spot'; export * from './v3/account'; +export * from './v3/loan'; export * from './v3/public'; diff --git a/src/types/response/v3/loan.ts b/src/types/response/v3/loan.ts new file mode 100644 index 0000000..fe492ae --- /dev/null +++ b/src/types/response/v3/loan.ts @@ -0,0 +1,104 @@ +export interface TransferedResponseV3 { + coin: string; + transfered: string; + userId: string; +} + +export interface SymbolSettingV3 { + symbol: string; + leverage: string; +} + +export interface SymbolsResponseV3 { + productId: string; + spotSymbols: string[]; + usdtContractLeverage: string; + coinContractLeverage: string; + usdcContractLeverage: string; + usdtContractSymbols: SymbolSettingV3[]; + coinContractSymbols: SymbolSettingV3[]; + usdcContractSymbols: SymbolSettingV3[]; +} + +export interface RiskUnitResponseV3 { + riskUnitId: string[]; +} + +export interface RepaidHistoryItemV3 { + repayOrderId: string; + businessType: 'normal' | 'liquidation'; + repayType: 'all' | 'part'; + repaidTime: string; + coin: string; + repayAmount: string; + repayInterest: string; +} + +export interface ProductInfosResponseV3 { + productId: string; + leverage: string; + supportUsdtContract: 'YES' | 'NO'; + supportCoinContract: 'YES' | 'NO'; + supportUsdcContract: 'YES' | 'NO'; + transferLine: string; + spotBuyLine: string; + usdtContractOpenLine: string; + coinContractOpenLine: string; + usdcContractOpenLine: string; + liquidationLine: string; + stopLiquidationLine: string; +} + +export interface LoanOrderV3 { + orderId: string; + orderProductId: string; + uid: string; + loanTime: string; + loanCoin: string; + loanAmount: string; + unpaidAmount: string; + unpaidInterest: string; + repaidAmount: string; + repaidInterest: string; + reserve: string; + status: 'not_paid_off' | 'paid_off'; +} + +export interface CoinInfoV3 { + coin: string; + convertRatio: string; + maxConvertValue: string; +} + +export interface EnsureCoinsResponseV3 { + productId: string; + coinInfo: CoinInfoV3[]; +} + +export interface BindUidResponseV3 { + riskUnitId: string; + uid: string; + operate: 'bind' | 'unbind'; +} + +export interface UnpaidInfoV3 { + coin: string; + unpaidQty: string; + unpaidInterest: string; +} + +export interface BalanceInfoV3 { + coin: string; + price: string; + amount: string; + convertedUsdtAmount: string; +} + +export interface LTVConvertResponseV3 { + ltv: string; + subAccountUids: string[]; + unpaidUsdtAmount: string; + usdtBalance: string; + unpaidInfo: UnpaidInfoV3[]; + balanceInfo: BalanceInfoV3[]; +} From ddf8ce7715ad74823ecd59a7f3ce30b8d8a788d8 Mon Sep 17 00:00:00 2001 From: JJ-Cro Date: Tue, 1 Jul 2025 15:30:50 +0200 Subject: [PATCH 04/57] feat(): add v3 trade endpoints --- src/rest-client-v3.ts | 185 +++++++++++++++++++++++++- src/types/request/index.ts | 1 + src/types/request/v3/public.ts | 2 +- src/types/request/v3/trade.ts | 154 ++++++++++++++++++++++ src/types/response/index.ts | 1 + src/types/response/v3/public.ts | 2 +- src/types/response/v3/trade.ts | 227 ++++++++++++++++++++++++++++++++ 7 files changed, 565 insertions(+), 7 deletions(-) create mode 100644 src/types/request/v3/trade.ts create mode 100644 src/types/response/v3/trade.ts diff --git a/src/rest-client-v3.ts b/src/rest-client-v3.ts index e5fbae1..761fa88 100644 --- a/src/rest-client-v3.ts +++ b/src/rest-client-v3.ts @@ -3,9 +3,19 @@ import { AccountAssetsV3, AccountSettingsV3, APIResponse, + BatchModifyOrderRequestV3, + BatchModifyOrderResponseV3, BindUidRequestV3, BindUidResponseV3, + CancelAllOrdersRequestV3, + CancelAllOrdersResponseV3, + CancelBatchOrdersRequestV3, + CancelBatchOrdersResponseV3, + CancelOrderRequestV3, + CancelOrderResponseV3, CandlestickV3, + CloseAllPositionsRequestV3, + CloseAllPositionsResponseV3, ContractOiV3, ConvertRecordsResponseV3, CreateSubAccountApiKeyRequestV3, @@ -16,26 +26,36 @@ import { DeleteSubAccountApiKeyRequestV3, DiscountRateV3, EnsureCoinsResponseV3, - FillV3, FinancialRecordsResponseV3, FreezeSubAccountRequestV3, GetCandlesRequestV3, GetContractsOiRequestV3, GetConvertRecordsRequestV3, GetCurrentFundingRateRequestV3, + GetCurrentPositionRequestV3, + GetCurrentPositionResponseV3, GetEnsureCoinsRequestV3, GetFillsRequestV3, + GetFillsResponseV3, GetFinancialRecordsRequestV3, GetHistoryCandlesRequestV3, GetHistoryFundingRateRequestV3, + GetHistoryOrdersRequestV3, + GetHistoryOrdersResponseV3, GetInstrumentsRequestV3, GetLoanOrderRequestV3, GetLTVConvertRequestV3, GetMarginLoansRequestV3, + GetMaxOpenAvailableRequestV3, + GetMaxOpenAvailableResponseV3, GetOpenInterestRequestV3, GetOrderBookRequestV3, + GetOrderInfoRequestV3, + GetPositionHistoryRequestV3, + GetPositionHistoryResponseV3, GetPositionTierRequestV3, GetProductInfosRequestV3, + GetPublicFillsRequestV3, GetRepaidHistoryRequestV3, GetRiskReserveRequestV3, GetSubAccountApiKeysRequestV3, @@ -48,16 +68,26 @@ import { GetTickersRequestV3, GetTransferableCoinsRequestV3, GetTransferedRequestV3, + GetUnfilledOrdersRequestV3, + GetUnfilledOrdersResponseV3, HistoryFundingRateV3, InstrumentV3, LoanOrderV3, LTVConvertResponseV3, MarginLoanV3, + ModifyOrderRequestV3, + ModifyOrderResponseV3, OpenInterestV3, OrderBookV3, + OrderInfoV3, PaymentCoinsResponseV3, + PlaceBatchOrdersRequestV3, + PlaceBatchOrdersResponseV3, + PlaceOrderRequestV3, + PlaceOrderResponseV3, PositionTierV3, ProductInfosResponseV3, + PublicFillV3, RepaidHistoryItemV3, RepayableCoinsResponseV3, RepayRequestV3, @@ -73,7 +103,7 @@ import { TransferRequestV3, TransferResponseV3, UpdateSubAccountApiKeyRequestV3, - UpdateSubAccountApiKeyResponseV3 + UpdateSubAccountApiKeyResponseV3, } from './types'; import { REST_CLIENT_TYPE_ENUM } from './util'; import BaseRestClient from './util/BaseRestClient'; @@ -321,7 +351,9 @@ export class RestClientV3 extends BaseRestClient { /** * Transfer */ - submitTransfer(params: TransferRequestV3): Promise> { + submitTransfer( + params: TransferRequestV3, + ): Promise> { return this.postPrivate('/api/v3/account/transfer', params); } @@ -361,7 +393,9 @@ export class RestClientV3 extends BaseRestClient { /** * Get Recent Public Fills */ - getFills(params: GetFillsRequestV3): Promise> { + getFills( + params: GetPublicFillsRequestV3, + ): Promise> { return this.get('/api/v3/market/fills', params); } @@ -548,7 +582,9 @@ export class RestClientV3 extends BaseRestClient { /** * Bind/Unbind UID to Risk Unit */ - bindLoanUid(params: BindUidRequestV3): Promise> { + bindLoanUid( + params: BindUidRequestV3, + ): Promise> { return this.postPrivate('/api/v3/ins-loan/bind-uid', params); } @@ -561,5 +597,144 @@ export class RestClientV3 extends BaseRestClient { return this.getPrivate('/api/v3/ins-loan/ltv-convert', params); } + /** + * + * Trade endpoints + * + */ + + /** + * Place Order + */ + placeOrder( + params: PlaceOrderRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/trade/place-order', params); + } + + /** + * Modify Order + */ + modifyOrder( + params: ModifyOrderRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/trade/modify-order', params); + } + + /** + * Cancel Order + */ + cancelOrder( + params: CancelOrderRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/trade/cancel-order', params); + } + + /** + * Batch Order + */ + placeBatchOrders( + params: PlaceBatchOrdersRequestV3[], + ): Promise> { + return this.postPrivate('/api/v3/trade/place-batch', params); + } + + /** + * Batch Modify Orders + */ + batchModifyOrders( + params: BatchModifyOrderRequestV3[], + ): Promise> { + return this.postPrivate('/api/v3/trade/batch-modify-order', params); + } + + /** + * Batch Cancel + */ + cancelBatchOrders( + params: CancelBatchOrdersRequestV3[], + ): Promise> { + return this.postPrivate('/api/v3/trade/cancel-batch', params); + } + + /** + * Cancel All Orders + */ + cancelAllOrders( + params: CancelAllOrdersRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/trade/cancel-symbol-order', params); + } + /** + * Close All Positions + */ + closeAllPositions( + params: CloseAllPositionsRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/trade/close-positions', params); + } + + /** + * Get Order Details + */ + getOrderInfo( + params: GetOrderInfoRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/trade/order-info', params); + } + + /** + * Get Open Orders + */ + getUnfilledOrders( + params?: GetUnfilledOrdersRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/trade/unfilled-orders', params); + } + + /** + * Get Order History + */ + getHistoryOrders( + params: GetHistoryOrdersRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/trade/history-orders', params); + } + + /** + * Get Fill History + */ + getTradeFills( + params?: GetFillsRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/trade/fills', params); + } + + /** + * Get Position Info + */ + getCurrentPosition( + params: GetCurrentPositionRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/position/current-position', params); + } + + /** + * Get Positions History + */ + getPositionHistory( + params: GetPositionHistoryRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/position/history-position', params); + } + + /** + * Get Max Open Available + */ + getMaxOpenAvailable( + params: GetMaxOpenAvailableRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/account/max-open-available', params); + } } diff --git a/src/types/request/index.ts b/src/types/request/index.ts index d181f82..0068ec6 100644 --- a/src/types/request/index.ts +++ b/src/types/request/index.ts @@ -12,4 +12,5 @@ export * from './v2/spot'; export * from './v3/account'; export * from './v3/loan'; export * from './v3/public'; +export * from './v3/trade'; diff --git a/src/types/request/v3/public.ts b/src/types/request/v3/public.ts index 32870e4..467a365 100644 --- a/src/types/request/v3/public.ts +++ b/src/types/request/v3/public.ts @@ -1,4 +1,4 @@ -export interface GetFillsRequestV3 { +export interface GetPublicFillsRequestV3 { category: | 'SPOT' | 'MARGIN' diff --git a/src/types/request/v3/trade.ts b/src/types/request/v3/trade.ts new file mode 100644 index 0000000..8f3b0f3 --- /dev/null +++ b/src/types/request/v3/trade.ts @@ -0,0 +1,154 @@ +export interface BatchModifyOrderRequestV3 { + orderId?: string; + clientOid?: string; + qty?: string; + price?: string; + autoCancel?: 'yes' | 'no'; +} + +export interface CancelAllOrdersRequestV3 { + category: + | 'SPOT' + | 'MARGIN' + | 'USDT-FUTURES' + | 'COIN-FUTURES' + | 'USDC-FUTURES'; + symbol?: string; +} + +export interface CancelBatchOrdersRequestV3 { + orderId?: string; + clientOid?: string; + category: + | 'SPOT' + | 'MARGIN' + | 'USDT-FUTURES' + | 'COIN-FUTURES' + | 'USDC-FUTURES'; + symbol: string; +} + +export interface CloseAllPositionsRequestV3 { + category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + symbol?: string; + posSide?: 'long' | 'short'; +} + +export interface CancelOrderRequestV3 { + orderId?: string; + clientOid?: string; +} + +export interface GetMaxOpenAvailableRequestV3 { + category: + | 'SPOT' + | 'MARGIN' + | 'USDT-FUTURES' + | 'COIN-FUTURES' + | 'USDC-FUTURES'; + symbol: string; + orderType: 'limit' | 'market'; + side: 'buy' | 'sell'; + price?: string; + size?: string; +} + +export interface GetOrderInfoRequestV3 { + orderId?: string; + clientOid?: string; +} + +export interface GetFillsRequestV3 { + orderId?: string; + startTime?: string; + endTime?: string; + limit?: string; + cursor?: string; +} + +export interface GetUnfilledOrdersRequestV3 { + category?: + | 'SPOT' + | 'MARGIN' + | 'USDT-FUTURES' + | 'COIN-FUTURES' + | 'USDC-FUTURES'; + symbol?: string; + startTime?: string; + endTime?: string; + limit?: string; + cursor?: string; +} + +export interface GetHistoryOrdersRequestV3 { + category: + | 'SPOT' + | 'MARGIN' + | 'USDT-FUTURES' + | 'COIN-FUTURES' + | 'USDC-FUTURES'; + startTime?: string; + endTime?: string; + limit?: string; + cursor?: string; +} + +export interface GetPositionHistoryRequestV3 { + category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + symbol?: string; + startTime?: string; + endTime?: string; + limit?: string; + cursor?: string; +} + +export interface GetCurrentPositionRequestV3 { + category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + symbol?: string; + posSide?: 'long' | 'short'; +} + +export interface ModifyOrderRequestV3 { + orderId?: string; + clientOid?: string; + qty?: string; + price?: string; + autoCancel?: 'yes' | 'no'; +} + +export interface PlaceBatchOrdersRequestV3 { + category: + | 'SPOT' + | 'MARGIN' + | 'USDT-FUTURES' + | 'COIN-FUTURES' + | 'USDC-FUTURES'; + symbol: string; + qty: string; + price?: string; + side: 'buy' | 'sell'; + orderType: 'limit' | 'market'; + timeInForce?: 'ioc' | 'fok' | 'gtc' | 'post_only'; + posSide?: 'long' | 'short'; + clientOid?: string; + reduceOnly?: 'yes' | 'no'; +} + +export interface PlaceOrderRequestV3 { + category: + | 'SPOT' + | 'MARGIN' + | 'USDT-FUTURES' + | 'COIN-FUTURES' + | 'USDC-FUTURES'; + symbol: string; + qty: string; + price?: string; + side: 'buy' | 'sell'; + orderType: 'limit' | 'market'; + timeInForce?: 'ioc' | 'fok' | 'gtc' | 'post_only'; + posSide?: 'long' | 'short'; + clientOid?: string; + reduceOnly?: 'yes' | 'no'; + stpMode?: 'none' | 'cancel_taker' | 'cancel_maker' | 'cancel_both'; +} diff --git a/src/types/response/index.ts b/src/types/response/index.ts index fcdb515..5413d9f 100644 --- a/src/types/response/index.ts +++ b/src/types/response/index.ts @@ -11,4 +11,5 @@ export * from './v2/spot'; export * from './v3/account'; export * from './v3/loan'; export * from './v3/public'; +export * from './v3/trade'; diff --git a/src/types/response/v3/public.ts b/src/types/response/v3/public.ts index 2baf5a7..3bec6bd 100644 --- a/src/types/response/v3/public.ts +++ b/src/types/response/v3/public.ts @@ -1,4 +1,4 @@ -export interface FillV3 { +export interface PublicFillV3 { execId: string; price: string; size: string; diff --git a/src/types/response/v3/trade.ts b/src/types/response/v3/trade.ts new file mode 100644 index 0000000..41ad715 --- /dev/null +++ b/src/types/response/v3/trade.ts @@ -0,0 +1,227 @@ +export interface BatchModifyOrderResponseV3 { + orderId: string; + clientOid: string; +} + +export interface CancelAllOrdersResponseV3 { + list: { + orderId: string; + clientOid: string; + code: string; + msg: string; + }[]; +} + +export interface CancelBatchOrdersResponseV3 { + orderId: string; + clientOid: string; + code?: string; + msg?: string; +} + +export interface CloseAllPositionsResponseV3 { + list: { + orderId: string; + clientOid: string; + code: string; + msg: string; + }[]; +} + +export interface CancelOrderResponseV3 { + orderId: string; + clientOid: string; +} + +export interface GetMaxOpenAvailableResponseV3 { + available: string; + maxOpen: string; + buyOpenCost: string; + sellOpenCost: string; + maxBuyOpen: string; + maxSellOpen: string; +} + +export interface FeeDetailV3 { + feeCoin: string; + fee: string; +} + +export interface OrderInfoV3 { + orderId: string; + clientOid: string; + category: string; + symbol: string; + orderType: string; + side: string; + price: string; + qty: string; + amount: string; + cumExecQty: string; + cumExecValue: string; + avgPrice: string; + timeInForce: string; + orderStatus: string; + posSide: string; + holdMode: string; + reduceOnly: string; + feeDetail: FeeDetailV3[]; + cancelReason: string; + execType: string; + createdTime: string; + updatedTime: string; +} + +export interface FillV3 { + execId: string; + orderId: string; + category: string; + symbol: string; + orderType: string; + side: string; + execPrice: string; + execQty: string; + execValue: string; + tradeScope: string; + feeDetail: FeeDetailV3[]; + createdTime: string; + updatedTime: string; +} + +export interface GetFillsResponseV3 { + list: FillV3[]; + cursor: string; +} + +export interface UnfilledOrderV3 { + orderId: string; + clientOid: string; + category: string; + symbol: string; + orderType: string; + side: string; + price: string; + qty: string; + amount: string; + cumExecQty: string; + cumExecValue: string; + avgPrice: string; + timeInForce: string; + orderStatus: string; + posSide: string; + holdMode: string; + reduceOnly: string; + feeDetail: FeeDetailV3[]; + createdTime: string; + updatedTime: string; +} + +export interface GetUnfilledOrdersResponseV3 { + list: UnfilledOrderV3[]; + cursor: string; +} + +export interface HistoryOrderV3 { + orderId: string; + clientOid: string; + category: string; + symbol: string; + orderType: string; + side: string; + price: string; + qty: string; + amount: string; + cumExecQty: string; + cumExecValue: string; + avgPrice: string; + timeInForce: string; + orderStatus: string; + posSide: string; + holdMode: string; + reduceOnly: string; + feeDetail: FeeDetailV3[]; + cancelReason: string; + execType: string; + createdTime: string; + updatedTime: string; +} + +export interface GetHistoryOrdersResponseV3 { + list: HistoryOrderV3[]; + cursor: string; +} + +export interface PositionHistoryV3 { + positionId: string; + category: string; + symbol: string; + marginCoin: string; + holdMode: string; + posSide: string; + marginMode: string; + openPriceAvg: string; + closePriceAvg: string; + openTotalPos: string; + closeTotalPos: string; + cumRealisedPnl: string; + netProfit: string; + totalFunding: string; + openFeeTotal: string; + closeFeeTotal: string; + createdTime: string; + updatedTime: string; +} + +export interface GetPositionHistoryResponseV3 { + list: PositionHistoryV3[]; + cursor: string; +} + +export interface CurrentPositionV3 { + category: string; + symbol: string; + marginCoin: string; + holdMode: string; + posSide: string; + marginMode: string; + positionBalance: string; + available: string; + frozen: string; + total: string; + leverage: string; + curRealisedPnl: string; + avgPrice: string; + positionStatus: string; + unrealisedPnl: string; + liquidationPrice: string; + mmr: string; + profitRate: string; + markPrice: string; + breakEvenPrice: string; + totalFunding: string; + openFeeTotal: string; + closeFeeTotal: string; + createdTime: string; + updatedTime: string; +} + +export interface GetCurrentPositionResponseV3 { + list: CurrentPositionV3[]; +} + +export interface ModifyOrderResponseV3 { + orderId: string; + clientOid: string; +} + +export interface PlaceBatchOrdersResponseV3 { + orderId: string; + clientOid: string; + code?: string; + msg?: string; +} + +export interface PlaceOrderResponseV3 { + orderId: string; + clientOid: string; +} From 783c01f905be43511910f77ee072dade985e9667 Mon Sep 17 00:00:00 2001 From: JJ-Cro Date: Mon, 14 Jul 2025 11:50:40 +0200 Subject: [PATCH 05/57] chore(): fix lint --- src/rest-client-v3.ts | 209 ++++++++++++++++++------------------ src/types/request/index.ts | 1 - src/types/response/index.ts | 1 - 3 files changed, 104 insertions(+), 107 deletions(-) diff --git a/src/rest-client-v3.ts b/src/rest-client-v3.ts index 761fa88..dc41e1e 100644 --- a/src/rest-client-v3.ts +++ b/src/rest-client-v3.ts @@ -1,109 +1,108 @@ -/* eslint-disable prettier/prettier */ import { - AccountAssetsV3, - AccountSettingsV3, - APIResponse, - BatchModifyOrderRequestV3, - BatchModifyOrderResponseV3, - BindUidRequestV3, - BindUidResponseV3, - CancelAllOrdersRequestV3, - CancelAllOrdersResponseV3, - CancelBatchOrdersRequestV3, - CancelBatchOrdersResponseV3, - CancelOrderRequestV3, - CancelOrderResponseV3, - CandlestickV3, - CloseAllPositionsRequestV3, - CloseAllPositionsResponseV3, - ContractOiV3, - ConvertRecordsResponseV3, - CreateSubAccountApiKeyRequestV3, - CreateSubAccountApiKeyResponseV3, - CreateSubAccountRequestV3, - CreateSubAccountResponseV3, - CurrentFundingRateV3, - DeleteSubAccountApiKeyRequestV3, - DiscountRateV3, - EnsureCoinsResponseV3, - FinancialRecordsResponseV3, - FreezeSubAccountRequestV3, - GetCandlesRequestV3, - GetContractsOiRequestV3, - GetConvertRecordsRequestV3, - GetCurrentFundingRateRequestV3, - GetCurrentPositionRequestV3, - GetCurrentPositionResponseV3, - GetEnsureCoinsRequestV3, - GetFillsRequestV3, - GetFillsResponseV3, - GetFinancialRecordsRequestV3, - GetHistoryCandlesRequestV3, - GetHistoryFundingRateRequestV3, - GetHistoryOrdersRequestV3, - GetHistoryOrdersResponseV3, - GetInstrumentsRequestV3, - GetLoanOrderRequestV3, - GetLTVConvertRequestV3, - GetMarginLoansRequestV3, - GetMaxOpenAvailableRequestV3, - GetMaxOpenAvailableResponseV3, - GetOpenInterestRequestV3, - GetOrderBookRequestV3, - GetOrderInfoRequestV3, - GetPositionHistoryRequestV3, - GetPositionHistoryResponseV3, - GetPositionTierRequestV3, - GetProductInfosRequestV3, - GetPublicFillsRequestV3, - GetRepaidHistoryRequestV3, - GetRiskReserveRequestV3, - GetSubAccountApiKeysRequestV3, - GetSubAccountApiKeysResponseV3, - GetSubAccountListRequestV3, - GetSubAccountListResponseV3, - GetSubTransferRecordsRequestV3, - GetSubTransferRecordsResponseV3, - GetSymbolsRequestV3, - GetTickersRequestV3, - GetTransferableCoinsRequestV3, - GetTransferedRequestV3, - GetUnfilledOrdersRequestV3, - GetUnfilledOrdersResponseV3, - HistoryFundingRateV3, - InstrumentV3, - LoanOrderV3, - LTVConvertResponseV3, - MarginLoanV3, - ModifyOrderRequestV3, - ModifyOrderResponseV3, - OpenInterestV3, - OrderBookV3, - OrderInfoV3, - PaymentCoinsResponseV3, - PlaceBatchOrdersRequestV3, - PlaceBatchOrdersResponseV3, - PlaceOrderRequestV3, - PlaceOrderResponseV3, - PositionTierV3, - ProductInfosResponseV3, - PublicFillV3, - RepaidHistoryItemV3, - RepayableCoinsResponseV3, - RepayRequestV3, - RepayResponseV3, - RiskReserveV3, - RiskUnitResponseV3, - SetLeverageRequestV3, - SubAccountTransferRequestV3, - SubAccountTransferResponseV3, - SymbolsResponseV3, - TickerV3, - TransferedResponseV3, - TransferRequestV3, - TransferResponseV3, - UpdateSubAccountApiKeyRequestV3, - UpdateSubAccountApiKeyResponseV3, + AccountAssetsV3, + AccountSettingsV3, + APIResponse, + BatchModifyOrderRequestV3, + BatchModifyOrderResponseV3, + BindUidRequestV3, + BindUidResponseV3, + CancelAllOrdersRequestV3, + CancelAllOrdersResponseV3, + CancelBatchOrdersRequestV3, + CancelBatchOrdersResponseV3, + CancelOrderRequestV3, + CancelOrderResponseV3, + CandlestickV3, + CloseAllPositionsRequestV3, + CloseAllPositionsResponseV3, + ContractOiV3, + ConvertRecordsResponseV3, + CreateSubAccountApiKeyRequestV3, + CreateSubAccountApiKeyResponseV3, + CreateSubAccountRequestV3, + CreateSubAccountResponseV3, + CurrentFundingRateV3, + DeleteSubAccountApiKeyRequestV3, + DiscountRateV3, + EnsureCoinsResponseV3, + FinancialRecordsResponseV3, + FreezeSubAccountRequestV3, + GetCandlesRequestV3, + GetContractsOiRequestV3, + GetConvertRecordsRequestV3, + GetCurrentFundingRateRequestV3, + GetCurrentPositionRequestV3, + GetCurrentPositionResponseV3, + GetEnsureCoinsRequestV3, + GetFillsRequestV3, + GetFillsResponseV3, + GetFinancialRecordsRequestV3, + GetHistoryCandlesRequestV3, + GetHistoryFundingRateRequestV3, + GetHistoryOrdersRequestV3, + GetHistoryOrdersResponseV3, + GetInstrumentsRequestV3, + GetLoanOrderRequestV3, + GetLTVConvertRequestV3, + GetMarginLoansRequestV3, + GetMaxOpenAvailableRequestV3, + GetMaxOpenAvailableResponseV3, + GetOpenInterestRequestV3, + GetOrderBookRequestV3, + GetOrderInfoRequestV3, + GetPositionHistoryRequestV3, + GetPositionHistoryResponseV3, + GetPositionTierRequestV3, + GetProductInfosRequestV3, + GetPublicFillsRequestV3, + GetRepaidHistoryRequestV3, + GetRiskReserveRequestV3, + GetSubAccountApiKeysRequestV3, + GetSubAccountApiKeysResponseV3, + GetSubAccountListRequestV3, + GetSubAccountListResponseV3, + GetSubTransferRecordsRequestV3, + GetSubTransferRecordsResponseV3, + GetSymbolsRequestV3, + GetTickersRequestV3, + GetTransferableCoinsRequestV3, + GetTransferedRequestV3, + GetUnfilledOrdersRequestV3, + GetUnfilledOrdersResponseV3, + HistoryFundingRateV3, + InstrumentV3, + LoanOrderV3, + LTVConvertResponseV3, + MarginLoanV3, + ModifyOrderRequestV3, + ModifyOrderResponseV3, + OpenInterestV3, + OrderBookV3, + OrderInfoV3, + PaymentCoinsResponseV3, + PlaceBatchOrdersRequestV3, + PlaceBatchOrdersResponseV3, + PlaceOrderRequestV3, + PlaceOrderResponseV3, + PositionTierV3, + ProductInfosResponseV3, + PublicFillV3, + RepaidHistoryItemV3, + RepayableCoinsResponseV3, + RepayRequestV3, + RepayResponseV3, + RiskReserveV3, + RiskUnitResponseV3, + SetLeverageRequestV3, + SubAccountTransferRequestV3, + SubAccountTransferResponseV3, + SymbolsResponseV3, + TickerV3, + TransferedResponseV3, + TransferRequestV3, + TransferResponseV3, + UpdateSubAccountApiKeyRequestV3, + UpdateSubAccountApiKeyResponseV3, } from './types'; import { REST_CLIENT_TYPE_ENUM } from './util'; import BaseRestClient from './util/BaseRestClient'; diff --git a/src/types/request/index.ts b/src/types/request/index.ts index 0068ec6..15bc71a 100644 --- a/src/types/request/index.ts +++ b/src/types/request/index.ts @@ -13,4 +13,3 @@ export * from './v3/account'; export * from './v3/loan'; export * from './v3/public'; export * from './v3/trade'; - diff --git a/src/types/response/index.ts b/src/types/response/index.ts index 5413d9f..61f33f3 100644 --- a/src/types/response/index.ts +++ b/src/types/response/index.ts @@ -12,4 +12,3 @@ export * from './v3/account'; export * from './v3/loan'; export * from './v3/public'; export * from './v3/trade'; - From d4d2a623f12bb95ef0b1f61de8bb7bb07035382a Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Tue, 15 Jul 2025 10:53:28 +0100 Subject: [PATCH 06/57] chore(): bump audit dependencies --- package-lock.json | 477 ++++++++++------------------------------------ 1 file changed, 97 insertions(+), 380 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3149263..368da75 100644 --- a/package-lock.json +++ b/package-lock.json @@ -50,89 +50,20 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", - "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/highlight": "^7.22.13", - "chalk": "^2.4.2" + "@babel/helper-validator-identifier": "^7.27.1", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/code-frame/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/code-frame/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/@babel/code-frame/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/code-frame/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/compat-data": { "version": "7.19.3", "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.3.tgz", @@ -318,19 +249,21 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", + "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -345,109 +278,28 @@ } }, "node_modules/@babel/helpers": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.0.tgz", - "integrity": "sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg==", - "dev": true, - "dependencies": { - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.0", - "@babel/types": "^7.19.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", - "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", + "version": "7.27.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.6.tgz", + "integrity": "sha512-muE8Tt8M22638HU31A3CgfSUciwz1fhATfoVai05aPXGor//CdWDCbnlY1yvBPo07njuVOCNGCSp/GTt12lIug==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.22.20", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" + "@babel/template": "^7.27.2", + "@babel/types": "^7.27.6" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "node_modules/@babel/parser": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.0.tgz", + "integrity": "sha512-jVZGvOxOuNSsuQuLRTh13nU0AogFlw32w/MT+LV6D3sP5WdbW61E77RnkbaO2dUvmPAYrBDJXGn5gGS6tH4j8g==", "dev": true, + "license": "MIT", "dependencies": { - "has-flag": "^3.0.0" + "@babel/types": "^7.28.0" }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/parser": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.3.tgz", - "integrity": "sha512-uVsWNvlVsIninV2prNz/3lHCb+5CJ+e+IUBfbjToAHODtfGYLfCFuY4AU7TskI+dAKk+njsPiBjq1gKTvZOBaw==", - "dev": true, "bin": { "parser": "bin/babel-parser.js" }, @@ -633,14 +485,15 @@ } }, "node_modules/@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", + "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" + "@babel/code-frame": "^7.27.1", + "@babel/parser": "^7.27.2", + "@babel/types": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -677,14 +530,14 @@ } }, "node_modules/@babel/types": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.3.tgz", - "integrity": "sha512-OZnvoH2l8PK5eUvEcUyCt/sXgr/h+UWpVuBbOljwcrAgUl6lpchoQ++PHGyQy1AtYnVA6CEq3y5xeEI10brpXw==", + "version": "7.28.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.1.tgz", + "integrity": "sha512-x0LvFTekgSX+83TI28Y9wYPUfzrnl2aT5+5QLnO6v7mSJYtEEevuDRN0F0uSHRk1G1IWZC43o00Y0xDDrpBGPQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.20", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -1597,10 +1450,11 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } @@ -2138,10 +1992,11 @@ "dev": true }, "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -4061,7 +3916,8 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/js-yaml": { "version": "4.1.0", @@ -4528,10 +4384,11 @@ "dev": true }, "node_modules/picocolors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", - "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", - "dev": true + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" }, "node_modules/picomatch": { "version": "2.3.1", @@ -5324,15 +5181,6 @@ "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", "dev": true }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -5937,71 +5785,14 @@ } }, "@babel/code-frame": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", - "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", "dev": true, "requires": { - "@babel/highlight": "^7.22.13", - "chalk": "^2.4.2" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } + "@babel/helper-validator-identifier": "^7.27.1", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" } }, "@babel/compat-data": { @@ -6145,15 +5936,15 @@ } }, "@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", "dev": true }, "@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", + "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", "dev": true }, "@babel/helper-validator-option": { @@ -6163,91 +5954,24 @@ "dev": true }, "@babel/helpers": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.0.tgz", - "integrity": "sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg==", + "version": "7.27.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.6.tgz", + "integrity": "sha512-muE8Tt8M22638HU31A3CgfSUciwz1fhATfoVai05aPXGor//CdWDCbnlY1yvBPo07njuVOCNGCSp/GTt12lIug==", "dev": true, "requires": { - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.0", - "@babel/types": "^7.19.0" + "@babel/template": "^7.27.2", + "@babel/types": "^7.27.6" } }, - "@babel/highlight": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", - "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", + "@babel/parser": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.0.tgz", + "integrity": "sha512-jVZGvOxOuNSsuQuLRTh13nU0AogFlw32w/MT+LV6D3sP5WdbW61E77RnkbaO2dUvmPAYrBDJXGn5gGS6tH4j8g==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.22.20", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } + "@babel/types": "^7.28.0" } }, - "@babel/parser": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.3.tgz", - "integrity": "sha512-uVsWNvlVsIninV2prNz/3lHCb+5CJ+e+IUBfbjToAHODtfGYLfCFuY4AU7TskI+dAKk+njsPiBjq1gKTvZOBaw==", - "dev": true - }, "@babel/plugin-syntax-async-generators": { "version": "7.8.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", @@ -6375,14 +6099,14 @@ } }, "@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", + "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", "dev": true, "requires": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" + "@babel/code-frame": "^7.27.1", + "@babel/parser": "^7.27.2", + "@babel/types": "^7.27.1" } }, "@babel/traverse": { @@ -6412,14 +6136,13 @@ } }, "@babel/types": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.3.tgz", - "integrity": "sha512-OZnvoH2l8PK5eUvEcUyCt/sXgr/h+UWpVuBbOljwcrAgUl6lpchoQ++PHGyQy1AtYnVA6CEq3y5xeEI10brpXw==", + "version": "7.28.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.1.tgz", + "integrity": "sha512-x0LvFTekgSX+83TI28Y9wYPUfzrnl2aT5+5QLnO6v7mSJYtEEevuDRN0F0uSHRk1G1IWZC43o00Y0xDDrpBGPQ==", "dev": true, "requires": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.20", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1" } }, "@bcoe/v8-coverage": { @@ -7127,9 +6850,9 @@ }, "dependencies": { "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "requires": { "balanced-match": "^1.0.0" @@ -7560,9 +7283,9 @@ "dev": true }, "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "requires": { "balanced-match": "^1.0.0", @@ -9317,9 +9040,9 @@ "dev": true }, "picocolors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", - "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "dev": true }, "picomatch": { @@ -9872,12 +9595,6 @@ "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", "dev": true }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true - }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", From 785a6ff0d79a5c5861a508e94d714ae990143ced Mon Sep 17 00:00:00 2001 From: JJ-Cro Date: Tue, 15 Jul 2025 12:11:51 +0200 Subject: [PATCH 07/57] feat(): added http keepAlive setting --- src/util/BaseRestClient.ts | 11 +++++++++++ src/util/requestUtils.ts | 12 ++++++++++++ 2 files changed, 23 insertions(+) diff --git a/src/util/BaseRestClient.ts b/src/util/BaseRestClient.ts index e02be75..b0ac0c3 100644 --- a/src/util/BaseRestClient.ts +++ b/src/util/BaseRestClient.ts @@ -1,4 +1,5 @@ import axios, { AxiosRequestConfig, AxiosResponse, Method } from 'axios'; +import https from 'https'; import { RestClientType } from '../types'; import { signMessage } from './node-support'; @@ -114,6 +115,16 @@ export default abstract class BaseRestClient { }, }; + // If enabled, configure a https agent with keepAlive enabled + if (this.options.keepAlive) { + // For more advanced configuration, raise an issue on GitHub or use the "networkOptions" + // parameter to define a custom httpsAgent with the desired properties + this.globalRequestOptions.httpsAgent = new https.Agent({ + keepAlive: true, + keepAliveMsecs: this.options.keepAliveMsecs, + }); + } + this.baseUrl = getRestBaseUrl(false, restOptions); this.apiKey = this.options.apiKey; this.apiSecret = this.options.apiSecret; diff --git a/src/util/requestUtils.ts b/src/util/requestUtils.ts index 60282ef..2e7116f 100644 --- a/src/util/requestUtils.ts +++ b/src/util/requestUtils.ts @@ -31,6 +31,18 @@ export interface RestClientOptions { */ encodeQueryStringValues?: boolean; + /** + * Enable keep alive for REST API requests (via axios). + */ + keepAlive?: boolean; + + /** + * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000. + * Only relevant if keepAlive is set to true. + * Default: 1000 (defaults comes from https agent) + */ + keepAliveMsecs?: number; + /** * Optionally override API protocol + domain * e.g baseUrl: 'https://api.bitget.com' From 58b25a3ce1157d5636a07f75e0346de0f99511b2 Mon Sep 17 00:00:00 2001 From: JJ-Cro Date: Tue, 15 Jul 2025 12:22:31 +0200 Subject: [PATCH 08/57] fix(): fix keepAlive --- src/util/BaseRestClient.ts | 7 +++++++ src/util/requestUtils.ts | 18 +++++++++--------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/util/BaseRestClient.ts b/src/util/BaseRestClient.ts index b0ac0c3..e002749 100644 --- a/src/util/BaseRestClient.ts +++ b/src/util/BaseRestClient.ts @@ -117,9 +117,16 @@ export default abstract class BaseRestClient { // If enabled, configure a https agent with keepAlive enabled if (this.options.keepAlive) { + // Extract existing https agent parameters, if provided, to prevent the keepAlive flag from overwriting an existing https agent completely + const existingHttpsAgent = this.globalRequestOptions.httpsAgent as + | https.Agent + | undefined; + const existingAgentOptions = existingHttpsAgent?.options || {}; + // For more advanced configuration, raise an issue on GitHub or use the "networkOptions" // parameter to define a custom httpsAgent with the desired properties this.globalRequestOptions.httpsAgent = new https.Agent({ + ...existingAgentOptions, keepAlive: true, keepAliveMsecs: this.options.keepAliveMsecs, }); diff --git a/src/util/requestUtils.ts b/src/util/requestUtils.ts index 2e7116f..673fec7 100644 --- a/src/util/requestUtils.ts +++ b/src/util/requestUtils.ts @@ -31,6 +31,15 @@ export interface RestClientOptions { */ encodeQueryStringValues?: boolean; + /** + * Optionally override API protocol + domain + * e.g baseUrl: 'https://api.bitget.com' + **/ + baseUrl?: string; + + /** Default: true. whether to try and post-process request exceptions (and throw them). */ + parseExceptions?: boolean; + /** * Enable keep alive for REST API requests (via axios). */ @@ -42,15 +51,6 @@ export interface RestClientOptions { * Default: 1000 (defaults comes from https agent) */ keepAliveMsecs?: number; - - /** - * Optionally override API protocol + domain - * e.g baseUrl: 'https://api.bitget.com' - **/ - baseUrl?: string; - - /** Default: true. whether to try and post-process request exceptions (and throw them). */ - parseExceptions?: boolean; } export function serializeParams( From 91e049f95ccd12c148db91f3978433ec159d040e Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Tue, 15 Jul 2025 11:51:19 +0100 Subject: [PATCH 09/57] feat(): add v3 websocket urls --- src/util/BaseRestClient.ts | 9 ++++++++- src/util/websocket-util.ts | 40 ++++++++++++++++++++++++++++++++++++-- src/websocket-client-v2.ts | 13 ++++++++++--- src/websocket-client.ts | 6 ++++-- 4 files changed, 60 insertions(+), 8 deletions(-) diff --git a/src/util/BaseRestClient.ts b/src/util/BaseRestClient.ts index e002749..20c3710 100644 --- a/src/util/BaseRestClient.ts +++ b/src/util/BaseRestClient.ts @@ -111,10 +111,17 @@ export default abstract class BaseRestClient { 'X-CHANNEL-API-CODE': 'hbnni', 'Content-Type': 'application/json', locale: 'en-US', - ...(restOptions.demoTrading ? { paptrading: '1' } : {}), }, }; + if (this.options.demoTrading) { + this.globalRequestOptions.headers = { + ...this.globalRequestOptions.headers, + // Header to enable paper trading with provided demo API keys + paptrading: '1', + }; + } + // If enabled, configure a https agent with keepAlive enabled if (this.options.keepAlive) { // Extract existing https agent parameters, if provided, to prevent the keepAlive flag from overwriting an existing https agent completely diff --git a/src/util/websocket-util.ts b/src/util/websocket-util.ts index 509cc9c..fb2baa2 100644 --- a/src/util/websocket-util.ts +++ b/src/util/websocket-util.ts @@ -24,26 +24,42 @@ type NetworkMap< export const WS_BASE_URL_MAP: Record< WsKey, - Record<'all', NetworkMap<'livenet'>> + Record<'all', NetworkMap<'livenet' | 'demo'>> > = { mixv1: { all: { livenet: 'wss://ws.bitget.com/mix/v1/stream', + demo: 'NotSupportedForV1', }, }, spotv1: { all: { livenet: 'wss://ws.bitget.com/spot/v1/stream', + demo: 'NotSupportedForV1', }, }, v2Public: { all: { livenet: 'wss://ws.bitget.com/v2/ws/public', + demo: 'wss://wspap.bitget.com/v2/ws/public', }, }, v2Private: { all: { livenet: 'wss://ws.bitget.com/v2/ws/private', + demo: 'wss://wspap.bitget.com/v2/ws/private', + }, + }, + v3Public: { + all: { + livenet: 'wss://ws.bitget.com/v3/ws/public', + demo: 'wss://wspap.bitget.com/v3/ws/public', + }, + }, + v3Private: { + all: { + livenet: 'wss://ws.bitget.com/v3/ws/private', + demo: 'wss://wspap.bitget.com/v3/ws/private', }, }, }; @@ -54,6 +70,8 @@ export const WS_KEY_MAP = { mixv1: 'mixv1', v2Public: 'v2Public', v2Private: 'v2Private', + v3Public: 'v3Public', + v3Private: 'v3Private', } as const; /** Any WS keys in this list will trigger auth on connect, if credentials are available */ @@ -133,7 +151,9 @@ export function getMaxTopicsPerSubscribeEvent(wsKey: WsKey): number | null { case 'mixv1': case 'spotv1': case 'v2Public': - case 'v2Private': { + case 'v2Private': + case 'v3Public': + case 'v3Private': { // Technically there doesn't seem to be a documented cap, but there is a size limit per request. Doesn't hurt to batch requests. return 15; } @@ -200,3 +220,19 @@ export function safeTerminateWs( return false; } + +/** + * WebSocket.ping() is not available in browsers. This is a simple check used to + * disable heartbeats in browers, for exchanges that use native WebSocket ping/pong frames. + */ +export function isWSPingFrameAvailable(): boolean { + return typeof WebSocket.prototype['ping'] === 'function'; +} + +/** + * WebSocket.pong() is not available in browsers. This is a simple check used to + * disable heartbeats in browers, for exchanges that use native WebSocket ping/pong frames. + */ +export function isWSPongFrameAvailable(): boolean { + return typeof WebSocket.prototype['pong'] === 'function'; +} diff --git a/src/websocket-client-v2.ts b/src/websocket-client-v2.ts index 1c0e795..e36332d 100644 --- a/src/websocket-client-v2.ts +++ b/src/websocket-client-v2.ts @@ -58,13 +58,14 @@ export class WebsocketClientV2 extends BaseWebsocketClient< return WS_AUTH_ON_CONNECT_KEYS.includes(wsKey as WsKey); } - protected getWsUrl(wsKey: WsKey): string { + protected getWsUrl( + wsKey: WsKey, + networkKey: 'livenet' | 'demo' = 'livenet', + ): string { if (this.options.wsUrl) { return this.options.wsUrl; } - const networkKey = 'livenet'; - switch (wsKey) { case WS_KEY_MAP.spotv1: case WS_KEY_MAP.mixv1: { @@ -78,6 +79,12 @@ export class WebsocketClientV2 extends BaseWebsocketClient< case WS_KEY_MAP.v2Public: { return WS_BASE_URL_MAP.v2Public.all[networkKey]; } + case WS_KEY_MAP.v3Private: { + return WS_BASE_URL_MAP.v3Private.all[networkKey]; + } + case WS_KEY_MAP.v3Public: { + return WS_BASE_URL_MAP.v3Public.all[networkKey]; + } default: { this.logger.error('getWsUrl(): Unhandled wsKey: ', { ...LOGGER_CATEGORY, diff --git a/src/websocket-client.ts b/src/websocket-client.ts index dd9c2d4..f1e0635 100644 --- a/src/websocket-client.ts +++ b/src/websocket-client.ts @@ -651,8 +651,10 @@ export class WebsocketClient extends EventEmitter { return WS_BASE_URL_MAP.mixv1.all[networkKey]; } case WS_KEY_MAP.v2Private: - case WS_KEY_MAP.v2Public: { - throw new Error('Use the WebsocketClientV2 for V2 websockets'); + case WS_KEY_MAP.v2Public: + case WS_KEY_MAP.v3Private: + case WS_KEY_MAP.v3Public: { + throw new Error('Use the WebsocketClientV2 for V2 websockets'); //TODO: update error msg } default: { this.logger.error('getWsUrl(): Unhandled wsKey: ', { From f89d51591c26cf60d4f6dcf0de018da4c08e9677 Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Tue, 15 Jul 2025 11:54:02 +0100 Subject: [PATCH 10/57] breaking change: rename v1 websocket client to WebsocketClientLegacyV1 --- src/index.ts | 2 +- src/{websocket-client.ts => websocket-client-legacy-v1.ts} | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename src/{websocket-client.ts => websocket-client-legacy-v1.ts} (99%) diff --git a/src/index.ts b/src/index.ts index c1c41cf..8a40e4f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,5 +6,5 @@ export * from './spot-client'; export * from './types'; export * from './util'; export * from './util/logger'; -export * from './websocket-client'; +export * from './websocket-client-legacy-v1'; export * from './websocket-client-v2'; diff --git a/src/websocket-client.ts b/src/websocket-client-legacy-v1.ts similarity index 99% rename from src/websocket-client.ts rename to src/websocket-client-legacy-v1.ts index f1e0635..5478557 100644 --- a/src/websocket-client.ts +++ b/src/websocket-client-legacy-v1.ts @@ -57,7 +57,7 @@ interface WebsocketClientEvents { } // Type safety for on and emit handlers: https://stackoverflow.com/a/61609010/880837 -export declare interface WebsocketClient { +export declare interface WebsocketClientLegacyV1 { on( event: U, listener: WebsocketClientEvents[U], @@ -72,7 +72,7 @@ export declare interface WebsocketClient { /** * @deprecated use WebsocketClientV2 instead */ -export class WebsocketClient extends EventEmitter { +export class WebsocketClientLegacyV1 extends EventEmitter { private logger: typeof DefaultLogger; private options: WebsocketClientOptions; From bda206c1313af0c1eaa0d4c8bccd06d7d5eb455f Mon Sep 17 00:00:00 2001 From: JJ-Cro Date: Tue, 15 Jul 2025 13:37:55 +0200 Subject: [PATCH 11/57] feat(): updated new endpoints and changelog types --- src/rest-client-v3.ts | 43 ++++++++++++++++++++++++++++++++ src/types/request/v3/account.ts | 21 ++++++++++++++++ src/types/request/v3/trade.ts | 8 ++++++ src/types/response/v3/account.ts | 29 +++++++++++++++++++++ src/types/response/v3/public.ts | 2 +- src/types/response/v3/trade.ts | 5 ++++ 6 files changed, 107 insertions(+), 1 deletion(-) diff --git a/src/rest-client-v3.ts b/src/rest-client-v3.ts index dc41e1e..7d62384 100644 --- a/src/rest-client-v3.ts +++ b/src/rest-client-v3.ts @@ -17,6 +17,7 @@ import { CloseAllPositionsResponseV3, ContractOiV3, ConvertRecordsResponseV3, + CountdownCancelAllRequestV3, CreateSubAccountApiKeyRequestV3, CreateSubAccountApiKeyResponseV3, CreateSubAccountRequestV3, @@ -27,6 +28,7 @@ import { EnsureCoinsResponseV3, FinancialRecordsResponseV3, FreezeSubAccountRequestV3, + FundingAssetV3, GetCandlesRequestV3, GetContractsOiRequestV3, GetConvertRecordsRequestV3, @@ -34,9 +36,12 @@ import { GetCurrentPositionRequestV3, GetCurrentPositionResponseV3, GetEnsureCoinsRequestV3, + GetFeeRateRequestV3, + GetFeeRateResponseV3, GetFillsRequestV3, GetFillsResponseV3, GetFinancialRecordsRequestV3, + GetFundingAssetsRequestV3, GetHistoryCandlesRequestV3, GetHistoryFundingRateRequestV3, GetHistoryOrdersRequestV3, @@ -63,6 +68,7 @@ import { GetSubAccountListResponseV3, GetSubTransferRecordsRequestV3, GetSubTransferRecordsResponseV3, + GetSubUnifiedAssetsRequestV3, GetSymbolsRequestV3, GetTickersRequestV3, GetTransferableCoinsRequestV3, @@ -96,6 +102,7 @@ import { SetLeverageRequestV3, SubAccountTransferRequestV3, SubAccountTransferResponseV3, + SubUnifiedAssetsItemV3, SymbolsResponseV3, TickerV3, TransferedResponseV3, @@ -203,6 +210,15 @@ export class RestClientV3 extends BaseRestClient { * */ + /** + * Get Fund Account Assets + */ + getFundingAssets( + params?: GetFundingAssetsRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/account/funding-assets', params); + } + /** * Set Leverage */ @@ -272,6 +288,15 @@ export class RestClientV3 extends BaseRestClient { return this.postPrivate('/api/v3/account/repay', params); } + /** + * Get Trading Fee Rate + */ + getFeeRate( + params: GetFeeRateRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/account/fee-rate', params); + } + /** * * Sub-account Management endpoints @@ -365,6 +390,15 @@ export class RestClientV3 extends BaseRestClient { return this.getPrivate('/api/v3/account/transferable-coins', params); } + /** + * Get Sub-account Unified Account Assets + */ + getSubUnifiedAssets( + params?: GetSubUnifiedAssetsRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/account/sub-unified-assets', params); + } + /** * Get Main-Sub Transfer Records */ @@ -736,4 +770,13 @@ export class RestClientV3 extends BaseRestClient { ): Promise> { return this.postPrivate('/api/v3/account/max-open-available', params); } + + /** + * CountDown Cancel All + */ + countdownCancelAll( + params: CountdownCancelAllRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/trade/countdown-cancel-all', params); + } } diff --git a/src/types/request/v3/account.ts b/src/types/request/v3/account.ts index d14cc2b..e0ad748 100644 --- a/src/types/request/v3/account.ts +++ b/src/types/request/v3/account.ts @@ -25,6 +25,7 @@ export interface GetFinancialRecordsRequestV3 { | 'COIN-FUTURES' | 'USDC-FUTURES'; coin?: string; + type?: string; startTime?: string; endTime?: string; limit?: string; @@ -162,3 +163,23 @@ export interface SubAccountTransferRequestV3 { toUserId: string; clientOid: string; } + +export interface GetSubUnifiedAssetsRequestV3 { + subUid?: string; + cursor?: string; + limit?: string; +} + +export interface GetFeeRateRequestV3 { + category: + | 'SPOT' + | 'MARGIN' + | 'USDT-FUTURES' + | 'COIN-FUTURES' + | 'USDC-FUTURES'; + symbol: string; +} + +export interface GetFundingAssetsRequestV3 { + coin?: string; +} diff --git a/src/types/request/v3/trade.ts b/src/types/request/v3/trade.ts index 8f3b0f3..3fa7fc6 100644 --- a/src/types/request/v3/trade.ts +++ b/src/types/request/v3/trade.ts @@ -151,4 +151,12 @@ export interface PlaceOrderRequestV3 { clientOid?: string; reduceOnly?: 'yes' | 'no'; stpMode?: 'none' | 'cancel_taker' | 'cancel_maker' | 'cancel_both'; + takeProfitPrice?: string; + stopLossPrice?: string; + takeProfitTriggerType?: 'mark_price' | 'last_price'; + stopLossTriggerType?: 'mark_price' | 'last_price'; +} + +export interface CountdownCancelAllRequestV3 { + countdown: string; // seconds until auto-cancel (5-60, or 0 to disable) } diff --git a/src/types/response/v3/account.ts b/src/types/response/v3/account.ts index f6bea56..bce755f 100644 --- a/src/types/response/v3/account.ts +++ b/src/types/response/v3/account.ts @@ -167,6 +167,7 @@ export interface TransferResponseV3 { export interface SubTransferRecordV3 { transferId: string; + oldTransferId?: string; fromType: string; toType: string; amount: string; @@ -188,3 +189,31 @@ export interface SubAccountTransferResponseV3 { transferId: string; clientOid: string; } + +export interface SubUnifiedAssetV3 { + coin: string; + equity: string; + usdValue: string; + balance: string; + available: string; + debt: string; + locked: string; +} + +export interface SubUnifiedAssetsItemV3 { + subUid: string; + cursor: string; + assets: SubUnifiedAssetV3[]; +} + +export interface GetFeeRateResponseV3 { + makerFeeRate: string; + takerFeeRate: string; +} + +export interface FundingAssetV3 { + coin: string; + available: string; + frozen: string; + balance: string; +} diff --git a/src/types/response/v3/public.ts b/src/types/response/v3/public.ts index 3bec6bd..f7c2356 100644 --- a/src/types/response/v3/public.ts +++ b/src/types/response/v3/public.ts @@ -78,7 +78,6 @@ export interface RiskReserveRecordV3 { } export interface RiskReserveV3 { - totalBalance: string; coin: string; riskReserveRecords: RiskReserveRecordV3[]; } @@ -98,6 +97,7 @@ export interface InstrumentV3 { feeRateUpRatio: string; minOrderQty: string; maxOrderQty: string; + maxMarketOrderQty: string; pricePrecision: string; quantityPrecision: string; quotePrecision: string; diff --git a/src/types/response/v3/trade.ts b/src/types/response/v3/trade.ts index 41ad715..5c7e415 100644 --- a/src/types/response/v3/trade.ts +++ b/src/types/response/v3/trade.ts @@ -68,6 +68,7 @@ export interface OrderInfoV3 { feeDetail: FeeDetailV3[]; cancelReason: string; execType: string; + stpMode?: string; createdTime: string; updatedTime: string; } @@ -84,6 +85,8 @@ export interface FillV3 { execValue: string; tradeScope: string; feeDetail: FeeDetailV3[]; + execPnl?: string; + tradeSide?: string; createdTime: string; updatedTime: string; } @@ -112,6 +115,7 @@ export interface UnfilledOrderV3 { holdMode: string; reduceOnly: string; feeDetail: FeeDetailV3[]; + stpMode?: string; createdTime: string; updatedTime: string; } @@ -142,6 +146,7 @@ export interface HistoryOrderV3 { feeDetail: FeeDetailV3[]; cancelReason: string; execType: string; + stpMode?: string; createdTime: string; updatedTime: string; } From c7928e4df924a38c5f8a3cf9a35b7451d074c331 Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Tue, 15 Jul 2025 12:54:00 +0100 Subject: [PATCH 12/57] feat(): update WsStore to catch up to other SDKs. breaking change: refactor custom logger to 3 tiers --- src/util/BaseWSClient.ts | 37 ++-- src/util/WsStore.ts | 299 ++++++++++++++++++++++++++++-- src/util/WsStore.types.ts | 39 +++- src/util/logger.ts | 14 +- src/websocket-client-legacy-v1.ts | 24 +-- 5 files changed, 353 insertions(+), 60 deletions(-) diff --git a/src/util/BaseWSClient.ts b/src/util/BaseWSClient.ts index ec33cf5..4a3963e 100644 --- a/src/util/BaseWSClient.ts +++ b/src/util/BaseWSClient.ts @@ -50,20 +50,23 @@ export interface BaseWebsocketClient< const LOGGER_CATEGORY = { category: 'bitget-ws' }; +export interface EmittableEvent { + eventType: 'response' | 'update' | 'exception' | 'authenticated'; + event: TEvent; + isWSAPIResponse?: boolean; +} + export abstract class BaseWebsocketClient< TWSKey extends string, TWSTopicSubscribeEventArgs extends object, > extends EventEmitter { private wsStore: WsStore; - protected logger: typeof DefaultLogger; + protected logger: DefaultLogger; protected options: WebsocketClientOptions; - constructor( - options: WSClientConfigurableOptions, - logger?: typeof DefaultLogger, - ) { + constructor(options: WSClientConfigurableOptions, logger?: DefaultLogger) { super(); this.logger = logger || DefaultLogger; @@ -303,7 +306,7 @@ export abstract class BaseWebsocketClient< return this.tryWsSend(wsKey, JSON.stringify(request)); } catch (e) { - this.logger.silly(e, { ...LOGGER_CATEGORY, wsKey }); + this.logger.trace(e, { ...LOGGER_CATEGORY, wsKey }); } } @@ -332,7 +335,7 @@ export abstract class BaseWebsocketClient< this.clearPongTimer(wsKey); - this.logger.silly('Sending ping', { ...LOGGER_CATEGORY, wsKey }); + this.logger.trace('Sending ping', { ...LOGGER_CATEGORY, wsKey }); this.tryWsSend(wsKey, 'ping'); this.wsStore.get(wsKey, true).activePongTimer = setTimeout(() => { @@ -385,15 +388,15 @@ export abstract class BaseWebsocketClient< const maxTopicsPerEvent = this.getMaxTopicsPerSubscribeEvent(wsKey); if (maxTopicsPerEvent && topics.length > maxTopicsPerEvent) { - this.logger.silly( + this.logger.trace( `Subscribing to topics in batches of ${maxTopicsPerEvent}`, ); for (let i = 0; i < topics.length; i += maxTopicsPerEvent) { const batch = topics.slice(i, i + maxTopicsPerEvent); - this.logger.silly(`Subscribing to batch of ${batch.length}`); + this.logger.trace(`Subscribing to batch of ${batch.length}`); this.requestSubscribeTopics(wsKey, batch); } - this.logger.silly( + this.logger.trace( `Finished batch subscribing to ${topics.length} topics`, ); return; @@ -420,15 +423,15 @@ export abstract class BaseWebsocketClient< const maxTopicsPerEvent = this.getMaxTopicsPerSubscribeEvent(wsKey); if (maxTopicsPerEvent && topics.length > maxTopicsPerEvent) { - this.logger.silly( + this.logger.trace( `Unsubscribing to topics in batches of ${maxTopicsPerEvent}`, ); for (let i = 0; i < topics.length; i += maxTopicsPerEvent) { const batch = topics.slice(i, i + maxTopicsPerEvent); - this.logger.silly(`Unsubscribing to batch of ${batch.length}`); + this.logger.trace(`Unsubscribing to batch of ${batch.length}`); this.requestUnsubscribeTopics(wsKey, batch); } - this.logger.silly( + this.logger.trace( `Finished batch unsubscribing to ${topics.length} topics`, ); return; @@ -444,7 +447,7 @@ export abstract class BaseWebsocketClient< public tryWsSend(wsKey: TWSKey, wsMessage: string) { try { - this.logger.silly('Sending upstream ws message: ', { + this.logger.trace('Sending upstream ws message: ', { ...LOGGER_CATEGORY, wsMessage, wsKey, @@ -472,7 +475,7 @@ export abstract class BaseWebsocketClient< } private connectToWsUrl(url: string, wsKey: TWSKey): WebSocket { - this.logger.silly(`Opening WS connection to URL: ${url}`, { + this.logger.trace(`Opening WS connection to URL: ${url}`, { ...LOGGER_CATEGORY, wsKey, }); @@ -545,7 +548,7 @@ export abstract class BaseWebsocketClient< this.clearPongTimer(wsKey); if (isWsPong(event)) { - this.logger.silly('Received pong', { ...LOGGER_CATEGORY, wsKey }); + this.logger.trace('Received pong', { ...LOGGER_CATEGORY, wsKey }); return; } @@ -588,7 +591,7 @@ export abstract class BaseWebsocketClient< } } - this.logger.warning('Unhandled/unrecognised ws event message', { + this.logger.info('Unhandled/unrecognised ws event message', { ...LOGGER_CATEGORY, message: msg || 'no message', // messageType: typeof msg, diff --git a/src/util/WsStore.ts b/src/util/WsStore.ts index c37cb03..045390d 100644 --- a/src/util/WsStore.ts +++ b/src/util/WsStore.ts @@ -1,17 +1,44 @@ import WebSocket from 'isomorphic-ws'; import { DefaultLogger } from './logger'; -import { WsConnectionStateEnum, WsStoredState } from './WsStore.types'; +import { + DeferredPromise, + WSConnectedResult, + WsConnectionStateEnum, + WsStoredState, +} from './WsStore.types'; + +/** + * Simple comparison of two objects, only checks 1-level deep (nested objects won't match) + */ +export function isDeepObjectMatch(object1: unknown, object2: unknown): boolean { + if (typeof object1 === 'string' && typeof object2 === 'string') { + return object1 === object2; + } + + if (typeof object1 !== 'object' || typeof object2 !== 'object') { + return false; + } -function isDeepObjectMatch(object1: object, object2: object) { for (const key in object1) { - if (object1[key] !== object2[key]) { + const value1 = (object1 as any)[key]; + const value2 = (object2 as any)[key]; + + if (value1 !== value2) { return false; } } return true; } +export const DEFERRED_PROMISE_REF = { + CONNECTION_IN_PROGRESS: 'CONNECTION_IN_PROGRESS', + AUTHENTICATION_IN_PROGRESS: 'AUTHENTICATION_IN_PROGRESS', +} as const; + +type DeferredPromiseRef = + (typeof DEFERRED_PROMISE_REF)[keyof typeof DEFERRED_PROMISE_REF]; + export default class WsStore< WsKey extends string, TWSTopicSubscribeEventArgs extends object, @@ -19,9 +46,9 @@ export default class WsStore< private wsState: Record> = {}; - private logger: typeof DefaultLogger; + private logger: DefaultLogger; - constructor(logger: typeof DefaultLogger) { + constructor(logger: DefaultLogger) { this.logger = logger || DefaultLogger; } @@ -55,7 +82,7 @@ export default class WsStore< create(key: WsKey): WsStoredState | undefined { if (this.hasExistingActiveConnection(key)) { - this.logger.warning( + this.logger.info( 'WsStore setConnection() overwriting existing open connection: ', this.getWs(key), ); @@ -63,6 +90,7 @@ export default class WsStore< this.wsState[key] = { subscribedTopics: new Set(), connectionState: WsConnectionStateEnum.INITIAL, + deferredPromiseStore: {}, }; return this.get(key); } @@ -71,7 +99,7 @@ export default class WsStore< // TODO: should we allow this at all? Perhaps block this from happening... if (this.hasExistingActiveConnection(key)) { const ws = this.getWs(key); - this.logger.warning( + this.logger.info( 'WsStore deleting state for connection still open: ', ws, ); @@ -92,7 +120,7 @@ export default class WsStore< setWs(key: WsKey, wsConnection: WebSocket): WebSocket { if (this.isWsOpen(key)) { - this.logger.warning( + this.logger.info( 'WsStore setConnection() overwriting existing open connection: ', this.getWs(key), ); @@ -102,6 +130,211 @@ export default class WsStore< return wsConnection; } + /** + * deferred promises + */ + + getDeferredPromise( + wsKey: WsKey, + promiseRef: string | DeferredPromiseRef, + ): DeferredPromise | undefined { + const storeForKey = this.get(wsKey); + if (!storeForKey) { + return; + } + + const deferredPromiseStore = storeForKey.deferredPromiseStore; + return deferredPromiseStore[promiseRef]; + } + + createDeferredPromise( + wsKey: WsKey, + promiseRef: string | DeferredPromiseRef, + throwIfExists: boolean, + ): DeferredPromise { + const existingPromise = this.getDeferredPromise( + wsKey, + promiseRef, + ); + if (existingPromise) { + if (throwIfExists) { + throw new Error(`Promise exists for "${wsKey}"`); + } else { + // console.log('existing promise'); + return existingPromise; + } + } + + // console.log('create promise'); + const createIfMissing = true; + const storeForKey = this.get(wsKey, createIfMissing); + + // TODO: Once stable, use Promise.withResolvers in future + const deferredPromise: DeferredPromise = {}; + + deferredPromise.promise = new Promise((resolve, reject) => { + deferredPromise.resolve = resolve; + deferredPromise.reject = reject; + }); + + const deferredPromiseStore = storeForKey.deferredPromiseStore; + + deferredPromiseStore[promiseRef] = deferredPromise; + + return deferredPromise; + } + + resolveDeferredPromise( + wsKey: WsKey, + promiseRef: string | DeferredPromiseRef, + value: unknown, + removeAfter: boolean, + ): void { + const promise = this.getDeferredPromise(wsKey, promiseRef); + if (promise?.resolve) { + promise.resolve(value); + } + if (removeAfter) { + this.removeDeferredPromise(wsKey, promiseRef); + } + } + + rejectDeferredPromise( + wsKey: WsKey, + promiseRef: string | DeferredPromiseRef, + value: unknown, + removeAfter: boolean, + ): void { + const promise = this.getDeferredPromise(wsKey, promiseRef); + + if (promise?.reject) { + this.logger.trace( + `rejectDeferredPromise(): rejecting ${wsKey}/${promiseRef}`, + value, + ); + + if (typeof value === 'string') { + promise.reject(new Error(value)); + } else { + promise.reject(value); + } + } + + if (removeAfter) { + this.removeDeferredPromise(wsKey, promiseRef); + } + } + + removeDeferredPromise( + wsKey: WsKey, + promiseRef: string | DeferredPromiseRef, + ): void { + const storeForKey = this.get(wsKey); + if (!storeForKey) { + return; + } + + const deferredPromise = storeForKey.deferredPromiseStore[promiseRef]; + if (deferredPromise) { + // Just in case it's pending + if (deferredPromise.resolve) { + deferredPromise.resolve('promiseRemoved'); + } + + delete storeForKey.deferredPromiseStore[promiseRef]; + } + } + + rejectAllDeferredPromises(wsKey: WsKey, reason: string): void { + const storeForKey = this.get(wsKey); + const deferredPromiseStore = storeForKey.deferredPromiseStore; + if (!storeForKey || !deferredPromiseStore) { + return; + } + + const reservedKeys = Object.values(DEFERRED_PROMISE_REF) as string[]; + + for (const promiseRef in deferredPromiseStore) { + // Skip reserved keys, such as the connection promise + if (reservedKeys.includes(promiseRef)) { + continue; + } + + try { + this.logger.trace( + `rejectAllDeferredPromises(): rejecting ${wsKey}/${promiseRef}/${reason}`, + ); + this.rejectDeferredPromise(wsKey, promiseRef, reason, true); + } catch (e) { + this.logger.error( + 'rejectAllDeferredPromises(): Exception rejecting deferred promise', + { wsKey: wsKey, reason, promiseRef, exception: e }, + ); + } + } + } + + /** Get promise designed to track a connection attempt in progress. Resolves once connected. */ + getConnectionInProgressPromise( + wsKey: WsKey, + ): DeferredPromise | undefined { + return this.getDeferredPromise( + wsKey, + DEFERRED_PROMISE_REF.CONNECTION_IN_PROGRESS, + ); + } + + getAuthenticationInProgressPromise( + wsKey: WsKey, + ): DeferredPromise | undefined { + return this.getDeferredPromise( + wsKey, + DEFERRED_PROMISE_REF.AUTHENTICATION_IN_PROGRESS, + ); + } + + /** + * Create a deferred promise designed to track a connection attempt in progress. + * + * Will throw if existing promise is found. + */ + createConnectionInProgressPromise( + wsKey: WsKey, + throwIfExists: boolean, + ): DeferredPromise { + return this.createDeferredPromise( + wsKey, + DEFERRED_PROMISE_REF.CONNECTION_IN_PROGRESS, + throwIfExists, + ); + } + + createAuthenticationInProgressPromise( + wsKey: WsKey, + throwIfExists: boolean, + ): DeferredPromise { + return this.createDeferredPromise( + wsKey, + DEFERRED_PROMISE_REF.AUTHENTICATION_IN_PROGRESS, + throwIfExists, + ); + } + + /** Remove promise designed to track a connection attempt in progress */ + removeConnectingInProgressPromise(wsKey: WsKey): void { + return this.removeDeferredPromise( + wsKey, + DEFERRED_PROMISE_REF.CONNECTION_IN_PROGRESS, + ); + } + + removeAuthenticationInProgressPromise(wsKey: WsKey): void { + return this.removeDeferredPromise( + wsKey, + DEFERRED_PROMISE_REF.AUTHENTICATION_IN_PROGRESS, + ); + } + /* connection state */ isWsOpen(key: WsKey): boolean { @@ -118,12 +351,42 @@ export default class WsStore< setConnectionState(key: WsKey, state: WsConnectionStateEnum) { this.get(key, true).connectionState = state; + this.get(key, true).connectionStateChangedAt = new Date(); } isConnectionState(key: WsKey, state: WsConnectionStateEnum): boolean { return this.getConnectionState(key) === state; } + /** + * Check if we're currently in the process of opening a connection for any reason. Safer than only checking "CONNECTING" as the state + * @param key + * @returns + */ + isConnectionAttemptInProgress(key: WsKey): boolean { + const isConnectionInProgress = + this.isConnectionState(key, WsConnectionStateEnum.CONNECTING) || + this.isConnectionState(key, WsConnectionStateEnum.RECONNECTING); + + if (isConnectionInProgress) { + const wsState = this.get(key, true); + const stateLastChangedAt = wsState?.connectionStateChangedAt; + const stateChangedAtTimestamp = stateLastChangedAt?.getTime(); + if (stateChangedAtTimestamp) { + const timestampNow = new Date().getTime(); + const stateChangedTimeAgo = timestampNow - stateChangedAtTimestamp; + const stateChangeTimeout = 15000; // allow a max 15 second timeout since the last state change before assuming stuck; + if (stateChangedTimeAgo >= stateChangeTimeout) { + const msg = 'State change timed out, reconnect workflow stuck?'; + this.logger.error(msg, { key, wsState }); + this.setConnectionState(key, WsConnectionStateEnum.ERROR); + } + } + } + + return isConnectionInProgress; + } + /* subscribed topics */ getTopics(key: WsKey): Set { @@ -132,18 +395,21 @@ export default class WsStore< getTopicsByKey(): Record> { const result = {}; + for (const refKey in this.wsState) { result[refKey] = this.getTopics(refKey as WsKey); } + return result; } - // Since topics are objects we can't rely on the set to detect duplicates + /** + * Find matching "topic" request from the store + * @param key + * @param topic + * @returns + */ getMatchingTopic(key: WsKey, topic: TWSTopicSubscribeEventArgs) { - // if (typeof topic === 'string') { - // return this.getMatchingTopic(key, { channel: topic }); - // } - const allTopics = this.getTopics(key).values(); for (const storedTopic of allTopics) { if (isDeepObjectMatch(topic, storedTopic)) { @@ -153,13 +419,6 @@ export default class WsStore< } addTopic(key: WsKey, topic: TWSTopicSubscribeEventArgs) { - // if (typeof topic === 'string') { - // return this.addTopic(key, { - // instType: 'sp', - // channel: topic, - // instId: 'default', - // }; - // } // Check for duplicate topic. If already tracked, don't store this one const existingTopic = this.getMatchingTopic(key, topic); if (existingTopic) { diff --git a/src/util/WsStore.types.ts b/src/util/WsStore.types.ts index 5eb95d6..3692b55 100644 --- a/src/util/WsStore.types.ts +++ b/src/util/WsStore.types.ts @@ -1,28 +1,65 @@ +import WebSocket from 'isomorphic-ws'; + export enum WsConnectionStateEnum { INITIAL = 0, CONNECTING = 1, CONNECTED = 2, CLOSING = 3, RECONNECTING = 4, - // ERROR = 5, + // ERROR_RECONNECTING = 5, + ERROR = 5, +} + +export interface DeferredPromise { + resolve?: (value: TSuccess) => TSuccess; + reject?: (value: TError) => TError; + promise?: Promise; +} + +export interface WSConnectedResult { + wsKey: string; } export interface WsStoredState { /** The currently active websocket connection */ ws?: WebSocket; + /** The current lifecycle state of the connection (enum) */ connectionState?: WsConnectionStateEnum; + connectionStateChangedAt?: Date; + /** A timer that will send an upstream heartbeat (ping) when it expires */ activePingTimer?: ReturnType | undefined; + /** A timer tracking that an upstream heartbeat was sent, expecting a reply before it expires */ activePongTimer?: ReturnType | undefined; + /** If a reconnection is in progress, this will have the timer for the delayed reconnect */ activeReconnectTimer?: ReturnType | undefined; + /** + * When a connection attempt is in progress (even for reconnect), a promise is stored here. + * + * This promise will resolve once connected (and will then get removed); + */ + // connectionInProgressPromise?: DeferredPromise | undefined; + deferredPromiseStore: Record; + /** * All the topics we are expected to be subscribed to on this connection (and we automatically resubscribe to if the connection drops) * * A "Set" and a deep-object-match are used to ensure we only subscribe to a topic once (tracking a list of unique topics we're expected to be connected to) */ subscribedTopics: Set; + + /** Whether this connection has completed authentication (only applies to private connections) */ isAuthenticated?: boolean; + + /** + * Whether this connection has completed authentication before for the Websocket API, so it k + * nows to automatically reauth if reconnected + */ + didAuthWSAPI?: boolean; + + /** To reauthenticate on the WS API, which channel do we send to? */ + WSAPIAuthChannel?: string; } diff --git a/src/util/logger.ts b/src/util/logger.ts index d5a585c..0f5f6bd 100644 --- a/src/util/logger.ts +++ b/src/util/logger.ts @@ -1,22 +1,16 @@ export type LogParams = null | any; +export type DefaultLogger = typeof DefaultLogger; + export const DefaultLogger = { + /** Ping/pong events and other raw messages that might be noisy. Enable this while troubleshooting. */ // eslint-disable-next-line @typescript-eslint/no-unused-vars - silly: (...params: LogParams): void => { + trace: (...params: LogParams): void => { // console.log(params); }, - debug: (...params: LogParams): void => { - console.log(params); - }, - notice: (...params: LogParams): void => { - console.log(params); - }, info: (...params: LogParams): void => { console.info(params); }, - warning: (...params: LogParams): void => { - console.error(params); - }, error: (...params: LogParams): void => { console.error(params); }, diff --git a/src/websocket-client-legacy-v1.ts b/src/websocket-client-legacy-v1.ts index 5478557..2959b6a 100644 --- a/src/websocket-client-legacy-v1.ts +++ b/src/websocket-client-legacy-v1.ts @@ -305,7 +305,7 @@ export class WebsocketClientLegacyV1 extends EventEmitter { return this.tryWsSend(wsKey, JSON.stringify(request)); } catch (e) { - this.logger.silly(e, { ...LOGGER_CATEGORY, wsKey }); + this.logger.trace(e, { ...LOGGER_CATEGORY, wsKey }); } } @@ -334,7 +334,7 @@ export class WebsocketClientLegacyV1 extends EventEmitter { this.clearPongTimer(wsKey); - this.logger.silly('Sending ping', { ...LOGGER_CATEGORY, wsKey }); + this.logger.trace('Sending ping', { ...LOGGER_CATEGORY, wsKey }); this.tryWsSend(wsKey, 'ping'); this.wsStore.get(wsKey, true).activePongTimer = setTimeout(() => { @@ -387,15 +387,15 @@ export class WebsocketClientLegacyV1 extends EventEmitter { const maxTopicsPerEvent = getMaxTopicsPerSubscribeEvent(wsKey); if (maxTopicsPerEvent && topics.length > maxTopicsPerEvent) { - this.logger.silly( + this.logger.trace( `Subscribing to topics in batches of ${maxTopicsPerEvent}`, ); for (let i = 0; i < topics.length; i += maxTopicsPerEvent) { const batch = topics.slice(i, i + maxTopicsPerEvent); - this.logger.silly(`Subscribing to batch of ${batch.length}`); + this.logger.trace(`Subscribing to batch of ${batch.length}`); this.requestSubscribeTopics(wsKey, batch); } - this.logger.silly( + this.logger.trace( `Finished batch subscribing to ${topics.length} topics`, ); return; @@ -422,15 +422,15 @@ export class WebsocketClientLegacyV1 extends EventEmitter { const maxTopicsPerEvent = getMaxTopicsPerSubscribeEvent(wsKey); if (maxTopicsPerEvent && topics.length > maxTopicsPerEvent) { - this.logger.silly( + this.logger.trace( `Unsubscribing to topics in batches of ${maxTopicsPerEvent}`, ); for (let i = 0; i < topics.length; i += maxTopicsPerEvent) { const batch = topics.slice(i, i + maxTopicsPerEvent); - this.logger.silly(`Unsubscribing to batch of ${batch.length}`); + this.logger.trace(`Unsubscribing to batch of ${batch.length}`); this.requestUnsubscribeTopics(wsKey, batch); } - this.logger.silly( + this.logger.trace( `Finished batch unsubscribing to ${topics.length} topics`, ); return; @@ -446,7 +446,7 @@ export class WebsocketClientLegacyV1 extends EventEmitter { public tryWsSend(wsKey: WsKey, wsMessage: string) { try { - this.logger.silly('Sending upstream ws message: ', { + this.logger.trace('Sending upstream ws message: ', { ...LOGGER_CATEGORY, wsMessage, wsKey, @@ -474,7 +474,7 @@ export class WebsocketClientLegacyV1 extends EventEmitter { } private connectToWsUrl(url: string, wsKey: WsKey): WebSocket { - this.logger.silly(`Opening WS connection to URL: ${url}`, { + this.logger.trace(`Opening WS connection to URL: ${url}`, { ...LOGGER_CATEGORY, wsKey, }); @@ -547,7 +547,7 @@ export class WebsocketClientLegacyV1 extends EventEmitter { this.clearPongTimer(wsKey); if (isWsPong(event)) { - this.logger.silly('Received pong', { ...LOGGER_CATEGORY, wsKey }); + this.logger.trace('Received pong', { ...LOGGER_CATEGORY, wsKey }); return; } @@ -590,7 +590,7 @@ export class WebsocketClientLegacyV1 extends EventEmitter { } } - this.logger.warning('Unhandled/unrecognised ws event message', { + this.logger.info('Unhandled/unrecognised ws event message', { ...LOGGER_CATEGORY, message: msg || 'no message', // messageType: typeof msg, From 5563ffe9169ba630b47ac861bf28f2195c3e7792 Mon Sep 17 00:00:00 2001 From: JJ-Cro Date: Tue, 15 Jul 2025 16:26:56 +0200 Subject: [PATCH 13/57] feat(): added all missing endpoints and updated all types/interfaces that were changes --- src/rest-client-v3.ts | 614 +++++++++++++++++++----------- src/types/request/index.ts | 1 + src/types/request/v3/account.ts | 67 ++++ src/types/request/v3/strategy.ts | 50 +++ src/types/response/index.ts | 1 + src/types/response/v3/account.ts | 55 +++ src/types/response/v3/strategy.ts | 33 ++ 7 files changed, 590 insertions(+), 231 deletions(-) create mode 100644 src/types/request/v3/strategy.ts create mode 100644 src/types/response/v3/strategy.ts diff --git a/src/rest-client-v3.ts b/src/rest-client-v3.ts index 7d62384..2044743 100644 --- a/src/rest-client-v3.ts +++ b/src/rest-client-v3.ts @@ -12,6 +12,7 @@ import { CancelBatchOrdersResponseV3, CancelOrderRequestV3, CancelOrderResponseV3, + CancelStrategyOrderRequestV3, CandlestickV3, CloseAllPositionsRequestV3, CloseAllPositionsResponseV3, @@ -23,7 +24,10 @@ import { CreateSubAccountRequestV3, CreateSubAccountResponseV3, CurrentFundingRateV3, + DeductInfoResponseV3, DeleteSubAccountApiKeyRequestV3, + DepositAddressV3, + DepositRecordV3, DiscountRateV3, EnsureCoinsResponseV3, FinancialRecordsResponseV3, @@ -35,6 +39,8 @@ import { GetCurrentFundingRateRequestV3, GetCurrentPositionRequestV3, GetCurrentPositionResponseV3, + GetDepositAddressRequestV3, + GetDepositRecordsRequestV3, GetEnsureCoinsRequestV3, GetFeeRateRequestV3, GetFeeRateResponseV3, @@ -46,6 +52,8 @@ import { GetHistoryFundingRateRequestV3, GetHistoryOrdersRequestV3, GetHistoryOrdersResponseV3, + GetHistoryStrategyOrdersRequestV3, + GetHistoryStrategyOrdersResponseV3, GetInstrumentsRequestV3, GetLoanOrderRequestV3, GetLTVConvertRequestV3, @@ -66,6 +74,8 @@ import { GetSubAccountApiKeysResponseV3, GetSubAccountListRequestV3, GetSubAccountListResponseV3, + GetSubDepositAddressRequestV3, + GetSubDepositRecordsRequestV3, GetSubTransferRecordsRequestV3, GetSubTransferRecordsResponseV3, GetSubUnifiedAssetsRequestV3, @@ -75,6 +85,8 @@ import { GetTransferedRequestV3, GetUnfilledOrdersRequestV3, GetUnfilledOrdersResponseV3, + GetUnfilledStrategyOrdersRequestV3, + GetWithdrawRecordsRequestV3, HistoryFundingRateV3, InstrumentV3, LoanOrderV3, @@ -82,6 +94,8 @@ import { MarginLoanV3, ModifyOrderRequestV3, ModifyOrderResponseV3, + ModifyStrategyOrderRequestV3, + ModifyStrategyOrderResponseV3, OpenInterestV3, OrderBookV3, OrderInfoV3, @@ -90,6 +104,8 @@ import { PlaceBatchOrdersResponseV3, PlaceOrderRequestV3, PlaceOrderResponseV3, + PlaceStrategyOrderRequestV3, + PlaceStrategyOrderResponseV3, PositionTierV3, ProductInfosResponseV3, PublicFillV3, @@ -100,9 +116,11 @@ import { RiskReserveV3, RiskUnitResponseV3, SetLeverageRequestV3, + StrategyOrderV3, SubAccountTransferRequestV3, SubAccountTransferResponseV3, SubUnifiedAssetsItemV3, + SwitchDeductRequestV3, SymbolsResponseV3, TickerV3, TransferedResponseV3, @@ -110,6 +128,9 @@ import { TransferResponseV3, UpdateSubAccountApiKeyRequestV3, UpdateSubAccountApiKeyResponseV3, + WithdrawRecordV3, + WithdrawRequestV3, + WithdrawResponseV3, } from './types'; import { REST_CLIENT_TYPE_ENUM } from './util'; import BaseRestClient from './util/BaseRestClient'; @@ -206,433 +227,428 @@ export class RestClientV3 extends BaseRestClient { /** * - * Account Management endpoints + * =====Market======= endpoints * */ /** - * Get Fund Account Assets + * Get Instruments */ - getFundingAssets( - params?: GetFundingAssetsRequestV3, - ): Promise> { - return this.getPrivate('/api/v3/account/funding-assets', params); + getInstruments( + params: GetInstrumentsRequestV3, + ): Promise> { + return this.get('/api/v3/market/instruments', params); } /** - * Set Leverage + * Get Tickers */ - setLeverage(params: SetLeverageRequestV3): Promise> { - return this.postPrivate('/api/v3/account/set-leverage', params); + getTickers(params: GetTickersRequestV3): Promise> { + return this.get('/api/v3/market/tickers', params); } /** - * Set Holding Mode + * Get OrderBook */ - setHoldMode(params: { - holdMode: 'one_way_mode' | 'hedge_mode'; - }): Promise> { - return this.postPrivate('/api/v3/account/set-hold-mode', params); + getOrderBook( + params: GetOrderBookRequestV3, + ): Promise> { + return this.get('/api/v3/market/orderbook', params); } /** - * Get Account Info + * Get Recent Public Fills */ - getAccountSettings(): Promise> { - return this.getPrivate('/api/v3/account/settings'); + getFills( + params: GetPublicFillsRequestV3, + ): Promise> { + return this.get('/api/v3/market/fills', params); } /** - * Get Account Assets + * Get Open Interest */ - getAccountAssets(): Promise> { - return this.getPrivate('/api/v3/account/assets'); + getOpenInterest( + params: GetOpenInterestRequestV3, + ): Promise> { + return this.get('/api/v3/market/open-interest', params); } /** - * Get Convert Records + * Get Kline/Candlestick */ - getConvertRecords( - params: GetConvertRecordsRequestV3, - ): Promise> { - return this.getPrivate('/api/v3/account/convert-records', params); + getCandles( + params: GetCandlesRequestV3, + ): Promise> { + return this.get('/api/v3/market/candles', params); } /** - * Get Financial Records + * Get Kline/Candlestick History */ - getFinancialRecords( - params: GetFinancialRecordsRequestV3, - ): Promise> { - return this.getPrivate('/api/v3/account/financial-records', params); + getHistoryCandles( + params: GetHistoryCandlesRequestV3, + ): Promise> { + return this.get('/api/v3/market/history-candles', params); } /** - * Get Payment Coins + * Get Current Funding Rate */ - getPaymentCoins(): Promise> { - return this.getPrivate('/api/v3/account/payment-coins'); + getCurrentFundingRate( + params: GetCurrentFundingRateRequestV3, + ): Promise> { + return this.get('/api/v3/market/current-fund-rate', params); } /** - * Get Repayable Coins + * Get Funding Rate History */ - getRepayableCoins(): Promise> { - return this.getPrivate('/api/v3/account/repayable-coins'); + getHistoryFundingRate( + params: GetHistoryFundingRateRequestV3, + ): Promise> { + return this.get('/api/v3/market/history-fund-rate', params); } /** - * Repay + * Get Risk Reserve */ - submitRepay(params: RepayRequestV3): Promise> { - return this.postPrivate('/api/v3/account/repay', params); + getRiskReserve( + params: GetRiskReserveRequestV3, + ): Promise> { + return this.get('/api/v3/market/risk-reserve', params); } /** - * Get Trading Fee Rate + * Get Discount Rate */ - getFeeRate( - params: GetFeeRateRequestV3, - ): Promise> { - return this.getPrivate('/api/v3/account/fee-rate', params); + getDiscountRate(): Promise> { + return this.get('/api/v3/market/discount-rate'); } /** - * - * Sub-account Management endpoints - * + * Get Margin Loan */ + getMarginLoans( + params: GetMarginLoansRequestV3, + ): Promise> { + return this.get('/api/v3/market/margin-loans', params); + } /** - * Create Sub-account API Key + * Get Position Tier */ - createSubAccountApiKey( - params: CreateSubAccountApiKeyRequestV3, - ): Promise> { - return this.postPrivate('/api/v3/user/create-sub-api', params); + getPositionTier( + params: GetPositionTierRequestV3, + ): Promise> { + return this.get('/api/v3/market/position-tier', params); } /** - * Delete Sub-account API Key + * Get Open Interest Limit */ - deleteSubAccountApiKey( - params: DeleteSubAccountApiKeyRequestV3, - ): Promise> { - return this.postPrivate('/api/v3/user/delete-sub-api', params); + getContractsOi( + params: GetContractsOiRequestV3, + ): Promise> { + return this.get('/api/v3/market/oi-limit', params); } /** - * Get Sub-account API Keys + * + * =====Account======= endpoints + * */ - getSubAccountApiKeys( - params: GetSubAccountApiKeysRequestV3, - ): Promise> { - return this.getPrivate('/api/v3/user/sub-api-list', params); - } /** - * Modify Sub-account API Key + * Get Account Assets */ - updateSubAccountApiKey( - params: UpdateSubAccountApiKeyRequestV3, - ): Promise> { - return this.postPrivate('/api/v3/user/update-sub-api', params); + getAccountAssets(): Promise> { + return this.getPrivate('/api/v3/account/assets'); } /** - * Create Sub-account + * Get Fund Account Assets */ - createSubAccount( - params: CreateSubAccountRequestV3, - ): Promise> { - return this.postPrivate('/api/v3/user/create-sub', params); + getFundingAssets( + params?: GetFundingAssetsRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/account/funding-assets', params); } /** - * Freeze/Unfreeze Sub-account + * Get Account Info */ - freezeSubAccount( - params: FreezeSubAccountRequestV3, - ): Promise> { - return this.postPrivate('/api/v3/user/freeze-sub', params); + getAccountSettings(): Promise> { + return this.getPrivate('/api/v3/account/settings'); } /** - * Get Sub-account List + * Set Leverage */ - getSubAccountList( - params?: GetSubAccountListRequestV3, - ): Promise> { - return this.getPrivate('/api/v3/user/sub-list', params); + setLeverage(params: SetLeverageRequestV3): Promise> { + return this.postPrivate('/api/v3/account/set-leverage', params); } /** - * - * Transfer endpoints - * + * Set Holding Mode */ + setHoldMode(params: { + holdMode: 'one_way_mode' | 'hedge_mode'; + }): Promise> { + return this.postPrivate('/api/v3/account/set-hold-mode', params); + } /** - * Transfer + * Get Financial Records */ - submitTransfer( - params: TransferRequestV3, - ): Promise> { - return this.postPrivate('/api/v3/account/transfer', params); + getFinancialRecords( + params: GetFinancialRecordsRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/account/financial-records', params); } /** - * Get Transferable Coins + * Get Repayable Coins */ - getTransferableCoins( - params: GetTransferableCoinsRequestV3, - ): Promise> { - return this.getPrivate('/api/v3/account/transferable-coins', params); + getRepayableCoins(): Promise> { + return this.getPrivate('/api/v3/account/repayable-coins'); } /** - * Get Sub-account Unified Account Assets + * Get Payment Coins */ - getSubUnifiedAssets( - params?: GetSubUnifiedAssetsRequestV3, - ): Promise> { - return this.getPrivate('/api/v3/account/sub-unified-assets', params); + getPaymentCoins(): Promise> { + return this.getPrivate('/api/v3/account/payment-coins'); } /** - * Get Main-Sub Transfer Records + * Repay */ - getSubTransferRecords( - params?: GetSubTransferRecordsRequestV3, - ): Promise> { - return this.getPrivate('/api/v3/account/sub-transfer-record', params); + submitRepay(params: RepayRequestV3): Promise> { + return this.postPrivate('/api/v3/account/repay', params); } /** - * Main-Sub Account Transfer + * Get Convert Records */ - subAccountTransfer( - params: SubAccountTransferRequestV3, - ): Promise> { - return this.postPrivate('/api/v3/account/sub-transfer', params); + getConvertRecords( + params: GetConvertRecordsRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/account/convert-records', params); } /** - * - * Market Data endpoints - * + * Switch Deduct - Set BGB deduction */ + switchDeduct(params: SwitchDeductRequestV3): Promise> { + return this.postPrivate('/api/v3/account/switch-deduct', params); + } /** - * Get Recent Public Fills + * Get Deduct Info - Get BGB deduction status */ - getFills( - params: GetPublicFillsRequestV3, - ): Promise> { - return this.get('/api/v3/market/fills', params); + getDeductInfo(): Promise> { + return this.getPrivate('/api/v3/account/deduct-info'); } /** - * Get Kline/Candlestick + * Get Trading Fee Rate */ - getCandles( - params: GetCandlesRequestV3, - ): Promise> { - return this.get('/api/v3/market/candles', params); + getFeeRate( + params: GetFeeRateRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/account/fee-rate', params); } /** - * Get Kline/Candlestick History + * + * =====SubAccount======= endpoints + * */ - getHistoryCandles( - params: GetHistoryCandlesRequestV3, - ): Promise> { - return this.get('/api/v3/market/history-candles', params); - } /** - * Get Open Interest Limit + * Create Sub-account */ - getContractsOi( - params: GetContractsOiRequestV3, - ): Promise> { - return this.get('/api/v3/market/oi-limit', params); + createSubAccount( + params: CreateSubAccountRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/user/create-sub', params); } /** - * Get Current Funding Rate + * Freeze/Unfreeze Sub-account */ - getCurrentFundingRate( - params: GetCurrentFundingRateRequestV3, - ): Promise> { - return this.get('/api/v3/market/current-fund-rate', params); + freezeSubAccount( + params: FreezeSubAccountRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/user/freeze-sub', params); } /** - * Get Discount Rate + * Get Sub-account Unified Account Assets */ - getDiscountRate(): Promise> { - return this.get('/api/v3/market/discount-rate'); + getSubUnifiedAssets( + params?: GetSubUnifiedAssetsRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/account/sub-unified-assets', params); } /** - * Get Funding Rate History + * Get Sub-account List */ - getHistoryFundingRate( - params: GetHistoryFundingRateRequestV3, - ): Promise> { - return this.get('/api/v3/market/history-fund-rate', params); + getSubAccountList( + params?: GetSubAccountListRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/user/sub-list', params); } /** - * Get Margin Loan + * Create Sub-account API Key */ - getMarginLoans( - params: GetMarginLoansRequestV3, - ): Promise> { - return this.get('/api/v3/market/margin-loans', params); + createSubAccountApiKey( + params: CreateSubAccountApiKeyRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/user/create-sub-api', params); } /** - * Get Open Interest + * Modify Sub-account API Key */ - getOpenInterest( - params: GetOpenInterestRequestV3, - ): Promise> { - return this.get('/api/v3/market/open-interest', params); + updateSubAccountApiKey( + params: UpdateSubAccountApiKeyRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/user/update-sub-api', params); } /** - * Get Position Tier + * Delete Sub-account API Key */ - getPositionTier( - params: GetPositionTierRequestV3, - ): Promise> { - return this.get('/api/v3/market/position-tier', params); + deleteSubAccountApiKey( + params: DeleteSubAccountApiKeyRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/user/delete-sub-api', params); } /** - * Get Risk Reserve + * Get Sub-account API Keys */ - getRiskReserve( - params: GetRiskReserveRequestV3, - ): Promise> { - return this.get('/api/v3/market/risk-reserve', params); + getSubAccountApiKeys( + params: GetSubAccountApiKeysRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/user/sub-api-list', params); } /** - * Get Instruments + * + * =====Transfer======= endpoints + * */ - getInstruments( - params: GetInstrumentsRequestV3, - ): Promise> { - return this.get('/api/v3/market/instruments', params); - } /** - * Get OrderBook + * Get Transferable Coins */ - getOrderBook( - params: GetOrderBookRequestV3, - ): Promise> { - return this.get('/api/v3/market/orderbook', params); + getTransferableCoins( + params: GetTransferableCoinsRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/account/transferable-coins', params); } /** - * Get Tickers + * Transfer */ - getTickers(params: GetTickersRequestV3): Promise> { - return this.get('/api/v3/market/tickers', params); + submitTransfer( + params: TransferRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/account/transfer', params); } /** - * - * Loan endpoints - * + * Main-Sub Account Transfer */ + subAccountTransfer( + params: SubAccountTransferRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/account/sub-transfer', params); + } /** - * Get Transferred Quantity + * Get Main-Sub Transfer Records */ - getLoanTransfered( - params: GetTransferedRequestV3, - ): Promise> { - return this.getPrivate('/api/v3/ins-loan/transfered', params); + getSubTransferRecords( + params?: GetSubTransferRecordsRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/account/sub-transfer-record', params); } /** - * Get Trade Symbols + * + * =====Deposit======= endpoints + * */ - getLoanSymbols( - params: GetSymbolsRequestV3, - ): Promise> { - return this.getPrivate('/api/v3/ins-loan/symbols', params); - } /** - * Get Risk Unit + * Get Deposit Address */ - getLoanRiskUnit(): Promise> { - return this.getPrivate('/api/v3/ins-loan/risk-unit'); + getDepositAddress( + params: GetDepositAddressRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/account/deposit-address', params); } /** - * Get Repayment Orders + * Get Sub Deposit Address */ - getLoanRepaidHistory( - params?: GetRepaidHistoryRequestV3, - ): Promise> { - return this.getPrivate('/api/v3/ins-loan/repaid-history', params); + getSubDepositAddress( + params: GetSubDepositAddressRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/account/sub-deposit-address', params); } /** - * Get Product Info + * Get Deposit Records */ - getLoanProductInfo( - params: GetProductInfosRequestV3, - ): Promise> { - return this.getPrivate('/api/v3/ins-loan/product-infos', params); + getDepositRecords( + params: GetDepositRecordsRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/account/deposit-records', params); } /** - * Get Loan Orders + * Get Sub Deposit Records */ - getLoanOrder( - params?: GetLoanOrderRequestV3, - ): Promise> { - return this.getPrivate('/api/v3/ins-loan/loan-order', params); + getSubDepositRecords( + params: GetSubDepositRecordsRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/account/sub-deposit-records', params); } /** - * Get Margin Coin Info + * + * =====Withdraw======= endpoints + * */ - getLoanMarginCoinInfo( - params: GetEnsureCoinsRequestV3, - ): Promise> { - return this.getPrivate('/api/v3/ins-loan/ensure-coins-convert', params); - } /** - * Bind/Unbind UID to Risk Unit + * Withdraw - Includes on-chain withdrawals and internal transfers */ - bindLoanUid( - params: BindUidRequestV3, - ): Promise> { - return this.postPrivate('/api/v3/ins-loan/bind-uid', params); + submitWithdraw( + params: WithdrawRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/account/withdraw', params); } /** - * Get LTV + * Get Withdraw Records */ - getLoanLTVConvert( - params?: GetLTVConvertRequestV3, - ): Promise> { - return this.getPrivate('/api/v3/ins-loan/ltv-convert', params); + getWithdrawRecords( + params: GetWithdrawRecordsRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/account/withdrawl-records', params); } /** * - * Trade endpoints + * =====Trade======= endpoints * */ @@ -779,4 +795,140 @@ export class RestClientV3 extends BaseRestClient { ): Promise> { return this.postPrivate('/api/v3/trade/countdown-cancel-all', params); } + + /** + * + * =====Inst Loan======= endpoints + * + */ + + /** + * Get Transferred Quantity + */ + getLoanTransfered( + params: GetTransferedRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/ins-loan/transfered', params); + } + + /** + * Get Trade Symbols + */ + getLoanSymbols( + params: GetSymbolsRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/ins-loan/symbols', params); + } + + /** + * Get Risk Unit + */ + getLoanRiskUnit(): Promise> { + return this.getPrivate('/api/v3/ins-loan/risk-unit'); + } + + /** + * Get Repayment Orders + */ + getLoanRepaidHistory( + params?: GetRepaidHistoryRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/ins-loan/repaid-history', params); + } + + /** + * Get Product Info + */ + getLoanProductInfo( + params: GetProductInfosRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/ins-loan/product-infos', params); + } + + /** + * Get Loan Orders + */ + getLoanOrder( + params?: GetLoanOrderRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/ins-loan/loan-order', params); + } + + /** + * Get LTV + */ + getLoanLTVConvert( + params?: GetLTVConvertRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/ins-loan/ltv-convert', params); + } + + /** + * Get Margin Coin Info + */ + getLoanMarginCoinInfo( + params: GetEnsureCoinsRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/ins-loan/ensure-coins-convert', params); + } + + /** + * Bind/Unbind UID to Risk Unit + */ + bindLoanUid( + params: BindUidRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/ins-loan/bind-uid', params); + } + + /** + * + * =====Strategy======= endpoints + * + */ + + /** + * Place Strategy Order + */ + placeStrategyOrder( + params: PlaceStrategyOrderRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/trade/place-strategy-order', params); + } + + /** + * Modify Strategy Order + */ + modifyStrategyOrder( + params: ModifyStrategyOrderRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/trade/modify-strategy-order', params); + } + + /** + * Cancel Strategy Order + */ + cancelStrategyOrder( + params: CancelStrategyOrderRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/trade/cancel-strategy-order', params); + } + + /** + * Get Unfilled Strategy Orders + */ + getUnfilledStrategyOrders( + params: GetUnfilledStrategyOrdersRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/trade/unfilled-strategy-orders', params); + } + + /** + * Get Strategy Order History + */ + getHistoryStrategyOrders( + params: GetHistoryStrategyOrdersRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/trade/history-strategy-orders', params); + } } diff --git a/src/types/request/index.ts b/src/types/request/index.ts index 15bc71a..b0384d2 100644 --- a/src/types/request/index.ts +++ b/src/types/request/index.ts @@ -12,4 +12,5 @@ export * from './v2/spot'; export * from './v3/account'; export * from './v3/loan'; export * from './v3/public'; +export * from './v3/strategy'; export * from './v3/trade'; diff --git a/src/types/request/v3/account.ts b/src/types/request/v3/account.ts index e0ad748..eae2e88 100644 --- a/src/types/request/v3/account.ts +++ b/src/types/request/v3/account.ts @@ -183,3 +183,70 @@ export interface GetFeeRateRequestV3 { export interface GetFundingAssetsRequestV3 { coin?: string; } + +export interface SwitchDeductRequestV3 { + deduct: 'on' | 'off'; +} + +// Deposit Request Types + +export interface GetDepositAddressRequestV3 { + coin: string; + chain?: string; + size?: string; +} + +export interface GetSubDepositAddressRequestV3 { + subUid: string; + coin: string; + chain?: string; + size?: string; +} + +export interface GetDepositRecordsRequestV3 { + coin?: string; + orderId?: string; + startTime: string; + endTime: string; + limit?: string; + cursor?: string; +} + +export interface GetSubDepositRecordsRequestV3 { + coin?: string; + subUid: string; + startTime: string; + endTime: string; + limit?: string; + cursor?: string; +} + +// Withdraw Request Types + +export interface WithdrawRequestV3 { + coin: string; + chain?: string; + transferType: 'on_chain' | 'internal_transfer'; + address: string; + innerToType?: 'uid' | 'email' | 'mobile'; + areaCode?: string; + tag?: string; + size: string; + remark?: string; + clientOid?: string; + memberCode?: 'bithumb' | 'korbit' | 'coinone'; + identityType?: 'company' | 'user'; + companyName?: string; + firstName?: string; + lastName?: string; +} + +export interface GetWithdrawRecordsRequestV3 { + coin?: string; + orderId?: string; + clientOid?: string; + startTime: string; + endTime: string; + limit?: string; + cursor?: string; +} diff --git a/src/types/request/v3/strategy.ts b/src/types/request/v3/strategy.ts new file mode 100644 index 0000000..8b4f540 --- /dev/null +++ b/src/types/request/v3/strategy.ts @@ -0,0 +1,50 @@ +export interface PlaceStrategyOrderRequestV3 { + category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + symbol: string; + clientOid?: string; + type?: 'tpsl'; + tpslMode?: 'full' | 'partial'; + qty: string; + posSide: 'long' | 'short'; + tpTriggerBy?: 'market' | 'mark'; + slTriggerBy?: 'market' | 'mark'; + takeProfit?: string; + stopLoss?: string; + tpOrderType?: 'limit' | 'market'; + slOrderType?: 'limit' | 'market'; + tpLimitPrice?: string; + slLimitPrice?: string; +} + +export interface ModifyStrategyOrderRequestV3 { + orderId?: string; + clientOid?: string; + qty: string; + tpTriggerBy?: 'market' | 'mark'; + slTriggerBy?: 'market' | 'mark'; + takeProfit?: string; + stopLoss?: string; + tpOrderType?: 'limit' | 'market'; + slOrderType?: 'limit' | 'market'; + tpLimitPrice?: string; + slLimitPrice?: string; +} + +export interface CancelStrategyOrderRequestV3 { + orderId?: string; + clientOid?: string; +} + +export interface GetUnfilledStrategyOrdersRequestV3 { + category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + type?: 'tpsl'; +} + +export interface GetHistoryStrategyOrdersRequestV3 { + category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + type?: 'tpsl'; + startTime?: string; + endTime?: string; + limit?: string; + cursor?: string; +} diff --git a/src/types/response/index.ts b/src/types/response/index.ts index 61f33f3..ff19e41 100644 --- a/src/types/response/index.ts +++ b/src/types/response/index.ts @@ -11,4 +11,5 @@ export * from './v2/spot'; export * from './v3/account'; export * from './v3/loan'; export * from './v3/public'; +export * from './v3/strategy'; export * from './v3/trade'; diff --git a/src/types/response/v3/account.ts b/src/types/response/v3/account.ts index bce755f..cb9511d 100644 --- a/src/types/response/v3/account.ts +++ b/src/types/response/v3/account.ts @@ -217,3 +217,58 @@ export interface FundingAssetV3 { frozen: string; balance: string; } + +export interface DeductInfoResponseV3 { + deduct: 'on' | 'off'; +} + +// Deposit Response Types + +export interface DepositAddressV3 { + address: string; + chain: string; + coin: string; + tag: string; + url: string; +} + +export interface DepositRecordV3 { + orderId: string; + recordId: string; + coin: string; + type: 'deposit'; + dest: 'on_chain' | 'internal_transfer'; + size: string; + status: 'pending' | 'success' | 'fail'; + fromAddress: string; + toAddress: string; + chain: string; + createdTime: string; + updatedTime: string; +} + +// Withdraw Response Types + +export interface WithdrawResponseV3 { + orderId: string; + clientOid: string; +} + +export interface WithdrawRecordV3 { + orderId: string; + clientOid: string; + recordId: string; + coin: string; + type: 'withdraw'; + dest: 'on_chain' | 'internal_transfer'; + size: string; + status: 'pending' | 'success' | 'fail'; + fromAddress: string; + toAddress: string; + chain: string; + fee: string; + confirm: string; + tag: string; + createdTime: string; + updatedTime: string; +} diff --git a/src/types/response/v3/strategy.ts b/src/types/response/v3/strategy.ts new file mode 100644 index 0000000..c19e739 --- /dev/null +++ b/src/types/response/v3/strategy.ts @@ -0,0 +1,33 @@ +export interface PlaceStrategyOrderResponseV3 { + orderId: string; + clientOid: string; +} + +export interface ModifyStrategyOrderResponseV3 { + orderId: string; + clientOid: string; +} + +export interface StrategyOrderV3 { + orderId: string; + clientOid: string; + category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + symbol: string; + qty: string; + posSide: 'long' | 'short'; + tpTriggerBy: 'market' | 'mark'; + slTriggerBy: 'market' | 'mark'; + takeProfit: string; + stopLoss: string; + tpOrderType: 'limit' | 'market'; + slOrderType: 'limit' | 'market'; + tpLimitPrice: string; + slLimitPrice: string; + createdTime: string; + updatedTime: string; +} + +export interface GetHistoryStrategyOrdersResponseV3 { + list: StrategyOrderV3[]; + cursor?: string; +} From 7671f5893bed634cdcfe4d512c85dad0efc443ec Mon Sep 17 00:00:00 2001 From: JJ-Cro Date: Tue, 15 Jul 2025 16:39:08 +0200 Subject: [PATCH 14/57] feat(): renamed all functions and types to be standardised --- src/rest-client-v3.ts | 204 +++++++++++++++++++----------- src/types/response/v3/account.ts | 47 +------ src/types/response/v3/loan.ts | 23 +--- src/types/response/v3/strategy.ts | 5 - src/types/response/v3/trade.ts | 24 ---- 5 files changed, 138 insertions(+), 165 deletions(-) diff --git a/src/rest-client-v3.ts b/src/rest-client-v3.ts index 2044743..b1ae693 100644 --- a/src/rest-client-v3.ts +++ b/src/rest-client-v3.ts @@ -16,21 +16,22 @@ import { CandlestickV3, CloseAllPositionsRequestV3, CloseAllPositionsResponseV3, + CoinInfoV3, ContractOiV3, - ConvertRecordsResponseV3, + ConvertRecordV3, CountdownCancelAllRequestV3, CreateSubAccountApiKeyRequestV3, CreateSubAccountApiKeyResponseV3, CreateSubAccountRequestV3, CreateSubAccountResponseV3, CurrentFundingRateV3, - DeductInfoResponseV3, + CurrentPositionV3, DeleteSubAccountApiKeyRequestV3, DepositAddressV3, DepositRecordV3, DiscountRateV3, - EnsureCoinsResponseV3, - FinancialRecordsResponseV3, + FillV3, + FinancialRecordV3, FreezeSubAccountRequestV3, FundingAssetV3, GetCandlesRequestV3, @@ -38,22 +39,17 @@ import { GetConvertRecordsRequestV3, GetCurrentFundingRateRequestV3, GetCurrentPositionRequestV3, - GetCurrentPositionResponseV3, GetDepositAddressRequestV3, GetDepositRecordsRequestV3, GetEnsureCoinsRequestV3, GetFeeRateRequestV3, - GetFeeRateResponseV3, GetFillsRequestV3, - GetFillsResponseV3, GetFinancialRecordsRequestV3, GetFundingAssetsRequestV3, GetHistoryCandlesRequestV3, GetHistoryFundingRateRequestV3, GetHistoryOrdersRequestV3, - GetHistoryOrdersResponseV3, GetHistoryStrategyOrdersRequestV3, - GetHistoryStrategyOrdersResponseV3, GetInstrumentsRequestV3, GetLoanOrderRequestV3, GetLTVConvertRequestV3, @@ -64,32 +60,31 @@ import { GetOrderBookRequestV3, GetOrderInfoRequestV3, GetPositionHistoryRequestV3, - GetPositionHistoryResponseV3, GetPositionTierRequestV3, GetProductInfosRequestV3, GetPublicFillsRequestV3, GetRepaidHistoryRequestV3, GetRiskReserveRequestV3, GetSubAccountApiKeysRequestV3, - GetSubAccountApiKeysResponseV3, GetSubAccountListRequestV3, - GetSubAccountListResponseV3, GetSubDepositAddressRequestV3, GetSubDepositRecordsRequestV3, GetSubTransferRecordsRequestV3, - GetSubTransferRecordsResponseV3, GetSubUnifiedAssetsRequestV3, GetSymbolsRequestV3, GetTickersRequestV3, GetTransferableCoinsRequestV3, GetTransferedRequestV3, GetUnfilledOrdersRequestV3, - GetUnfilledOrdersResponseV3, GetUnfilledStrategyOrdersRequestV3, GetWithdrawRecordsRequestV3, HistoryFundingRateV3, + HistoryOrderV3, InstrumentV3, LoanOrderV3, + LoanProductInfoV3, + LoanSymbolsV3, + LoanTransfersV3, LTVConvertResponseV3, MarginLoanV3, ModifyOrderRequestV3, @@ -99,33 +94,33 @@ import { OpenInterestV3, OrderBookV3, OrderInfoV3, - PaymentCoinsResponseV3, + PaymentCoinV3, PlaceBatchOrdersRequestV3, PlaceBatchOrdersResponseV3, PlaceOrderRequestV3, PlaceOrderResponseV3, PlaceStrategyOrderRequestV3, PlaceStrategyOrderResponseV3, + PositionHistoryV3, PositionTierV3, - ProductInfosResponseV3, PublicFillV3, RepaidHistoryItemV3, - RepayableCoinsResponseV3, + RepayableCoinV3, RepayRequestV3, RepayResponseV3, RiskReserveV3, - RiskUnitResponseV3, SetLeverageRequestV3, StrategyOrderV3, + SubAccountApiKeyV3, SubAccountTransferRequestV3, - SubAccountTransferResponseV3, - SubUnifiedAssetsItemV3, + SubAccountV3, + SubTransferRecordV3, + SubUnifiedAssetV3, SwitchDeductRequestV3, - SymbolsResponseV3, TickerV3, - TransferedResponseV3, TransferRequestV3, TransferResponseV3, + UnfilledOrderV3, UpdateSubAccountApiKeyRequestV3, UpdateSubAccountApiKeyResponseV3, WithdrawRecordV3, @@ -401,23 +396,36 @@ export class RestClientV3 extends BaseRestClient { /** * Get Financial Records */ - getFinancialRecords( - params: GetFinancialRecordsRequestV3, - ): Promise> { + getFinancialRecords(params: GetFinancialRecordsRequestV3): Promise< + APIResponse<{ + list: FinancialRecordV3[]; + cursor: string; + }> + > { return this.getPrivate('/api/v3/account/financial-records', params); } /** * Get Repayable Coins */ - getRepayableCoins(): Promise> { + getRepayableCoins(): Promise< + APIResponse<{ + repayableCoinList: RepayableCoinV3[]; + maxSelection: string; + }> + > { return this.getPrivate('/api/v3/account/repayable-coins'); } /** * Get Payment Coins */ - getPaymentCoins(): Promise> { + getPaymentCoins(): Promise< + APIResponse<{ + paymentCoinList: PaymentCoinV3[]; + maxSelection: string; + }> + > { return this.getPrivate('/api/v3/account/payment-coins'); } @@ -431,9 +439,12 @@ export class RestClientV3 extends BaseRestClient { /** * Get Convert Records */ - getConvertRecords( - params: GetConvertRecordsRequestV3, - ): Promise> { + getConvertRecords(params: GetConvertRecordsRequestV3): Promise< + APIResponse<{ + list: ConvertRecordV3[]; + cursor: string; + }> + > { return this.getPrivate('/api/v3/account/convert-records', params); } @@ -447,16 +458,23 @@ export class RestClientV3 extends BaseRestClient { /** * Get Deduct Info - Get BGB deduction status */ - getDeductInfo(): Promise> { + getDeductInfo(): Promise< + APIResponse<{ + deduct: 'on' | 'off'; + }> + > { return this.getPrivate('/api/v3/account/deduct-info'); } /** * Get Trading Fee Rate */ - getFeeRate( - params: GetFeeRateRequestV3, - ): Promise> { + getFeeRate(params: GetFeeRateRequestV3): Promise< + APIResponse<{ + makerFeeRate: string; + takerFeeRate: string; + }> + > { return this.getPrivate('/api/v3/account/fee-rate', params); } @@ -489,16 +507,20 @@ export class RestClientV3 extends BaseRestClient { */ getSubUnifiedAssets( params?: GetSubUnifiedAssetsRequestV3, - ): Promise> { + ): Promise> { return this.getPrivate('/api/v3/account/sub-unified-assets', params); } /** * Get Sub-account List */ - getSubAccountList( - params?: GetSubAccountListRequestV3, - ): Promise> { + getSubAccountList(params?: GetSubAccountListRequestV3): Promise< + APIResponse<{ + list: SubAccountV3[]; + hasNext: boolean; + cursor: string; + }> + > { return this.getPrivate('/api/v3/user/sub-list', params); } @@ -525,16 +547,20 @@ export class RestClientV3 extends BaseRestClient { */ deleteSubAccountApiKey( params: DeleteSubAccountApiKeyRequestV3, - ): Promise> { + ): Promise> { return this.postPrivate('/api/v3/user/delete-sub-api', params); } /** * Get Sub-account API Keys */ - getSubAccountApiKeys( - params: GetSubAccountApiKeysRequestV3, - ): Promise> { + getSubAccountApiKeys(params: GetSubAccountApiKeysRequestV3): Promise< + APIResponse<{ + items: SubAccountApiKeyV3[]; + hasNext: boolean; + cursor: string; + }> + > { return this.getPrivate('/api/v3/user/sub-api-list', params); } @@ -565,18 +591,24 @@ export class RestClientV3 extends BaseRestClient { /** * Main-Sub Account Transfer */ - subAccountTransfer( - params: SubAccountTransferRequestV3, - ): Promise> { + subAccountTransfer(params: SubAccountTransferRequestV3): Promise< + APIResponse<{ + transferId: string; + clientOid: string; + }> + > { return this.postPrivate('/api/v3/account/sub-transfer', params); } /** * Get Main-Sub Transfer Records */ - getSubTransferRecords( - params?: GetSubTransferRecordsRequestV3, - ): Promise> { + getSubTransferRecords(params?: GetSubTransferRecordsRequestV3): Promise< + APIResponse<{ + items: SubTransferRecordV3[]; + cursor: string; + }> + > { return this.getPrivate('/api/v3/account/sub-transfer-record', params); } @@ -736,45 +768,59 @@ export class RestClientV3 extends BaseRestClient { /** * Get Open Orders */ - getUnfilledOrders( - params?: GetUnfilledOrdersRequestV3, - ): Promise> { + getUnfilledOrders(params?: GetUnfilledOrdersRequestV3): Promise< + APIResponse<{ + list: UnfilledOrderV3[]; + cursor: string; + }> + > { return this.getPrivate('/api/v3/trade/unfilled-orders', params); } /** * Get Order History */ - getHistoryOrders( - params: GetHistoryOrdersRequestV3, - ): Promise> { + getHistoryOrders(params: GetHistoryOrdersRequestV3): Promise< + APIResponse<{ + list: HistoryOrderV3[]; + cursor: string; + }> + > { return this.getPrivate('/api/v3/trade/history-orders', params); } /** * Get Fill History */ - getTradeFills( - params?: GetFillsRequestV3, - ): Promise> { + getTradeFills(params?: GetFillsRequestV3): Promise< + APIResponse<{ + list: FillV3[]; + cursor: string; + }> + > { return this.getPrivate('/api/v3/trade/fills', params); } /** * Get Position Info */ - getCurrentPosition( - params: GetCurrentPositionRequestV3, - ): Promise> { + getCurrentPosition(params: GetCurrentPositionRequestV3): Promise< + APIResponse<{ + list: CurrentPositionV3[]; + }> + > { return this.getPrivate('/api/v3/position/current-position', params); } /** * Get Positions History */ - getPositionHistory( - params: GetPositionHistoryRequestV3, - ): Promise> { + getPositionHistory(params: GetPositionHistoryRequestV3): Promise< + APIResponse<{ + list: PositionHistoryV3[]; + cursor: string; + }> + > { return this.getPrivate('/api/v3/position/history-position', params); } @@ -807,7 +853,7 @@ export class RestClientV3 extends BaseRestClient { */ getLoanTransfered( params: GetTransferedRequestV3, - ): Promise> { + ): Promise> { return this.getPrivate('/api/v3/ins-loan/transfered', params); } @@ -816,14 +862,18 @@ export class RestClientV3 extends BaseRestClient { */ getLoanSymbols( params: GetSymbolsRequestV3, - ): Promise> { + ): Promise> { return this.getPrivate('/api/v3/ins-loan/symbols', params); } /** * Get Risk Unit */ - getLoanRiskUnit(): Promise> { + getLoanRiskUnit(): Promise< + APIResponse<{ + riskUnitId: string[]; + }> + > { return this.getPrivate('/api/v3/ins-loan/risk-unit'); } @@ -841,7 +891,7 @@ export class RestClientV3 extends BaseRestClient { */ getLoanProductInfo( params: GetProductInfosRequestV3, - ): Promise> { + ): Promise> { return this.getPrivate('/api/v3/ins-loan/product-infos', params); } @@ -866,9 +916,12 @@ export class RestClientV3 extends BaseRestClient { /** * Get Margin Coin Info */ - getLoanMarginCoinInfo( - params: GetEnsureCoinsRequestV3, - ): Promise> { + getLoanMarginCoinInfo(params: GetEnsureCoinsRequestV3): Promise< + APIResponse<{ + productId: string; + coinInfo: CoinInfoV3[]; + }> + > { return this.getPrivate('/api/v3/ins-loan/ensure-coins-convert', params); } @@ -890,7 +943,7 @@ export class RestClientV3 extends BaseRestClient { /** * Place Strategy Order */ - placeStrategyOrder( + submitStrategyOrder( params: PlaceStrategyOrderRequestV3, ): Promise> { return this.postPrivate('/api/v3/trade/place-strategy-order', params); @@ -926,9 +979,12 @@ export class RestClientV3 extends BaseRestClient { /** * Get Strategy Order History */ - getHistoryStrategyOrders( - params: GetHistoryStrategyOrdersRequestV3, - ): Promise> { + getHistoryStrategyOrders(params: GetHistoryStrategyOrdersRequestV3): Promise< + APIResponse<{ + list: StrategyOrderV3[]; + cursor?: string; + }> + > { return this.getPrivate('/api/v3/trade/history-strategy-orders', params); } } diff --git a/src/types/response/v3/account.ts b/src/types/response/v3/account.ts index cb9511d..ba95b87 100644 --- a/src/types/response/v3/account.ts +++ b/src/types/response/v3/account.ts @@ -52,11 +52,6 @@ export interface ConvertRecordV3 { ts: string; } -export interface ConvertRecordsResponseV3 { - list: ConvertRecordV3[]; - cursor: string; -} - export interface FinancialRecordV3 { category: string; id: string; @@ -69,20 +64,11 @@ export interface FinancialRecordV3 { ts: string; } -export interface FinancialRecordsResponseV3 { - list: FinancialRecordV3[]; - cursor: string; -} - export interface PaymentCoinV3 { coin: string; size: string; amount: string; } -export interface PaymentCoinsResponseV3 { - paymentCoinList: PaymentCoinV3[]; - maxSelection: string; -} export interface RepayableCoinV3 { coin: string; @@ -90,11 +76,6 @@ export interface RepayableCoinV3 { amount: string; } -export interface RepayableCoinsResponseV3 { - repayableCoinList: RepayableCoinV3[]; - maxSelection: string; -} - export interface RepayResponseV3 { result: string; repayAmount: string; @@ -119,12 +100,6 @@ export interface SubAccountApiKeyV3 { ts?: string; } -export interface GetSubAccountApiKeysResponseV3 { - items: SubAccountApiKeyV3[]; - hasNext: boolean; - cursor: string; -} - export interface UpdateSubAccountApiKeyResponseV3 { note: string; apiKey: string; @@ -153,12 +128,6 @@ export interface SubAccountV3 { updatedTime: string; } -export interface GetSubAccountListResponseV3 { - list: SubAccountV3[]; - hasNext: boolean; - cursor: string; -} - // Transfer Response Types export interface TransferResponseV3 { @@ -180,16 +149,6 @@ export interface SubTransferRecordV3 { updatedTime: string; } -export interface GetSubTransferRecordsResponseV3 { - items: SubTransferRecordV3[]; - cursor: string; -} - -export interface SubAccountTransferResponseV3 { - transferId: string; - clientOid: string; -} - export interface SubUnifiedAssetV3 { coin: string; equity: string; @@ -200,7 +159,7 @@ export interface SubUnifiedAssetV3 { locked: string; } -export interface SubUnifiedAssetsItemV3 { +export interface SubUnifiedAssetV3 { subUid: string; cursor: string; assets: SubUnifiedAssetV3[]; @@ -218,10 +177,6 @@ export interface FundingAssetV3 { balance: string; } -export interface DeductInfoResponseV3 { - deduct: 'on' | 'off'; -} - // Deposit Response Types export interface DepositAddressV3 { diff --git a/src/types/response/v3/loan.ts b/src/types/response/v3/loan.ts index fe492ae..ccc4bbe 100644 --- a/src/types/response/v3/loan.ts +++ b/src/types/response/v3/loan.ts @@ -1,27 +1,23 @@ -export interface TransferedResponseV3 { +export interface LoanTransfersV3 { coin: string; transfered: string; userId: string; } -export interface SymbolSettingV3 { +export interface LoanSymbolSettingV3 { symbol: string; leverage: string; } -export interface SymbolsResponseV3 { +export interface LoanSymbolsV3 { productId: string; spotSymbols: string[]; usdtContractLeverage: string; coinContractLeverage: string; usdcContractLeverage: string; - usdtContractSymbols: SymbolSettingV3[]; - coinContractSymbols: SymbolSettingV3[]; - usdcContractSymbols: SymbolSettingV3[]; -} - -export interface RiskUnitResponseV3 { - riskUnitId: string[]; + usdtContractSymbols: LoanSymbolSettingV3[]; + coinContractSymbols: LoanSymbolSettingV3[]; + usdcContractSymbols: LoanSymbolSettingV3[]; } export interface RepaidHistoryItemV3 { @@ -34,7 +30,7 @@ export interface RepaidHistoryItemV3 { repayInterest: string; } -export interface ProductInfosResponseV3 { +export interface LoanProductInfoV3 { productId: string; leverage: string; supportUsdtContract: 'YES' | 'NO'; @@ -70,11 +66,6 @@ export interface CoinInfoV3 { maxConvertValue: string; } -export interface EnsureCoinsResponseV3 { - productId: string; - coinInfo: CoinInfoV3[]; -} - export interface BindUidResponseV3 { riskUnitId: string; uid: string; diff --git a/src/types/response/v3/strategy.ts b/src/types/response/v3/strategy.ts index c19e739..8fc8b1b 100644 --- a/src/types/response/v3/strategy.ts +++ b/src/types/response/v3/strategy.ts @@ -26,8 +26,3 @@ export interface StrategyOrderV3 { createdTime: string; updatedTime: string; } - -export interface GetHistoryStrategyOrdersResponseV3 { - list: StrategyOrderV3[]; - cursor?: string; -} diff --git a/src/types/response/v3/trade.ts b/src/types/response/v3/trade.ts index 5c7e415..741982f 100644 --- a/src/types/response/v3/trade.ts +++ b/src/types/response/v3/trade.ts @@ -91,11 +91,6 @@ export interface FillV3 { updatedTime: string; } -export interface GetFillsResponseV3 { - list: FillV3[]; - cursor: string; -} - export interface UnfilledOrderV3 { orderId: string; clientOid: string; @@ -120,11 +115,6 @@ export interface UnfilledOrderV3 { updatedTime: string; } -export interface GetUnfilledOrdersResponseV3 { - list: UnfilledOrderV3[]; - cursor: string; -} - export interface HistoryOrderV3 { orderId: string; clientOid: string; @@ -151,11 +141,6 @@ export interface HistoryOrderV3 { updatedTime: string; } -export interface GetHistoryOrdersResponseV3 { - list: HistoryOrderV3[]; - cursor: string; -} - export interface PositionHistoryV3 { positionId: string; category: string; @@ -177,11 +162,6 @@ export interface PositionHistoryV3 { updatedTime: string; } -export interface GetPositionHistoryResponseV3 { - list: PositionHistoryV3[]; - cursor: string; -} - export interface CurrentPositionV3 { category: string; symbol: string; @@ -210,10 +190,6 @@ export interface CurrentPositionV3 { updatedTime: string; } -export interface GetCurrentPositionResponseV3 { - list: CurrentPositionV3[]; -} - export interface ModifyOrderResponseV3 { orderId: string; clientOid: string; From 503e50bec13f392a4f2eef9ff2f46949955e31d3 Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Tue, 15 Jul 2025 16:36:55 +0100 Subject: [PATCH 15/57] feat(): bulk upgrades to bring BaseWSClient to latest standard --- src/types/websockets/index.ts | 5 +- src/types/websockets/ws-api.ts | 13 + .../websockets/{events.ts => ws-events.ts} | 15 + .../websockets/{client.ts => ws-general.ts} | 27 +- src/util/BaseRestClient.ts | 7 +- src/util/BaseWSClient.ts | 1089 +++++++++++++---- src/util/WsStore.types.ts | 1 + src/util/browser-support.ts | 11 +- src/util/index.ts | 1 + src/util/node-support.ts | 59 +- src/util/webCryptoAPI.ts | 157 +++ src/util/websocket-util.ts | 53 + src/websocket-client-legacy-v1.ts | 7 +- src/websocket-client-v2.ts | 419 ++++++- 14 files changed, 1579 insertions(+), 285 deletions(-) create mode 100644 src/types/websockets/ws-api.ts rename src/types/websockets/{events.ts => ws-events.ts} (82%) rename src/types/websockets/{client.ts => ws-general.ts} (85%) create mode 100644 src/util/webCryptoAPI.ts diff --git a/src/types/websockets/index.ts b/src/types/websockets/index.ts index a22218e..caf148a 100644 --- a/src/types/websockets/index.ts +++ b/src/types/websockets/index.ts @@ -1,2 +1,3 @@ -export * from './client'; -export * from './events'; +export * from './ws-api'; +export * from './ws-events'; +export * from './ws-general'; diff --git a/src/types/websockets/ws-api.ts b/src/types/websockets/ws-api.ts new file mode 100644 index 0000000..557505c --- /dev/null +++ b/src/types/websockets/ws-api.ts @@ -0,0 +1,13 @@ +export type WsOperation = 'subscribe' | 'unsubscribe' | 'login'; + +export interface WsOperationLoginParams { + apiKey: string; + passphrase: string; + timestamp: number; + sign: string; +} + +export interface WsRequestOperationBitget { + op: WsOperation; + args?: (TWSRequestArg | string | number)[]; +} diff --git a/src/types/websockets/events.ts b/src/types/websockets/ws-events.ts similarity index 82% rename from src/types/websockets/events.ts rename to src/types/websockets/ws-events.ts index 1b1107e..05a4624 100644 --- a/src/types/websockets/events.ts +++ b/src/types/websockets/ws-events.ts @@ -1,3 +1,18 @@ +export interface MessageEventLike { + target: WebSocket; + type: 'message'; + data: string; +} + +export function isMessageEvent(msg: unknown): msg is MessageEventLike { + if (typeof msg !== 'object' || !msg) { + return false; + } + + const message = msg as MessageEventLike; + return message['type'] === 'message' && typeof message['data'] === 'string'; +} + export interface WsBaseEvent { action: TAction; arg: unknown; diff --git a/src/types/websockets/client.ts b/src/types/websockets/ws-general.ts similarity index 85% rename from src/types/websockets/client.ts rename to src/types/websockets/ws-general.ts index f0d5bac..eb3913f 100644 --- a/src/types/websockets/client.ts +++ b/src/types/websockets/ws-general.ts @@ -1,4 +1,4 @@ -import { WS_KEY_MAP } from '../../util'; +import { RestClientOptions, WS_KEY_MAP } from '../../util'; import { FuturesProductTypeV2 } from '../request'; /** A "topic" is always a string */ @@ -143,6 +143,12 @@ export interface WSClientConfigurableOptions { /** The passphrase you set when creating the API Key (NOT your account password) */ apiPass?: string; + /** Define a recv window when preparing a private websocket signature. This is in milliseconds, so 5000 == 5 seconds */ + recvWindow?: number; + + // Disable ping/pong ws heartbeat mechanism (not recommended) // TODO: + disableHeartbeat?: boolean; + /** How often to check if the connection is alive */ pingInterval?: number; @@ -152,15 +158,22 @@ export interface WSClientConfigurableOptions { /** Delay in milliseconds before respawning the connection */ reconnectTimeout?: number; - requestOptions?: { - /** override the user agent when opening the websocket connection (some proxies use this) */ - agent?: string; + requestOptions?: RestClientOptions; + + wsOptions?: { + protocols?: string[]; + agent?: any; }; wsUrl?: string; - /** Define a recv window when preparing a private websocket signature. This is in milliseconds, so 5000 == 5 seconds */ - recvWindow?: number; + // TODO: + /** + * Allows you to provide a custom "signMessage" function, e.g. to use node's much faster createHmac method + * + * Look in the examples folder for a demonstration on using node's createHmac instead. + */ + customSignMessageFn?: (message: string, secret: string) => Promise; } export interface WebsocketClientOptions extends WSClientConfigurableOptions { @@ -168,4 +181,6 @@ export interface WebsocketClientOptions extends WSClientConfigurableOptions { pongTimeout: number; reconnectTimeout: number; recvWindow: number; + authPrivateConnectionsOnConnect: boolean; + authPrivateRequests: boolean; } diff --git a/src/util/BaseRestClient.ts b/src/util/BaseRestClient.ts index 20c3710..9bd41d9 100644 --- a/src/util/BaseRestClient.ts +++ b/src/util/BaseRestClient.ts @@ -303,7 +303,12 @@ export default abstract class BaseRestClient { // console.log('sign params: ', paramsStr); - res.sign = await signMessage(paramsStr, this.apiSecret, 'base64'); + res.sign = await signMessage( + paramsStr, + this.apiSecret, + 'base64', + 'SHA-256', + ); res.queryParamsWithSign = signRequestParams; return res; } diff --git a/src/util/BaseWSClient.ts b/src/util/BaseWSClient.ts index 4a3963e..a09b972 100644 --- a/src/util/BaseWSClient.ts +++ b/src/util/BaseWSClient.ts @@ -3,30 +3,56 @@ import EventEmitter from 'events'; import WebSocket from 'isomorphic-ws'; import { + isMessageEvent, + MessageEventLike, WebsocketClientOptions, WSClientConfigurableOptions, -} from '../types/index'; + WsOperation, +} from '../types'; import { DefaultLogger } from './logger'; import { isWsPong } from './requestUtils'; -import { getWsAuthSignature, safeTerminateWs } from './websocket-util'; +import { + getNormalisedTopicRequests, + safeTerminateWs, + WS_LOGGER_CATEGORY, + WsTopicRequest, + WsTopicRequestOrStringTopic, +} from './websocket-util'; import WsStore from './WsStore'; -import { WsConnectionStateEnum } from './WsStore.types'; +import { WSConnectedResult, WsConnectionStateEnum } from './WsStore.types'; interface WSClientEventMap { /** Connection opened. If this connection was previously opened and reconnected, expect the reconnected event instead */ - open: (evt: { wsKey: WsKey; event: any }) => void; + open: (evt: { + wsKey: WsKey; + event: any; + wsUrl: string; + ws: WebSocket; + }) => void; + /** Reconnecting a dropped connection */ reconnect: (evt: { wsKey: WsKey; event: any }) => void; + /** Successfully reconnected a connection that dropped */ - reconnected: (evt: { wsKey: WsKey; event: any }) => void; + reconnected: (evt: { + wsKey: WsKey; + event: any; + wsUrl: string; + ws: WebSocket; + }) => void; + /** Connection closed */ close: (evt: { wsKey: WsKey; event: any }) => void; + /** Received reply to websocket command (e.g. after subscribing to topics) */ response: (response: any & { wsKey: WsKey }) => void; + /** Received data for topic */ update: (response: any & { wsKey: WsKey }) => void; + /** Exception from ws client OR custom listeners (e.g. if you throw inside your event handler) */ exception: (response: any & { wsKey: WsKey }) => void; + /** Confirmation that a connection successfully authenticated */ authenticated: (event: { wsKey: WsKey; event: any }) => void; } @@ -35,7 +61,7 @@ interface WSClientEventMap { export interface BaseWebsocketClient< TWSKey extends string, // eslint-disable-next-line @typescript-eslint/no-unused-vars - TWSTopicSubscribeEventArgs extends object, + TWSRequestEvent extends object, > { on>( event: U, @@ -48,25 +74,96 @@ export interface BaseWebsocketClient< ): boolean; } -const LOGGER_CATEGORY = { category: 'bitget-ws' }; - export interface EmittableEvent { eventType: 'response' | 'update' | 'exception' | 'authenticated'; event: TEvent; isWSAPIResponse?: boolean; } +/** + * Appends wsKey and isWSAPIResponse to all events. + * Some events are arrays, this handles that nested scenario too. + */ +function getFinalEmittable( + emittable: EmittableEvent | EmittableEvent[], + wsKey: any, + isWSAPIResponse?: boolean, +): any { + if (Array.isArray(emittable)) { + return emittable.map((subEvent) => + getFinalEmittable(subEvent, wsKey, isWSAPIResponse), + ); + } + + if (Array.isArray(emittable.event)) { + // Some topics just emit an array. + // This is consistent with how it was before the WS API upgrade: + return emittable.event.map((subEvent) => + getFinalEmittable(subEvent, wsKey, isWSAPIResponse), + ); + + // const { event, ...others } = emittable; + // return { + // ...others, + // event: event.map((subEvent) => + // getFinalEmittable(subEvent, wsKey, isWSAPIResponse), + // ), + // }; + } + + if (emittable.event) { + return { + ...emittable.event, + wsKey: wsKey, + isWSAPIResponse: !!isWSAPIResponse, + }; + } + + return { + ...emittable, + wsKey: wsKey, + isWSAPIResponse: !!isWSAPIResponse, + }; +} + +/** + * A midflight WS request event (e.g. subscribe to these topics). + * + * - requestKey: unique identifier for this request, if available. Can be anything as a string. + * - requestEvent: the raw request, as an object, that will be sent on the ws connection. This may contain multiple topics/requests in one object, if the exchange supports it. + */ +export interface MidflightWsRequestEvent { + requestKey: string; + requestEvent: TEvent; +} + export abstract class BaseWebsocketClient< TWSKey extends string, - TWSTopicSubscribeEventArgs extends object, + TWSRequestEvent extends object, > extends EventEmitter { - private wsStore: WsStore; + // TODO: the stored structure changed! Check it! + /** + * State store to track a list of topics (topic requests) we are expected to be subscribed to if reconnected + */ + private wsStore: WsStore>; protected logger: DefaultLogger; protected options: WebsocketClientOptions; - constructor(options: WSClientConfigurableOptions, logger?: DefaultLogger) { + private wsApiRequestId: number = 0; + + private timeOffsetMs: number = 0; + + /** + * { [wsKey]: { [requestId]: request } } + */ + private midflightRequestCache: Record< + string, + Record + > = {}; + + constructor(options?: WSClientConfigurableOptions, logger?: DefaultLogger) { super(); this.logger = logger || DefaultLogger; @@ -77,117 +174,252 @@ export abstract class BaseWebsocketClient< pingInterval: 10000, reconnectTimeout: 500, recvWindow: 0, + + // Automatically send an authentication op/request after a connection opens, for private connections. + authPrivateConnectionsOnConnect: true, + // Individual requests do not require a signature, so this is disabled. + authPrivateRequests: false, // TODO: + ...options, }; } - protected abstract getWsKeyForTopic( - subscribeEvent: TWSTopicSubscribeEventArgs, - isPrivate?: boolean, - ): TWSKey; + /** + * Return true if this wsKey connection should automatically authenticate immediately after connecting + */ + protected abstract isAuthOnConnectWsKey(wsKey: TWSKey): boolean; - protected abstract isPrivateChannel( - subscribeEvent: TWSTopicSubscribeEventArgs, + protected abstract isCustomReconnectionNeeded(wsKey: TWSKey): boolean; + + protected abstract triggerCustomReconnectionWorkflow( + wsKey: TWSKey, + ): Promise; + + protected abstract sendPingEvent(wsKey: TWSKey, ws: WebSocket): void; + + protected abstract sendPongEvent(wsKey: TWSKey, ws: WebSocket): void; + + protected abstract isWsPing(data: any): boolean; + + protected abstract isWsPong(data: any): boolean; + + protected abstract getWsAuthRequestEvent(wsKey: TWSKey): Promise; + + protected abstract isPrivateTopicRequest( + request: WsTopicRequest, + wsKey: TWSKey, ): boolean; - protected abstract shouldAuthOnConnect(wsKey: TWSKey): boolean; + protected abstract getPrivateWSKeys(): TWSKey[]; - protected abstract getWsUrl(wsKey: TWSKey): string; + protected abstract getWsUrl(wsKey: TWSKey): Promise; protected abstract getMaxTopicsPerSubscribeEvent( wsKey: TWSKey, ): number | null; /** - * Request connection of all dependent (public & private) websockets, instead of waiting for automatic connection by library + * @returns one or more correctly structured request events for performing a operations over WS. This can vary per exchange spec. */ - abstract connectAll(): Promise[]; + protected abstract getWsRequestEvents( + operation: WsOperation, + requests: WsTopicRequest[], + wsKey: TWSKey, + ): Promise[]>; /** - * Subscribe to topics & track/persist them. They will be automatically resubscribed to if the connection drops/reconnects. - * @param wsTopics topic or list of topics - * @param isPrivateTopic optional - the library will try to detect private topics, you can use this to mark a topic as private (if the topic isn't recognised yet) + * Abstraction called to sort ws events into emittable event types (response to a request, data update, etc) */ - public subscribe( - wsTopics: TWSTopicSubscribeEventArgs[] | TWSTopicSubscribeEventArgs, - isPrivateTopic?: boolean, - ) { - const topics = Array.isArray(wsTopics) ? wsTopics : [wsTopics]; + protected abstract resolveEmittableEvents( + wsKey: TWSKey, + event: MessageEventLike, + ): EmittableEvent[]; - topics.forEach((topic) => { - const wsKey = this.getWsKeyForTopic(topic, isPrivateTopic); + /** + * Request connection of all dependent (public & private) websockets, instead of waiting for automatic connection by library + * + * // TODO: breaking change, and check that any calls to this anticipate connected result (was WS) + */ + protected abstract connectAll(): Promise[]; - // Persist this topic to the expected topics list - this.wsStore.addTopic(wsKey, topic); + protected isPrivateWsKey(wsKey: TWSKey): boolean { + return this.getPrivateWSKeys().includes(wsKey); + } - // TODO: tidy up unsubscribe too, also in other connectors + /** Returns auto-incrementing request ID, used to track promise references for async requests */ + protected getNewRequestId(): number { + return ++this.wsApiRequestId; + } - // if connected, send subscription request - if ( - this.wsStore.isConnectionState(wsKey, WsConnectionStateEnum.CONNECTED) - ) { - // if not authenticated, dont sub to private topics yet. - // This'll happen automatically once authenticated - const isAuthenticated = this.wsStore.get(wsKey)?.isAuthenticated; - if (!isAuthenticated) { - return this.requestSubscribeTopics( - wsKey, - topics.filter((topic) => !this.isPrivateChannel(topic)), - ); - } - return this.requestSubscribeTopics(wsKey, topics); - } + protected abstract sendWSAPIRequest( + wsKey: TWSKey, + channel: string, + params?: any, + ): Promise; - // start connection process if it hasn't yet begun. Topics are automatically subscribed to on-connect - if ( - !this.wsStore.isConnectionState( - wsKey, - WsConnectionStateEnum.CONNECTING, - ) && - !this.wsStore.isConnectionState( - wsKey, - WsConnectionStateEnum.RECONNECTING, - ) - ) { - return this.connect(wsKey); - } - }); + protected abstract sendWSAPIRequest( + wsKey: TWSKey, + channel: string, + params: any, + ): Promise; + + public getTimeOffsetMs() { + return this.timeOffsetMs; + } + + public setTimeOffsetMs(newOffset: number) { + this.timeOffsetMs = newOffset; } /** - * Unsubscribe from topics & remove them from memory. They won't be re-subscribed to if the connection reconnects. - * @param wsTopics topic or list of topics - * @param isPrivateTopic optional - the library will try to detect private topics, you can use this to mark a topic as private (if the topic isn't recognised yet) + * Don't call directly! Use subscribe() instead! + * + * Subscribe to one or more topics on a WS connection (identified by WS Key). + * + * - Topics are automatically cached + * - Connections are automatically opened, if not yet connected + * - Authentication is automatically handled + * - Topics are automatically resubscribed to, if something happens to the connection, unless you call unsubsribeTopicsForWsKey(topics, key). + * + * @param wsRequests array of topics to subscribe to + * @param wsKey ws key referring to the ws connection these topics should be subscribed on */ - public unsubscribe( - wsTopics: TWSTopicSubscribeEventArgs[] | TWSTopicSubscribeEventArgs, - isPrivateTopic?: boolean, - ) { - const topics = Array.isArray(wsTopics) ? wsTopics : [wsTopics]; - topics.forEach((topic) => { - this.wsStore.deleteTopic( - this.getWsKeyForTopic(topic, isPrivateTopic), - topic, + protected async subscribeTopicsForWsKey( + wsTopicRequests: WsTopicRequestOrStringTopic[], + wsKey: TWSKey, + ): Promise { + const normalisedTopicRequests = getNormalisedTopicRequests(wsTopicRequests); + + // Store topics, so future automation (post-auth, post-reconnect) has everything needed to resubscribe automatically + for (const topic of normalisedTopicRequests) { + this.wsStore.addTopic(wsKey, topic); + } + + const isConnected = this.wsStore.isConnectionState( + wsKey, + WsConnectionStateEnum.CONNECTED, + ); + + const isConnectionInProgress = + this.wsStore.isConnectionAttemptInProgress(wsKey); + + // start connection process if it hasn't yet begun. Topics are automatically subscribed to on-connect + if (!isConnected && !isConnectionInProgress) { + return this.connect(wsKey); + } + + // Subscribe should happen automatically once connected, nothing to do here after topics are added to wsStore. + if (!isConnected) { + /** + * Are we in the process of connection? Nothing to send yet. + */ + this.logger.trace( + 'WS not connected - requests queued for retry once connected.', + { + ...WS_LOGGER_CATEGORY, + wsKey, + wsTopicRequests, + }, ); + return isConnectionInProgress; + } - const wsKey = this.getWsKeyForTopic(topic, isPrivateTopic); + // We're connected. Check if auth is needed and if already authenticated + const isPrivateConnection = this.isPrivateWsKey(wsKey); + const isAuthenticated = this.wsStore.get(wsKey)?.isAuthenticated; + if (isPrivateConnection && !isAuthenticated) { + /** + * If not authenticated yet and auth is required, don't request topics yet. + * + * Auth should already automatically be in progress, so no action needed from here. Topics will automatically subscribe post-auth success. + */ + return false; + } - // unsubscribe request only necessary if active connection exists - if ( - this.wsStore.isConnectionState(wsKey, WsConnectionStateEnum.CONNECTED) - ) { - this.requestUnsubscribeTopics(wsKey, [topic]); + // Finally, request subscription to topics if the connection is healthy and ready + return this.requestSubscribeTopics(wsKey, normalisedTopicRequests); + } + + protected async unsubscribeTopicsForWsKey( + wsTopicRequests: WsTopicRequestOrStringTopic[], + wsKey: TWSKey, + ): Promise { + const normalisedTopicRequests = getNormalisedTopicRequests(wsTopicRequests); + + // Store topics, so future automation (post-auth, post-reconnect) has everything needed to resubscribe automatically + for (const topic of normalisedTopicRequests) { + this.wsStore.deleteTopic(wsKey, topic); + } + + const isConnected = this.wsStore.isConnectionState( + wsKey, + WsConnectionStateEnum.CONNECTED, + ); + + // If not connected, don't need to do anything. + // Removing the topic from the store is enough to stop it from being resubscribed to on reconnect. + if (!isConnected) { + return; + } + + // We're connected. Check if auth is needed and if already authenticated + const isPrivateConnection = this.isPrivateWsKey(wsKey); + const isAuthenticated = this.wsStore.get(wsKey)?.isAuthenticated; + if (isPrivateConnection && !isAuthenticated) { + /** + * If not authenticated yet and auth is required, don't need to do anything. + * We don't subscribe to topics until auth is complete anyway. + */ + return; + } + + // Finally, request subscription to topics if the connection is healthy and ready + return this.requestUnsubscribeTopics(wsKey, normalisedTopicRequests); + } + + /** + * Splits topic requests into two groups, public & private topic requests + */ + private sortTopicRequestsIntoPublicPrivate( + wsTopicRequests: WsTopicRequest[], + wsKey: TWSKey, + ): { + publicReqs: WsTopicRequest[]; + privateReqs: WsTopicRequest[]; + } { + const publicTopicRequests: WsTopicRequest[] = []; + const privateTopicRequests: WsTopicRequest[] = []; + + for (const topic of wsTopicRequests) { + if (this.isPrivateTopicRequest(topic, wsKey)) { + privateTopicRequests.push(topic); + } else { + publicTopicRequests.push(topic); } - }); + } + + return { + publicReqs: publicTopicRequests, + privateReqs: privateTopicRequests, + }; } + protected abstract getWsKeyForTopic( + subscribeEvent: WsTopicRequest, // TWSTopicSubscribeEventArgs == WsTopicRequest now + isPrivate?: boolean, + ): TWSKey; + + protected abstract isPrivateChannel( + subscribeEvent: WsTopicRequest, + ): boolean; + /** Get the WsStore that tracks websockets & topics */ - public getWsStore(): WsStore { + public getWsStore(): WsStore> { return this.wsStore; } public close(wsKey: TWSKey, force?: boolean) { - this.logger.info('Closing connection', { ...LOGGER_CATEGORY, wsKey }); + this.logger.info('Closing connection', { ...WS_LOGGER_CATEGORY, wsKey }); this.setWsState(wsKey, WsConnectionStateEnum.CLOSING); this.clearTimers(wsKey); @@ -199,22 +431,36 @@ export abstract class BaseWebsocketClient< } public closeAll(force?: boolean) { - this.wsStore.getKeys().forEach((key: TWSKey) => { + const keys = this.wsStore.getKeys(); + + this.logger.info(`Closing all ws connections: ${keys}`); + keys.forEach((key: TWSKey) => { this.close(key, force); }); } + public isConnected(wsKey: TWSKey): boolean { + return this.wsStore.isConnectionState( + wsKey, + WsConnectionStateEnum.CONNECTED, + ); + } + /** * Request connection to a specific websocket, instead of waiting for automatic connection. */ - protected async connect(wsKey: TWSKey): Promise { + public async connect( + wsKey: TWSKey, + customUrl?: string | undefined, + throwOnError?: boolean, + ): Promise { try { if (this.wsStore.isWsOpen(wsKey)) { this.logger.error( 'Refused to connect to ws with existing active connection', - { ...LOGGER_CATEGORY, wsKey }, + { ...WS_LOGGER_CATEGORY, wsKey }, ); - return this.wsStore.getWs(wsKey); + return { wsKey, ws: this.wsStore.getWs(wsKey) }; } if ( @@ -222,9 +468,9 @@ export abstract class BaseWebsocketClient< ) { this.logger.error( 'Refused to connect to ws, connection attempt already active', - { ...LOGGER_CATEGORY, wsKey }, + { ...WS_LOGGER_CATEGORY, wsKey }, ); - return; + return this.wsStore.getConnectionInProgressPromise(wsKey)?.promise; } if ( @@ -234,14 +480,53 @@ export abstract class BaseWebsocketClient< this.setWsState(wsKey, WsConnectionStateEnum.CONNECTING); } - const url = this.getWsUrl(wsKey); // + authParams; + if (!this.wsStore.getConnectionInProgressPromise(wsKey)) { + this.wsStore.createConnectionInProgressPromise(wsKey, false); + } + + const url = customUrl || (await this.getWsUrl(wsKey)); const ws = this.connectToWsUrl(url, wsKey); - return this.wsStore.setWs(wsKey, ws); + this.wsStore.setWs(wsKey, ws); } catch (err) { this.parseWsError('Connection failed', err, wsKey); this.reconnectWithDelay(wsKey, this.options.reconnectTimeout!); + + if (throwOnError) { + throw err; + } } + return this.wsStore.getConnectionInProgressPromise(wsKey)?.promise; + } + + private connectToWsUrl(url: string, wsKey: TWSKey): WebSocket { + this.logger.trace(`Opening WS connection to URL: ${url}`, { + ...WS_LOGGER_CATEGORY, + wsKey, + }); + + const { protocols = [], ...wsOptions } = this.options.wsOptions || {}; + const ws = new WebSocket(url, protocols, wsOptions); + + ws.onopen = (event) => this.onWsOpen(event, wsKey, url, ws); + ws.onmessage = (event) => this.onWsMessageLegacy(event, wsKey, ws); + ws.onerror = (event) => + this.parseWsError('Websocket onWsError', event, wsKey); + ws.onclose = (event) => this.onWsClose(event, wsKey); + + // Native ws ping/pong frames are not in use for bitget + // if (typeof ws.on === 'function') { + // ws.on('ping', (event) => this.onWsPing(event, wsKey, ws, 'event')); + // ws.on('pong', (event) => this.onWsPong(event, wsKey, 'event')); + // } + + // // Not sure these work in the browser, the traditional event listeners are required for ping/pong frames in node + // ws.onping = (event) => this.onWsPing(event, wsKey, ws, 'function'); + // ws.onpong = (event) => this.onWsPong(event, wsKey, 'function'); + + ws.wsKey = wsKey; + + return ws; } private parseWsError(context: string, error: any, wsKey: TWSKey) { @@ -255,7 +540,7 @@ export abstract class BaseWebsocketClient< switch (error.message) { case 'Unexpected server response: 401': this.logger.error(`${context} due to 401 authorization failure.`, { - ...LOGGER_CATEGORY, + ...WS_LOGGER_CATEGORY, wsKey, }); break; @@ -265,7 +550,7 @@ export abstract class BaseWebsocketClient< `${context} due to unexpected response error: "${ error?.msg || error?.message || error }"`, - { ...LOGGER_CATEGORY, wsKey, error }, + { ...WS_LOGGER_CATEGORY, wsKey, error }, ); break; } @@ -275,38 +560,28 @@ export abstract class BaseWebsocketClient< } /** Get a signature, build the auth request and send it */ - private async sendAuthRequest(wsKey: TWSKey): Promise { + private async sendAuthRequest(wsKey: TWSKey): Promise { try { - const { apiKey, apiSecret, apiPass, recvWindow } = this.options; - - const { signature, expiresAt } = await getWsAuthSignature( - apiKey, - apiSecret, - apiPass, - recvWindow, - ); - - this.logger.info('Sending auth request...', { - ...LOGGER_CATEGORY, + this.logger.trace('Sending auth request...', { + ...WS_LOGGER_CATEGORY, wsKey, }); - const request = { - op: 'login', - args: [ - { - apiKey: this.options.apiKey, - passphrase: this.options.apiPass, - timestamp: expiresAt, - sign: signature, - }, - ], - }; + await this.assertIsConnected(wsKey); + + if (!this.wsStore.getAuthenticationInProgressPromise(wsKey)) { + this.wsStore.createAuthenticationInProgressPromise(wsKey, false); + } + + const request = await this.getWsAuthRequestEvent(wsKey); + // console.log('ws auth req', request); - return this.tryWsSend(wsKey, JSON.stringify(request)); + this.tryWsSend(wsKey, JSON.stringify(request)); + + return this.wsStore.getAuthenticationInProgressPromise(wsKey)?.promise; } catch (e) { - this.logger.trace(e, { ...LOGGER_CATEGORY, wsKey }); + this.logger.trace(e, { ...WS_LOGGER_CATEGORY, wsKey }); } } @@ -321,7 +596,7 @@ export abstract class BaseWebsocketClient< this.wsStore.get(wsKey, true).activeReconnectTimer = setTimeout(() => { this.logger.info('Reconnecting to websocket', { - ...LOGGER_CATEGORY, + ...WS_LOGGER_CATEGORY, wsKey, }); this.connect(wsKey); @@ -335,12 +610,12 @@ export abstract class BaseWebsocketClient< this.clearPongTimer(wsKey); - this.logger.trace('Sending ping', { ...LOGGER_CATEGORY, wsKey }); + this.logger.trace('Sending ping', { ...WS_LOGGER_CATEGORY, wsKey }); this.tryWsSend(wsKey, 'ping'); this.wsStore.get(wsKey, true).activePongTimer = setTimeout(() => { this.logger.info('Pong timeout - closing socket to reconnect', { - ...LOGGER_CATEGORY, + ...WS_LOGGER_CATEGORY, wsKey, }); safeTerminateWs(this.getWs(wsKey), true); @@ -376,79 +651,166 @@ export abstract class BaseWebsocketClient< } /** - * @private Use the `subscribe(topics)` method to subscribe to topics. Send WS message to subscribe to topics. + * Returns a list of string events that can be individually sent upstream to complete subscribing/unsubscribing/etc to these topics + * + * If events are an object, these should be stringified (`return JSON.stringify(event);`) + * Each event returned by this will be sent one at a time + * + * Events are automatically split into smaller batches, by this method, if needed. */ - private requestSubscribeTopics( + protected async getWsOperationEventsForTopics( + topics: WsTopicRequest[], wsKey: TWSKey, - topics: TWSTopicSubscribeEventArgs[], - ) { + operation: WsOperation, + ): Promise[]> { if (!topics.length) { - return; + return []; } + // Events that are ready to send (usually stringified JSON) + const requestEvents: MidflightWsRequestEvent[] = []; + const maxTopicsPerEvent = this.getMaxTopicsPerSubscribeEvent(wsKey); - if (maxTopicsPerEvent && topics.length > maxTopicsPerEvent) { - this.logger.trace( - `Subscribing to topics in batches of ${maxTopicsPerEvent}`, - ); + if ( + maxTopicsPerEvent && + maxTopicsPerEvent !== null && + topics.length > maxTopicsPerEvent + ) { for (let i = 0; i < topics.length; i += maxTopicsPerEvent) { const batch = topics.slice(i, i + maxTopicsPerEvent); - this.logger.trace(`Subscribing to batch of ${batch.length}`); - this.requestSubscribeTopics(wsKey, batch); + const subscribeRequestEvents = await this.getWsRequestEvents( + operation, + batch, + wsKey, + ); + + requestEvents.push(...subscribeRequestEvents); } - this.logger.trace( - `Finished batch subscribing to ${topics.length} topics`, - ); - return; + + return requestEvents; } - const wsMessage = JSON.stringify({ - op: 'subscribe', - args: topics, - }); + const subscribeRequestEvents = await this.getWsRequestEvents( + operation, + topics, + wsKey, + ); - this.tryWsSend(wsKey, wsMessage); + return subscribeRequestEvents; } /** - * @private Use the `unsubscribe(topics)` method to unsubscribe from topics. Send WS message to unsubscribe from topics. + * @private Use the `subscribe(topics)` method to subscribe to topics. Send WS message to subscribe to topics. */ - private requestUnsubscribeTopics( + private async requestSubscribeTopics( wsKey: TWSKey, - topics: TWSTopicSubscribeEventArgs[], + wsTopicRequests: WsTopicRequest[], ) { - if (!topics.length) { + if (!wsTopicRequests.length) { return; } - const maxTopicsPerEvent = this.getMaxTopicsPerSubscribeEvent(wsKey); - if (maxTopicsPerEvent && topics.length > maxTopicsPerEvent) { - this.logger.trace( - `Unsubscribing to topics in batches of ${maxTopicsPerEvent}`, - ); - for (let i = 0; i < topics.length; i += maxTopicsPerEvent) { - const batch = topics.slice(i, i + maxTopicsPerEvent); - this.logger.trace(`Unsubscribing to batch of ${batch.length}`); - this.requestUnsubscribeTopics(wsKey, batch); + // Automatically splits requests into smaller batches, if needed + const subscribeWsMessages = await this.getWsOperationEventsForTopics( + wsTopicRequests, + wsKey, + 'subscribe', + ); + + this.logger.trace( + `Subscribing to ${wsTopicRequests.length} "${wsKey}" topics in ${subscribeWsMessages.length} batches.`, // Events: "${JSON.stringify(topics)}" + ); + + // console.log(`batches: `, JSON.stringify(subscribeWsMessages, null, 2)); + + for (const midflightRequest of subscribeWsMessages) { + const wsMessage = midflightRequest.requestEvent; + + if (!this.midflightRequestCache[wsKey]) { + this.midflightRequestCache[wsKey] = {}; } + + // Cache the request for this call, so we can enrich the response with request info + this.midflightRequestCache[wsKey][midflightRequest.requestKey] = + midflightRequest.requestEvent; + this.logger.trace( - `Finished batch unsubscribing to ${topics.length} topics`, + `Sending batch via message: "${JSON.stringify(wsMessage)}", cached with key "${midflightRequest.requestKey}"`, ); + + try { + this.tryWsSend(wsKey, JSON.stringify(wsMessage), true); + // eslint-disable-next-line @typescript-eslint/no-unused-vars + } catch (e) { + delete this.midflightRequestCache[wsKey][midflightRequest.requestKey]; + } + } + + // const wsMessage = JSON.stringify({ + // op: 'subscribe', + // args: wsTopicRequests, + // }); + } + + /** + * @private Use the `unsubscribe(topics)` method to unsubscribe from topics. Send WS message to unsubscribe from topics. + */ + private async requestUnsubscribeTopics( + wsKey: TWSKey, + wsTopicRequests: WsTopicRequest[], + ) { + if (!wsTopicRequests.length) { return; } - const wsMessage = JSON.stringify({ - op: 'unsubscribe', - args: topics, - }); + const subscribeWsMessages = await this.getWsOperationEventsForTopics( + wsTopicRequests, + wsKey, + 'unsubscribe', + ); + + this.logger.trace( + `Unsubscribing to ${wsTopicRequests.length} "${wsKey}" topics in ${subscribeWsMessages.length} batches. Events: "${JSON.stringify(wsTopicRequests)}"`, + ); + + for (const midflightRequest of subscribeWsMessages) { + const wsMessage = midflightRequest.requestEvent; + + if (!this.midflightRequestCache[wsKey]) { + this.midflightRequestCache[wsKey] = {}; + } + + // Cache the request for this call, so we can enrich the response with request info + this.midflightRequestCache[wsKey][midflightRequest.requestKey] = + midflightRequest.requestEvent; + + this.logger.trace(`Sending batch via message: "${wsMessage}"`); + try { + this.tryWsSend(wsKey, JSON.stringify(wsMessage)); + // eslint-disable-next-line @typescript-eslint/no-unused-vars + } catch (e) { + delete this.midflightRequestCache[wsKey][midflightRequest.requestKey]; + } + } + + this.logger.trace( + `Finished unsubscribing to ${wsTopicRequests.length} "${wsKey}" topics in ${subscribeWsMessages.length} batches.`, + ); - this.tryWsSend(wsKey, wsMessage); + // const wsMessage = JSON.stringify({ + // op: 'unsubscribe', + // args: wsTopicRequests, + // }); } - public tryWsSend(wsKey: TWSKey, wsMessage: string) { + public tryWsSend( + wsKey: TWSKey, + wsMessage: string, + throwExceptions?: boolean, + ) { try { this.logger.trace('Sending upstream ws message: ', { - ...LOGGER_CATEGORY, + ...WS_LOGGER_CATEGORY, wsMessage, wsKey, }); @@ -466,105 +828,179 @@ export abstract class BaseWebsocketClient< ws.send(wsMessage); } catch (e) { this.logger.error('Failed to send WS message', { - ...LOGGER_CATEGORY, + ...WS_LOGGER_CATEGORY, wsMessage, wsKey, exception: e, }); + if (throwExceptions) { + throw e; + } } } - private connectToWsUrl(url: string, wsKey: TWSKey): WebSocket { - this.logger.trace(`Opening WS connection to URL: ${url}`, { - ...LOGGER_CATEGORY, + private async onWsOpen(event, wsKey: TWSKey, url: string, ws: WebSocket) { + const isFreshConnectionAttempt = this.wsStore.isConnectionState( wsKey, - }); - - const agent = this.options.requestOptions?.agent; - const ws = new WebSocket(url, undefined, agent ? { agent } : undefined); - ws.onopen = (event) => this.onWsOpen(event, wsKey); - ws.onmessage = (event) => this.onWsMessage(event, wsKey); - ws.onerror = (event) => this.parseWsError('websocket error', event, wsKey); - ws.onclose = (event) => this.onWsClose(event, wsKey); + WsConnectionStateEnum.CONNECTING, + ); - return ws; - } + const isReconnectionAttempt = this.wsStore.isConnectionState( + wsKey, + WsConnectionStateEnum.RECONNECTING, + ); - private async onWsOpen(event, wsKey: TWSKey) { - if ( - this.wsStore.isConnectionState(wsKey, WsConnectionStateEnum.CONNECTING) - ) { + if (isFreshConnectionAttempt) { this.logger.info('Websocket connected', { - ...LOGGER_CATEGORY, + ...WS_LOGGER_CATEGORY, wsKey, }); - this.emit('open', { wsKey, event }); - } else if ( - this.wsStore.isConnectionState(wsKey, WsConnectionStateEnum.RECONNECTING) - ) { - this.logger.info('Websocket reconnected', { ...LOGGER_CATEGORY, wsKey }); - this.emit('reconnected', { wsKey, event }); + this.emit('open', { wsKey, event, wsUrl: url, ws }); + } else if (isReconnectionAttempt) { + this.logger.info('Websocket reconnected', { + ...WS_LOGGER_CATEGORY, + wsKey, + }); + this.emit('reconnected', { wsKey, event, wsUrl: url, ws }); } this.setWsState(wsKey, WsConnectionStateEnum.CONNECTED); + this.logger.trace('Enabled ping timer', { ...WS_LOGGER_CATEGORY, wsKey }); + this.wsStore.get(wsKey, true)!.activePingTimer = setInterval( + () => this.ping(wsKey), + this.options.pingInterval, + ); + + // Resolve & cleanup deferred "connection attempt in progress" promise + try { + const connectionInProgressPromise = + this.wsStore.getConnectionInProgressPromise(wsKey); + if (connectionInProgressPromise?.resolve) { + connectionInProgressPromise.resolve({ + wsKey, + ws, + }); + } + } catch (e) { + this.logger.error( + 'Exception trying to resolve "connectionInProgress" promise', + e, + ); + } + + // Remove before continuing, in case there's more requests queued + this.wsStore.removeConnectingInProgressPromise(wsKey); + // Some websockets require an auth packet to be sent after opening the connection - if (this.shouldAuthOnConnect(wsKey)) { - await this.sendAuthRequest(wsKey); + if ( + this.isAuthOnConnectWsKey(wsKey) && + this.options.authPrivateConnectionsOnConnect + ) { + await this.assertIsAuthenticated(wsKey); } // Reconnect to topics known before it connected - // Private topics will be resubscribed to once reconnected - const topics = [...this.wsStore.getTopics(wsKey)]; - const publicTopics = topics.filter( - (topic) => !this.isPrivateChannel(topic), + const { privateReqs, publicReqs } = this.sortTopicRequestsIntoPublicPrivate( + [...this.wsStore.getTopics(wsKey)], + wsKey, ); - this.requestSubscribeTopics(wsKey, publicTopics); - this.wsStore.get(wsKey, true)!.activePingTimer = setInterval( - () => this.ping(wsKey), - this.options.pingInterval, - ); + // Request sub to public topics, if any + this.requestSubscribeTopics(wsKey, publicReqs); + + // Request sub to private topics, if auth on connect isn't needed + // Else, this is automatic after authentication is successfully confirmed + if (!this.options.authPrivateConnectionsOnConnect) { + this.requestSubscribeTopics(wsKey, privateReqs); + } } - /** Handle subscription to private topics _after_ authentication successfully completes asynchronously */ - private onWsAuthenticated(wsKey: TWSKey) { + /** + * Handle subscription to private topics _after_ authentication successfully completes asynchronously. + * + * Only used for exchanges that require auth before sending private topic subscription requests + */ + private onWsAuthenticated(wsKey: TWSKey, event: unknown) { const wsState = this.wsStore.get(wsKey, true); wsState.isAuthenticated = true; - const topics = [...this.wsStore.getTopics(wsKey)]; - const privateTopics = topics.filter((topic) => - this.isPrivateChannel(topic), - ); + // Resolve & cleanup deferred "auth attempt in progress" promise + try { + const inProgressPromise = + this.wsStore.getAuthenticationInProgressPromise(wsKey); - if (privateTopics.length) { - this.subscribe(privateTopics, true); + if (inProgressPromise?.resolve) { + inProgressPromise.resolve({ + wsKey, + event, + ws: wsState.ws, + }); + } + } catch (e) { + this.logger.error( + 'Exception trying to resolve "authenticationInProgress" promise', + e, + ); + } + + // Remove before continuing, in case there's more requests queued + this.wsStore.removeAuthenticationInProgressPromise(wsKey); + + if (this.options.authPrivateConnectionsOnConnect) { + const topics = [...this.wsStore.getTopics(wsKey)]; + const privateTopics = topics.filter((topic) => + this.isPrivateTopicRequest(topic, wsKey), + ); + + if (privateTopics.length) { + this.subscribeTopicsForWsKey(privateTopics, wsKey); + } } } - private onWsMessage(event: unknown, wsKey: TWSKey) { + /** + * Original V1 & V2 WS Message handler. Might need to migrate to the common standard, see onWsMessage() + */ + private onWsMessageLegacy(event: unknown, wsKey: TWSKey, ws: WebSocket) { try { // any message can clear the pong timer - wouldn't get a message if the ws wasn't working this.clearPongTimer(wsKey); if (isWsPong(event)) { - this.logger.trace('Received pong', { ...LOGGER_CATEGORY, wsKey }); + this.logger.trace('Received pong', { + ...WS_LOGGER_CATEGORY, + wsKey, + event: (event as any)?.data, + }); + return; + } + + if (this.isWsPing(event)) { + this.logger.trace('Received ping', { + ...WS_LOGGER_CATEGORY, + wsKey, + event, + }); + this.sendPongEvent(wsKey, ws); return; } const msg = JSON.parse((event && event['data']) || event); const emittableEvent = { ...msg, wsKey }; + // TODO: are v3 events different from V2? if yes? migrate to resolveEmittableEvents if (typeof msg === 'object') { if (typeof msg['code'] === 'number') { if (msg.event === 'login' && msg.code === 0) { this.logger.info('Successfully authenticated WS client', { - ...LOGGER_CATEGORY, + ...WS_LOGGER_CATEGORY, wsKey, + msg, }); this.emit('response', emittableEvent); this.emit('authenticated', emittableEvent); - this.onWsAuthenticated(wsKey); + this.onWsAuthenticated(wsKey, msg); return; } } @@ -572,7 +1008,7 @@ export abstract class BaseWebsocketClient< if (msg['event']) { if (msg.event === 'error') { this.logger.error('WS Error received', { - ...LOGGER_CATEGORY, + ...WS_LOGGER_CATEGORY, wsKey, message: msg || 'no message', // messageType: typeof msg, @@ -592,7 +1028,7 @@ export abstract class BaseWebsocketClient< } this.logger.info('Unhandled/unrecognised ws event message', { - ...LOGGER_CATEGORY, + ...WS_LOGGER_CATEGORY, message: msg || 'no message', // messageType: typeof msg, // messageString: JSON.stringify(msg), @@ -604,7 +1040,135 @@ export abstract class BaseWebsocketClient< return this.emit('update', emittableEvent); } catch (e) { this.logger.error('Failed to parse ws event message', { - ...LOGGER_CATEGORY, + ...WS_LOGGER_CATEGORY, + error: e, + event, + wsKey, + }); + } + } + + /** + * The newer standard. Requires resolveEmittableEvents in the integration layer. + * Might need to migrate to this for V3. TODO: check me. + */ + private onWsMessage(event: unknown, wsKey: TWSKey, ws: WebSocket) { + try { + // console.log('onMessageRaw: ', (event as any).data); + // any message can clear the pong timer - wouldn't get a message if the ws wasn't working + this.clearPongTimer(wsKey); + + if (this.isWsPong(event)) { + this.logger.trace('Received pong', { + ...WS_LOGGER_CATEGORY, + wsKey, + event: (event as any)?.data, + }); + return; + } + + if (this.isWsPing(event)) { + this.logger.trace('Received ping', { + ...WS_LOGGER_CATEGORY, + wsKey, + event, + }); + this.sendPongEvent(wsKey, ws); + return; + } + + if (isMessageEvent(event)) { + const data = event.data; + const dataType = event.type; + + const emittableEvents = this.resolveEmittableEvents(wsKey, event); + + if (!emittableEvents.length) { + // console.log(`raw event: `, { data, dataType, emittableEvents }); + this.logger.error( + 'Unhandled/unrecognised ws event message - returned no emittable data', + { + ...WS_LOGGER_CATEGORY, + message: data || 'no message', + dataType, + event, + wsKey, + }, + ); + + return this.emit('update', { ...(event as any), wsKey }); + } + + for (const emittable of emittableEvents) { + if (this.isWsPong(emittable)) { + this.logger.trace('Received pong2', { + ...WS_LOGGER_CATEGORY, + wsKey, + data, + }); + continue; + } + + // this.logger.trace( + // 'getFinalEmittable()->pre(): ', + // JSON.stringify(emittable), + // ); + const emittableFinalEvent = getFinalEmittable( + emittable, + wsKey, + emittable.isWSAPIResponse, + ); + + // this.logger.trace( + // 'getFinalEmittable()->post(): ', + // JSON.stringify(emittable), + // ); + + if (emittable.eventType === 'authenticated') { + this.logger.trace('Successfully authenticated', { + ...WS_LOGGER_CATEGORY, + wsKey, + emittable, + }); + this.emit(emittable.eventType, emittableFinalEvent); + this.onWsAuthenticated(wsKey, emittable.event); + continue; + } + + // Other event types are automatically emitted here + // this.logger.trace( + // `onWsMessage().emit(${emittable.eventType})`, + // emittableFinalEvent, + // ); + try { + this.emit(emittable.eventType, emittableFinalEvent); + } catch (e) { + this.logger.error( + `Exception in onWsMessage().emit(${emittable.eventType}) handler:`, + e, + ); + } + // this.logger.trace( + // `onWsMessage().emit(${emittable.eventType}).done()`, + // emittableFinalEvent, + // ); + } + + return; + } + + this.logger.error( + 'Unhandled/unrecognised ws event message - unexpected message format', + { + ...WS_LOGGER_CATEGORY, + message: event || 'no message', + event, + wsKey, + }, + ); + } catch (e) { + this.logger.error('Failed to parse ws event message', { + ...WS_LOGGER_CATEGORY, error: e, event, wsKey, @@ -614,17 +1178,42 @@ export abstract class BaseWebsocketClient< private onWsClose(event: unknown, wsKey: TWSKey) { this.logger.info('Websocket connection closed', { - ...LOGGER_CATEGORY, + ...WS_LOGGER_CATEGORY, wsKey, }); + const wsState = this.wsStore.get(wsKey, true); + wsState.isAuthenticated = false; + if ( this.wsStore.getConnectionState(wsKey) !== WsConnectionStateEnum.CLOSING ) { + // unintentional close, attempt recovery + this.logger.trace( + `onWsClose(${wsKey}): rejecting all deferred promises...`, + ); + // clean up any pending promises for this connection + this.getWsStore().rejectAllDeferredPromises( + wsKey, + 'connection lost, reconnecting', + ); + + this.setWsState(wsKey, WsConnectionStateEnum.INITIAL); + this.reconnectWithDelay(wsKey, this.options.reconnectTimeout!); this.emit('reconnect', { wsKey, event }); } else { + // intentional close - clean up + // clean up any pending promises for this connection + this.logger.trace( + `onWsClose(${wsKey}): rejecting all deferred promises...`, + ); + this.getWsStore().rejectAllDeferredPromises(wsKey, 'disconnected'); this.setWsState(wsKey, WsConnectionStateEnum.INITIAL); + + // This was an intentional close, delete all state for this connection, as if it never existed: + this.wsStore.delete(wsKey); + this.emit('close', { wsKey, event }); } } @@ -636,4 +1225,74 @@ export abstract class BaseWebsocketClient< private setWsState(wsKey: TWSKey, state: WsConnectionStateEnum) { this.wsStore.setConnectionState(wsKey, state); } + + /** + * Promise-driven method to assert that a ws has successfully connected (will await until connection is open) + */ + public async assertIsConnected(wsKey: TWSKey): Promise { + const isConnected = this.getWsStore().isConnectionState( + wsKey, + WsConnectionStateEnum.CONNECTED, + ); + if (isConnected) { + return true; + } + + const inProgressPromise = + this.getWsStore().getConnectionInProgressPromise(wsKey); + + // Already in progress? Await shared promise and retry + if (inProgressPromise) { + this.logger.trace('assertIsConnected(): awaiting...'); + await inProgressPromise.promise; + this.logger.trace('assertIsConnected(): awaiting...connected!'); + return inProgressPromise.promise; + } + + // Start connection, it should automatically store/return a promise. + this.logger.trace('assertIsConnected(): connecting...'); + + await this.connect(wsKey); + + this.logger.trace('assertIsConnected(): connecting...newly connected!'); + } + + /** + * Promise-driven method to assert that a ws has been successfully authenticated (will await until auth is confirmed) + */ + public async assertIsAuthenticated(wsKey: TWSKey): Promise { + const isConnected = this.getWsStore().isConnectionState( + wsKey, + WsConnectionStateEnum.CONNECTED, + ); + + if (!isConnected) { + this.logger.trace('assertIsAuthenticated(): connecting...'); + await this.assertIsConnected(wsKey); + } + + const inProgressPromise = + this.getWsStore().getAuthenticationInProgressPromise(wsKey); + + // Already in progress? Await shared promise and retry + if (inProgressPromise) { + this.logger.trace('assertIsAuthenticated(): awaiting...'); + await inProgressPromise.promise; + this.logger.trace('assertIsAuthenticated(): authenticated!'); + return; + } + + const isAuthenticated = this.wsStore.get(wsKey)?.isAuthenticated; + if (isAuthenticated) { + // this.logger.trace('assertIsAuthenticated(): ok'); + return; + } + + // Start authentication, it should automatically store/return a promise. + this.logger.trace('assertIsAuthenticated(): authenticating...'); + + await this.sendAuthRequest(wsKey); + + this.logger.trace('assertIsAuthenticated(): newly authenticated!'); + } } diff --git a/src/util/WsStore.types.ts b/src/util/WsStore.types.ts index 3692b55..4b92686 100644 --- a/src/util/WsStore.types.ts +++ b/src/util/WsStore.types.ts @@ -18,6 +18,7 @@ export interface DeferredPromise { export interface WSConnectedResult { wsKey: string; + ws: WebSocket; } export interface WsStoredState { diff --git a/src/util/browser-support.ts b/src/util/browser-support.ts index f4a4fd2..0069d01 100644 --- a/src/util/browser-support.ts +++ b/src/util/browser-support.ts @@ -1,17 +1,20 @@ -function _arrayBufferToBase64(buffer: ArrayBuffer) { +function bufferToB64(buffer: ArrayBuffer): string { let binary = ''; const bytes = new Uint8Array(buffer); const len = bytes.byteLength; for (let i = 0; i < len; i++) { binary += String.fromCharCode(bytes[i]); } - return window.btoa(binary); + return globalThis.btoa(binary); } +export type SignEncodeMethod = 'hex' | 'base64'; +export type SignAlgorithm = 'SHA-256' | 'SHA-512'; + export async function signMessage( message: string, secret: string, - method: 'hex' | 'base64', + method: SignEncodeMethod, ): Promise { const encoder = new TextEncoder(); const key = await window.crypto.subtle.importKey( @@ -37,7 +40,7 @@ export async function signMessage( .join(''); } case 'base64': { - return _arrayBufferToBase64(signature); + return bufferToB64(signature); } default: { // eslint-disable-next-line @typescript-eslint/no-unused-vars diff --git a/src/util/index.ts b/src/util/index.ts index 6c491bd..87f4da5 100644 --- a/src/util/index.ts +++ b/src/util/index.ts @@ -1,4 +1,5 @@ export * from './BaseRestClient'; +export * from './BaseWSClient'; export * from './logger'; export * from './requestUtils'; export * from './type-guards'; diff --git a/src/util/node-support.ts b/src/util/node-support.ts index 7472e15..c18b674 100644 --- a/src/util/node-support.ts +++ b/src/util/node-support.ts @@ -1,24 +1,55 @@ -import { createHmac } from 'crypto'; +import { constants, createHmac, createSign, sign } from 'crypto'; + +import * as webCrypto from './webCryptoAPI'; +import { SignAlgorithm, SignEncodeMethod } from './webCryptoAPI'; /** This is async because the browser version uses a promise (browser-support) */ export async function signMessage( message: string, secret: string, - method: 'hex' | 'base64', + method: SignEncodeMethod, + algorithm: SignAlgorithm, + pemEncodeMethod: SignEncodeMethod = method, ): Promise { - const hmac = createHmac('sha256', secret).update(message); + const signType = webCrypto.getSignKeyType(secret); - switch (method) { - case 'hex': { - return hmac.digest('hex'); - } - case 'base64': { - return hmac.digest().toString('base64'); - } - default: { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - ((x: never) => {})(method); - throw new Error(`Unhandled sign method: ${method}`); + if (secret.includes('PRIVATE KEY') && typeof createSign === 'function') { + if (signType === 'RSASSA-PKCS1-v1_5') { + return createSign('RSA-SHA256') + .update(message) + .sign(secret, pemEncodeMethod); } + + // fallback to ed25519 + // ed25519 requires b64 encoding + const ed25519Method: SignEncodeMethod = 'base64'; + + return sign(null, Buffer.from(message), { + key: secret, + padding: constants.RSA_PKCS1_PSS_PADDING, + saltLength: constants.RSA_PSS_SALTLEN_DIGEST, + }).toString(ed25519Method); } + + // fallback to hmac + if (typeof createHmac === 'function') { + return createHmac('sha256', secret).update(message).digest(method); + } + + // fallback to web crypto api methods + return webCrypto.signMessage(message, secret, method, algorithm); + + // switch (method) { + // case 'hex': { + // return hmac.digest('hex'); + // } + // case 'base64': { + // return hmac.digest().toString('base64'); + // } + // default: { + // // eslint-disable-next-line @typescript-eslint/no-unused-vars + // ((x: never) => {})(method); + // throw new Error(`Unhandled sign method: ${method}`); + // } + // } } diff --git a/src/util/webCryptoAPI.ts b/src/util/webCryptoAPI.ts new file mode 100644 index 0000000..659b2c5 --- /dev/null +++ b/src/util/webCryptoAPI.ts @@ -0,0 +1,157 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import { neverGuard } from './websocket-util'; + +function bufferToB64(buffer: ArrayBuffer): string { + let binary = ''; + const bytes = new Uint8Array(buffer); + const len = bytes.byteLength; + for (let i = 0; i < len; i++) { + binary += String.fromCharCode(bytes[i]); + } + return globalThis.btoa(binary); +} + +export type SignEncodeMethod = 'hex' | 'base64'; +export type SignAlgorithm = 'SHA-256' | 'SHA-512'; + +/** + * Similar to node crypto's `createHash()` function + */ +// async function hashMessage( +// message: string, +// method: SignEncodeMethod, +// algorithm: SignAlgorithm, +// ): Promise { +// const encoder = new TextEncoder(); + +// const buffer = await globalThis.crypto.subtle.digest( +// algorithm, +// encoder.encode(message), +// ); + +// switch (method) { +// case 'hex': { +// return Array.from(new Uint8Array(buffer)) +// .map((byte) => byte.toString(16).padStart(2, '0')) +// .join(''); +// } +// case 'base64': { +// return bufferToB64(buffer); +// } +// default: { +// throw neverGuard(method, `Unhandled sign method: "${method}"`); +// } +// } +// } + +type KeyType = 'HMAC' | 'RSASSA-PKCS1-v1_5' | 'Ed25519'; + +export function getSignKeyType(secret: string): KeyType { + if (secret.includes('PRIVATE KEY')) { + // Sometimes, not always, RSA keys include "RSA" in the header. That's a definite RSA key. + if (secret.includes('RSA PRIVATE KEY')) { + return 'RSASSA-PKCS1-v1_5'; + } + + // RSA keys are significantly longer than Ed25519 keys. 150 accounts for length of header & footer + if (secret.length <= 150) { + return 'Ed25519'; + } + + return 'RSASSA-PKCS1-v1_5'; + } + return 'HMAC'; +} + +async function importKey( + pem: string, + type: KeyType, + algorithm: SignAlgorithm, + encoder: TextEncoder, +): Promise { + switch (type) { + case 'Ed25519': + case 'RSASSA-PKCS1-v1_5': { + // const prefixRSA = /-----BEGIN RSA PRIVATE KEY-----/; + // const prefixEd25519 = /-----BEGIN PRIVATE KEY-----/; + + // const suffixRSA = /-----END RSA PRIVATE KEY-----/; + // const suffixEd25519 = /-----END PRIVATE KEY-----/; + + // const base64Key = pem + // .replace(prefixEd25519, '') + // .replace(prefixRSA, '') + // .replace(suffixEd25519, '') + // .replace(suffixRSA, '') + // .replace(/\s+/g, ''); // Remove spaces and newlines + + const base64Key = pem.replace( + /(?:-----BEGIN RSA PRIVATE KEY-----|-----BEGIN PRIVATE KEY-----|-----END RSA PRIVATE KEY-----|-----END PRIVATE KEY-----|\s+)/g, + '', + ); + + const binaryKey = Uint8Array.from(atob(base64Key), (c) => + c.charCodeAt(0), + ); + + return crypto.subtle.importKey( + 'pkcs8', + binaryKey.buffer, + { name: type, hash: { name: algorithm } }, + false, + ['sign'], + ); + } + case 'HMAC': { + return globalThis.crypto.subtle.importKey( + 'raw', + encoder.encode(pem), + { name: type, hash: algorithm }, + false, + ['sign'], + ); + } + default: { + throw neverGuard(type, `Unhandled key type: "${type}"`); + } + } +} + +/** + * Sign a message, with a secret, using the Web Crypto API + * + * Ed25519 is stable as of v23.5.0, but also not available in all browsers + */ +export async function signMessage( + message: string, + secret: string, + method: SignEncodeMethod, + algorithm: SignAlgorithm, + pemEncodeMethod: SignEncodeMethod = method, +): Promise { + const encoder = new TextEncoder(); + + const signKeyType = getSignKeyType(secret); + + const key = await importKey(secret, signKeyType, algorithm, encoder); + + const buffer = await globalThis.crypto.subtle.sign( + { name: signKeyType }, + key, + encoder.encode(message), + ); + + switch (method) { + case 'hex': { + return Array.from(new Uint8Array(buffer)) + .map((byte) => byte.toString(16).padStart(2, '0')) + .join(''); + } + case 'base64': { + return bufferToB64(buffer); + } + default: { + throw neverGuard(method, `Unhandled sign method: "${method}"`); + } + } +} diff --git a/src/util/websocket-util.ts b/src/util/websocket-util.ts index fb2baa2..645654e 100644 --- a/src/util/websocket-util.ts +++ b/src/util/websocket-util.ts @@ -7,6 +7,8 @@ import { } from '../types'; import { signMessage } from './node-support'; +export const WS_LOGGER_CATEGORY = { category: 'bitget-ws' }; + /** * Some exchanges have two livenet environments, some have test environments, some dont. This allows easy flexibility for different exchanges. * Examples: @@ -79,6 +81,7 @@ export const WS_AUTH_ON_CONNECT_KEYS: WsKey[] = [ WS_KEY_MAP.spotv1, WS_KEY_MAP.mixv1, WS_KEY_MAP.v2Private, + WS_KEY_MAP.v3Private, ]; /** Any WS keys in this list will ALWAYS skip the authentication process, even if credentials are available */ @@ -102,6 +105,29 @@ export const PRIVATE_TOPICS_V2: WsPrivateTopicV2[] = [ 'orders-isolated', ]; +/** + * Normalised internal format for a request (subscribe/unsubscribe/etc) on a topic, with optional parameters. + * + * - Topic: the topic this event is for + * - Payload: the parameters to include, optional. E.g. auth requires key + sign. Some topics allow configurable parameters. + * - Category: required for bybit, since different categories have different public endpoints + */ +export interface WsTopicRequest< + TWSTopic extends string = string, + TWSPayload = unknown, +> { + topic: TWSTopic; + payload?: TWSPayload; +} + +/** + * Conveniently allow users to request a topic either as string topics or objects (containing string topic + params) + */ +export type WsTopicRequestOrStringTopic< + TWSTopic extends string, + TWSPayload = unknown, +> = WsTopicRequest | string; + export function isPrivateChannel( channel: TChannel, ): boolean { @@ -191,6 +217,7 @@ export async function getWsAuthSignature( signatureExpiresAt + 'GET' + '/user/verify', apiSecret, 'base64', + 'SHA-256', ); return { @@ -220,6 +247,32 @@ export function safeTerminateWs( return false; } +/** + * Users can conveniently pass topics as strings or objects (object has topic name + optional params). + * + * This method normalises topics into objects (object has topic name + optional params). + */ +export function getNormalisedTopicRequests( + wsTopicRequests: WsTopicRequestOrStringTopic[], +): WsTopicRequest[] { + const normalisedTopicRequests: WsTopicRequest[] = []; + + for (const wsTopicRequest of wsTopicRequests) { + // passed as string, convert to object + if (typeof wsTopicRequest === 'string') { + const topicRequest: WsTopicRequest = { + topic: wsTopicRequest, + payload: undefined, + }; + normalisedTopicRequests.push(topicRequest); + continue; + } + + // already a normalised object, thanks to user + normalisedTopicRequests.push(wsTopicRequest); + } + return normalisedTopicRequests; +} /** * WebSocket.ping() is not available in browsers. This is a simple check used to diff --git a/src/websocket-client-legacy-v1.ts b/src/websocket-client-legacy-v1.ts index 2959b6a..55b7cf6 100644 --- a/src/websocket-client-legacy-v1.ts +++ b/src/websocket-client-legacy-v1.ts @@ -93,6 +93,8 @@ export class WebsocketClientLegacyV1 extends EventEmitter { pingInterval: 10000, reconnectTimeout: 500, recvWindow: 0, + authPrivateConnectionsOnConnect: true, + authPrivateRequests: false, ...options, }; } @@ -479,8 +481,9 @@ export class WebsocketClientLegacyV1 extends EventEmitter { wsKey, }); - const agent = this.options.requestOptions?.agent; - const ws = new WebSocket(url, undefined, agent ? { agent } : undefined); + const { protocols = [], ...wsOptions } = this.options.wsOptions || {}; + const ws = new WebSocket(url, protocols, wsOptions); + ws.onopen = (event) => this.onWsOpen(event, wsKey); ws.onmessage = (event) => this.onWsMessage(event, wsKey); ws.onerror = (event) => this.parseWsError('websocket error', event, wsKey); diff --git a/src/websocket-client-v2.ts b/src/websocket-client-v2.ts index e36332d..5cb1c63 100644 --- a/src/websocket-client-v2.ts +++ b/src/websocket-client-v2.ts @@ -2,26 +2,30 @@ import WebSocket from 'isomorphic-ws'; import { BitgetInstTypeV2, - WebsocketClientOptions, - WsCoinChannelsV2, - WsInstIdChannelsV2, WsKey, - WsPublicTopicV2, - WsTopicSubscribeEventArgsV2, - WsTopicSubscribePrivateCoinArgsV2, - WsTopicSubscribePrivateInstIdArgsV2, + WsOperation, + WsOperationLoginParams, + WsRequestOperationBitget, + WsTopic, WsTopicV2, } from './types'; import { - DefaultLogger, + BaseWebsocketClient, + EmittableEvent, getMaxTopicsPerSubscribeEvent, + getNormalisedTopicRequests, isPrivateChannel, + isWsPong, + MidflightWsRequestEvent, neverGuard, WS_AUTH_ON_CONNECT_KEYS, WS_BASE_URL_MAP, WS_KEY_MAP, + WS_LOGGER_CATEGORY, + WsTopicRequest, } from './util'; -import { BaseWebsocketClient } from './util/BaseWSClient'; +import { signMessage } from './util/node-support'; +import { SignAlgorithm } from './util/webCryptoAPI'; const LOGGER_CATEGORY = { category: 'bitget-ws' }; @@ -33,39 +37,69 @@ const COIN_CHANNELS: WsTopicV2[] = [ export class WebsocketClientV2 extends BaseWebsocketClient< WsKey, - WsTopicSubscribeEventArgsV2 + WsRequestOperationBitget > { - protected logger: typeof DefaultLogger; - - protected options: WebsocketClientOptions; - protected getWsKeyForTopic( - subscribeEvent: WsTopicSubscribeEventArgsV2, + // subscribeEvent: WsTopicSubscribeEventArgsV2, + subscribeEvent: WsTopicRequest, // TWSTopicSubscribeEventArgs == WsTopicRequest now isPrivate?: boolean, ): WsKey { - return isPrivate || isPrivateChannel(subscribeEvent.channel) + return isPrivate || isPrivateChannel(subscribeEvent.topic) ? WS_KEY_MAP.v2Private : WS_KEY_MAP.v2Public; } - protected isPrivateChannel( - subscribeEvent: WsTopicSubscribeEventArgsV2, - ): boolean { - return isPrivateChannel(subscribeEvent.channel); + protected isPrivateChannel(subscribeEvent: WsTopicRequest): boolean { + return isPrivateChannel(subscribeEvent.topic); + } + + protected isCustomReconnectionNeeded(): boolean { + return false; + } + + protected async triggerCustomReconnectionWorkflow(): Promise {} + + protected sendPingEvent(wsKey: WsKey): void { + this.tryWsSend(wsKey, 'ping'); + } + + protected sendPongEvent(wsKey: WsKey): void { + this.tryWsSend(wsKey, 'pong'); + } + + protected isWsPing(data: any): boolean { + if (data?.data === 'ping') { + return true; + } + return false; } - protected shouldAuthOnConnect(wsKey: WsKey): boolean { - return WS_AUTH_ON_CONNECT_KEYS.includes(wsKey as WsKey); + protected isWsPong(data: any): boolean { + return isWsPong(data); } - protected getWsUrl( + protected isPrivateTopicRequest( + request: WsTopicRequest, wsKey: WsKey, - networkKey: 'livenet' | 'demo' = 'livenet', - ): string { + ): boolean { + return WS_AUTH_ON_CONNECT_KEYS.includes(wsKey); + } + + protected getPrivateWSKeys(): WsKey[] { + return WS_AUTH_ON_CONNECT_KEYS; + } + + protected isAuthOnConnectWsKey(wsKey: WsKey): boolean { + return WS_AUTH_ON_CONNECT_KEYS.includes(wsKey); + } + + protected async getWsUrl(wsKey: WsKey): Promise { if (this.options.wsUrl) { return this.options.wsUrl; } + const networkKey: 'livenet' | 'demo' = 'livenet'; + switch (wsKey) { case WS_KEY_MAP.spotv1: case WS_KEY_MAP.mixv1: { @@ -99,6 +133,75 @@ export class WebsocketClientV2 extends BaseWebsocketClient< return getMaxTopicsPerSubscribeEvent(wsKey); } + /** + * @returns one or more correctly structured request events for performing a operations over WS. This can vary per exchange spec. + */ + protected async getWsRequestEvents( + operation: WsOperation, + requests: WsTopicRequest[], + ): Promise>[]> { + const wsRequestEvents: MidflightWsRequestEvent< + WsRequestOperationBitget + >[] = []; + const wsRequestBuildingErrors: unknown[] = []; + + const topics = requests.map((r) => r.topic); + + // Previously used to track topics in a request. Keeping this for subscribe/unsubscribe requests, no need for incremental values + const req_id = + ['subscribe', 'unsubscribe'].includes(operation) && topics.length + ? topics.join(',') + : this.getNewRequestId().toFixed(); + + const wsEvent: WsRequestOperationBitget = { + op: operation, + args: topics, + }; + + const midflightWsEvent: MidflightWsRequestEvent< + WsRequestOperationBitget + > = { + requestKey: req_id, + requestEvent: wsEvent, + }; + + wsRequestEvents.push({ + ...midflightWsEvent, + }); + + if (wsRequestBuildingErrors.length) { + const label = + wsRequestBuildingErrors.length === requests.length ? 'all' : 'some'; + + this.logger.error( + `Failed to build/send ${wsRequestBuildingErrors.length} event(s) for ${label} WS requests due to exceptions`, + { + ...WS_LOGGER_CATEGORY, + wsRequestBuildingErrors, + wsRequestBuildingErrorsStringified: JSON.stringify( + wsRequestBuildingErrors, + null, + 2, + ), + }, + ); + } + + return wsRequestEvents; + } + + /** + * Abstraction called to sort ws events into emittable event types (response to a request, data update, etc) + */ + protected resolveEmittableEvents(): EmittableEvent[] { + const results: EmittableEvent[] = []; + return results; + } + + async sendWSAPIRequest(): Promise { + return; + } + /** * Request connection of all dependent (public & private) websockets, instead of waiting for automatic connection by library */ @@ -114,35 +217,42 @@ export class WebsocketClientV2 extends BaseWebsocketClient< instType: BitgetInstTypeV2, topic: WsTopicV2, coin: string = 'default', - ): WsTopicSubscribeEventArgsV2 { + ): WsTopicRequest { if (isPrivateChannel(topic)) { if (COIN_CHANNELS.includes(topic)) { - const subscribeRequest: WsTopicSubscribePrivateCoinArgsV2 = { - instType, - channel: topic as WsCoinChannelsV2, - coin, + const subscribeRequest: WsTopicRequest = { + topic, + payload: { + instType, + coin, + }, }; return subscribeRequest; } - const subscribeRequest: WsTopicSubscribePrivateInstIdArgsV2 = { - instType, - channel: topic as WsInstIdChannelsV2, - instId: coin, + const subscribeRequest: WsTopicRequest = { + topic, + payload: { + instType, + instId: coin, + }, }; return subscribeRequest; } - return { - instType, - channel: topic as WsPublicTopicV2, - instId: coin, + const subscribeRequest: WsTopicRequest = { + topic, + payload: { + instType, + instId: coin, + }, }; + return subscribeRequest; } /** - * Subscribe to a PUBLIC topic + * Subscribe to a topic * @param instType instrument type (refer to API docs). * @param topic topic name (e.g. "ticker"). * @param instId instrument ID (e.g. "BTCUSDT"). Use "default" for private topics. @@ -153,7 +263,9 @@ export class WebsocketClientV2 extends BaseWebsocketClient< coin: string = 'default', ) { const subRequest = this.getSubRequest(instType, topic, coin); - return this.subscribe(subRequest); + const isPrivateTopic = isPrivateChannel(topic); + const wsKey = isPrivateTopic ? WS_KEY_MAP.v2Private : WS_KEY_MAP.v2Public; + return this.subscribe(subRequest, wsKey); } /** @@ -168,6 +280,231 @@ export class WebsocketClientV2 extends BaseWebsocketClient< coin: string = 'default', ) { const subRequest = this.getSubRequest(instType, topic, coin); - return this.unsubscribe(subRequest); + + const isPrivateTopic = isPrivateChannel(topic); + const wsKey = isPrivateTopic ? WS_KEY_MAP.v2Private : WS_KEY_MAP.v2Public; + + return this.unsubscribe(subRequest, wsKey); + } + + /** + * Request subscription to one or more topics. Pass topics as either an array of strings, + * or array of objects (if the topic has parameters). + * + * Objects should be formatted as {topic: string, params: object, category: CategoryV5}. + * + * - Subscriptions are automatically routed to the correct websocket connection. + * - Authentication/connection is automatic. + * - Resubscribe after network issues is automatic. + * + * Call `unsubscribe(topics)` to remove topics + */ + public subscribe( + requests: + | (WsTopicRequest | WsTopic) + | (WsTopicRequest | WsTopic)[], + wsKey: WsKey, + ): Promise { + const topicRequests = Array.isArray(requests) ? requests : [requests]; + const normalisedTopicRequests = getNormalisedTopicRequests(topicRequests); + + return this.subscribeTopicsForWsKey(normalisedTopicRequests, wsKey); + } + + /** + * Unsubscribe from one or more topics. Similar to subscribe() but in reverse. + * + * - Requests are automatically routed to the correct websocket connection. + * - These topics will be removed from the topic cache, so they won't be subscribed to again. + */ + public unsubscribe( + requests: + | (WsTopicRequest | WsTopic) + | (WsTopicRequest | WsTopic)[], + wsKey: WsKey, + ) { + const topicRequests = Array.isArray(requests) ? requests : [requests]; + const normalisedTopicRequests = getNormalisedTopicRequests(topicRequests); + + return this.unsubscribeTopicsForWsKey(normalisedTopicRequests, wsKey); + } + + // /** + // * + // * + // * Legacy internal methods that were redundant with the BaseWSClient upgrades for V3 + // * + // * + // */ + + // /** + // * Subscribe to topics & track/persist them. They will be automatically resubscribed to if the connection drops/reconnects. + // * @param wsTopics topic or list of topics + // * @param isPrivateTopic optional - the library will try to detect private topics, you can use this to mark a topic as private (if the topic isn't recognised yet) + // */ + // public subscribeLegacy( + // wsTopics: WsTopicSubscribeEventArgsV2, + // isPrivateTopic?: boolean, + // ) { + // const topics = Array.isArray(wsTopics) ? wsTopics : [wsTopics]; + + // topics.forEach((topic) => { + // const wsKey = this.getWsKeyForTopic(topic, isPrivateTopic); + + // // Persist this topic to the expected topics list + // this.getWsStore().addTopic(wsKey, topic); + + // // if connected, send subscription request + // if ( + // this.getWsStore().isConnectionState( + // wsKey, + // WsConnectionStateEnum.CONNECTED, + // ) + // ) { + // // if not authenticated, dont sub to private topics yet. + // // This'll happen automatically once authenticated + // const isAuthenticated = this.getWsStore().get(wsKey)?.isAuthenticated; + // if (!isAuthenticated) { + // return this.requestSubscribeTopics( + // wsKey, + // topics.filter((topic) => !this.isPrivateChannel(topic)), + // ); + // } + // return this.requestSubscribeTopics(wsKey, topics); + // } + + // // start connection process if it hasn't yet begun. Topics are automatically subscribed to on-connect + // if ( + // !this.getWsStore().isConnectionState( + // wsKey, + // WsConnectionStateEnum.CONNECTING, + // ) && + // !this.getWsStore().isConnectionState( + // wsKey, + // WsConnectionStateEnum.RECONNECTING, + // ) + // ) { + // return this.connect(wsKey); + // } + // }); + // } + + // /** + // * Unsubscribe from topics & remove them from memory. They won't be re-subscribed to if the connection reconnects. + // * @param wsTopics topic or list of topics + // * @param isPrivateTopic optional - the library will try to detect private topics, you can use this to mark a topic as private (if the topic isn't recognised yet) + // */ + // public unsubscribeLegacy( + // wsTopics: WsTopicSubscribeEventArgsV2, + // isPrivateTopic?: boolean, + // ) { + // const topics = Array.isArray(wsTopics) ? wsTopics : [wsTopics]; + // topics.forEach((topic) => { + // this.getWsStore().deleteTopic( + // this.getWsKeyForTopic(topic, isPrivateTopic), + // topic, + // ); + + // const wsKey = this.getWsKeyForTopic(topic, isPrivateTopic); + + // // unsubscribe request only necessary if active connection exists + // if ( + // this.getWsStore().isConnectionState( + // wsKey, + // WsConnectionStateEnum.CONNECTED, + // ) + // ) { + // this.requestUnsubscribeTopics(wsKey, [topic]); + // } + // }); + // } + + /** + * + * + * Internal methods required to integrate with the BaseWSClient + * + * + */ + + protected async getWsAuthRequestEvent( + wsKey: WsKey, + ): Promise> { + try { + const { apiKey, apiSecret, apiPass } = this.options; + const { signature, expiresAt } = await this.getWsAuthSignature(wsKey); + + if (!apiKey || !apiSecret || !apiPass) { + this.logger.error( + 'Cannot authenticate websocket, either api key, secret or passphrase missing.', + { ...WS_LOGGER_CATEGORY, wsKey }, + ); + throw new Error( + 'Cannot auth - missing api or secret or pass in config', + ); + } + + const request: WsRequestOperationBitget = { + op: 'login', + args: [ + { + apiKey, + passphrase: apiPass, + timestamp: expiresAt, + sign: signature, + }, + ], + }; + + return request; + } catch (e) { + this.logger.error(e, { ...WS_LOGGER_CATEGORY, wsKey }); + throw e; + } + } + + private async getWsAuthSignature( + wsKey: WsKey, + ): Promise<{ expiresAt: number; signature: string }> { + const { apiKey, apiSecret, apiPass, recvWindow } = this.options; + + if (!apiKey || !apiSecret || !apiPass) { + this.logger.error( + 'Cannot authenticate websocket, either api key, secret or passphrase missing.', + { ...WS_LOGGER_CATEGORY, wsKey }, + ); + throw new Error('Cannot auth - missing api or secret or pass in config'); + } + + this.logger.trace("Getting auth'd request params", { + ...WS_LOGGER_CATEGORY, + wsKey, + }); + + const signatureExpiresAt = ((Date.now() + recvWindow) / 1000).toFixed(0); + + const signature = await this.signMessage( + signatureExpiresAt + 'GET' + '/user/verify', + apiSecret, + 'base64', + 'SHA-256', + ); + + return { + expiresAt: +signatureExpiresAt, + signature, + }; + } + + private async signMessage( + paramsStr: string, + secret: string, + method: 'hex' | 'base64', + algorithm: SignAlgorithm, + ): Promise { + if (typeof this.options.customSignMessageFn === 'function') { + return this.options.customSignMessageFn(paramsStr, secret); + } + return await signMessage(paramsStr, secret, method, algorithm); } } From 79b03fce8bc69328c6a28e25a66b98e7039e2ff8 Mon Sep 17 00:00:00 2001 From: JJ-Cro Date: Tue, 15 Jul 2025 19:45:31 +0200 Subject: [PATCH 16/57] chore: update ESLint configuration and dependencies --- .eslintrc.cjs | 6 ++- package-lock.json | 94 ++++++++++++++++++++++++++++++----------------- package.json | 5 ++- 3 files changed, 69 insertions(+), 36 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index f14285a..01b5d28 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -20,7 +20,7 @@ module.exports = { node: true, jest: true, }, - ignorePatterns: ['.eslintrc.js', 'webpack.config.js'], + ignorePatterns: ['.eslintrc.js', 'webpack.config.js', 'examples/apidoc'], rules: { '@typescript-eslint/interface-name-prefix': 'off', '@typescript-eslint/explicit-function-return-type': 'off', @@ -28,6 +28,10 @@ module.exports = { '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-non-null-assertion': 'off', '@typescript-eslint/ban-types': 'off', + '@typescript-eslint/no-empty-object-type': [ + 'error', + { allowObjectTypes: 'always' }, + ], 'simple-import-sort/imports': 'error', 'simple-import-sort/exports': 'error', 'array-bracket-spacing': ['error', 'never'], diff --git a/package-lock.json b/package-lock.json index 368da75..a7bc2ae 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,8 +15,9 @@ }, "devDependencies": { "@types/jest": "^29.0.3", - "@types/node": "^18.7.23", + "@types/node": "^22.10.2", "@typescript-eslint/eslint-plugin": "^8.18.0", + "@typescript-eslint/parser": "^8.18.0", "eslint": "^8.24.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.2.1", @@ -26,7 +27,7 @@ "source-map-loader": "^4.0.0", "ts-jest": "^29.0.2", "ts-loader": "^9.4.1", - "typescript": "^4.8.4", + "typescript": "^5.7.3", "webpack": "^5.74.0", "webpack-bundle-analyzer": "^4.6.1", "webpack-cli": "^4.10.0" @@ -1284,10 +1285,14 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.7.23", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.23.tgz", - "integrity": "sha512-DWNcCHolDq0ZKGizjx2DZjR/PqsYwAcYUJmfMWqtVU2MBMG5Mo+xFZrhGId5r/O5HOuMPyQEcM6KUBp5lBZZBg==", - "dev": true + "version": "22.16.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.16.4.tgz", + "integrity": "sha512-PYRhNtZdm2wH/NT2k/oAJ6/f2VD2N2Dag0lGlx2vWgMSJXGNmlce5MiTQzoWAiIJtso30mjnfQCOKVH+kAQC/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } }, "node_modules/@types/prettier": { "version": "2.7.1", @@ -1350,7 +1355,6 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.18.0.tgz", "integrity": "sha512-hgUZ3kTEpVzKaK3uNibExUYm6SKKOmTU2BOxBSvOYwtJEPdVQ70kZJpPjstlnhCHcuc2WGfSbpKlb/69ttyN5Q==", "dev": true, - "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.18.0", "@typescript-eslint/types": "8.18.0", @@ -1392,6 +1396,7 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.18.0.tgz", "integrity": "sha512-er224jRepVAVLnMF2Q7MZJCq5CsdH2oqjP4dT7K6ij09Kyd+R21r7UVJrF0buMVdZS5QRhDzpvzAxHxabQadow==", "dev": true, + "license": "MIT", "dependencies": { "@typescript-eslint/typescript-estree": "8.18.0", "@typescript-eslint/utils": "8.18.0", @@ -1428,6 +1433,7 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.18.0.tgz", "integrity": "sha512-rqQgFRu6yPkauz+ms3nQpohwejS8bvgbPyIDq13cgEDbkXt4LH4OkDMT0/fN1RUtzG8e8AKJyDBoocuQh8qNeg==", "dev": true, + "license": "MIT", "dependencies": { "@typescript-eslint/types": "8.18.0", "@typescript-eslint/visitor-keys": "8.18.0", @@ -1464,6 +1470,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -1475,10 +1482,11 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -1491,6 +1499,7 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.18.0.tgz", "integrity": "sha512-p6GLdY383i7h5b0Qrfbix3Vc3+J2k6QWw6UMUeY5JGfm3C5LbZ4QIZzJNoNOfgyRe0uuYKjvVOsO/jD4SJO+xg==", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@typescript-eslint/scope-manager": "8.18.0", @@ -2724,16 +2733,17 @@ "dev": true }, "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.2", "merge2": "^1.3.0", - "micromatch": "^4.0.4" + "micromatch": "^4.0.8" }, "engines": { "node": ">=8.6.0" @@ -2744,6 +2754,7 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, + "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -4114,6 +4125,7 @@ "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 8" } @@ -5346,18 +5358,26 @@ } }, "node_modules/typescript": { - "version": "4.8.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", - "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", + "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" + }, "node_modules/update-browserslist-db": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", @@ -6742,10 +6762,13 @@ "dev": true }, "@types/node": { - "version": "18.7.23", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.23.tgz", - "integrity": "sha512-DWNcCHolDq0ZKGizjx2DZjR/PqsYwAcYUJmfMWqtVU2MBMG5Mo+xFZrhGId5r/O5HOuMPyQEcM6KUBp5lBZZBg==", - "dev": true + "version": "22.16.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.16.4.tgz", + "integrity": "sha512-PYRhNtZdm2wH/NT2k/oAJ6/f2VD2N2Dag0lGlx2vWgMSJXGNmlce5MiTQzoWAiIJtso30mjnfQCOKVH+kAQC/g==", + "dev": true, + "requires": { + "undici-types": "~6.21.0" + } }, "@types/prettier": { "version": "2.7.1", @@ -6796,7 +6819,6 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.18.0.tgz", "integrity": "sha512-hgUZ3kTEpVzKaK3uNibExUYm6SKKOmTU2BOxBSvOYwtJEPdVQ70kZJpPjstlnhCHcuc2WGfSbpKlb/69ttyN5Q==", "dev": true, - "peer": true, "requires": { "@typescript-eslint/scope-manager": "8.18.0", "@typescript-eslint/types": "8.18.0", @@ -6868,9 +6890,9 @@ } }, "semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true } } @@ -7799,16 +7821,16 @@ "dev": true }, "fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", "dev": true, "requires": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.2", "merge2": "^1.3.0", - "micromatch": "^4.0.4" + "micromatch": "^4.0.8" }, "dependencies": { "glob-parent": { @@ -9695,9 +9717,15 @@ "dev": true }, "typescript": { - "version": "4.8.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", - "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", + "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", + "dev": true + }, + "undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", "dev": true }, "update-browserslist-db": { diff --git a/package.json b/package.json index 7c2a286..2c15f5d 100644 --- a/package.json +++ b/package.json @@ -31,8 +31,9 @@ }, "devDependencies": { "@types/jest": "^29.0.3", - "@types/node": "^18.7.23", + "@types/node": "^22.10.2", "@typescript-eslint/eslint-plugin": "^8.18.0", + "@typescript-eslint/parser": "^8.18.0", "eslint": "^8.24.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.2.1", @@ -42,7 +43,7 @@ "source-map-loader": "^4.0.0", "ts-jest": "^29.0.2", "ts-loader": "^9.4.1", - "typescript": "^4.8.4", + "typescript": "^5.7.3", "webpack": "^5.74.0", "webpack-bundle-analyzer": "^4.6.1", "webpack-cli": "^4.10.0" From ce4c28345668882a616db9f6f195fc228af77e72 Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Wed, 16 Jul 2025 11:35:52 +0100 Subject: [PATCH 17/57] chore(): fix v1 test --- test/v1/ws.public.test.ts | 6 +++--- test/ws.util.ts | 22 ++++++++-------------- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/test/v1/ws.public.test.ts b/test/v1/ws.public.test.ts index 4342734..5f5f660 100644 --- a/test/v1/ws.public.test.ts +++ b/test/v1/ws.public.test.ts @@ -1,17 +1,17 @@ import { - WebsocketClient, + WebsocketClientLegacyV1, WS_KEY_MAP, WSClientConfigurableOptions, } from '../../src'; import { getSilentLogger, logAllEvents, waitForSocketEvent } from '../ws.util'; describe('Public Spot Websocket Client', () => { - let wsClient: WebsocketClient; + let wsClient: WebsocketClientLegacyV1; const wsClientOptions: WSClientConfigurableOptions = {}; beforeAll(() => { - wsClient = new WebsocketClient( + wsClient = new WebsocketClientLegacyV1( wsClientOptions, getSilentLogger('expectSuccess'), ); diff --git a/test/ws.util.ts b/test/ws.util.ts index 223880d..e038d89 100644 --- a/test/ws.util.ts +++ b/test/ws.util.ts @@ -1,24 +1,18 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { WebsocketClient } from '../src'; +import { DefaultLogger, WebsocketClientLegacyV1 } from '../src'; // eslint-disable-next-line @typescript-eslint/no-unused-vars -export function getSilentLogger(logHint?: string) { +export function getSilentLogger(logHint?: string): DefaultLogger { return { - silly: () => {}, - debug: () => {}, - notice: () => {}, + trace: () => {}, info: () => {}, - warning: () => {}, error: () => {}, }; } -export const fullLogger = { - silly: (...params) => console.log('silly', ...params), - debug: (...params) => console.log('debug', ...params), - notice: (...params) => console.log('notice', ...params), +export const fullLogger: DefaultLogger = { + trace: (...params) => console.log('trace', ...params), info: (...params) => console.info('info', ...params), - warning: (...params) => console.warn('warning', ...params), error: (...params) => console.error('error', ...params), }; @@ -33,7 +27,7 @@ type WsClientEvent = /** Resolves a promise if an event is seen before a timeout (defaults to 4.5 seconds) */ export function waitForSocketEvent( - wsClient: WebsocketClient, + wsClient: WebsocketClientLegacyV1, event: WsClientEvent, timeoutMs: number = 10 * 1000, ) { @@ -80,7 +74,7 @@ export function waitForSocketEvent( }); } -export function listenToSocketEvents(wsClient: WebsocketClient) { +export function listenToSocketEvents(wsClient: WebsocketClientLegacyV1) { const retVal: Record< 'update' | 'open' | 'response' | 'close' | 'error', typeof jest.fn @@ -110,7 +104,7 @@ export function listenToSocketEvents(wsClient: WebsocketClient) { }; } -export function logAllEvents(wsClient: WebsocketClient) { +export function logAllEvents(wsClient: WebsocketClientLegacyV1) { wsClient.on('update', (data) => { // console.log('wsUpdate: ', JSON.stringify(data, null, 2)); }); From 05487b9a3ef8b8f9038e468d574042b4cdebbe4a Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Wed, 16 Jul 2025 12:22:33 +0100 Subject: [PATCH 18/57] chore(): implement request mapping properly --- README.md | 4 +- .../deprecated-V1-Websockets/ws-private.ts | 8 +-- .../deprecated-V1-Websockets/ws-public.ts | 6 +- examples/ws-private.ts | 2 +- examples/ws-public.ts | 2 +- src/types/websockets/ws-api.ts | 19 ++++++ src/util/BaseWSClient.ts | 17 ++++++ src/websocket-client-v2.ts | 60 ++++++++++++++++--- 8 files changed, 98 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 252ecc3..48e1643 100644 --- a/README.md +++ b/README.md @@ -166,10 +166,10 @@ Pass a custom logger which supports the log methods `silly`, `debug`, `notice`, ```javascript const { WebsocketClientV2, DefaultLogger } = require('bitget-api'); -// Disable all logging on the silly level (less console logs) +// Disable all logging on the trace level (less console logs) const customLogger = { ...DefaultLogger, - silly: () => {}, + trace: () => {}, }; const ws = new WebsocketClientV2( diff --git a/examples/deprecated-V1-Websockets/ws-private.ts b/examples/deprecated-V1-Websockets/ws-private.ts index e5acc1a..eb92bb4 100644 --- a/examples/deprecated-V1-Websockets/ws-private.ts +++ b/examples/deprecated-V1-Websockets/ws-private.ts @@ -1,4 +1,4 @@ -import { WebsocketClient, DefaultLogger } from '../../src'; +import { DefaultLogger, WebsocketClientLegacyV1 } from '../../src'; // or // import { DefaultLogger, WS_KEY_MAP, WebsocketClient } from 'bitget-api'; @@ -6,16 +6,16 @@ import { WebsocketClient, DefaultLogger } from '../../src'; (async () => { const logger = { ...DefaultLogger, - silly: (...params) => console.log('silly', ...params), + trace: (...params) => console.log('silly', ...params), }; - logger.info(`Starting private V1 websocket`); + logger.info('Starting private V1 websocket'); const API_KEY = process.env.API_KEY_COM; const API_SECRET = process.env.API_SECRET_COM; const API_PASS = process.env.API_PASS_COM; - const wsClient = new WebsocketClient( + const wsClient = new WebsocketClientLegacyV1( { apiKey: API_KEY, apiSecret: API_SECRET, diff --git a/examples/deprecated-V1-Websockets/ws-public.ts b/examples/deprecated-V1-Websockets/ws-public.ts index fb2af37..396c59a 100644 --- a/examples/deprecated-V1-Websockets/ws-public.ts +++ b/examples/deprecated-V1-Websockets/ws-public.ts @@ -1,4 +1,4 @@ -import { DefaultLogger, WS_KEY_MAP, WebsocketClient } from '../../src'; +import { DefaultLogger, WebsocketClientLegacyV1, WS_KEY_MAP } from '../../src'; // or // import { DefaultLogger, WS_KEY_MAP, WebsocketClient } from 'bitget-api'; @@ -6,10 +6,10 @@ import { DefaultLogger, WS_KEY_MAP, WebsocketClient } from '../../src'; (async () => { const logger = { ...DefaultLogger, - silly: (...params) => console.log('silly', ...params), + trace: (...params) => console.log('trace', ...params), }; - const wsClient = new WebsocketClient( + const wsClient = new WebsocketClientLegacyV1( { // restOptions: { // optionally provide rest options, e.g. to pass through a proxy diff --git a/examples/ws-private.ts b/examples/ws-private.ts index f610e48..dabcc63 100644 --- a/examples/ws-private.ts +++ b/examples/ws-private.ts @@ -6,7 +6,7 @@ import { DefaultLogger, WebsocketClientV2 } from '../src'; (async () => { const logger = { ...DefaultLogger, - silly: (...params) => console.log('silly', ...params), + trace: (...params) => console.log('trace', ...params), }; const API_KEY = process.env.API_KEY_COM; diff --git a/examples/ws-public.ts b/examples/ws-public.ts index 2a0df55..424d6e1 100644 --- a/examples/ws-public.ts +++ b/examples/ws-public.ts @@ -6,7 +6,7 @@ import { DefaultLogger, WebsocketClientV2, WS_KEY_MAP } from '../src'; (async () => { const logger = { ...DefaultLogger, - silly: (...params) => console.log('silly', ...params), + trace: (...params) => console.log('trace', ...params), }; const wsClient = new WebsocketClientV2( diff --git a/src/types/websockets/ws-api.ts b/src/types/websockets/ws-api.ts index 557505c..e1a357e 100644 --- a/src/types/websockets/ws-api.ts +++ b/src/types/websockets/ws-api.ts @@ -7,6 +7,25 @@ export interface WsOperationLoginParams { sign: string; } +/** + * V2 request looks like this: +{ + "op":"subscribe", + "args":[ + { + "instType":"SPOT", + "channel":"ticker", + "instId":"BTCUSDT" + }, + { + "instType":"SPOT", + "channel":"candle5m", + "instId":"BTCUSDT" + } + ] +} + */ + export interface WsRequestOperationBitget { op: WsOperation; args?: (TWSRequestArg | string | number)[]; diff --git a/src/util/BaseWSClient.ts b/src/util/BaseWSClient.ts index a09b972..d275f35 100644 --- a/src/util/BaseWSClient.ts +++ b/src/util/BaseWSClient.ts @@ -803,6 +803,23 @@ export abstract class BaseWebsocketClient< // }); } + getCachedMidFlightRequest( + wsKey: TWSKey, + requestKey: string, + ): TWSRequestEvent | undefined { + if (!this.midflightRequestCache[wsKey]) { + this.midflightRequestCache[wsKey] = {}; + } + return this.midflightRequestCache[wsKey][requestKey]; + } + + // TODO: where is this used? + removeCachedMidFlightRequest(wsKey: TWSKey, requestKey: string) { + if (this.getCachedMidFlightRequest(wsKey, requestKey)) { + delete this.midflightRequestCache[wsKey][requestKey]; + } + } + public tryWsSend( wsKey: TWSKey, wsMessage: string, diff --git a/src/websocket-client-v2.ts b/src/websocket-client-v2.ts index 5cb1c63..b1a86c1 100644 --- a/src/websocket-client-v2.ts +++ b/src/websocket-client-v2.ts @@ -37,7 +37,7 @@ const COIN_CHANNELS: WsTopicV2[] = [ export class WebsocketClientV2 extends BaseWebsocketClient< WsKey, - WsRequestOperationBitget + WsRequestOperationBitget // subscribe requests have an "args" parameter with an object within > { protected getWsKeyForTopic( // subscribeEvent: WsTopicSubscribeEventArgsV2, @@ -138,14 +138,16 @@ export class WebsocketClientV2 extends BaseWebsocketClient< */ protected async getWsRequestEvents( operation: WsOperation, - requests: WsTopicRequest[], - ): Promise>[]> { + requests: WsTopicRequest[], + ): Promise>[]> { const wsRequestEvents: MidflightWsRequestEvent< - WsRequestOperationBitget + WsRequestOperationBitget >[] = []; const wsRequestBuildingErrors: unknown[] = []; - const topics = requests.map((r) => r.topic); + const topics = requests.map( + (r) => r.topic + ',' + Object.values(r.payload || {}).join(','), + ); // Previously used to track topics in a request. Keeping this for subscribe/unsubscribe requests, no need for incremental values const req_id = @@ -153,13 +155,53 @@ export class WebsocketClientV2 extends BaseWebsocketClient< ? topics.join(',') : this.getNewRequestId().toFixed(); - const wsEvent: WsRequestOperationBitget = { + /** + { + "op":"subscribe", + "args":[ + { + "instType":"SPOT", + "channel":"ticker", + "instId":"BTCUSDT" + }, + { + "instType":"SPOT", + "channel":"candle5m", + "instId":"BTCUSDT" + } + ] + } + */ + const wsEvent: WsRequestOperationBitget = { op: operation, - args: topics, + args: requests.map((request) => { + // const request = { + // topic: 'ticker', + // payload: { instType: 'SPOT', instId: 'BTCUSDT' }, + // }; + // becomes: + // const request = { + // channel: 'ticker', + // instType: 'SPOT', + // instId: 'BTCUSDT', + // }; + return { + channel: request.topic, + ...request.payload, + }; + }), }; + // console.log('getWsRequestEvents()', { + // operation, + // requests, + // topics, + // wsEvent: JSON.stringify(wsEvent, null, 2), + // req_id, + // }); + const midflightWsEvent: MidflightWsRequestEvent< - WsRequestOperationBitget + WsRequestOperationBitget > = { requestKey: req_id, requestEvent: wsEvent, @@ -265,6 +307,7 @@ export class WebsocketClientV2 extends BaseWebsocketClient< const subRequest = this.getSubRequest(instType, topic, coin); const isPrivateTopic = isPrivateChannel(topic); const wsKey = isPrivateTopic ? WS_KEY_MAP.v2Private : WS_KEY_MAP.v2Public; + return this.subscribe(subRequest, wsKey); } @@ -307,7 +350,6 @@ export class WebsocketClientV2 extends BaseWebsocketClient< ): Promise { const topicRequests = Array.isArray(requests) ? requests : [requests]; const normalisedTopicRequests = getNormalisedTopicRequests(topicRequests); - return this.subscribeTopicsForWsKey(normalisedTopicRequests, wsKey); } From 78c33f7df41e4b1b3f49eac429075f3ede6d1719 Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Wed, 16 Jul 2025 14:59:47 +0100 Subject: [PATCH 19/57] feat(): implement abstraction getEmittable. chore(): update eslint config --- .eslintrc.cjs | 2 + src/util/BaseWSClient.ts | 94 +------------------ src/websocket-client-v2.ts | 184 +++++++++++++++++-------------------- 3 files changed, 89 insertions(+), 191 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 01b5d28..ea4fdeb 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -53,5 +53,7 @@ module.exports = { 'computed-property-spacing': [2, 'never'], 'keyword-spacing': 2, 'space-unary-ops': 2, + // https://eslint.org/docs/latest/rules/no-param-reassign + 'no-param-reassign': ['error'], }, }; diff --git a/src/util/BaseWSClient.ts b/src/util/BaseWSClient.ts index d275f35..6479793 100644 --- a/src/util/BaseWSClient.ts +++ b/src/util/BaseWSClient.ts @@ -10,7 +10,6 @@ import { WsOperation, } from '../types'; import { DefaultLogger } from './logger'; -import { isWsPong } from './requestUtils'; import { getNormalisedTopicRequests, safeTerminateWs, @@ -509,7 +508,7 @@ export abstract class BaseWebsocketClient< const ws = new WebSocket(url, protocols, wsOptions); ws.onopen = (event) => this.onWsOpen(event, wsKey, url, ws); - ws.onmessage = (event) => this.onWsMessageLegacy(event, wsKey, ws); + ws.onmessage = (event) => this.onWsMessage(event, wsKey, ws); ws.onerror = (event) => this.parseWsError('Websocket onWsError', event, wsKey); ws.onclose = (event) => this.onWsClose(event, wsKey); @@ -976,98 +975,9 @@ export abstract class BaseWebsocketClient< } } - /** - * Original V1 & V2 WS Message handler. Might need to migrate to the common standard, see onWsMessage() - */ - private onWsMessageLegacy(event: unknown, wsKey: TWSKey, ws: WebSocket) { - try { - // any message can clear the pong timer - wouldn't get a message if the ws wasn't working - this.clearPongTimer(wsKey); - - if (isWsPong(event)) { - this.logger.trace('Received pong', { - ...WS_LOGGER_CATEGORY, - wsKey, - event: (event as any)?.data, - }); - return; - } - - if (this.isWsPing(event)) { - this.logger.trace('Received ping', { - ...WS_LOGGER_CATEGORY, - wsKey, - event, - }); - this.sendPongEvent(wsKey, ws); - return; - } - - const msg = JSON.parse((event && event['data']) || event); - const emittableEvent = { ...msg, wsKey }; - - // TODO: are v3 events different from V2? if yes? migrate to resolveEmittableEvents - if (typeof msg === 'object') { - if (typeof msg['code'] === 'number') { - if (msg.event === 'login' && msg.code === 0) { - this.logger.info('Successfully authenticated WS client', { - ...WS_LOGGER_CATEGORY, - wsKey, - msg, - }); - this.emit('response', emittableEvent); - this.emit('authenticated', emittableEvent); - this.onWsAuthenticated(wsKey, msg); - return; - } - } - - if (msg['event']) { - if (msg.event === 'error') { - this.logger.error('WS Error received', { - ...WS_LOGGER_CATEGORY, - wsKey, - message: msg || 'no message', - // messageType: typeof msg, - // messageString: JSON.stringify(msg), - event, - }); - this.emit('exception', emittableEvent); - this.emit('response', emittableEvent); - return; - } - return this.emit('response', emittableEvent); - } - - if (msg['arg']) { - return this.emit('update', emittableEvent); - } - } - - this.logger.info('Unhandled/unrecognised ws event message', { - ...WS_LOGGER_CATEGORY, - message: msg || 'no message', - // messageType: typeof msg, - // messageString: JSON.stringify(msg), - event, - wsKey, - }); - - // fallback emit anyway - return this.emit('update', emittableEvent); - } catch (e) { - this.logger.error('Failed to parse ws event message', { - ...WS_LOGGER_CATEGORY, - error: e, - event, - wsKey, - }); - } - } - /** * The newer standard. Requires resolveEmittableEvents in the integration layer. - * Might need to migrate to this for V3. TODO: check me. + * Change needed to support V3? TODO: check me. */ private onWsMessage(event: unknown, wsKey: TWSKey, ws: WebSocket) { try { diff --git a/src/websocket-client-v2.ts b/src/websocket-client-v2.ts index b1a86c1..2f672ca 100644 --- a/src/websocket-client-v2.ts +++ b/src/websocket-client-v2.ts @@ -2,6 +2,7 @@ import WebSocket from 'isomorphic-ws'; import { BitgetInstTypeV2, + MessageEventLike, WsKey, WsOperation, WsOperationLoginParams, @@ -192,14 +193,6 @@ export class WebsocketClientV2 extends BaseWebsocketClient< }), }; - // console.log('getWsRequestEvents()', { - // operation, - // requests, - // topics, - // wsEvent: JSON.stringify(wsEvent, null, 2), - // req_id, - // }); - const midflightWsEvent: MidflightWsRequestEvent< WsRequestOperationBitget > = { @@ -235,8 +228,91 @@ export class WebsocketClientV2 extends BaseWebsocketClient< /** * Abstraction called to sort ws events into emittable event types (response to a request, data update, etc) */ - protected resolveEmittableEvents(): EmittableEvent[] { + protected resolveEmittableEvents( + wsKey: WsKey, + event: MessageEventLike, + ): EmittableEvent[] { const results: EmittableEvent[] = []; + + try { + const msg = JSON.parse(event.data); + const emittableEvent = { ...msg, wsKey }; + + // TODO: are v3 events different from V2? if yes? migrate to resolveEmittableEvents + // v2 event processing + if (typeof msg === 'object') { + if (typeof msg['code'] === 'number') { + // v2 authentication event + if (msg.event === 'login' && msg.code === 0) { + results.push({ + eventType: 'response', + event: emittableEvent, + }); + results.push({ + eventType: 'authenticated', + event: emittableEvent, + }); + return results; + } + } + + if (msg['event']) { + results.push({ + eventType: 'response', + event: emittableEvent, + }); + + if (msg.event === 'error') { + this.logger.error('WS Error received', { + ...WS_LOGGER_CATEGORY, + wsKey, + message: msg || 'no message', + // messageType: typeof msg, + // messageString: JSON.stringify(msg), + event, + }); + results.push({ + eventType: 'exception', + event: emittableEvent, + }); + } + + return results; + } + + if (msg['arg']) { + results.push({ + eventType: 'update', + event: emittableEvent, + }); + return results; + } + } + + this.logger.info('Unhandled/unrecognised ws event message', { + ...WS_LOGGER_CATEGORY, + message: msg || 'no message', + // messageType: typeof msg, + // messageString: JSON.stringify(msg), + event, + wsKey, + }); + + // fallback emit anyway + results.push({ + eventType: 'update', + event: emittableEvent, + }); + return results; + } catch (e) { + this.logger.error('Failed to parse ws event message', { + ...WS_LOGGER_CATEGORY, + error: e, + event, + wsKey, + }); + } + return results; } @@ -371,96 +447,6 @@ export class WebsocketClientV2 extends BaseWebsocketClient< return this.unsubscribeTopicsForWsKey(normalisedTopicRequests, wsKey); } - // /** - // * - // * - // * Legacy internal methods that were redundant with the BaseWSClient upgrades for V3 - // * - // * - // */ - - // /** - // * Subscribe to topics & track/persist them. They will be automatically resubscribed to if the connection drops/reconnects. - // * @param wsTopics topic or list of topics - // * @param isPrivateTopic optional - the library will try to detect private topics, you can use this to mark a topic as private (if the topic isn't recognised yet) - // */ - // public subscribeLegacy( - // wsTopics: WsTopicSubscribeEventArgsV2, - // isPrivateTopic?: boolean, - // ) { - // const topics = Array.isArray(wsTopics) ? wsTopics : [wsTopics]; - - // topics.forEach((topic) => { - // const wsKey = this.getWsKeyForTopic(topic, isPrivateTopic); - - // // Persist this topic to the expected topics list - // this.getWsStore().addTopic(wsKey, topic); - - // // if connected, send subscription request - // if ( - // this.getWsStore().isConnectionState( - // wsKey, - // WsConnectionStateEnum.CONNECTED, - // ) - // ) { - // // if not authenticated, dont sub to private topics yet. - // // This'll happen automatically once authenticated - // const isAuthenticated = this.getWsStore().get(wsKey)?.isAuthenticated; - // if (!isAuthenticated) { - // return this.requestSubscribeTopics( - // wsKey, - // topics.filter((topic) => !this.isPrivateChannel(topic)), - // ); - // } - // return this.requestSubscribeTopics(wsKey, topics); - // } - - // // start connection process if it hasn't yet begun. Topics are automatically subscribed to on-connect - // if ( - // !this.getWsStore().isConnectionState( - // wsKey, - // WsConnectionStateEnum.CONNECTING, - // ) && - // !this.getWsStore().isConnectionState( - // wsKey, - // WsConnectionStateEnum.RECONNECTING, - // ) - // ) { - // return this.connect(wsKey); - // } - // }); - // } - - // /** - // * Unsubscribe from topics & remove them from memory. They won't be re-subscribed to if the connection reconnects. - // * @param wsTopics topic or list of topics - // * @param isPrivateTopic optional - the library will try to detect private topics, you can use this to mark a topic as private (if the topic isn't recognised yet) - // */ - // public unsubscribeLegacy( - // wsTopics: WsTopicSubscribeEventArgsV2, - // isPrivateTopic?: boolean, - // ) { - // const topics = Array.isArray(wsTopics) ? wsTopics : [wsTopics]; - // topics.forEach((topic) => { - // this.getWsStore().deleteTopic( - // this.getWsKeyForTopic(topic, isPrivateTopic), - // topic, - // ); - - // const wsKey = this.getWsKeyForTopic(topic, isPrivateTopic); - - // // unsubscribe request only necessary if active connection exists - // if ( - // this.getWsStore().isConnectionState( - // wsKey, - // WsConnectionStateEnum.CONNECTED, - // ) - // ) { - // this.requestUnsubscribeTopics(wsKey, [topic]); - // } - // }); - // } - /** * * From 83272f49a2ae9780495060bea60ed19ae7f90a1d Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Wed, 16 Jul 2025 15:02:38 +0100 Subject: [PATCH 20/57] chore(): cleaning --- examples/ws-private.ts | 8 ++++---- src/util/BaseWSClient.ts | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/examples/ws-private.ts b/examples/ws-private.ts index dabcc63..567bdb5 100644 --- a/examples/ws-private.ts +++ b/examples/ws-private.ts @@ -62,20 +62,20 @@ import { DefaultLogger, WebsocketClientV2 } from '../src'; // spot private // : account updates - // wsClient.subscribeTopic('SPOT', 'account'); + wsClient.subscribeTopic('SPOT', 'account'); // : order updates (note: symbol is required) // wsClient.subscribeTopic('SPOT', 'orders', 'BTCUSDT'); // futures private // : account updates - // wsClient.subscribeTopic('USDT-FUTURES', 'account'); + wsClient.subscribeTopic('USDT-FUTURES', 'account'); // : position updates - // wsClient.subscribeTopic('USDT-FUTURES', 'positions'); + wsClient.subscribeTopic('USDT-FUTURES', 'positions'); // : order updates - // wsClient.subscribeTopic('USDT-FUTURES', 'orders'); + wsClient.subscribeTopic('USDT-FUTURES', 'orders'); // : plan order updates wsClient.subscribeTopic('USDT-FUTURES', 'orders-algo'); diff --git a/src/util/BaseWSClient.ts b/src/util/BaseWSClient.ts index 6479793..7ae8ccd 100644 --- a/src/util/BaseWSClient.ts +++ b/src/util/BaseWSClient.ts @@ -730,11 +730,12 @@ export abstract class BaseWebsocketClient< } // Cache the request for this call, so we can enrich the response with request info - this.midflightRequestCache[wsKey][midflightRequest.requestKey] = - midflightRequest.requestEvent; + // this.midflightRequestCache[wsKey][midflightRequest.requestKey] = + // midflightRequest.requestEvent; this.logger.trace( - `Sending batch via message: "${JSON.stringify(wsMessage)}", cached with key "${midflightRequest.requestKey}"`, + // `Sending batch via message: "${JSON.stringify(wsMessage)}", cached with key "${midflightRequest.requestKey}"`, + `Sending batch via message: "${JSON.stringify(wsMessage)}"`, ); try { From 0db3b4cd9cba8d81af7f73575f6daf6dc7de4487 Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Wed, 16 Jul 2025 15:05:12 +0100 Subject: [PATCH 21/57] chore(): fix v1 import --- test/v1/ws.private.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/v1/ws.private.test.ts b/test/v1/ws.private.test.ts index a6ca2e4..ad5f036 100644 --- a/test/v1/ws.private.test.ts +++ b/test/v1/ws.private.test.ts @@ -1,5 +1,5 @@ import { - WebsocketClient, + WebsocketClientLegacyV1, WS_ERROR_ENUM, WS_KEY_MAP, WSClientConfigurableOptions, @@ -19,7 +19,7 @@ describe.skip('Private Spot Websocket Client', () => { describe('with invalid credentials', () => { it('should reject private subscribe if keys/signature are incorrect', async () => { - const badClient = new WebsocketClient( + const badClient = new WebsocketClientLegacyV1( { ...wsClientOptions, apiKey: 'bad', @@ -52,7 +52,7 @@ describe.skip('Private Spot Websocket Client', () => { }); describe('with valid API credentails', () => { - let wsClient: WebsocketClient; + let wsClient: WebsocketClientLegacyV1; it('should have api credentials to test with', () => { expect(API_KEY).toStrictEqual(expect.any(String)); @@ -61,7 +61,7 @@ describe.skip('Private Spot Websocket Client', () => { }); beforeAll(() => { - wsClient = new WebsocketClient( + wsClient = new WebsocketClientLegacyV1( wsClientOptions, getSilentLogger('expectSuccess'), ); From 0b34dff0f4382d534e57c3192c2db38f9e605656 Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Thu, 17 Jul 2025 11:30:04 +0100 Subject: [PATCH 22/57] feat(): fix deep object match for wsStore dedupe --- examples/ws-private.ts | 29 ++++++++++++-- src/util/BaseWSClient.ts | 5 --- src/util/WsStore.ts | 9 +++-- test/websockets/wsStore.test.ts | 69 +++++++++++++++++++++++++++++++++ 4 files changed, 101 insertions(+), 11 deletions(-) create mode 100644 test/websockets/wsStore.test.ts diff --git a/examples/ws-private.ts b/examples/ws-private.ts index 567bdb5..bc96ccf 100644 --- a/examples/ws-private.ts +++ b/examples/ws-private.ts @@ -70,13 +70,36 @@ import { DefaultLogger, WebsocketClientV2 } from '../src'; // futures private // : account updates wsClient.subscribeTopic('USDT-FUTURES', 'account'); + wsClient.subscribeTopic('USDC-FUTURES', 'account'); // : position updates - wsClient.subscribeTopic('USDT-FUTURES', 'positions'); + // wsClient.subscribeTopic('USDT-FUTURES', 'positions'); // : order updates - wsClient.subscribeTopic('USDT-FUTURES', 'orders'); + // wsClient.subscribeTopic('USDT-FUTURES', 'orders'); // : plan order updates - wsClient.subscribeTopic('USDT-FUTURES', 'orders-algo'); + // wsClient.subscribeTopic('USDT-FUTURES', 'orders-algo'); + + // wsClient + // .getWsStore() + // .getKeys() + // .forEach((wsKey) => { + // const state = wsClient.getWsStore().get(wsKey); + // console.log(`${wsKey} state: `, state.subscribedTopics.values()); + // }); + + // setTimeout(() => { + // wsClient.unsubscribeTopic('USDT-FUTURES', 'account'); + // }, 1000 * 2); + + // setTimeout(() => { + // wsClient + // .getWsStore() + // .getKeys() + // .forEach((wsKey) => { + // const state = wsClient.getWsStore().get(wsKey); + // console.log(`${wsKey} state: `, state.subscribedTopics.values()); + // }); + // }, 1000 * 5); })(); diff --git a/src/util/BaseWSClient.ts b/src/util/BaseWSClient.ts index 7ae8ccd..cdc1dd8 100644 --- a/src/util/BaseWSClient.ts +++ b/src/util/BaseWSClient.ts @@ -745,11 +745,6 @@ export abstract class BaseWebsocketClient< delete this.midflightRequestCache[wsKey][midflightRequest.requestKey]; } } - - // const wsMessage = JSON.stringify({ - // op: 'subscribe', - // args: wsTopicRequests, - // }); } /** diff --git a/src/util/WsStore.ts b/src/util/WsStore.ts index 045390d..df3b616 100644 --- a/src/util/WsStore.ts +++ b/src/util/WsStore.ts @@ -9,7 +9,7 @@ import { } from './WsStore.types'; /** - * Simple comparison of two objects, only checks 1-level deep (nested objects won't match) + * Simple comparison of two objects. Checks every key for match. Recursive if child properties contain objects. */ export function isDeepObjectMatch(object1: unknown, object2: unknown): boolean { if (typeof object1 === 'string' && typeof object2 === 'string') { @@ -20,11 +20,13 @@ export function isDeepObjectMatch(object1: unknown, object2: unknown): boolean { return false; } + // both are objects, run deeper match for (const key in object1) { const value1 = (object1 as any)[key]; const value2 = (object2 as any)[key]; - if (value1 !== value2) { + const matches = isDeepObjectMatch(value1, value2); + if (!matches) { return false; } } @@ -412,7 +414,8 @@ export default class WsStore< getMatchingTopic(key: WsKey, topic: TWSTopicSubscribeEventArgs) { const allTopics = this.getTopics(key).values(); for (const storedTopic of allTopics) { - if (isDeepObjectMatch(topic, storedTopic)) { + const matchesStoredTopic = isDeepObjectMatch(topic, storedTopic); + if (matchesStoredTopic) { return storedTopic; } } diff --git a/test/websockets/wsStore.test.ts b/test/websockets/wsStore.test.ts new file mode 100644 index 0000000..26c70f8 --- /dev/null +++ b/test/websockets/wsStore.test.ts @@ -0,0 +1,69 @@ +import { isDeepObjectMatch } from '../../src'; + +describe('WsStore', () => { + describe('isDeepObjectMatch()', () => { + it('should match an overlapping complex topic: ', () => { + const topic1 = { + topic: 'account', + payload: { instType: 'USDT-FUTURES', coin: 'default' }, + }; + const topic2 = { + topic: 'account', + payload: { instType: 'USDT-FUTURES', coin: 'default' }, + }; + + expect(isDeepObjectMatch(topic1, topic2)).toBeTruthy(); + }); + + it('should match an overlapping complex topic, even if keys are differently ordered', () => { + const topic1 = { + topic: 'account', + payload: { instType: 'USDT-FUTURES', coin: 'default' }, + }; + const topic2 = { + payload: { instType: 'USDT-FUTURES', coin: 'default' }, + topic: 'account', + }; + + expect(isDeepObjectMatch(topic1, topic2)).toBeTruthy(); + }); + + it('should NOT match an overlapping complex topic: ', () => { + const topic1 = { + topic: 'account', + payload: { instType: 'USDC-FUTURES', coin: 'default' }, + }; + const topic2 = { + topic: 'account', + payload: { instType: 'USDT-FUTURES', coin: 'default' }, + }; + + expect(isDeepObjectMatch(topic1, topic2)).toBeFalsy(); + }); + + it('should NOT match asymmetric objects (child property removed): ', () => { + const topic1 = { + topic: 'account', + payload: { instType: 'USDT-FUTURES', coin: 'default' }, + }; + const topic2 = { + topic: 'account', + payload: { coin: 'default' }, + }; + + expect(isDeepObjectMatch(topic1, topic2)).toBeFalsy(); + }); + + it('should NOT match asymmetric objects (no payload): ', () => { + const topic1 = { + topic: 'account', + payload: { instType: 'USDT-FUTURES', coin: 'default' }, + }; + const topic2 = { + topic: 'account', + }; + + expect(isDeepObjectMatch(topic1, topic2)).toBeFalsy(); + }); + }); +}); From 67c7351b4a6e9ac89c0dc7d4bd1b476d24dd1b7e Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Thu, 17 Jul 2025 11:42:33 +0100 Subject: [PATCH 23/57] feat(): add demo trading for WS V2 --- src/types/websockets/ws-general.ts | 8 ++++++++ src/util/BaseWSClient.ts | 1 + src/websocket-client-v2.ts | 3 ++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/types/websockets/ws-general.ts b/src/types/websockets/ws-general.ts index eb3913f..3c0aa6b 100644 --- a/src/types/websockets/ws-general.ts +++ b/src/types/websockets/ws-general.ts @@ -143,6 +143,14 @@ export interface WSClientConfigurableOptions { /** The passphrase you set when creating the API Key (NOT your account password) */ apiPass?: string; + /** + * Set to `true` to connect to Bitget's demo trading WebSockets: + * + * - V2: https://www.bitget.com/api-doc/common/demotrading/websocket + * - V3/UTA: https://www.bitget.com/api-doc/uta/guide#demo-trading + */ + demoTrading?: boolean; + /** Define a recv window when preparing a private websocket signature. This is in milliseconds, so 5000 == 5 seconds */ recvWindow?: number; diff --git a/src/util/BaseWSClient.ts b/src/util/BaseWSClient.ts index cdc1dd8..048eefc 100644 --- a/src/util/BaseWSClient.ts +++ b/src/util/BaseWSClient.ts @@ -169,6 +169,7 @@ export abstract class BaseWebsocketClient< this.wsStore = new WsStore(this.logger); this.options = { + demoTrading: false, pongTimeout: 1000, pingInterval: 10000, reconnectTimeout: 500, diff --git a/src/websocket-client-v2.ts b/src/websocket-client-v2.ts index 2f672ca..a9fbeb8 100644 --- a/src/websocket-client-v2.ts +++ b/src/websocket-client-v2.ts @@ -99,7 +99,8 @@ export class WebsocketClientV2 extends BaseWebsocketClient< return this.options.wsUrl; } - const networkKey: 'livenet' | 'demo' = 'livenet'; + const isDemoTrading = this.options.demoTrading; + const networkKey: 'livenet' | 'demo' = isDemoTrading ? 'demo' : 'livenet'; switch (wsKey) { case WS_KEY_MAP.spotv1: From 4c824c2e3b3e88b5cf836914bcbe9a17bb63b155 Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Thu, 17 Jul 2025 12:00:02 +0100 Subject: [PATCH 24/57] feat(): refactoring and cleaning in v2 client --- src/types/websockets/ws-api.ts | 2 +- src/util/BaseWSClient.ts | 17 +- src/util/websocket-util.ts | 43 +++ src/websocket-client-v2.ts | 498 +++++++++++++++------------------ 4 files changed, 263 insertions(+), 297 deletions(-) diff --git a/src/types/websockets/ws-api.ts b/src/types/websockets/ws-api.ts index e1a357e..ef9a618 100644 --- a/src/types/websockets/ws-api.ts +++ b/src/types/websockets/ws-api.ts @@ -26,7 +26,7 @@ export interface WsOperationLoginParams { } */ -export interface WsRequestOperationBitget { +export interface WsRequestOperationBitgetV2 { op: WsOperation; args?: (TWSRequestArg | string | number)[]; } diff --git a/src/util/BaseWSClient.ts b/src/util/BaseWSClient.ts index 048eefc..8da8934 100644 --- a/src/util/BaseWSClient.ts +++ b/src/util/BaseWSClient.ts @@ -178,7 +178,7 @@ export abstract class BaseWebsocketClient< // Automatically send an authentication op/request after a connection opens, for private connections. authPrivateConnectionsOnConnect: true, // Individual requests do not require a signature, so this is disabled. - authPrivateRequests: false, // TODO: + authPrivateRequests: false, ...options, }; @@ -189,12 +189,6 @@ export abstract class BaseWebsocketClient< */ protected abstract isAuthOnConnectWsKey(wsKey: TWSKey): boolean; - protected abstract isCustomReconnectionNeeded(wsKey: TWSKey): boolean; - - protected abstract triggerCustomReconnectionWorkflow( - wsKey: TWSKey, - ): Promise; - protected abstract sendPingEvent(wsKey: TWSKey, ws: WebSocket): void; protected abstract sendPongEvent(wsKey: TWSKey, ws: WebSocket): void; @@ -404,15 +398,6 @@ export abstract class BaseWebsocketClient< }; } - protected abstract getWsKeyForTopic( - subscribeEvent: WsTopicRequest, // TWSTopicSubscribeEventArgs == WsTopicRequest now - isPrivate?: boolean, - ): TWSKey; - - protected abstract isPrivateChannel( - subscribeEvent: WsTopicRequest, - ): boolean; - /** Get the WsStore that tracks websockets & topics */ public getWsStore(): WsStore> { return this.wsStore; diff --git a/src/util/websocket-util.ts b/src/util/websocket-util.ts index 645654e..2d7b10e 100644 --- a/src/util/websocket-util.ts +++ b/src/util/websocket-util.ts @@ -1,10 +1,12 @@ import { BitgetInstType, + WebsocketClientOptions, WsKey, WsPrivateTopicV2, WsTopicSubscribeEventArgs, WsTopicSubscribePublicArgsV2, } from '../types'; +import { DefaultLogger } from './logger'; import { signMessage } from './node-support'; export const WS_LOGGER_CATEGORY = { category: 'bitget-ws' }; @@ -105,6 +107,47 @@ export const PRIVATE_TOPICS_V2: WsPrivateTopicV2[] = [ 'orders-isolated', ]; +export async function getWsUrl( + wsKey: WsKey, + options: WebsocketClientOptions, + logger: DefaultLogger, +): Promise { + if (options.wsUrl) { + return options.wsUrl; + } + + const isDemoTrading = options.demoTrading; + const networkKey: 'livenet' | 'demo' = isDemoTrading ? 'demo' : 'livenet'; + + switch (wsKey) { + case WS_KEY_MAP.spotv1: + case WS_KEY_MAP.mixv1: { + throw new Error( + 'Use the WebsocketClient instead of WebsocketClientV2 for V1 websockets', + ); + } + case WS_KEY_MAP.v2Private: { + return WS_BASE_URL_MAP.v2Private.all[networkKey]; + } + case WS_KEY_MAP.v2Public: { + return WS_BASE_URL_MAP.v2Public.all[networkKey]; + } + case WS_KEY_MAP.v3Private: { + return WS_BASE_URL_MAP.v3Private.all[networkKey]; + } + case WS_KEY_MAP.v3Public: { + return WS_BASE_URL_MAP.v3Public.all[networkKey]; + } + default: { + logger.error('getWsUrl(): Unhandled wsKey: ', { + ...WS_LOGGER_CATEGORY, + wsKey, + }); + throw neverGuard(wsKey, 'getWsUrl(): Unhandled wsKey'); + } + } +} + /** * Normalised internal format for a request (subscribe/unsubscribe/etc) on a topic, with optional parameters. * diff --git a/src/websocket-client-v2.ts b/src/websocket-client-v2.ts index a9fbeb8..20b6213 100644 --- a/src/websocket-client-v2.ts +++ b/src/websocket-client-v2.ts @@ -6,7 +6,7 @@ import { WsKey, WsOperation, WsOperationLoginParams, - WsRequestOperationBitget, + WsRequestOperationBitgetV2, WsTopic, WsTopicV2, } from './types'; @@ -15,20 +15,18 @@ import { EmittableEvent, getMaxTopicsPerSubscribeEvent, getNormalisedTopicRequests, + getWsUrl, isPrivateChannel, isWsPong, MidflightWsRequestEvent, - neverGuard, WS_AUTH_ON_CONNECT_KEYS, - WS_BASE_URL_MAP, WS_KEY_MAP, - WS_LOGGER_CATEGORY, WsTopicRequest, } from './util'; import { signMessage } from './util/node-support'; import { SignAlgorithm } from './util/webCryptoAPI'; -const LOGGER_CATEGORY = { category: 'bitget-ws' }; +const WS_LOGGER_CATEGORY = { category: 'bitget-ws' }; const COIN_CHANNELS: WsTopicV2[] = [ 'account', @@ -38,27 +36,142 @@ const COIN_CHANNELS: WsTopicV2[] = [ export class WebsocketClientV2 extends BaseWebsocketClient< WsKey, - WsRequestOperationBitget // subscribe requests have an "args" parameter with an object within + WsRequestOperationBitgetV2 // subscribe requests have an "args" parameter with an object within > { - protected getWsKeyForTopic( - // subscribeEvent: WsTopicSubscribeEventArgsV2, - subscribeEvent: WsTopicRequest, // TWSTopicSubscribeEventArgs == WsTopicRequest now - isPrivate?: boolean, - ): WsKey { - return isPrivate || isPrivateChannel(subscribeEvent.topic) - ? WS_KEY_MAP.v2Private - : WS_KEY_MAP.v2Public; + /** + * Request connection of all dependent (public & private) websockets, instead of waiting for automatic connection by library + */ + public connectAll(): Promise[] { + return [ + this.connect(WS_KEY_MAP.v2Private), + this.connect(WS_KEY_MAP.v2Public), + ]; } - protected isPrivateChannel(subscribeEvent: WsTopicRequest): boolean { - return isPrivateChannel(subscribeEvent.topic); + /** Some private channels use `coin` instead of `instId`. This method handles building the sub/unsub request */ + private getSubRequest( + instType: BitgetInstTypeV2, + topic: WsTopicV2, + coin: string = 'default', + ): WsTopicRequest { + if (isPrivateChannel(topic)) { + if (COIN_CHANNELS.includes(topic)) { + const subscribeRequest: WsTopicRequest = { + topic, + payload: { + instType, + coin, + }, + }; + return subscribeRequest; + } + + const subscribeRequest: WsTopicRequest = { + topic, + payload: { + instType, + instId: coin, + }, + }; + + return subscribeRequest; + } + + const subscribeRequest: WsTopicRequest = { + topic, + payload: { + instType, + instId: coin, + }, + }; + return subscribeRequest; } - protected isCustomReconnectionNeeded(): boolean { - return false; + /** + * Subscribe to a topic + * @param instType instrument type (refer to API docs). + * @param topic topic name (e.g. "ticker"). + * @param instId instrument ID (e.g. "BTCUSDT"). Use "default" for private topics. + */ + public subscribeTopic( + instType: BitgetInstTypeV2, + topic: WsTopicV2, + coin: string = 'default', + ) { + const subRequest = this.getSubRequest(instType, topic, coin); + const isPrivateTopic = isPrivateChannel(topic); + const wsKey = isPrivateTopic ? WS_KEY_MAP.v2Private : WS_KEY_MAP.v2Public; + + return this.subscribe(subRequest, wsKey); + } + + /** + * Unsubscribe from a topic + * @param instType instrument type (refer to API docs). + * @param topic topic name (e.g. "ticker"). + * @param instId instrument ID (e.g. "BTCUSDT"). Use "default" for private topics to get all symbols. + */ + public unsubscribeTopic( + instType: BitgetInstTypeV2, + topic: WsTopicV2, + coin: string = 'default', + ) { + const subRequest = this.getSubRequest(instType, topic, coin); + + const isPrivateTopic = isPrivateChannel(topic); + const wsKey = isPrivateTopic ? WS_KEY_MAP.v2Private : WS_KEY_MAP.v2Public; + + return this.unsubscribe(subRequest, wsKey); + } + + /** + * Request subscription to one or more topics. Pass topics as either an array of strings, + * or array of objects (if the topic has parameters). + * + * Objects should be formatted as {topic: string, params: object, category: CategoryV5}. + * + * - Subscriptions are automatically routed to the correct websocket connection. + * - Authentication/connection is automatic. + * - Resubscribe after network issues is automatic. + * + * Call `unsubscribe(topics)` to remove topics + */ + public subscribe( + requests: + | (WsTopicRequest | WsTopic) + | (WsTopicRequest | WsTopic)[], + wsKey: WsKey, + ): Promise { + const topicRequests = Array.isArray(requests) ? requests : [requests]; + const normalisedTopicRequests = getNormalisedTopicRequests(topicRequests); + return this.subscribeTopicsForWsKey(normalisedTopicRequests, wsKey); + } + + /** + * Unsubscribe from one or more topics. Similar to subscribe() but in reverse. + * + * - Requests are automatically routed to the correct websocket connection. + * - These topics will be removed from the topic cache, so they won't be subscribed to again. + */ + public unsubscribe( + requests: + | (WsTopicRequest | WsTopic) + | (WsTopicRequest | WsTopic)[], + wsKey: WsKey, + ) { + const topicRequests = Array.isArray(requests) ? requests : [requests]; + const normalisedTopicRequests = getNormalisedTopicRequests(topicRequests); + + return this.unsubscribeTopicsForWsKey(normalisedTopicRequests, wsKey); } - protected async triggerCustomReconnectionWorkflow(): Promise {} + /** + * + * + * Internal methods required to integrate with the BaseWSClient + * + * + */ protected sendPingEvent(wsKey: WsKey): void { this.tryWsSend(wsKey, 'ping'); @@ -95,40 +208,7 @@ export class WebsocketClientV2 extends BaseWebsocketClient< } protected async getWsUrl(wsKey: WsKey): Promise { - if (this.options.wsUrl) { - return this.options.wsUrl; - } - - const isDemoTrading = this.options.demoTrading; - const networkKey: 'livenet' | 'demo' = isDemoTrading ? 'demo' : 'livenet'; - - switch (wsKey) { - case WS_KEY_MAP.spotv1: - case WS_KEY_MAP.mixv1: { - throw new Error( - 'Use the WebsocketClient instead of WebsocketClientV2 for V1 websockets', - ); - } - case WS_KEY_MAP.v2Private: { - return WS_BASE_URL_MAP.v2Private.all[networkKey]; - } - case WS_KEY_MAP.v2Public: { - return WS_BASE_URL_MAP.v2Public.all[networkKey]; - } - case WS_KEY_MAP.v3Private: { - return WS_BASE_URL_MAP.v3Private.all[networkKey]; - } - case WS_KEY_MAP.v3Public: { - return WS_BASE_URL_MAP.v3Public.all[networkKey]; - } - default: { - this.logger.error('getWsUrl(): Unhandled wsKey: ', { - ...LOGGER_CATEGORY, - wsKey, - }); - throw neverGuard(wsKey, 'getWsUrl(): Unhandled wsKey'); - } - } + return getWsUrl(wsKey, this.options, this.logger); } protected getMaxTopicsPerSubscribeEvent(wsKey: WsKey): number | null { @@ -141,10 +221,7 @@ export class WebsocketClientV2 extends BaseWebsocketClient< protected async getWsRequestEvents( operation: WsOperation, requests: WsTopicRequest[], - ): Promise>[]> { - const wsRequestEvents: MidflightWsRequestEvent< - WsRequestOperationBitget - >[] = []; + ): Promise>[]> { const wsRequestBuildingErrors: unknown[] = []; const topics = requests.map( @@ -174,7 +251,7 @@ export class WebsocketClientV2 extends BaseWebsocketClient< ] } */ - const wsEvent: WsRequestOperationBitget = { + const wsEvent: WsRequestOperationBitgetV2 = { op: operation, args: requests.map((request) => { // const request = { @@ -195,16 +272,12 @@ export class WebsocketClientV2 extends BaseWebsocketClient< }; const midflightWsEvent: MidflightWsRequestEvent< - WsRequestOperationBitget + WsRequestOperationBitgetV2 > = { requestKey: req_id, requestEvent: wsEvent, }; - wsRequestEvents.push({ - ...midflightWsEvent, - }); - if (wsRequestBuildingErrors.length) { const label = wsRequestBuildingErrors.length === requests.length ? 'all' : 'some'; @@ -223,7 +296,88 @@ export class WebsocketClientV2 extends BaseWebsocketClient< ); } - return wsRequestEvents; + return [midflightWsEvent]; + } + + private async getWsAuthSignature( + wsKey: WsKey, + ): Promise<{ expiresAt: number; signature: string }> { + const { apiKey, apiSecret, apiPass, recvWindow } = this.options; + + if (!apiKey || !apiSecret || !apiPass) { + this.logger.error( + 'Cannot authenticate websocket, either api key, secret or passphrase missing.', + { ...WS_LOGGER_CATEGORY, wsKey }, + ); + throw new Error('Cannot auth - missing api or secret or pass in config'); + } + + this.logger.trace("Getting auth'd request params", { + ...WS_LOGGER_CATEGORY, + wsKey, + }); + + const signatureExpiresAt = ((Date.now() + recvWindow) / 1000).toFixed(0); + + const signature = await this.signMessage( + signatureExpiresAt + 'GET' + '/user/verify', + apiSecret, + 'base64', + 'SHA-256', + ); + + return { + expiresAt: +signatureExpiresAt, + signature, + }; + } + + private async signMessage( + paramsStr: string, + secret: string, + method: 'hex' | 'base64', + algorithm: SignAlgorithm, + ): Promise { + if (typeof this.options.customSignMessageFn === 'function') { + return this.options.customSignMessageFn(paramsStr, secret); + } + return await signMessage(paramsStr, secret, method, algorithm); + } + + protected async getWsAuthRequestEvent( + wsKey: WsKey, + ): Promise> { + try { + const { apiKey, apiSecret, apiPass } = this.options; + const { signature, expiresAt } = await this.getWsAuthSignature(wsKey); + + if (!apiKey || !apiSecret || !apiPass) { + this.logger.error( + 'Cannot authenticate websocket, either api key, secret or passphrase missing.', + { ...WS_LOGGER_CATEGORY, wsKey }, + ); + throw new Error( + 'Cannot auth - missing api or secret or pass in config', + ); + } + + const request: WsRequestOperationBitgetV2 = { + op: 'login', + args: [ + { + apiKey, + passphrase: apiPass, + timestamp: expiresAt, + sign: signature, + }, + ], + }; + + return request; + } catch (e) { + this.logger.error(e, { ...WS_LOGGER_CATEGORY, wsKey }); + throw e; + } } /** @@ -320,220 +474,4 @@ export class WebsocketClientV2 extends BaseWebsocketClient< async sendWSAPIRequest(): Promise { return; } - - /** - * Request connection of all dependent (public & private) websockets, instead of waiting for automatic connection by library - */ - public connectAll(): Promise[] { - return [ - this.connect(WS_KEY_MAP.v2Private), - this.connect(WS_KEY_MAP.v2Public), - ]; - } - - /** Some private channels use `coin` instead of `instId`. This method handles building the sub/unsub request */ - private getSubRequest( - instType: BitgetInstTypeV2, - topic: WsTopicV2, - coin: string = 'default', - ): WsTopicRequest { - if (isPrivateChannel(topic)) { - if (COIN_CHANNELS.includes(topic)) { - const subscribeRequest: WsTopicRequest = { - topic, - payload: { - instType, - coin, - }, - }; - return subscribeRequest; - } - - const subscribeRequest: WsTopicRequest = { - topic, - payload: { - instType, - instId: coin, - }, - }; - - return subscribeRequest; - } - - const subscribeRequest: WsTopicRequest = { - topic, - payload: { - instType, - instId: coin, - }, - }; - return subscribeRequest; - } - - /** - * Subscribe to a topic - * @param instType instrument type (refer to API docs). - * @param topic topic name (e.g. "ticker"). - * @param instId instrument ID (e.g. "BTCUSDT"). Use "default" for private topics. - */ - public subscribeTopic( - instType: BitgetInstTypeV2, - topic: WsTopicV2, - coin: string = 'default', - ) { - const subRequest = this.getSubRequest(instType, topic, coin); - const isPrivateTopic = isPrivateChannel(topic); - const wsKey = isPrivateTopic ? WS_KEY_MAP.v2Private : WS_KEY_MAP.v2Public; - - return this.subscribe(subRequest, wsKey); - } - - /** - * Unsubscribe from a topic - * @param instType instrument type (refer to API docs). - * @param topic topic name (e.g. "ticker"). - * @param instId instrument ID (e.g. "BTCUSDT"). Use "default" for private topics to get all symbols. - */ - public unsubscribeTopic( - instType: BitgetInstTypeV2, - topic: WsTopicV2, - coin: string = 'default', - ) { - const subRequest = this.getSubRequest(instType, topic, coin); - - const isPrivateTopic = isPrivateChannel(topic); - const wsKey = isPrivateTopic ? WS_KEY_MAP.v2Private : WS_KEY_MAP.v2Public; - - return this.unsubscribe(subRequest, wsKey); - } - - /** - * Request subscription to one or more topics. Pass topics as either an array of strings, - * or array of objects (if the topic has parameters). - * - * Objects should be formatted as {topic: string, params: object, category: CategoryV5}. - * - * - Subscriptions are automatically routed to the correct websocket connection. - * - Authentication/connection is automatic. - * - Resubscribe after network issues is automatic. - * - * Call `unsubscribe(topics)` to remove topics - */ - public subscribe( - requests: - | (WsTopicRequest | WsTopic) - | (WsTopicRequest | WsTopic)[], - wsKey: WsKey, - ): Promise { - const topicRequests = Array.isArray(requests) ? requests : [requests]; - const normalisedTopicRequests = getNormalisedTopicRequests(topicRequests); - return this.subscribeTopicsForWsKey(normalisedTopicRequests, wsKey); - } - - /** - * Unsubscribe from one or more topics. Similar to subscribe() but in reverse. - * - * - Requests are automatically routed to the correct websocket connection. - * - These topics will be removed from the topic cache, so they won't be subscribed to again. - */ - public unsubscribe( - requests: - | (WsTopicRequest | WsTopic) - | (WsTopicRequest | WsTopic)[], - wsKey: WsKey, - ) { - const topicRequests = Array.isArray(requests) ? requests : [requests]; - const normalisedTopicRequests = getNormalisedTopicRequests(topicRequests); - - return this.unsubscribeTopicsForWsKey(normalisedTopicRequests, wsKey); - } - - /** - * - * - * Internal methods required to integrate with the BaseWSClient - * - * - */ - - protected async getWsAuthRequestEvent( - wsKey: WsKey, - ): Promise> { - try { - const { apiKey, apiSecret, apiPass } = this.options; - const { signature, expiresAt } = await this.getWsAuthSignature(wsKey); - - if (!apiKey || !apiSecret || !apiPass) { - this.logger.error( - 'Cannot authenticate websocket, either api key, secret or passphrase missing.', - { ...WS_LOGGER_CATEGORY, wsKey }, - ); - throw new Error( - 'Cannot auth - missing api or secret or pass in config', - ); - } - - const request: WsRequestOperationBitget = { - op: 'login', - args: [ - { - apiKey, - passphrase: apiPass, - timestamp: expiresAt, - sign: signature, - }, - ], - }; - - return request; - } catch (e) { - this.logger.error(e, { ...WS_LOGGER_CATEGORY, wsKey }); - throw e; - } - } - - private async getWsAuthSignature( - wsKey: WsKey, - ): Promise<{ expiresAt: number; signature: string }> { - const { apiKey, apiSecret, apiPass, recvWindow } = this.options; - - if (!apiKey || !apiSecret || !apiPass) { - this.logger.error( - 'Cannot authenticate websocket, either api key, secret or passphrase missing.', - { ...WS_LOGGER_CATEGORY, wsKey }, - ); - throw new Error('Cannot auth - missing api or secret or pass in config'); - } - - this.logger.trace("Getting auth'd request params", { - ...WS_LOGGER_CATEGORY, - wsKey, - }); - - const signatureExpiresAt = ((Date.now() + recvWindow) / 1000).toFixed(0); - - const signature = await this.signMessage( - signatureExpiresAt + 'GET' + '/user/verify', - apiSecret, - 'base64', - 'SHA-256', - ); - - return { - expiresAt: +signatureExpiresAt, - signature, - }; - } - - private async signMessage( - paramsStr: string, - secret: string, - method: 'hex' | 'base64', - algorithm: SignAlgorithm, - ): Promise { - if (typeof this.options.customSignMessageFn === 'function') { - return this.options.customSignMessageFn(paramsStr, secret); - } - return await signMessage(paramsStr, secret, method, algorithm); - } } From 04cc922f2d89d55b0cc5e6a1197c0266c42fdf45 Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Thu, 17 Jul 2025 12:49:23 +0100 Subject: [PATCH 25/57] feat(): refactor examples into API versions, feat(): implement v3 WS consumers, feat(): add v3 WS consumer example (public) --- examples/README.md | 18 +- examples/{ => V2}/rest-private-futures.ts | 2 +- examples/{ => V2}/rest-private-spot.ts | 2 +- examples/V2/rest-private-tiago.ts | 58 +++ examples/{ => V2}/rest-public-futures.ts | 2 +- examples/{ => V2}/rest-public-spot.ts | 2 +- examples/{ => V2}/rest-trade-futures.ts | 2 +- examples/{ => V2}/rest-trade-spot.ts | 2 +- examples/V2/ws-demo-trading.ts | 65 +++ examples/{ => V2}/ws-private.ts | 2 +- examples/{ => V2}/ws-public.ts | 2 +- examples/V3/ws-public.ts | 100 +++++ .../rest-private-futures.ts | 2 +- .../deprecated-V1-REST/rest-private-spot.ts | 2 +- .../deprecated-V1-REST/rest-public-futures.ts | 4 +- .../deprecated-V1-REST/rest-trade-futures.ts | 7 +- .../deprecated-V1-REST/rest-trade-spot.ts | 4 +- src/index.ts | 1 + src/types/websockets/ws-api.ts | 2 +- src/types/websockets/ws-general.ts | 32 +- src/util/websocket-util.ts | 11 +- src/websocket-client-v2.ts | 26 +- src/websocket-client-v3.ts | 398 ++++++++++++++++++ 23 files changed, 714 insertions(+), 32 deletions(-) rename examples/{ => V2}/rest-private-futures.ts (96%) rename examples/{ => V2}/rest-private-spot.ts (95%) create mode 100644 examples/V2/rest-private-tiago.ts rename examples/{ => V2}/rest-public-futures.ts (94%) rename examples/{ => V2}/rest-public-spot.ts (89%) rename examples/{ => V2}/rest-trade-futures.ts (99%) rename examples/{ => V2}/rest-trade-spot.ts (99%) create mode 100644 examples/V2/ws-demo-trading.ts rename examples/{ => V2}/ws-private.ts (98%) rename examples/{ => V2}/ws-public.ts (99%) create mode 100644 examples/V3/ws-public.ts create mode 100644 src/websocket-client-v3.ts diff --git a/examples/README.md b/examples/README.md index 3da479b..ae6f913 100644 --- a/examples/README.md +++ b/examples/README.md @@ -7,7 +7,23 @@ ts-node ./examples/rest-spot-public.ts Samples that require authentication can be edited directly but also support environmental variables. E.g. on mac/unix: ``` -API_KEY_COM="yourkeyhere" API_SECRET_COM="yoursecrethere" API_PASS_COM="yourapipasshere" ts-node examples/rest-trade-futures.ts +API_KEY_COM='yourkeyhere' API_SECRET_COM='yoursecrethere' API_PASS_COM='yourapipasshere' ts-node examples/rest-trade-futures.ts ``` They can also be converted to JavaScript by changing the imports to require & removing any type annotations. + +## V3 / Unified Trading Account (UTA) + +These newer examples are for Bitget's V3 APIs and WebSockets. They can be found in the examples/V3 folder. + +Refer to the V3 / UTA API documentation for more information on the V3 APIs: +https://www.bitget.com/api-doc/uta/intro + +These APIs require your account to be permanently upgraded to the Unified Trading Account, if you plan on using the account-level REST APIs and WebSockets. + +## V2 + +These examples are for Bitget's V2 APIs and WebSockets. They can be found in the examples/V2 folder. + +Refer to the V2 API documentation for more information on the V2 APIs: +https://www.bitget.com/api-doc/common/intro diff --git a/examples/rest-private-futures.ts b/examples/V2/rest-private-futures.ts similarity index 96% rename from examples/rest-private-futures.ts rename to examples/V2/rest-private-futures.ts index 7079c87..831c60c 100644 --- a/examples/rest-private-futures.ts +++ b/examples/V2/rest-private-futures.ts @@ -1,4 +1,4 @@ -import { RestClientV2 } from '../src/index'; +import { RestClientV2 } from '../../src/index'; // or // import { RestClientV2 } from 'bitget-api'; diff --git a/examples/rest-private-spot.ts b/examples/V2/rest-private-spot.ts similarity index 95% rename from examples/rest-private-spot.ts rename to examples/V2/rest-private-spot.ts index 50465d6..7aab4d9 100644 --- a/examples/rest-private-spot.ts +++ b/examples/V2/rest-private-spot.ts @@ -1,4 +1,4 @@ -import { RestClientV2 } from '../src/index'; +import { RestClientV2 } from '../../src/index'; // or // import { RestClientV2 } from 'bitget-api'; diff --git a/examples/V2/rest-private-tiago.ts b/examples/V2/rest-private-tiago.ts new file mode 100644 index 0000000..e84cff4 --- /dev/null +++ b/examples/V2/rest-private-tiago.ts @@ -0,0 +1,58 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import { BrokerClient, RestClientV2, WebsocketClient } from '../../src/index'; + +// or +// import { RestClientV2 } from 'bitget-api'; + +// read from environmental variables +const API_KEY = process.env.API_KEY_COM; +const API_SECRET = process.env.API_SECRET_COM; +const API_PASS = process.env.API_PASS_COM; + +const client = new BrokerClient({ + apiKey: API_KEY, + apiSecret: API_SECRET, + apiPass: API_PASS, + // apiKey: 'apiKeyHere', + // apiSecret: 'apiSecretHere', + // apiPass: 'apiPassHere', +}); + +/** This is a simple script wrapped in a immediately invoked function expression, designed to check for any available BTC balance and immediately sell the full amount for USDT */ +(async () => { + try { + // const account = await client.getSpotAccountAssets(); + + // const data = account.data; + // const cleanData = data.map((a) => { + // return [a.coin, +a.available].join(','); + // }); + + // console.log('res: ', data.length, '\ncoin,available'); + // console.log(cleanData.join('\n')); + + const res = await client.getAgentCommissionDetail(); + console.log('res: ', JSON.stringify(res, null, 2)); + + // const businessTypeEnum = [ + // 'SMALL_EXCHANGE_USER_IN', + // 'SMALL_EXCHANGE_USER_OUT', + // 'WITHDRAW', + // // 'AIRDROP_REWARD', + // ]; + // const billsRes = await client.getSpotAccountBills({ limit: '500' }); + + // const rows = billsRes.data.filter( + // (data) => !businessTypeEnum.includes(data.businessType), + // ); + // console.log('res, ', JSON.stringify(rows, null, 2)); + + // for (const bill of rows) { + // if (!businessTypeEnum.includes(bill.businessType)) { + // console.error('missing enum: ', bill); + // } + // } + } catch (e) { + console.error('request failed: ', e); + } +})(); diff --git a/examples/rest-public-futures.ts b/examples/V2/rest-public-futures.ts similarity index 94% rename from examples/rest-public-futures.ts rename to examples/V2/rest-public-futures.ts index 5c6c02d..d6e9724 100644 --- a/examples/rest-public-futures.ts +++ b/examples/V2/rest-public-futures.ts @@ -1,4 +1,4 @@ -import { RestClientV2 } from '../src/index'; +import { RestClientV2 } from '../../src/index'; // or // import { RestClientV2 } from 'bitget-api'; diff --git a/examples/rest-public-spot.ts b/examples/V2/rest-public-spot.ts similarity index 89% rename from examples/rest-public-spot.ts rename to examples/V2/rest-public-spot.ts index 5e282eb..6b2f52d 100644 --- a/examples/rest-public-spot.ts +++ b/examples/V2/rest-public-spot.ts @@ -1,4 +1,4 @@ -import { RestClientV2 } from '../src/index'; +import { RestClientV2 } from '../../src/index'; // or // import { RestClientV2 } from 'bitget-api'; diff --git a/examples/rest-trade-futures.ts b/examples/V2/rest-trade-futures.ts similarity index 99% rename from examples/rest-trade-futures.ts rename to examples/V2/rest-trade-futures.ts index 0553ff9..843e017 100644 --- a/examples/rest-trade-futures.ts +++ b/examples/V2/rest-trade-futures.ts @@ -2,7 +2,7 @@ import { FuturesPlaceOrderRequestV2, RestClientV2, WebsocketClientV2, -} from '../src'; +} from '../../src'; // or // import { FuturesPlaceOrderRequestV2, RestClientV2, WebsocketClientV2 } from '../src'; diff --git a/examples/rest-trade-spot.ts b/examples/V2/rest-trade-spot.ts similarity index 99% rename from examples/rest-trade-spot.ts rename to examples/V2/rest-trade-spot.ts index 555a773..feda562 100644 --- a/examples/rest-trade-spot.ts +++ b/examples/V2/rest-trade-spot.ts @@ -2,7 +2,7 @@ import { RestClientV2, SpotOrderRequestV2, WebsocketClientV2, -} from '../src/index'; +} from '../../src/index'; // import { RestClientV2, WebsocketClient } from '../src/index'; diff --git a/examples/V2/ws-demo-trading.ts b/examples/V2/ws-demo-trading.ts new file mode 100644 index 0000000..aa70424 --- /dev/null +++ b/examples/V2/ws-demo-trading.ts @@ -0,0 +1,65 @@ +import { DefaultLogger, WebsocketClientV2 } from '../../src'; + +// or +// import { DefaultLogger, WS_KEY_MAP, WebsocketClientV2 } from 'bitget-api'; + +(async () => { + const logger = { + ...DefaultLogger, + trace: (...params) => console.log('trace', ...params), + }; + + const API_KEY = process.env.API_KEY_COM; + const API_SECRET = process.env.API_SECRET_COM; + const API_PASS = process.env.API_PASS_COM; + + // If running from CLI in unix, you can pass env vars as such: + // API_KEY_COM='lkm12n3-2ba3-1mxf-fn13-lkm12n3a' API_SECRET_COM='035B2B9637E1BDFFEE2646BFBDDB8CE4' API_PASSPHRASE_COM='ComplexPa$$!23$5^' ts-node examples/ws-private.ts + + const wsClient = new WebsocketClientV2( + { + // restOptions: { + // optionally provide rest options, e.g. to pass through a proxy + // }, + + // Set demoTrading to true, to route all connections to the demo trading wss URLs: + demoTrading: true, + + // If using private topics, make sure to include API keys + apiKey: API_KEY, + apiSecret: API_SECRET, + apiPass: API_PASS, + }, + logger, + ); + + wsClient.on('update', (data) => { + console.log('WS raw message received ', data); + // console.log('WS raw message received ', JSON.stringify(data, null, 2)); + }); + + wsClient.on('open', (data) => { + console.log('WS connection opened:', data.wsKey); + }); + wsClient.on('response', (data) => { + console.log('WS response: ', JSON.stringify(data, null, 2)); + }); + wsClient.on('reconnect', ({ wsKey }) => { + console.log('WS automatically reconnecting.... ', wsKey); + }); + wsClient.on('reconnected', (data) => { + console.log('WS reconnected ', data?.wsKey); + }); + wsClient.on('exception', (data) => { + console.log('WS error', data); + }); + + /** + * Public events + */ + + const symbol = 'BTCUSDT'; + wsClient.subscribeTopic('SPOT', 'ticker', symbol); + + wsClient.subscribeTopic('USDC-FUTURES', 'account'); +})(); diff --git a/examples/ws-private.ts b/examples/V2/ws-private.ts similarity index 98% rename from examples/ws-private.ts rename to examples/V2/ws-private.ts index bc96ccf..98fd433 100644 --- a/examples/ws-private.ts +++ b/examples/V2/ws-private.ts @@ -1,4 +1,4 @@ -import { DefaultLogger, WebsocketClientV2 } from '../src'; +import { DefaultLogger, WebsocketClientV2 } from '../../src'; // or // import { DefaultLogger, WS_KEY_MAP, WebsocketClientV2 } from 'bitget-api'; diff --git a/examples/ws-public.ts b/examples/V2/ws-public.ts similarity index 99% rename from examples/ws-public.ts rename to examples/V2/ws-public.ts index 424d6e1..f68ac6d 100644 --- a/examples/ws-public.ts +++ b/examples/V2/ws-public.ts @@ -1,4 +1,4 @@ -import { DefaultLogger, WebsocketClientV2, WS_KEY_MAP } from '../src'; +import { DefaultLogger, WebsocketClientV2, WS_KEY_MAP } from '../../src'; // or // import { DefaultLogger, WS_KEY_MAP, WebsocketClientV2 } from 'bitget-api'; diff --git a/examples/V3/ws-public.ts b/examples/V3/ws-public.ts new file mode 100644 index 0000000..d8ba341 --- /dev/null +++ b/examples/V3/ws-public.ts @@ -0,0 +1,100 @@ +import { DefaultLogger, WebsocketClientV3, WS_KEY_MAP } from '../../src'; + +// or +// import { DefaultLogger, WS_KEY_MAP, WebsocketClientV2 } from 'bitget-api'; + +(async () => { + const logger = { + ...DefaultLogger, + trace: (...params) => console.log('trace', ...params), + }; + + const wsClient = new WebsocketClientV3({}, logger); + + wsClient.on('update', (data) => { + console.log('WS raw message received ', data); + // console.log('WS raw message received ', JSON.stringify(data, null, 2)); + }); + + wsClient.on('open', (data) => { + console.log('WS connection opened:', data.wsKey); + }); + wsClient.on('response', (data) => { + console.log('WS response: ', JSON.stringify(data, null, 2)); + }); + wsClient.on('reconnect', ({ wsKey }) => { + console.log('WS automatically reconnecting.... ', wsKey); + }); + wsClient.on('reconnected', (data) => { + console.log('WS reconnected ', data?.wsKey); + }); + wsClient.on('exception', (data) => { + console.log('WS error', data); + }); + + /** + * Public events + */ + + // You can subscribe to one topic at a time + wsClient.subscribe( + { + topic: 'ticker', + payload: { + instType: 'spot', + symbol: 'BTCUSDT', + }, + }, + WS_KEY_MAP.v3Public, // This parameter points to private or public + ); + + // Or multiple at once: + wsClient.subscribe( + [ + { + topic: 'ticker', + payload: { + instType: 'spot', + symbol: 'BTCUSDT', + }, + }, + { + topic: 'ticker', + payload: { + instType: 'spot', + symbol: 'ETHUSDT', + }, + }, + { + topic: 'ticker', + payload: { + instType: 'spot', + symbol: 'XRPUSDT', + }, + }, + { + topic: 'ticker', + payload: { + instType: 'usdt-futures', + symbol: 'BTCUSDT', + }, + }, + { + topic: 'ticker', + payload: { + instType: 'usdt-futures', + symbol: 'BTCUSDT', + }, + }, + ], + WS_KEY_MAP.v3Public, + ); + + // Topics are tracked per websocket type + // The below example will pull a list of subscribed topics on that connection (e.g. all public topics), after a 5 second delay: + setTimeout(() => { + const publicTopics = wsClient.getWsStore().getTopics(WS_KEY_MAP.v3Public); + + console.log('public topics: ', publicTopics); + }, 5 * 1000); +})(); diff --git a/examples/deprecated-V1-REST/rest-private-futures.ts b/examples/deprecated-V1-REST/rest-private-futures.ts index b52717d..e9f2aa2 100644 --- a/examples/deprecated-V1-REST/rest-private-futures.ts +++ b/examples/deprecated-V1-REST/rest-private-futures.ts @@ -1,4 +1,4 @@ -import { FuturesClient, WebsocketClient } from '../../src/index'; +import { FuturesClient } from '../../src/index'; // or // import { SpotClient } from 'bitget-api'; diff --git a/examples/deprecated-V1-REST/rest-private-spot.ts b/examples/deprecated-V1-REST/rest-private-spot.ts index f897ada..bbccaab 100644 --- a/examples/deprecated-V1-REST/rest-private-spot.ts +++ b/examples/deprecated-V1-REST/rest-private-spot.ts @@ -1,4 +1,4 @@ -import { SpotClient, WebsocketClient } from '../../src/index'; +import { SpotClient } from '../../src/index'; // or // import { SpotClient } from 'bitget-api'; diff --git a/examples/deprecated-V1-REST/rest-public-futures.ts b/examples/deprecated-V1-REST/rest-public-futures.ts index 423c6f9..1395c6a 100644 --- a/examples/deprecated-V1-REST/rest-public-futures.ts +++ b/examples/deprecated-V1-REST/rest-public-futures.ts @@ -1,4 +1,4 @@ -import { FuturesClient, WebsocketClient } from '../../src/index'; +import { FuturesClient } from '../../src/index'; // or // import { SpotClient } from 'bitget-api'; @@ -23,7 +23,7 @@ const symbol = 'BTCUSDT_UMCBL'; timestampNow.toString(), candlesToFetch.toString(), ); - console.log('getCandles returned ' + response.length + ' candles'); + console.log('getCandles returned ' + response.data.length + ' candles'); } catch (e) { console.error('request failed: ', e); } diff --git a/examples/deprecated-V1-REST/rest-trade-futures.ts b/examples/deprecated-V1-REST/rest-trade-futures.ts index bb6fb2c..650f720 100644 --- a/examples/deprecated-V1-REST/rest-trade-futures.ts +++ b/examples/deprecated-V1-REST/rest-trade-futures.ts @@ -1,9 +1,10 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ import { FuturesClient, isWsFuturesAccountSnapshotEvent, isWsFuturesPositionsSnapshotEvent, NewFuturesOrder, - WebsocketClient, + WebsocketClientLegacyV1, } from '../../src'; // or @@ -29,7 +30,7 @@ const client = new FuturesClient({ // apiPass: 'apiPassHere', }); -const wsClient = new WebsocketClient({ +const wsClient = new WebsocketClientLegacyV1({ apiKey: API_KEY, apiSecret: API_SECRET, apiPass: API_PASS, @@ -132,6 +133,7 @@ async function handleWsUpdate(event) { side: 'open_long', size: bitcoinUSDFuturesRule.minTradeNum, symbol, + productType: '', } as const; console.log('placing order: ', order); @@ -157,6 +159,7 @@ async function handleWsUpdate(event) { side: closingSide, size: position.available, symbol: position.symbol, + productType: '', }; console.log('closing position with market order: ', closingOrder); diff --git a/examples/deprecated-V1-REST/rest-trade-spot.ts b/examples/deprecated-V1-REST/rest-trade-spot.ts index bfa171a..8fe3ab1 100644 --- a/examples/deprecated-V1-REST/rest-trade-spot.ts +++ b/examples/deprecated-V1-REST/rest-trade-spot.ts @@ -1,4 +1,4 @@ -import { SpotClient, WebsocketClient } from '../../src/index'; +import { SpotClient, WebsocketClientLegacyV1 } from '../../src/index'; // or // import { SpotClient } from 'bitget-api'; @@ -17,7 +17,7 @@ const client = new SpotClient({ // apiPass: 'apiPassHere', }); -const wsClient = new WebsocketClient({ +const wsClient = new WebsocketClientLegacyV1({ apiKey: API_KEY, apiSecret: API_SECRET, apiPass: API_PASS, diff --git a/src/index.ts b/src/index.ts index 8a40e4f..310d90a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -8,3 +8,4 @@ export * from './util'; export * from './util/logger'; export * from './websocket-client-legacy-v1'; export * from './websocket-client-v2'; +export * from './websocket-client-v3'; diff --git a/src/types/websockets/ws-api.ts b/src/types/websockets/ws-api.ts index ef9a618..e1a357e 100644 --- a/src/types/websockets/ws-api.ts +++ b/src/types/websockets/ws-api.ts @@ -26,7 +26,7 @@ export interface WsOperationLoginParams { } */ -export interface WsRequestOperationBitgetV2 { +export interface WsRequestOperationBitget { op: WsOperation; args?: (TWSRequestArg | string | number)[]; } diff --git a/src/types/websockets/ws-general.ts b/src/types/websockets/ws-general.ts index 3c0aa6b..6892b6d 100644 --- a/src/types/websockets/ws-general.ts +++ b/src/types/websockets/ws-general.ts @@ -1,9 +1,19 @@ import { RestClientOptions, WS_KEY_MAP } from '../../util'; import { FuturesProductTypeV2 } from '../request'; -/** A "topic" is always a string */ export type BitgetInstType = 'SP' | 'SPBL' | 'MC' | 'UMCBL' | 'DMCBL'; export type BitgetInstTypeV2 = 'SPOT' | FuturesProductTypeV2; +export type BitgetInstTypeV3 = + | 'spot' + | 'usdt-futures' + | 'coin-futures' + | 'usdc-futures'; + +/** + * + * V1 list of topics for WebSocket consumers + * + */ export type WsPublicSpotTopic = | 'ticker' @@ -31,9 +41,16 @@ export type WsPrivateFuturesTopic = | 'ordersAlgo'; export type WsPublicTopic = WsPublicSpotTopic | WsPublicFuturesTopic; + export type WsPrivateTopic = WsPrivateSpotTopic | WsPrivateFuturesTopic; export type WsTopic = WsPublicTopic | WsPrivateTopic; +/** + * + * V2 list of topics for WebSocket consumers + * + */ + export type WsPublicTopicV2 = | 'index-price' // margin only | 'ticker' @@ -61,17 +78,20 @@ export type WsPublicTopicV2 = | 'books5' | 'books15'; +// Also update PRIVATE_TOPICS_V2 if this is updated export type WSPrivateTopicFuturesV2 = | 'positions' | 'orders-algo' | 'positions-history'; +// Also update PRIVATE_TOPICS_V2 if this is updated export type WSPrivateTopicMarginV2 = | 'orders-crossed' | 'account-crossed' | 'account-isolated' | 'orders-isolated'; +// Also update PRIVATE_TOPICS_V2 if this is updated export type WsPrivateTopicV2 = | 'account' | 'orders' @@ -80,6 +100,16 @@ export type WsPrivateTopicV2 = export type WsTopicV2 = WsPublicTopicV2 | WsPrivateTopicV2; +/** + * + * V3 / UTA list of topics for WebSocket consumers + * + */ +export type WsPublicTopicV3 = 'ticker' | 'kline' | 'books' | 'publicTrade'; +// Also update PRIVATE_TOPICS_V3 if this is updated +export type WsPrivateTopicV3 = 'account' | 'position' | 'fill' | 'order'; +export type WsTopicV3 = WsPublicTopicV3 | WsPrivateTopicV3; + /** This is used to differentiate between each of the available websocket streams */ export type WsKey = (typeof WS_KEY_MAP)[keyof typeof WS_KEY_MAP]; diff --git a/src/util/websocket-util.ts b/src/util/websocket-util.ts index 2d7b10e..2c71147 100644 --- a/src/util/websocket-util.ts +++ b/src/util/websocket-util.ts @@ -3,6 +3,7 @@ import { WebsocketClientOptions, WsKey, WsPrivateTopicV2, + WsPrivateTopicV3, WsTopicSubscribeEventArgs, WsTopicSubscribePublicArgsV2, } from '../types'; @@ -107,6 +108,13 @@ export const PRIVATE_TOPICS_V2: WsPrivateTopicV2[] = [ 'orders-isolated', ]; +export const PRIVATE_TOPICS_V3: WsPrivateTopicV3[] = [ + 'account', + 'position', + 'fill', + 'order', +]; + export async function getWsUrl( wsKey: WsKey, options: WebsocketClientOptions, @@ -176,7 +184,8 @@ export function isPrivateChannel( ): boolean { return ( PRIVATE_TOPICS.includes(channel) || - PRIVATE_TOPICS_V2.includes(channel as any) + PRIVATE_TOPICS_V2.includes(channel as any) || + PRIVATE_TOPICS_V3.includes(channel as any) ); } diff --git a/src/websocket-client-v2.ts b/src/websocket-client-v2.ts index 20b6213..340a06e 100644 --- a/src/websocket-client-v2.ts +++ b/src/websocket-client-v2.ts @@ -6,8 +6,7 @@ import { WsKey, WsOperation, WsOperationLoginParams, - WsRequestOperationBitgetV2, - WsTopic, + WsRequestOperationBitget, WsTopicV2, } from './types'; import { @@ -36,7 +35,7 @@ const COIN_CHANNELS: WsTopicV2[] = [ export class WebsocketClientV2 extends BaseWebsocketClient< WsKey, - WsRequestOperationBitgetV2 // subscribe requests have an "args" parameter with an object within + WsRequestOperationBitget // subscribe requests have an "args" parameter with an object within > { /** * Request connection of all dependent (public & private) websockets, instead of waiting for automatic connection by library @@ -138,8 +137,8 @@ export class WebsocketClientV2 extends BaseWebsocketClient< */ public subscribe( requests: - | (WsTopicRequest | WsTopic) - | (WsTopicRequest | WsTopic)[], + | (WsTopicRequest | WsTopicV2) + | (WsTopicRequest | WsTopicV2)[], wsKey: WsKey, ): Promise { const topicRequests = Array.isArray(requests) ? requests : [requests]; @@ -155,8 +154,8 @@ export class WebsocketClientV2 extends BaseWebsocketClient< */ public unsubscribe( requests: - | (WsTopicRequest | WsTopic) - | (WsTopicRequest | WsTopic)[], + | (WsTopicRequest | WsTopicV2) + | (WsTopicRequest | WsTopicV2)[], wsKey: WsKey, ) { const topicRequests = Array.isArray(requests) ? requests : [requests]; @@ -221,7 +220,7 @@ export class WebsocketClientV2 extends BaseWebsocketClient< protected async getWsRequestEvents( operation: WsOperation, requests: WsTopicRequest[], - ): Promise>[]> { + ): Promise>[]> { const wsRequestBuildingErrors: unknown[] = []; const topics = requests.map( @@ -251,7 +250,7 @@ export class WebsocketClientV2 extends BaseWebsocketClient< ] } */ - const wsEvent: WsRequestOperationBitgetV2 = { + const wsEvent: WsRequestOperationBitget = { op: operation, args: requests.map((request) => { // const request = { @@ -272,7 +271,7 @@ export class WebsocketClientV2 extends BaseWebsocketClient< }; const midflightWsEvent: MidflightWsRequestEvent< - WsRequestOperationBitgetV2 + WsRequestOperationBitget > = { requestKey: req_id, requestEvent: wsEvent, @@ -346,7 +345,7 @@ export class WebsocketClientV2 extends BaseWebsocketClient< protected async getWsAuthRequestEvent( wsKey: WsKey, - ): Promise> { + ): Promise> { try { const { apiKey, apiSecret, apiPass } = this.options; const { signature, expiresAt } = await this.getWsAuthSignature(wsKey); @@ -361,7 +360,7 @@ export class WebsocketClientV2 extends BaseWebsocketClient< ); } - const request: WsRequestOperationBitgetV2 = { + const request: WsRequestOperationBitget = { op: 'login', args: [ { @@ -471,6 +470,9 @@ export class WebsocketClientV2 extends BaseWebsocketClient< return results; } + /** + * @deprecrated not supported by Bitget's V2 API offering + */ async sendWSAPIRequest(): Promise { return; } diff --git a/src/websocket-client-v3.ts b/src/websocket-client-v3.ts new file mode 100644 index 0000000..636271d --- /dev/null +++ b/src/websocket-client-v3.ts @@ -0,0 +1,398 @@ +import WebSocket from 'isomorphic-ws'; + +import { + BitgetInstTypeV3, + MessageEventLike, + WsKey, + WsOperation, + WsOperationLoginParams, + WsRequestOperationBitget, + WsTopicV3, +} from './types'; +import { + getMaxTopicsPerSubscribeEvent, + getNormalisedTopicRequests, + getWsUrl, + isWsPong, + WS_AUTH_ON_CONNECT_KEYS, + WS_KEY_MAP, + WS_LOGGER_CATEGORY, + WsTopicRequest, +} from './util'; +import { + BaseWebsocketClient, + EmittableEvent, + MidflightWsRequestEvent, +} from './util/BaseWSClient'; +import { SignAlgorithm, signMessage } from './util/webCryptoAPI'; + +/** + * WebSocket client dedicated to the unified account (V3) WebSockets. + * + * Your Bitget account needs to be upgraded to unified account mode, to use the account-level WebSocket topics. + */ +export class WebsocketClientV3 extends BaseWebsocketClient< + WsKey, + WsRequestOperationBitget // subscribe requests have an "args" parameter with an object within +> { + /** + * Request connection of all dependent (public & private) websockets, instead of waiting for automatic connection by library + */ + public connectAll(): Promise[] { + return [ + this.connect(WS_KEY_MAP.v3Private), + this.connect(WS_KEY_MAP.v3Public), + ]; + } + + /** + * Request subscription to one or more topics. Pass topics as either an array of strings, + * or array of objects (if the topic has parameters). + * + * Objects should be formatted as {topic: string, params: object, category: CategoryV5}. + * + * - Subscriptions are automatically routed to the correct websocket connection. + * - Authentication/connection is automatic. + * - Resubscribe after network issues is automatic. + * + * Call `unsubscribe(topics)` to remove topics + */ + public subscribe( + requests: + | (WsTopicRequest | WsTopicV3) + | (WsTopicRequest | WsTopicV3)[], + wsKey: WsKey, + ): Promise { + const topicRequests = Array.isArray(requests) ? requests : [requests]; + const normalisedTopicRequests = getNormalisedTopicRequests(topicRequests); + return this.subscribeTopicsForWsKey(normalisedTopicRequests, wsKey); + } + + /** + * Unsubscribe from one or more topics. Similar to subscribe() but in reverse. + * + * - Requests are automatically routed to the correct websocket connection. + * - These topics will be removed from the topic cache, so they won't be subscribed to again. + */ + public unsubscribe( + requests: + | (WsTopicRequest | WsTopicV3) + | (WsTopicRequest | WsTopicV3)[], + wsKey: WsKey, + ) { + const topicRequests = Array.isArray(requests) ? requests : [requests]; + const normalisedTopicRequests = getNormalisedTopicRequests(topicRequests); + + return this.unsubscribeTopicsForWsKey(normalisedTopicRequests, wsKey); + } + + /** + * + * + * Internal methods required to integrate with the BaseWSClient + * + * + */ + + protected sendPingEvent(wsKey: WsKey): void { + this.tryWsSend(wsKey, 'ping'); + } + + protected sendPongEvent(wsKey: WsKey): void { + this.tryWsSend(wsKey, 'pong'); + } + + protected isWsPing(data: any): boolean { + if (data?.data === 'ping') { + return true; + } + return false; + } + + protected isWsPong(data: any): boolean { + return isWsPong(data); + } + + protected isPrivateTopicRequest( + request: WsTopicRequest, + wsKey: WsKey, + ): boolean { + return WS_AUTH_ON_CONNECT_KEYS.includes(wsKey); + } + + protected getPrivateWSKeys(): WsKey[] { + return WS_AUTH_ON_CONNECT_KEYS; + } + + protected isAuthOnConnectWsKey(wsKey: WsKey): boolean { + return WS_AUTH_ON_CONNECT_KEYS.includes(wsKey); + } + + protected async getWsUrl(wsKey: WsKey): Promise { + return getWsUrl(wsKey, this.options, this.logger); + } + + protected getMaxTopicsPerSubscribeEvent(wsKey: WsKey): number | null { + return getMaxTopicsPerSubscribeEvent(wsKey); + } + + /** + * @returns one or more correctly structured request events for performing a operations over WS. This can vary per exchange spec. + */ + protected async getWsRequestEvents( + operation: WsOperation, + requests: WsTopicRequest[], + ): Promise>[]> { + const wsRequestBuildingErrors: unknown[] = []; + + const topics = requests.map( + (r) => r.topic + ',' + Object.values(r.payload || {}).join(','), + ); + + // Previously used to track topics in a request. Keeping this for subscribe/unsubscribe requests, no need for incremental values + const req_id = + ['subscribe', 'unsubscribe'].includes(operation) && topics.length + ? topics.join(',') + : this.getNewRequestId().toFixed(); + + /** + { + "op":"subscribe", + "args":[ + { + "instType":"spot", + "topic":"ticker", + "symbol":"BTCUSDT" + }, + { + "instType":"spot", + "topic":"candle5m", + "symbol":"BTCUSDT" + } + ] + } + */ + const wsEvent: WsRequestOperationBitget = { + op: operation, + args: requests.map((request) => { + // const request = { + // topic: 'ticker', + // payload: { instType: 'spot', symbol: 'BTCUSDT' }, + // }; + // becomes: + // const request = { + // topic: 'ticker', + // instType: 'spot', + // symbol: 'BTCUSDT', + // }; + return { + topic: request.topic, + ...request.payload, + }; + }), + }; + + const midflightWsEvent: MidflightWsRequestEvent< + WsRequestOperationBitget + > = { + requestKey: req_id, + requestEvent: wsEvent, + }; + + if (wsRequestBuildingErrors.length) { + const label = + wsRequestBuildingErrors.length === requests.length ? 'all' : 'some'; + + this.logger.error( + `Failed to build/send ${wsRequestBuildingErrors.length} event(s) for ${label} WS requests due to exceptions`, + { + ...WS_LOGGER_CATEGORY, + wsRequestBuildingErrors, + wsRequestBuildingErrorsStringified: JSON.stringify( + wsRequestBuildingErrors, + null, + 2, + ), + }, + ); + } + + return [midflightWsEvent]; + } + + private async getWsAuthSignature( + wsKey: WsKey, + ): Promise<{ expiresAt: number; signature: string }> { + const { apiKey, apiSecret, apiPass, recvWindow } = this.options; + + if (!apiKey || !apiSecret || !apiPass) { + this.logger.error( + 'Cannot authenticate websocket, either api key, secret or passphrase missing.', + { ...WS_LOGGER_CATEGORY, wsKey }, + ); + throw new Error('Cannot auth - missing api or secret or pass in config'); + } + + this.logger.trace("Getting auth'd request params", { + ...WS_LOGGER_CATEGORY, + wsKey, + }); + + const signatureExpiresAt = ((Date.now() + recvWindow) / 1000).toFixed(0); + + const signature = await this.signMessage( + signatureExpiresAt + 'GET' + '/user/verify', + apiSecret, + 'base64', + 'SHA-256', + ); + + return { + expiresAt: +signatureExpiresAt, + signature, + }; + } + + private async signMessage( + paramsStr: string, + secret: string, + method: 'hex' | 'base64', + algorithm: SignAlgorithm, + ): Promise { + if (typeof this.options.customSignMessageFn === 'function') { + return this.options.customSignMessageFn(paramsStr, secret); + } + return await signMessage(paramsStr, secret, method, algorithm); + } + + protected async getWsAuthRequestEvent( + wsKey: WsKey, + ): Promise> { + try { + const { apiKey, apiSecret, apiPass } = this.options; + const { signature, expiresAt } = await this.getWsAuthSignature(wsKey); + + if (!apiKey || !apiSecret || !apiPass) { + this.logger.error( + 'Cannot authenticate websocket, either api key, secret or passphrase missing.', + { ...WS_LOGGER_CATEGORY, wsKey }, + ); + throw new Error( + 'Cannot auth - missing api or secret or pass in config', + ); + } + + const request: WsRequestOperationBitget = { + op: 'login', + args: [ + { + apiKey, + passphrase: apiPass, + timestamp: expiresAt, + sign: signature, + }, + ], + }; + + return request; + } catch (e) { + this.logger.error(e, { ...WS_LOGGER_CATEGORY, wsKey }); + throw e; + } + } + + /** + * Abstraction called to sort ws events into emittable event types (response to a request, data update, etc) + */ + protected resolveEmittableEvents( + wsKey: WsKey, + event: MessageEventLike, + ): EmittableEvent[] { + const results: EmittableEvent[] = []; + + try { + const msg = JSON.parse(event.data); + const emittableEvent = { ...msg, wsKey }; + + // TODO: are v3 events different from V2? if yes? migrate to resolveEmittableEvents + // v2 event processing + if (typeof msg === 'object') { + if (typeof msg['code'] === 'number') { + // v2 authentication event + if (msg.event === 'login' && msg.code === 0) { + results.push({ + eventType: 'response', + event: emittableEvent, + }); + results.push({ + eventType: 'authenticated', + event: emittableEvent, + }); + return results; + } + } + + if (msg['event']) { + results.push({ + eventType: 'response', + event: emittableEvent, + }); + + if (msg.event === 'error') { + this.logger.error('WS Error received', { + ...WS_LOGGER_CATEGORY, + wsKey, + message: msg || 'no message', + // messageType: typeof msg, + // messageString: JSON.stringify(msg), + event, + }); + results.push({ + eventType: 'exception', + event: emittableEvent, + }); + } + + return results; + } + + if (msg['arg']) { + results.push({ + eventType: 'update', + event: emittableEvent, + }); + return results; + } + } + + this.logger.info('Unhandled/unrecognised ws event message', { + ...WS_LOGGER_CATEGORY, + message: msg || 'no message', + // messageType: typeof msg, + // messageString: JSON.stringify(msg), + event, + wsKey, + }); + + // fallback emit anyway + results.push({ + eventType: 'update', + event: emittableEvent, + }); + return results; + } catch (e) { + this.logger.error('Failed to parse ws event message', { + ...WS_LOGGER_CATEGORY, + error: e, + event, + wsKey, + }); + } + + return results; + } + + async sendWSAPIRequest(): Promise { + return; + } +} From 4893df2664a437fa0865aeddc28756ef75223cc5 Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Thu, 17 Jul 2025 14:51:53 +0100 Subject: [PATCH 26/57] feat(): implement V3 private topics --- examples/V3/ws-private.ts | 106 +++++++++++++++++++++++++++++ src/types/websockets/ws-general.ts | 1 + 2 files changed, 107 insertions(+) create mode 100644 examples/V3/ws-private.ts diff --git a/examples/V3/ws-private.ts b/examples/V3/ws-private.ts new file mode 100644 index 0000000..75f0569 --- /dev/null +++ b/examples/V3/ws-private.ts @@ -0,0 +1,106 @@ +import { DefaultLogger, WebsocketClientV3, WS_KEY_MAP } from '../../src'; + +// or +// import { DefaultLogger, WS_KEY_MAP, WebsocketClientV2 } from 'bitget-api'; + +(async () => { + const logger = { + ...DefaultLogger, + trace: (...params) => console.log('trace', ...params), + }; + + const API_KEY = process.env.API_KEY_COM; + const API_SECRET = process.env.API_SECRET_COM; + const API_PASS = process.env.API_PASS_COM; + + // If running from CLI in unix, you can pass env vars as such: + // API_KEY_COM='lkm12n3-2ba3-1mxf-fn13-lkm12n3a' API_SECRET_COM='035B2B9637E1BDFFEE2646BFBDDB8CE4' API_PASSPHRASE_COM='ComplexPa$$!23$5^' ts-node examples/ws-private.ts + + const wsClient = new WebsocketClientV3( + { + apiKey: API_KEY, + apiSecret: API_SECRET, + apiPass: API_PASS, + }, + logger, + ); + + wsClient.on('update', (data) => { + console.log('WS raw message received ', data); + // console.log('WS raw message received ', JSON.stringify(data, null, 2)); + }); + + wsClient.on('open', (data) => { + console.log('WS connection opened:', data.wsKey); + }); + wsClient.on('response', (data) => { + console.log('WS response: ', JSON.stringify(data, null, 2)); + }); + wsClient.on('reconnect', ({ wsKey }) => { + console.log('WS automatically reconnecting.... ', wsKey); + }); + wsClient.on('reconnected', (data) => { + console.log('WS reconnected ', data?.wsKey); + }); + wsClient.on('exception', (data) => { + console.log('WS error', data); + }); + + /** + * Public events + */ + + // You can subscribe to one topic at a time + wsClient.subscribe( + { + topic: 'account', + payload: { + instType: 'UTA', // Note: all account events go on the UTA instType + }, + }, + WS_KEY_MAP.v3Private, // This parameter points to private or public + ); + + // Note: all account events go on the UTA instType + const ACCOUNT_INST_TYPE = 'UTA'; + const ACCOUNT_WS_KEY = WS_KEY_MAP.v3Private; + + // Or multiple at once: + wsClient.subscribe( + [ + { + topic: 'account', + payload: { + instType: ACCOUNT_INST_TYPE, + }, + }, + { + topic: 'position', + payload: { + instType: ACCOUNT_INST_TYPE, + }, + }, + { + topic: 'fill', + payload: { + instType: ACCOUNT_INST_TYPE, + }, + }, + { + topic: 'order', + payload: { + instType: ACCOUNT_INST_TYPE, + }, + }, + ], + ACCOUNT_WS_KEY, + ); + + // Topics are tracked per websocket type + // The below example will pull a list of subscribed topics on that connection (e.g. all private topics), after a 5 second delay: + setTimeout(() => { + const privateTopics = wsClient.getWsStore().getTopics(WS_KEY_MAP.v3Private); + + console.log('private topics currently in state: ', privateTopics); + }, 5 * 1000); +})(); diff --git a/src/types/websockets/ws-general.ts b/src/types/websockets/ws-general.ts index 6892b6d..3b554a0 100644 --- a/src/types/websockets/ws-general.ts +++ b/src/types/websockets/ws-general.ts @@ -4,6 +4,7 @@ import { FuturesProductTypeV2 } from '../request'; export type BitgetInstType = 'SP' | 'SPBL' | 'MC' | 'UMCBL' | 'DMCBL'; export type BitgetInstTypeV2 = 'SPOT' | FuturesProductTypeV2; export type BitgetInstTypeV3 = + | 'UTA' // for account-level topics | 'spot' | 'usdt-futures' | 'coin-futures' From 22c39ca09c9af2c44d63eca4aa032fcc16b79b52 Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Thu, 17 Jul 2025 14:54:10 +0100 Subject: [PATCH 27/57] chore(): remove dead example --- examples/V2/rest-private-tiago.ts | 58 ------------------------------- 1 file changed, 58 deletions(-) delete mode 100644 examples/V2/rest-private-tiago.ts diff --git a/examples/V2/rest-private-tiago.ts b/examples/V2/rest-private-tiago.ts deleted file mode 100644 index e84cff4..0000000 --- a/examples/V2/rest-private-tiago.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ -import { BrokerClient, RestClientV2, WebsocketClient } from '../../src/index'; - -// or -// import { RestClientV2 } from 'bitget-api'; - -// read from environmental variables -const API_KEY = process.env.API_KEY_COM; -const API_SECRET = process.env.API_SECRET_COM; -const API_PASS = process.env.API_PASS_COM; - -const client = new BrokerClient({ - apiKey: API_KEY, - apiSecret: API_SECRET, - apiPass: API_PASS, - // apiKey: 'apiKeyHere', - // apiSecret: 'apiSecretHere', - // apiPass: 'apiPassHere', -}); - -/** This is a simple script wrapped in a immediately invoked function expression, designed to check for any available BTC balance and immediately sell the full amount for USDT */ -(async () => { - try { - // const account = await client.getSpotAccountAssets(); - - // const data = account.data; - // const cleanData = data.map((a) => { - // return [a.coin, +a.available].join(','); - // }); - - // console.log('res: ', data.length, '\ncoin,available'); - // console.log(cleanData.join('\n')); - - const res = await client.getAgentCommissionDetail(); - console.log('res: ', JSON.stringify(res, null, 2)); - - // const businessTypeEnum = [ - // 'SMALL_EXCHANGE_USER_IN', - // 'SMALL_EXCHANGE_USER_OUT', - // 'WITHDRAW', - // // 'AIRDROP_REWARD', - // ]; - // const billsRes = await client.getSpotAccountBills({ limit: '500' }); - - // const rows = billsRes.data.filter( - // (data) => !businessTypeEnum.includes(data.businessType), - // ); - // console.log('res, ', JSON.stringify(rows, null, 2)); - - // for (const bill of rows) { - // if (!businessTypeEnum.includes(bill.businessType)) { - // console.error('missing enum: ', bill); - // } - // } - } catch (e) { - console.error('request failed: ', e); - } -})(); From 1c4a54525b02918bdb322c1e3f3949b1d5a53be1 Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Mon, 21 Jul 2025 11:56:22 +0100 Subject: [PATCH 28/57] feat(): websocket API integration for V3, including examples & docs. --- README.md | 248 ++++++++++++++++++++++- examples/README.md | 65 +++++- examples/V3/ws-api-client-trade.ts | 258 +++++++++++++++++++++++ examples/V3/ws-api-trade-raw.ts | 259 ++++++++++++++++++++++++ examples/V3/ws-private.ts | 4 - src/rest-client-v3.ts | 2 +- src/types/websockets/index.ts | 2 + src/types/websockets/ws-api-request.ts | 20 ++ src/types/websockets/ws-api-response.ts | 6 + src/types/websockets/ws-api.ts | 100 ++++++++- src/util/BaseWSClient.ts | 30 +-- src/util/type-guards.ts | 15 ++ src/util/websocket-util.ts | 13 ++ src/websocket-api-client.ts | 193 ++++++++++++++++++ src/websocket-client-v2.ts | 10 +- src/websocket-client-v3.ts | 203 ++++++++++++++++++- 16 files changed, 1377 insertions(+), 51 deletions(-) create mode 100644 examples/V3/ws-api-client-trade.ts create mode 100644 examples/V3/ws-api-trade-raw.ts create mode 100644 src/types/websockets/ws-api-request.ts create mode 100644 src/types/websockets/ws-api-response.ts create mode 100644 src/websocket-api-client.ts diff --git a/README.md b/README.md index 48e1643..e8b3ad3 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,10 @@ Updated & performant JavaScript & Node.js SDK for the Bitget V2 REST APIs and WebSockets: - Complete integration with all Bitget APIs. + - [x] Supports V1 REST APIs & WebSockets + - [x] Supports V2 REST APIs & WebSockets + - [x] Supports V3/UTA REST APIs & WebSockets + - [x] Supports order placement via V3 WebSocket API - TypeScript support (with type declarations for most API requests & responses). - Over 100 integration tests making real API calls & WebSocket connections, validating any changes before they reach npm. - Robust WebSocket integration with configurable connection heartbeats & automatic reconnect then resubscribe workflows. @@ -64,7 +68,8 @@ Check out my related JavaScript/TypeScript/Node.js projects: Most methods pass values as-is into HTTP requests. These can be populated using parameters specified by Bitget's API documentation, or check the type definition in each class within this repository (see table below for convenient links to each class). -- [Bitget API Documentation](https://www.bitget.com/api-doc/common/intro). +- [Bitget API V2 Documentation](https://www.bitget.com/api-doc/common/intro). +- [Bitget API V3/UTA Documentation](https://www.bitget.com/api-doc/uta/intro). - [REST Endpoint Function List](./docs/endpointFunctionList.md) ## Structure @@ -85,12 +90,15 @@ The version on npm is the output from the `build` command and can be used in pro Each REST API group has a dedicated REST client. To avoid confusion, here are the available REST clients and the corresponding API groups: | Class | Description | |:------------------------------------: |:---------------------------------------------------------------------------------------------: | +| [RestClientV3](src/rest-client-v3.ts) | [V3/UTA REST APIs for Bitget's Unified Trading Account](https://www.bitget.com/api-doc/uta/intro) | +| [WebsocketClientV3](src/websocket-client-v3.ts) | Universal WS client for Bitget's V3/UTA WebSockets | +| [WebsocketAPIClient](src/websocket-api-client.ts) | Websocket API Client, for RESTlike order placement via Bitget's V3/UTA WebSocket API | | [RestClientV2](src/rest-client-v2.ts) | [V2 REST APIs](https://www.bitget.com/api-doc/common/intro) | -| [WebsocketClientV2](src/websocket-client-v2.ts) | Universal client for all Bitget's V2 Websockets | +| [WebsocketClientV2](src/websocket-client-v2.ts) | Universal WS client for all Bitget's V2 WebSockets | | [~~SpotClient~~ (deprecated, use RestClientV2)](src/spot-client.ts) | [~~Spot APIs~~](https://bitgetlimited.github.io/apidoc/en/spot/#introduction) | | [~~FuturesClient~~ (deprecated, use RestClientV2)](src/futures-client.ts) | [~~Futures APIs~~](https://bitgetlimited.github.io/apidoc/en/mix/#introduction) | | [~~BrokerClient~~ (deprecated, use RestClientV2)](src/broker-client.ts) | [~~Broker APIs~~](https://bitgetlimited.github.io/apidoc/en/broker/#introduction) | -| [~~WebsocketClient~~ (deprecated, use WebsocketClientV2)](src/websocket-client.ts) | ~~Universal client for all Bitget's V1 Websockets~~ | +| [~~WebsocketClient~~ (deprecated, use WebsocketClientV2)](src/websocket-client.ts) | ~~Universal client for all Bitget's V1 WebSockets~~ | Examples for using each client can be found in: @@ -103,14 +111,30 @@ If you're missing an example, you're welcome to request one. Priority will be gi First, create API credentials on Bitget's website. -All REST endpoints should be included in the [RestClientV2](src/rest-client-v2.ts) class. If any endpoints are missing or need improved types, pull requests are very welcome. You can also open an issue on this repo to request an improvement. Priority will be given to [github sponsors](https://github.com/sponsors/tiagosiebler). +All REST APIs are integrated in each dedicated Rest Client class. See the above table for which REST client to use. If you've upgraded to the Unified Trading Account, you should use the V3 REST APIs and WebSockets. + +#### V3 REST APIs + +These are only available if you have upgraded to the Unified Trading Account. If not, use the V2 APIs instead. + +```javascript +import { RestClientV3 } from 'bitget-api'; +// or if you prefer require: +// const { RestClientV3 } = require('bitget-api'); + +// TODO: REST V3 example here, similar to V2 +``` + +#### V2 REST APIs Not sure which function to call or which parameters to use? Click the class name in the table above to look at all the function names (they are in the same order as the official API docs), and check the API docs for a list of endpoints/parameters/responses. -If you found the method you're looking for in the API docs, you can also search for the endpoint in the [RestClientV2](src/rest-client-v2.ts) class. +If you found the method you're looking for in the API docs, you can also search for the endpoint in the [RestClientV2](src/rest-client-v2.ts) class. This class has all V2 endpoints available. ```javascript -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you prefer require: +// const { RestClientV2 } = require('bitget-api'); const API_KEY = 'xxx'; const API_SECRET = 'yyy'; @@ -122,7 +146,6 @@ const client = new RestClientV2( apiSecret: API_SECRET, apiPass: API_PASS, }, - // requestLibraryOptions ); // For public-only API calls, simply don't provide a key & secret or set them to undefined @@ -153,6 +176,213 @@ client #### WebSockets +All WebSocket functionality is supported via the WebsocketClient. Since there are currently 3 generations of Bitget's API, there are 3 WebsocketClient classes in this Node.js, JavaScript & TypeScript SDK for Bitget. + +Use the following guidance to decide which one to use: +- Unified Trading Account / V3 (latest generation): + - For receiving data, use the [WebsocketClientV3](./src/websocket-client-v3.ts). + - For sending orders via WebSockets, use the [WebsocketAPIClient](./src/websocket-api-client.ts). +- V2 (not upgraded to Unified Trading Account yet) + - Use the [WebsocketClientV2](./src/websocket-client-v2.ts). +- V1 (deprecated) + - This is the oldest API group supported by Bitget. You should migrate to V3 or V2 as soon as possible. + - If you're not ready to migrate, you can use the [WebsocketClientLegacyV1](./src/websocket-client-legacy-v1.ts) class in the meantime. + +Higher level examples below, while more thorough examples can be found in the examples folder on GitHub. + +##### V3 Unified Trading Account + +###### Sending orders via WebSockets + +The V3 / Unified Trading Account APIs introduce order placement via a persisted WebSocket connection. This Bitget Node.js, JavaScript & TypeScript SDK supports Bitget's full V3 API offering, including the WebSocket API. + +There are two approaches to placing orders via the Bitget WebSocket APIs. The recommended route is to use the dedicated WebsocketAPIClient class, included with this SDK. + +This integration looks & feels like a REST API client, but uses WebSockets, via the WebsocketClient's sendWSAPIRequest method. It returns promises and has end to end types. + +A simple example is below, but for a more thorough example, check the example here: [./examples/V3/ws-api-client-trade.ts](./examples/V3/ws-api-client-trade.ts) + +```typescript +import { WebsocketAPIClient } from "bitget-api"; +// or if you prefer require: +// const { WebsocketAPIClient } = require("bitget-api"); + +// Make an instance of the WS API Client class with your API keys +const wsClient = new WebsocketAPIClient( + { + apiKey: API_KEY, + apiSecret: API_SECRET, + apiPass: API_PASS, + + // Whether to use the demo trading wss connection + // demoTrading: true, + } +); + +async function start() { + // Start using it like a REST API. All actions are sent via a persisted WebSocket connection. + + /** + * Place Order + * https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel#request-parameters + */ + try { + const res = await wsClient.submitNewOrder('spot', { + orderType: 'limit', + price: '100', + qty: '0.1', + side: 'buy', + symbol: 'BTCUSDT', + timeInForce: 'gtc', + }); + + console.log(new Date(), 'WS API "submitNewOrder()" result: ', res); + } catch (e) { + console.error(new Date(), 'Exception with WS API "submitNewOrder()": ', e); + } +} + +start().catch(e => console.error("Exception in example: ". e)); +``` + +###### Receiving realtime data + +Use the WebsocketClientV3 to receive data via the V3 WebSockets + +```typescript +import { WebsocketClientV3 } from "bitget-api"; +// or if you prefer require: +// const { WebsocketClientV3 } = require("bitget-api"); + +const API_KEY = "yourAPIKeyHere"; +const API_SECRET = "yourAPISecretHere; +const API_PASS = "yourAPIPassHere"; + +const wsClient = new WebsocketClientV3( + { + // Only necessary if you plan on using private/account websocket topics + apiKey: API_KEY, + apiSecret: API_SECRET, + apiPass: API_PASS, + } +); + +// Connect event handlers to process incoming events +wsClient.on('update', (data) => { + console.log('WS raw message received ', data); + // console.log('WS raw message received ', JSON.stringify(data, null, 2)); +}); + +wsClient.on('open', (data) => { + console.log('WS connection opened:', data.wsKey); +}); +wsClient.on('response', (data) => { + console.log('WS response: ', JSON.stringify(data, null, 2)); +}); +wsClient.on('reconnect', ({ wsKey }) => { + console.log('WS automatically reconnecting.... ', wsKey); +}); +wsClient.on('reconnected', (data) => { + console.log('WS reconnected ', data?.wsKey); +}); +wsClient.on('exception', (data) => { + console.log('WS error', data); +}); + +/** + * Subscribe to topics as you wish + */ + +// You can subscribe to one topic at a time +wsClient.subscribe( + { + topic: 'account', + payload: { + instType: 'UTA', // Note: all account events go on the UTA instType + }, + }, + WS_KEY_MAP.v3Private, // This parameter points to private or public +); + +// Note: all account events go on the UTA instType +const ACCOUNT_INST_TYPE = 'UTA'; +const ACCOUNT_WS_KEY = WS_KEY_MAP.v3Private; + +// Or multiple at once: +wsClient.subscribe( + [ + { + topic: 'account', + payload: { + instType: ACCOUNT_INST_TYPE, + }, + }, + { + topic: 'position', + payload: { + instType: ACCOUNT_INST_TYPE, + }, + }, + { + topic: 'fill', + payload: { + instType: ACCOUNT_INST_TYPE, + }, + }, + { + topic: 'order', + payload: { + instType: ACCOUNT_INST_TYPE, + }, + }, + ], + ACCOUNT_WS_KEY, +); + +// Example public events +wsClient.subscribe( + [ + { + topic: 'ticker', + payload: { + instType: 'spot', + symbol: 'BTCUSDT', + }, + }, + { + topic: 'ticker', + payload: { + instType: 'spot', + symbol: 'ETHUSDT', + }, + }, + { + topic: 'ticker', + payload: { + instType: 'spot', + symbol: 'XRPUSDT', + }, + }, + { + topic: 'ticker', + payload: { + instType: 'usdt-futures', + symbol: 'BTCUSDT', + }, + }, + { + topic: 'ticker', + payload: { + instType: 'usdt-futures', + symbol: 'BTCUSDT', + }, + }, + ], + WS_KEY_MAP.v3Public, +); +``` + + For more examples, including how to use websockets with Bitget, check the [examples](./examples/) and [test](./test/) folders. --- @@ -164,7 +394,9 @@ For more examples, including how to use websockets with Bitget, check the [examp Pass a custom logger which supports the log methods `silly`, `debug`, `notice`, `info`, `warning` and `error`, or override methods from the default logger as desired. ```javascript -const { WebsocketClientV2, DefaultLogger } = require('bitget-api'); +import { WebsocketClientV2, DefaultLogger } from 'bitget-api'; +// or if you prefer require: +// const { WebsocketClientV2, DefaultLogger } = require('bitget-api'); // Disable all logging on the trace level (less console logs) const customLogger = { diff --git a/examples/README.md b/examples/README.md index ae6f913..e3c392e 100644 --- a/examples/README.md +++ b/examples/README.md @@ -19,7 +19,70 @@ These newer examples are for Bitget's V3 APIs and WebSockets. They can be found Refer to the V3 / UTA API documentation for more information on the V3 APIs: https://www.bitget.com/api-doc/uta/intro -These APIs require your account to be permanently upgraded to the Unified Trading Account, if you plan on using the account-level REST APIs and WebSockets. +These APIs require your account to be permanently upgraded to the Unified Trading Account, if you plan on using the account-level REST APIs and WebSockets. Once upgraded, the V2 APIs are no longer available to you. + +### WebSocket API (WS API) + +The V3/UTA API introduces order placement via a persisted WebSocket connection. This Bitget Node.js, JavaScript & TypeScript SDK supports Bitget's full V3 API offering, including the WebSocket API. + +There are two approaches to placing orders via the Bitget WebSocket APIs + +#### WebsocketAPIClient (recommended) + +This integration looks & feels like a REST API client, but uses WebSockets, via the WebsocketClient's sendWSAPIRequest method. It returns promises and has end to end types. + +This is the recommended approach to easily start sending orders via an automatically persisted WebSocket connection. A simple example is below, but for a more thorough example, check the example here: [./V3/ws-api-client-trade.ts](./V3/ws-api-client-trade.ts) + +```typescript +import { WebsocketAPIClient } from "bitget-api"; +// or if you prefer require: +// const { WebsocketAPIClient } = require("bitget-api"); + +// Make an instance of the WS API Client class with your API keys +const wsClient = new WebsocketAPIClient( + { + apiKey: API_KEY, + apiSecret: API_SECRET, + apiPass: API_PASS, + + // Whether to use the demo trading wss connection + // demoTrading: true, + } +); + +async function start() { + // Start using it like a REST API. All actions are sent via a persisted WebSocket connection. + + /** + * Place Order + * https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel#request-parameters + */ + try { + const res = await wsClient.submitNewOrder('spot', { + orderType: 'limit', + price: '100', + qty: '0.1', + side: 'buy', + symbol: 'BTCUSDT', + timeInForce: 'gtc', + }); + + console.log(new Date(), 'WS API "submitNewOrder()" result: ', res); + } catch (e) { + console.error(new Date(), 'Exception with WS API "submitNewOrder()": ', e); + } +} + +start().catch(e => console.error("Exception in example: ". e)); +``` + +#### ws.sendWSAPIRequest(wsKey, command, category, operation) + +This is the "raw" integration within the existing WebSocket client. It uses an automatically persisted & authenticated connection to send events through Bitget's WebSocket API. It automatically tracks and connects outgoing requests with incoming responses, and returns promises that resolve/reject when a matching response is received. + +Refer to [V3/ws-api-trade-raw.ts](./V3/ws-api-trade-raw.ts) to see an example. + +Note: The WebsocketClient is built around this. For a more user friendly experience, it is recommended to use the WebsocketClient for WS API requests. It uses this method but has the convenience of behaving similar to a REST API (while all communication automatically happens over a persisted WebSocket connection). ## V2 diff --git a/examples/V3/ws-api-client-trade.ts b/examples/V3/ws-api-client-trade.ts new file mode 100644 index 0000000..b280b24 --- /dev/null +++ b/examples/V3/ws-api-client-trade.ts @@ -0,0 +1,258 @@ +import { DefaultLogger } from '../../src'; +import { WebsocketAPIClient } from '../../src/websocket-api-client'; + +// or +// import { DefaultLogger, WS_KEY_MAP, WebsocketAPIClient } from 'bitget-api'; + +// function attachEventHandlers( +// wsClient: TWSClient, +// ): void { +// wsClient.on('update', (data) => { +// console.log('raw message received ', JSON.stringify(data)); +// }); +// wsClient.on('open', (data) => { +// console.log('ws connected', data.wsKey); +// }); +// wsClient.on('reconnect', ({ wsKey }) => { +// console.log('ws automatically reconnecting.... ', wsKey); +// }); +// wsClient.on('reconnected', (data) => { +// console.log('ws has reconnected ', data?.wsKey); +// }); +// wsClient.on('authenticated', (data) => { +// console.log('ws has authenticated ', data?.wsKey); +// }); +// } + +(async () => { + const logger = { + ...DefaultLogger, + trace: (...params) => console.log('trace', ...params), + }; + + const API_KEY = process.env.API_KEY_COM; + const API_SECRET = process.env.API_SECRET_COM; + const API_PASS = process.env.API_PASS_COM; + + // If running from CLI in unix, you can pass env vars as such: + // API_KEY_COM='lkm12n3-2ba3-1mxf-fn13-lkm12n3a' API_SECRET_COM='035B2B9637E1BDFFEE2646BFBDDB8CE4' API_PASSPHRASE_COM='ComplexPa$$!23$5^' ts-node examples/ws-private.ts + + const wsClient = new WebsocketAPIClient( + { + apiKey: API_KEY, + apiSecret: API_SECRET, + apiPass: API_PASS, + + // Whether to use the demo trading wss connection + // demoTrading: true, + + // If you want your own event handlers instead of the default ones with logs, + // disable this setting and see the `attachEventHandlers` example below: + // attachEventListeners: false + }, + logger, // Optional: inject a custom logger + ); + + // Optional, see above "attachEventListeners". Attach basic event handlers, so nothing is left unhandled + // attachEventHandlers(wsClient.getWSClient()); + + // Optional: prepare the WebSocket API connection in advance. + // This happens automatically but you can do this early before making any API calls, to prevent delays from a cold start. + await wsClient.getWSClient().connectWSAPI(); + + /** + * Bitget's WebSocket API be used like a REST API, through this SDK's WebsocketAPIClient. The WebsocketAPIClient is a utility class wrapped around WebsocketClientV3's sendWSAPIRequest() capabilities. + * + * Each request sent via the WebsocketAPIClient will automatically: + * - route via the active WS API connection + * - return a Promise, which automatically resolves/rejects when a matching response is received + * + * Note: this requires V3/UTA API keys! + */ + + /** + * Place Order + * https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel#request-parameters + */ + try { + const res = await wsClient.submitNewOrder('spot', { + orderType: 'limit', + price: '100', + qty: '0.1', + side: 'buy', + symbol: 'BTCUSDT', + timeInForce: 'gtc', + }); + /** + const res = { + "event": "trade", + "id": "1750034396082", + "category": "spot", + "topic": "place-order", + "args": [ + { + "symbol": "BTCUSDT", + "orderId": "xxxxxxxx", + "clientOid": "xxxxxxxx", + "cTime": "1750034397008" + } + ], + "code": "0", + "msg": "success", + "ts": "1750034397076" + }; + */ + + console.log(new Date(), 'WS API "submitNewOrder()" result: ', res); + } catch (e) { + console.error(new Date(), 'Exception with WS API "submitNewOrder()": ', e); + } + + /** + * Batch Place Order Channel + * https://www.bitget.com/api-doc/uta/websocket/private/Batch-Place-Order-Channel + */ + + try { + /** + * Note: batch place will never reject the request, even if all orders were rejected. Check the "code" and "msg" properties for individual orders in the response, to detect batch place errors. + */ + const res = await wsClient.placeBatchOrders('spot', [ + { + clientOid: 'xxxxxxxx1', + orderType: 'limit', + price: '100', + qty: '0.1', + side: 'buy', + symbol: 'BTCUSDT', + timeInForce: 'gtc', + }, + { + clientOid: 'xxxxxxxx2', + orderType: 'limit', + price: '100', + qty: '0.15', + side: 'buy', + symbol: 'BTCUSDT', + timeInForce: 'gtc', + }, + ]); + + /** + const res = { + "event": "trade", + "id": "1750035029506", + "category": "spot", + "topic": "batch-place", + "args": [ + { + "code": "0", + "msg": "Success", + "symbol": "BTCUSDT", + "orderId": "xxxxxxxx", + "clientOid": "xxxxxxxx" + }, + { + "code": "0", + "msg": "Success", + "symbol": "BTCUSDT", + "orderId": "xxxxxxxx", + "clientOid": "xxxxxxxx" + } + ], + "code": "0", + "msg": "Success", + "ts": "1750035029925" + } + */ + + console.log(new Date(), 'WS API "placeBatchOrders()" result: ', res); + } catch (e) { + console.error( + new Date(), + 'Exception with WS API "placeBatchOrders()": ', + e, + ); + } + + /** + * Cancel Order + * https://www.bitget.com/api-doc/uta/websocket/private/Cancel-Order-Channel + */ + + try { + const res = await wsClient.cancelOrder('spot', { + clientOid: 'xxxxxxxx1', + }); + + /** + const res = { + "event": "trade", + "id": "1750034870205", + "topic": "cancel-order", + "args": [ + { + "orderId": "xxxxxxxx", + "clientOid": "xxxxxxxx" + } + ], + "code": "0", + "msg": "Success", + "ts": "1750034870597" + } + */ + + console.log(new Date(), 'WS API "cancelOrder()" result: ', res); + } catch (e) { + console.error(new Date(), 'Exception with WS API "cancelOrder()": ', e); + } + + /** + * Batch Cancel Order + * https://www.bitget.com/api-doc/uta/websocket/private/Batch-Cancel-Order-Channel + */ + + try { + const res = await wsClient.cancelBatchOrders('spot', [ + { + clientOid: 'xxxxxxxx1', + }, + { + orderId: '123123123', + }, + ]); + + /** + const res = { + "event": "trade", + "id": "bb553cc0-c1fa-454e-956d-c96c8d715760", + "topic": "batch-cancel", + "args": [ + { + "code": "0", + "msg": "Success", + "orderId": "xxxxxxxxxxxxx" + }, + { + "code": "25204", + "msg": "Order does not exist", + "orderId": "xxxxxxxxxxxxx" + } + ], + "code": "0", + "msg": "Success", + "ts": "1751980011084" + } + */ + + console.log(new Date(), 'WS API "cancelBatchOrders()" result: ', res); + } catch (e) { + console.error( + new Date(), + 'Exception with WS API "cancelBatchOrders()": ', + e, + ); + } + + console.log(new Date(), 'Reached end of example.'); +})(); diff --git a/examples/V3/ws-api-trade-raw.ts b/examples/V3/ws-api-trade-raw.ts new file mode 100644 index 0000000..2ec816b --- /dev/null +++ b/examples/V3/ws-api-trade-raw.ts @@ -0,0 +1,259 @@ +import { DefaultLogger, WebsocketClientV3, WS_KEY_MAP } from '../../src'; + +// or +// import { DefaultLogger, WS_KEY_MAP, WebsocketClientV3 } from 'bitget-api'; + +(async () => { + const logger = { + ...DefaultLogger, + trace: (...params) => console.log('trace', ...params), + }; + + const API_KEY = process.env.API_KEY_COM; + const API_SECRET = process.env.API_SECRET_COM; + const API_PASS = process.env.API_PASS_COM; + + // If running from CLI in unix, you can pass env vars as such: + // API_KEY_COM='lkm12n3-2ba3-1mxf-fn13-lkm12n3a' API_SECRET_COM='035B2B9637E1BDFFEE2646BFBDDB8CE4' API_PASSPHRASE_COM='ComplexPa$$!23$5^' ts-node examples/ws-private.ts + + const wsClient = new WebsocketClientV3( + { + apiKey: API_KEY, + apiSecret: API_SECRET, + apiPass: API_PASS, + }, + logger, + ); + + wsClient.on('update', (data) => { + console.log('WS raw message received ', data); + // console.log('WS raw message received ', JSON.stringify(data, null, 2)); + }); + + wsClient.on('open', (data) => { + console.log('WS connection opened:', data.wsKey); + }); + wsClient.on('response', (data) => { + console.log('WS response: ', JSON.stringify(data, null, 2)); + }); + wsClient.on('reconnect', ({ wsKey }) => { + console.log('WS automatically reconnecting.... ', wsKey); + }); + wsClient.on('reconnected', (data) => { + console.log('WS reconnected ', data?.wsKey); + }); + wsClient.on('exception', (data) => { + console.log('WS error', data); + }); + + /** + * Bitget's WebSocket API can be used via the sendWSAPIRequest() method. + * + * Use the `WS_KEY_MAP.v3Private` connection key for any requests. + * + * Note: this requires V3/UTA API keys! + * Note: for a better user experience, it is recommended to use the WebsocketAPIClient. + */ + + // Use the V3 private wss connection URL + const wsConnectionKey = WS_KEY_MAP.v3Private; + + /** + * Place Order + * https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel#request-parameters + */ + try { + const res = await wsClient.sendWSAPIRequest( + wsConnectionKey, + 'place-order', + 'spot', + { + orderType: 'limit', + price: '100', + qty: '0.1', + side: 'buy', + symbol: 'BTCUSDT', + timeInForce: 'gtc', + }, + ); + + /** + const res = { + "event": "trade", + "id": "1750034396082", + "category": "spot", + "topic": "place-order", + "args": [ + { + "symbol": "BTCUSDT", + "orderId": "xxxxxxxx", + "clientOid": "xxxxxxxx", + "cTime": "1750034397008" + } + ], + "code": "0", + "msg": "success", + "ts": "1750034397076" + }; + */ + + console.log(new Date(), 'WS API "place-order" result: ', res); + } catch (e) { + console.error(new Date(), 'Exception with WS API "place-order": ', e); + } + + /** + * Batch Place Order Channel + * https://www.bitget.com/api-doc/uta/websocket/private/Batch-Place-Order-Channel + */ + + try { + /** + * Note: batch place will never reject the request, even if all orders were rejected. Check the "code" and "msg" properties for individual orders in the response, to detect batch place errors. + */ + const res = await wsClient.sendWSAPIRequest( + wsConnectionKey, + 'batch-place', + 'spot', + [ + { + clientOid: 'xxxxxxxx1', + orderType: 'limit', + price: '100', + qty: '0.1', + side: 'buy', + symbol: 'BTCUSDT', + timeInForce: 'gtc', + }, + { + clientOid: 'xxxxxxxx2', + orderType: 'limit', + price: '100', + qty: '0.15', + side: 'buy', + symbol: 'BTCUSDT', + timeInForce: 'gtc', + }, + ], + ); + + /** + const res = { + "event": "trade", + "id": "1750035029506", + "category": "spot", + "topic": "batch-place", + "args": [ + { + "code": "0", + "msg": "Success", + "symbol": "BTCUSDT", + "orderId": "xxxxxxxx", + "clientOid": "xxxxxxxx" + }, + { + "code": "0", + "msg": "Success", + "symbol": "BTCUSDT", + "orderId": "xxxxxxxx", + "clientOid": "xxxxxxxx" + } + ], + "code": "0", + "msg": "Success", + "ts": "1750035029925" + } + */ + + console.log(new Date(), 'WS API "batch-place" result: ', res); + } catch (e) { + console.error(new Date(), 'Exception with WS API "batch-place": ', e); + } + + /** + * Cancel Order + * https://www.bitget.com/api-doc/uta/websocket/private/Cancel-Order-Channel + */ + + try { + const res = await wsClient.sendWSAPIRequest( + wsConnectionKey, + 'cancel-order', + 'spot', + { + clientOid: 'xxxxxxxx1', + }, + ); + + /** + const res = { + "event": "trade", + "id": "1750034870205", + "topic": "cancel-order", + "args": [ + { + "orderId": "xxxxxxxx", + "clientOid": "xxxxxxxx" + } + ], + "code": "0", + "msg": "Success", + "ts": "1750034870597" + } + */ + + console.log(new Date(), 'WS API "cancel-order" result: ', res); + } catch (e) { + console.error(new Date(), 'Exception with WS API "cancel-order": ', e); + } + + /** + * Batch Cancel Order + * https://www.bitget.com/api-doc/uta/websocket/private/Batch-Cancel-Order-Channel + */ + + try { + const res = await wsClient.sendWSAPIRequest( + wsConnectionKey, + 'batch-cancel', + 'spot', + [ + { + clientOid: 'xxxxxxxx1', + }, + { + orderId: '123123123', + }, + ], + ); + + /** + const res = { + "event": "trade", + "id": "bb553cc0-c1fa-454e-956d-c96c8d715760", + "topic": "batch-cancel", + "args": [ + { + "code": "0", + "msg": "Success", + "orderId": "xxxxxxxxxxxxx" + }, + { + "code": "25204", + "msg": "Order does not exist", + "orderId": "xxxxxxxxxxxxx" + } + ], + "code": "0", + "msg": "Success", + "ts": "1751980011084" + } + */ + + console.log(new Date(), 'WS API "batch-cancel" result: ', res); + } catch (e) { + console.error(new Date(), 'Exception with WS API "batch-cancel": ', e); + } + + console.log(new Date(), 'Reached end of example.'); +})(); diff --git a/examples/V3/ws-private.ts b/examples/V3/ws-private.ts index 75f0569..0b9b239 100644 --- a/examples/V3/ws-private.ts +++ b/examples/V3/ws-private.ts @@ -46,10 +46,6 @@ import { DefaultLogger, WebsocketClientV3, WS_KEY_MAP } from '../../src'; console.log('WS error', data); }); - /** - * Public events - */ - // You can subscribe to one topic at a time wsClient.subscribe( { diff --git a/src/rest-client-v3.ts b/src/rest-client-v3.ts index b1ae693..dbc90ff 100644 --- a/src/rest-client-v3.ts +++ b/src/rest-client-v3.ts @@ -687,7 +687,7 @@ export class RestClientV3 extends BaseRestClient { /** * Place Order */ - placeOrder( + submitNewOrder( params: PlaceOrderRequestV3, ): Promise> { return this.postPrivate('/api/v3/trade/place-order', params); diff --git a/src/types/websockets/index.ts b/src/types/websockets/index.ts index caf148a..d14fda4 100644 --- a/src/types/websockets/index.ts +++ b/src/types/websockets/index.ts @@ -1,3 +1,5 @@ export * from './ws-api'; +export * from './ws-api-request'; +export * from './ws-api-response'; export * from './ws-events'; export * from './ws-general'; diff --git a/src/types/websockets/ws-api-request.ts b/src/types/websockets/ws-api-request.ts new file mode 100644 index 0000000..6094de6 --- /dev/null +++ b/src/types/websockets/ws-api-request.ts @@ -0,0 +1,20 @@ +export interface WSAPIPlaceOrderRequestV3 { + symbol: string; + orderType: 'limit' | 'market'; + qty: string; + price?: string; + side: 'buy' | 'sell'; + posSide?: 'long' | 'short'; + timeInForce?: 'gtc' | 'ioc' | 'fok' | 'post_only'; + reduceOnly?: 'YES' | 'NO'; // TODO: not supported by batch place? Sent question to Bitget 18th Jul + clientOid?: string; + stpMode?: 'none' | 'cancel_taker' | 'cancel_maker' | 'cancel_both'; + tpTriggerBy?: 'market' | 'mark'; + slTriggerBy?: 'market' | 'mark'; + takeProfit?: string; + stopLoss?: string; + tpOrderType?: 'limit' | 'market'; + slOrderType?: 'limit' | 'market'; + tpLimitPrice?: string; + slLimitPrice?: string; +} diff --git a/src/types/websockets/ws-api-response.ts b/src/types/websockets/ws-api-response.ts new file mode 100644 index 0000000..fc33e93 --- /dev/null +++ b/src/types/websockets/ws-api-response.ts @@ -0,0 +1,6 @@ +export interface WSAPIPlaceOrderResponseV3 { + symbol: string; + orderId: string; + clientOid: string; + cTime: string; +} diff --git a/src/types/websockets/ws-api.ts b/src/types/websockets/ws-api.ts index e1a357e..5f94a9d 100644 --- a/src/types/websockets/ws-api.ts +++ b/src/types/websockets/ws-api.ts @@ -1,12 +1,55 @@ -export type WsOperation = 'subscribe' | 'unsubscribe' | 'login'; +import { WS_KEY_MAP } from '../../util'; +import { CancelOrderRequestV3 } from '../request'; +import { CancelOrderResponseV3 } from '../response'; +import { WSAPIPlaceOrderRequestV3 } from './ws-api-request'; +import { WSAPIPlaceOrderResponseV3 } from './ws-api-response'; +import { BitgetInstTypeV3, WsKey } from './ws-general'; -export interface WsOperationLoginParams { +export type WSOperation = 'subscribe' | 'unsubscribe' | 'login'; + +// When new WS API operations are added, make sure to also update WS_API_Operations[] below +export type WSAPIOperation = + | 'place-order' + | 'batch-place' + | 'cancel-order' + | 'batch-cancel'; + +export const WS_API_Operations: WSAPIOperation[] = [ + 'place-order', + 'batch-place', + 'cancel-order', + 'batch-cancel', +]; + +export interface WSOperationLoginParams { apiKey: string; passphrase: string; timestamp: number; sign: string; } +export interface WSAPIRequestBitgetV3 { + op: 'trade'; + id: string; + category: BitgetInstTypeV3; + topic: WSAPIOperation; + args: TWSParams | TWSParams[]; +} + +export interface WSAPIRequestFlags { + /** If true, will skip auth requirement for WS API connection */ + authIsOptional?: boolean | undefined; +} + +export type Exact = { + // This part says: if there's any key that's not in T, it's an error + [K: string]: never; +} & { + [K in keyof T]: T[K]; +}; + +/** + /** * V2 request looks like this: { @@ -25,8 +68,57 @@ export interface WsOperationLoginParams { ] } */ - export interface WsRequestOperationBitget { - op: WsOperation; + op: WSOperation; args?: (TWSRequestArg | string | number)[]; } +export interface WSAPIResponse< + TResponseData extends object = object, + TOperation extends WSAPIOperation = WSAPIOperation, +> { + wsKey: WsKey; + /** Auto-generated */ + id: string; + event: 'trade'; + category: BitgetInstTypeV3; + topic: TOperation; + args: TResponseData; + code: '0' | string; + msg: 'success' | string; + ts: string; +} + +/** + * List of operations supported for this WsKey (connection) + */ +export interface WsAPIWsKeyTopicMap { + [WS_KEY_MAP.v3Private]: WSAPIOperation; +} + +/** + * Request parameters expected per operation + */ +export interface WsAPITopicRequestParamMap { + // https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel#request-parameters + 'place-order': WSAPIPlaceOrderRequestV3; + // https://www.bitget.com/api-doc/uta/websocket/private/Batch-Place-Order-Channel + 'batch-place': WSAPIPlaceOrderRequestV3[]; + // https://www.bitget.com/api-doc/uta/websocket/private/Cancel-Order-Channel + 'cancel-order': CancelOrderRequestV3; + // https://www.bitget.com/api-doc/uta/websocket/private/Batch-Cancel-Order-Channel + 'batch-cancel': CancelOrderRequestV3[]; +} + +/** + * Response structure expected for each operation + */ +export interface WsAPIOperationResponseMap { + // https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel#request-parameters + 'place-order': WSAPIResponse<[WSAPIPlaceOrderResponseV3], 'place-order'>; + // https://www.bitget.com/api-doc/uta/websocket/private/Batch-Place-Order-Channel + 'batch-place': WSAPIResponse; + // https://www.bitget.com/api-doc/uta/websocket/private/Cancel-Order-Channel + 'cancel-order': WSAPIResponse<[CancelOrderResponseV3], 'cancel-order'>; + // https://www.bitget.com/api-doc/uta/websocket/private/Batch-Cancel-Order-Channel + 'batch-cancel': WSAPIResponse; +} diff --git a/src/util/BaseWSClient.ts b/src/util/BaseWSClient.ts index 8da8934..2946273 100644 --- a/src/util/BaseWSClient.ts +++ b/src/util/BaseWSClient.ts @@ -7,7 +7,7 @@ import { MessageEventLike, WebsocketClientOptions, WSClientConfigurableOptions, - WsOperation, + WSOperation, } from '../types'; import { DefaultLogger } from './logger'; import { @@ -140,13 +140,12 @@ export abstract class BaseWebsocketClient< TWSKey extends string, TWSRequestEvent extends object, > extends EventEmitter { - // TODO: the stored structure changed! Check it! /** * State store to track a list of topics (topic requests) we are expected to be subscribed to if reconnected */ private wsStore: WsStore>; - protected logger: DefaultLogger; + public logger: DefaultLogger; protected options: WebsocketClientOptions; @@ -216,7 +215,7 @@ export abstract class BaseWebsocketClient< * @returns one or more correctly structured request events for performing a operations over WS. This can vary per exchange spec. */ protected abstract getWsRequestEvents( - operation: WsOperation, + operation: WSOperation, requests: WsTopicRequest[], wsKey: TWSKey, ): Promise[]>; @@ -231,8 +230,6 @@ export abstract class BaseWebsocketClient< /** * Request connection of all dependent (public & private) websockets, instead of waiting for automatic connection by library - * - * // TODO: breaking change, and check that any calls to this anticipate connected result (was WS) */ protected abstract connectAll(): Promise[]; @@ -247,16 +244,11 @@ export abstract class BaseWebsocketClient< protected abstract sendWSAPIRequest( wsKey: TWSKey, - channel: string, + operation: string, + category: string, params?: any, ): Promise; - protected abstract sendWSAPIRequest( - wsKey: TWSKey, - channel: string, - params: any, - ): Promise; - public getTimeOffsetMs() { return this.timeOffsetMs; } @@ -646,7 +638,7 @@ export abstract class BaseWebsocketClient< protected async getWsOperationEventsForTopics( topics: WsTopicRequest[], wsKey: TWSKey, - operation: WsOperation, + operation: WSOperation, ): Promise[]> { if (!topics.length) { return []; @@ -762,8 +754,8 @@ export abstract class BaseWebsocketClient< } // Cache the request for this call, so we can enrich the response with request info - this.midflightRequestCache[wsKey][midflightRequest.requestKey] = - midflightRequest.requestEvent; + // this.midflightRequestCache[wsKey][midflightRequest.requestKey] = + // midflightRequest.requestEvent; this.logger.trace(`Sending batch via message: "${wsMessage}"`); try { @@ -794,7 +786,8 @@ export abstract class BaseWebsocketClient< return this.midflightRequestCache[wsKey][requestKey]; } - // TODO: where is this used? + // Not in use for Bitget. If desired, call from resolveEmittableEvents() for WS API responses. + // See binance SDK for reference removeCachedMidFlightRequest(wsKey: TWSKey, requestKey: string) { if (this.getCachedMidFlightRequest(wsKey, requestKey)) { delete this.midflightRequestCache[wsKey][requestKey]; @@ -958,8 +951,7 @@ export abstract class BaseWebsocketClient< } /** - * The newer standard. Requires resolveEmittableEvents in the integration layer. - * Change needed to support V3? TODO: check me. + * Raw incoming event handler. Parsing happens in integration layer via resolveEmittableEvents(). */ private onWsMessage(event: unknown, wsKey: TWSKey, ws: WebSocket) { try { diff --git a/src/util/type-guards.ts b/src/util/type-guards.ts index 897f5d0..87ce235 100644 --- a/src/util/type-guards.ts +++ b/src/util/type-guards.ts @@ -1,6 +1,7 @@ import { MarginType, WsAccountSnapshotUMCBL, + WSAPIResponse, WsBaseEvent, WSPositionSnapshotUMCBL, WsSnapshotAccountEvent, @@ -82,3 +83,17 @@ export function assertMarginType(marginType: string): marginType is MarginType { } return true; } + +export function isWSAPIResponse( + msg: unknown, +): msg is Omit { + if (typeof msg !== 'object' || !msg) { + return false; + } + + if (typeof msg['event'] !== 'string' || typeof msg['id'] !== 'string') { + return false; + } + + return true; +} diff --git a/src/util/websocket-util.ts b/src/util/websocket-util.ts index 2c71147..e8af763 100644 --- a/src/util/websocket-util.ts +++ b/src/util/websocket-util.ts @@ -1,6 +1,7 @@ import { BitgetInstType, WebsocketClientOptions, + WSAPIRequestBitgetV3, WsKey, WsPrivateTopicV2, WsPrivateTopicV3, @@ -341,3 +342,15 @@ export function isWSPingFrameAvailable(): boolean { export function isWSPongFrameAvailable(): boolean { return typeof WebSocket.prototype['pong'] === 'function'; } + +/** + * WS API promises are stored using a primary key. This key is constructed using + * properties found in every request & reply. + */ +export function getPromiseRefForWSAPIRequest( + requestEvent: WSAPIRequestBitgetV3, +): string { + // Responses don't have any other info we can use to connect them to the request. Just the "id" field... + const promiseRef = [requestEvent.id].join('_'); + return promiseRef; +} diff --git a/src/websocket-api-client.ts b/src/websocket-api-client.ts new file mode 100644 index 0000000..2987ffc --- /dev/null +++ b/src/websocket-api-client.ts @@ -0,0 +1,193 @@ +import { + BitgetInstTypeV3, + CancelOrderRequestV3, + CancelOrderResponseV3, + WSAPIPlaceOrderRequestV3, + WSAPIPlaceOrderResponseV3, + WSAPIResponse, + WSClientConfigurableOptions, +} from './types'; +import { DefaultLogger, WS_KEY_MAP } from './util'; +import { WebsocketClientV3 } from './websocket-client-v3'; + +/** + * Configurable options specific to only the REST-like WebsocketAPIClient + */ +export interface WSAPIClientConfigurableOptions { + /** + * Default: true + * + * Attach default event listeners, which will console log any high level + * events (opened/reconnecting/reconnected/etc). + * + * If you disable this, you should set your own event listeners + * on the embedded WS Client `wsApiClient.getWSClient().on(....)`. + */ + attachEventListeners: boolean; +} + +/** + * This is a minimal Websocket API wrapper around the WebsocketClient. + * + * Note: You can also directly use the sendWSAPIRequest() method to make WS API calls, but some + * may find the below methods slightly more intuitive. + * + * Refer to the WS API promises example for a more detailed example on using sendWSAPIRequest() directly: + * https://github.com/tiagosiebler/bitget-api/blob/master/examples/V3/ws-api-trade-raw.ts + */ +export class WebsocketAPIClient { + private wsClient: WebsocketClientV3; + + private options: WSClientConfigurableOptions & WSAPIClientConfigurableOptions; + + constructor( + options?: WSClientConfigurableOptions & + Partial, + logger?: DefaultLogger, + ) { + this.wsClient = new WebsocketClientV3(options, logger); + + this.options = { + attachEventListeners: true, + ...options, + }; + + this.setupDefaultEventListeners(); + } + + public getWSClient(): WebsocketClientV3 { + return this.wsClient; + } + + public setTimeOffsetMs(newOffset: number): void { + return this.getWSClient().setTimeOffsetMs(newOffset); + } + + /* + * Bitget WebSocket API Methods + * https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel + */ + + /** + * Submit a new order + * + * https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel + * + * @returns + */ + submitNewOrder( + category: BitgetInstTypeV3, + params: WSAPIPlaceOrderRequestV3, + ): Promise> { + return this.wsClient.sendWSAPIRequest( + WS_KEY_MAP.v3Private, + 'place-order', + category, + params, + ); + } + + /** + * Submit a new order + * + * https://www.bitget.com/api-doc/uta/websocket/private/Batch-Place-Order-Channel + * + * @returns + */ + placeBatchOrders( + category: BitgetInstTypeV3, + params: WSAPIPlaceOrderRequestV3[], + ): Promise> { + return this.wsClient.sendWSAPIRequest( + WS_KEY_MAP.v3Private, + 'batch-place', + category, + params, + ); + } + + /* + * Bitget WebSocket API Methods + * https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel + */ + + /** + * Cancel Order + * + * https://www.bitget.com/api-doc/uta/websocket/private/Cancel-Order-Channel + * + * @returns + */ + cancelOrder( + category: BitgetInstTypeV3, + params: CancelOrderRequestV3, + ): Promise> { + return this.wsClient.sendWSAPIRequest( + WS_KEY_MAP.v3Private, + 'cancel-order', + category, + params, + ); + } + + /** + * Batch Cancel Order + * + * https://www.bitget.com/api-doc/uta/websocket/private/Batch-Cancel-Order-Channel + * + * @returns + */ + cancelBatchOrders( + category: BitgetInstTypeV3, + params: CancelOrderRequestV3[], + ): Promise> { + return this.wsClient.sendWSAPIRequest( + WS_KEY_MAP.v3Private, + 'batch-cancel', + category, + params, + ); + } + + /** + * + * + * + * + * + * + * + * Private methods for handling some of the convenience/automation provided by the WS API Client + * + * + * + * + * + * + * + */ + + private setupDefaultEventListeners() { + if (this.options.attachEventListeners) { + /** + * General event handlers for monitoring the WebsocketClient + */ + this.wsClient + .on('open', (data) => { + console.log(new Date(), 'ws connected', data.wsKey); + }) + .on('reconnect', ({ wsKey }) => { + console.log(new Date(), 'ws automatically reconnecting.... ', wsKey); + }) + .on('reconnected', (data) => { + console.log(new Date(), 'ws has reconnected ', data?.wsKey); + }) + .on('authenticated', (data) => { + console.info(new Date(), 'ws has authenticated ', data?.wsKey); + }) + .on('exception', (data) => { + console.error(new Date(), 'ws exception: ', JSON.stringify(data)); + }); + } + } +} diff --git a/src/websocket-client-v2.ts b/src/websocket-client-v2.ts index 340a06e..6bbfe19 100644 --- a/src/websocket-client-v2.ts +++ b/src/websocket-client-v2.ts @@ -4,8 +4,8 @@ import { BitgetInstTypeV2, MessageEventLike, WsKey, - WsOperation, - WsOperationLoginParams, + WSOperation, + WSOperationLoginParams, WsRequestOperationBitget, WsTopicV2, } from './types'; @@ -218,7 +218,7 @@ export class WebsocketClientV2 extends BaseWebsocketClient< * @returns one or more correctly structured request events for performing a operations over WS. This can vary per exchange spec. */ protected async getWsRequestEvents( - operation: WsOperation, + operation: WSOperation, requests: WsTopicRequest[], ): Promise>[]> { const wsRequestBuildingErrors: unknown[] = []; @@ -345,7 +345,7 @@ export class WebsocketClientV2 extends BaseWebsocketClient< protected async getWsAuthRequestEvent( wsKey: WsKey, - ): Promise> { + ): Promise> { try { const { apiKey, apiSecret, apiPass } = this.options; const { signature, expiresAt } = await this.getWsAuthSignature(wsKey); @@ -360,7 +360,7 @@ export class WebsocketClientV2 extends BaseWebsocketClient< ); } - const request: WsRequestOperationBitget = { + const request: WsRequestOperationBitget = { op: 'login', args: [ { diff --git a/src/websocket-client-v3.ts b/src/websocket-client-v3.ts index 636271d..c6e1c1a 100644 --- a/src/websocket-client-v3.ts +++ b/src/websocket-client-v3.ts @@ -3,16 +3,23 @@ import WebSocket from 'isomorphic-ws'; import { BitgetInstTypeV3, MessageEventLike, + WsAPIOperationResponseMap, + WSAPIRequestBitgetV3, + WSAPIRequestFlags, + WsAPITopicRequestParamMap, + WsAPIWsKeyTopicMap, WsKey, - WsOperation, - WsOperationLoginParams, + WSOperation, + WSOperationLoginParams, WsRequestOperationBitget, WsTopicV3, } from './types'; import { getMaxTopicsPerSubscribeEvent, getNormalisedTopicRequests, + getPromiseRefForWSAPIRequest, getWsUrl, + isWSAPIResponse, isWsPong, WS_AUTH_ON_CONNECT_KEYS, WS_KEY_MAP, @@ -45,6 +52,17 @@ export class WebsocketClientV3 extends BaseWebsocketClient< ]; } + /** + * Ensures the WS API connection is active and ready. + * + * You do not need to call this, but if you call this before making any WS API requests, + * it can accelerate the first request (by preparing the connection in advance). + */ + public connectWSAPI(): Promise { + /** This call automatically ensures the connection is active AND authenticated before resolving */ + return this.assertIsAuthenticated(WS_KEY_MAP.v3Private); + } + /** * Request subscription to one or more topics. Pass topics as either an array of strings, * or array of objects (if the topic has parameters). @@ -140,7 +158,7 @@ export class WebsocketClientV3 extends BaseWebsocketClient< * @returns one or more correctly structured request events for performing a operations over WS. This can vary per exchange spec. */ protected async getWsRequestEvents( - operation: WsOperation, + operation: WSOperation, requests: WsTopicRequest[], ): Promise>[]> { const wsRequestBuildingErrors: unknown[] = []; @@ -267,7 +285,7 @@ export class WebsocketClientV3 extends BaseWebsocketClient< protected async getWsAuthRequestEvent( wsKey: WsKey, - ): Promise> { + ): Promise> { try { const { apiKey, apiSecret, apiPass } = this.options; const { signature, expiresAt } = await this.getWsAuthSignature(wsKey); @@ -282,7 +300,7 @@ export class WebsocketClientV3 extends BaseWebsocketClient< ); } - const request: WsRequestOperationBitget = { + const request: WsRequestOperationBitget = { op: 'login', args: [ { @@ -314,8 +332,86 @@ export class WebsocketClientV3 extends BaseWebsocketClient< const msg = JSON.parse(event.data); const emittableEvent = { ...msg, wsKey }; - // TODO: are v3 events different from V2? if yes? migrate to resolveEmittableEvents - // v2 event processing + /** + * WS API response handling + */ + if (isWSAPIResponse(emittableEvent)) { + // const eg1 = { + // event: 'error', + // id: '1', + // code: '43012', + // msg: 'Insufficient balance', + // }; + + const retCode = emittableEvent.code; + const reqId = emittableEvent.id; + const isError = retCode !== '0'; + + const promiseRef = [emittableEvent.id].join('_'); + + const loggableContext = { + wsKey, + promiseRef, + parsedEvent: emittableEvent, + }; + + if (!reqId) { + this.logger.error( + 'WS API response is missing reqId - promisified workflow could get stuck. If this happens, please get in touch with steps to reproduce. Trace:', + loggableContext, + ); + } + + if (isError) { + try { + this.getWsStore().rejectDeferredPromise( + wsKey, + promiseRef, + emittableEvent, + true, + ); + } catch (e) { + this.logger.error('Exception trying to reject WSAPI promise', { + ...loggableContext, + error: e, + }); + } + + results.push({ + eventType: 'exception', + event: emittableEvent, + isWSAPIResponse: true, + }); + return results; + } + + // WS API Success + try { + this.getWsStore().resolveDeferredPromise( + wsKey, + promiseRef, + emittableEvent, + true, + ); + } catch (e) { + this.logger.error('Exception trying to resolve WSAPI promise', { + ...loggableContext, + error: e, + }); + } + + results.push({ + eventType: 'response', + event: emittableEvent, + isWSAPIResponse: true, + }); + + return results; + } + + /** + * V3 event handling for consumers - behaves the same as V2 + */ if (typeof msg === 'object') { if (typeof msg['code'] === 'number') { // v2 authentication event @@ -392,7 +488,96 @@ export class WebsocketClientV3 extends BaseWebsocketClient< return results; } - async sendWSAPIRequest(): Promise { - return; + /** + * V3/UTA supports order placement via WebSockets. This is the WS API: + * https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel + * + * @returns a promise that resolves/rejects when a matching response arrives + */ + async sendWSAPIRequest< + TWSKey extends keyof WsAPIWsKeyTopicMap, + TWSOperation extends WsAPIWsKeyTopicMap[TWSKey], + TWSParams extends WsAPITopicRequestParamMap[TWSOperation], + TWSAPIResponse extends + WsAPIOperationResponseMap[TWSOperation] = WsAPIOperationResponseMap[TWSOperation], + >( + wsKey: WsKey, + operation: TWSOperation, + category: BitgetInstTypeV3, + params: TWSParams & { signRequest?: boolean }, + requestFlags?: WSAPIRequestFlags, + ): Promise { + this.logger.trace(`sendWSAPIRequest(): assert "${wsKey}" is connected`); + + await this.assertIsConnected(wsKey); + this.logger.trace('sendWSAPIRequest()->assertIsConnected() ok'); + + if (requestFlags?.authIsOptional !== true) { + // this.logger.trace('sendWSAPIRequest(): assertIsAuthenticated(${wsKey})...'); + await this.assertIsAuthenticated(wsKey); + // this.logger.trace('sendWSAPIRequest(): assertIsAuthenticated(${wsKey}) ok'); + } + + const request: WSAPIRequestBitgetV3 = { + op: 'trade', + id: `${this.getNewRequestId()}`, + category: category, + topic: operation, + // Ensure "args" is always wrapped as array + args: Array.isArray(params) ? params : [params], + }; + + // Store deferred promise, resolved within the "resolveEmittableEvents" method while parsing incoming events + const promiseRef = getPromiseRefForWSAPIRequest(request); + + const deferredPromise = this.getWsStore().createDeferredPromise< + // eslint-disable-next-line @typescript-eslint/no-explicit-any + TWSAPIResponse & { request: any } + >(wsKey, promiseRef, false); + + // Enrich returned promise with request context for easier debugging + deferredPromise.promise + ?.then((res) => { + if (!Array.isArray(res)) { + res.request = { + wsKey, + ...request, + }; + } + + return res; + }) + .catch((e) => { + if (typeof e === 'string') { + this.logger.error('Unexpected string thrown without Error object:', { + e, + wsKey, + request, + }); + return e; + } + e.request = { + wsKey, + operation, + params: params, + }; + // throw e; + return e; + }); + + this.logger.trace( + `sendWSAPIRequest(): sending raw request: ${JSON.stringify(request, null, 2)}`, + ); + + // Send event + const throwExceptions = false; + this.tryWsSend(wsKey, JSON.stringify(request), throwExceptions); + + this.logger.trace( + `sendWSAPIRequest(): sent "${operation}" event with promiseRef(${promiseRef})`, + ); + + // Return deferred promise, so caller can await this call + return deferredPromise.promise!; } } From 17b1fc37d80ef5673b5b8f5b8e68f436f630d5a9 Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Mon, 21 Jul 2025 14:39:17 +0100 Subject: [PATCH 29/57] feat(#59): add support for RSA auth. feat(): transition to web crypto api for sign --- README.md | 3 + examples/auth/fasterHmacSign.ts | 143 +++++++++++++++++++++++++++++ examples/auth/rest-private-rsa.md | 109 ++++++++++++++++++++++ examples/auth/rest-private-rsa.ts | 57 ++++++++++++ package-lock.json | 4 +- package.json | 2 +- src/index.ts | 1 + src/rest-client-v3.ts | 2 +- src/types/websockets/ws-general.ts | 1 - src/util/BaseRestClient.ts | 16 +++- src/util/browser-support.ts | 51 ---------- src/util/node-support.ts | 55 ----------- src/util/requestUtils.ts | 7 ++ src/util/websocket-util.ts | 30 ------ src/websocket-client-legacy-v1.ts | 33 ++++++- src/websocket-client-v2.ts | 9 +- webpack/webpack.config.js | 9 +- 17 files changed, 378 insertions(+), 154 deletions(-) create mode 100644 examples/auth/fasterHmacSign.ts create mode 100644 examples/auth/rest-private-rsa.md create mode 100644 examples/auth/rest-private-rsa.ts delete mode 100644 src/util/browser-support.ts delete mode 100644 src/util/node-support.ts diff --git a/README.md b/README.md index e8b3ad3..2754a11 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,9 @@ Updated & performant JavaScript & Node.js SDK for the Bitget V2 REST APIs and We - Robust WebSocket integration with configurable connection heartbeats & automatic reconnect then resubscribe workflows. - Officially listed Node.js SDK in [Bitget API docs](https://bitgetlimited.github.io/apidoc/en/spot/#sdk-code-example). - Browser support (via webpack bundle - see "Browser Usage" below). +- Support all authentication methods supported by Bitget: + - [x] HMAC + - [x] RSA ## Installation diff --git a/examples/auth/fasterHmacSign.ts b/examples/auth/fasterHmacSign.ts new file mode 100644 index 0000000..7bd0680 --- /dev/null +++ b/examples/auth/fasterHmacSign.ts @@ -0,0 +1,143 @@ +import { createHmac } from 'crypto'; + +import { DefaultLogger, RestClientV3, WebsocketClientV3 } from '../../src/'; + +// or +// import { createHmac } from 'crypto'; +// import { DefaultLogger, RestClientV3, WebsocketClientV3 } from 'bitget-api'; + +/** + * Injecting a custom signMessage function. + * + * As of version 3.0.0 of the bitget-api Node.js/TypeScript/JavaScript + * SDK for Bitget, the SDK uses the Web Crypto API for signing requests. + * While it is compatible with Node and Browser environments, it is + * slightly slower than using Node's native crypto module (only + * available in backend Node environments). + * + * For latency sensitive users, you can inject the previous node crypto sign + * method (or your own even faster implementation), if this change affects you. + * + * This example demonstrates how to inject a custom sign function, to achieve + * the same peformance as seen before the Web Crypto API was introduced. + * + * For context on standard usage, the "signMessage" function is used: + * - During every single API call + * - After opening a new private WebSocket connection + */ + +const apiKey = process.env.API_KEY_COM; +const apiSecret = process.env.API_SECRET_COM; +const apiPass = process.env.API_PASS_COM; + +const restClient = new RestClientV3({ + apiKey: apiKey, + apiSecret: apiSecret, + apiPass: apiPass, + /** + * Set this to true to enable demo trading: + */ + demoTrading: true, + /** + * Overkill in almost every case, but if you need any optimisation available, + * you can inject a faster sign mechanism such as node's native createHmac: + */ + customSignMessageFn: async (message, secret) => { + return createHmac('sha256', secret).update(message).digest('hex'); + }, +}); + +// Optional, uncomment the "trace" override to log a lot more info about what the WS client is doing +const customLogger = { + ...DefaultLogger, + // trace: (...params) => console.log('trace', ...params), +}; + +const wsClient = new WebsocketClientV3( + { + apiKey: apiKey, + apiSecret: apiSecret, + apiPass: apiPass, + /** + * Set this to true to enable demo trading for the private account data WS + * Topics: order,execution,position,wallet,greeks + */ + demoTrading: true, + /** + * Overkill in almost every case, but if you need any optimisation available, + * you can inject a faster sign mechanism such as node's native createHmac: + */ + customSignMessageFn: async (message, secret) => { + return createHmac('sha256', secret).update(message).digest('hex'); + }, + }, + customLogger, +); + +function setWsClientEventListeners( + websocketClient: WebsocketClientV3, + accountRef: string, +): Promise { + return new Promise((resolve) => { + websocketClient.on('update', (data) => { + console.log(new Date(), accountRef, 'data ', JSON.stringify(data)); + // console.log('raw message received ', JSON.stringify(data, null, 2)); + }); + + websocketClient.on('open', (data) => { + console.log( + new Date(), + accountRef, + 'connection opened open:', + data.wsKey, + ); + }); + websocketClient.on('response', (data) => { + console.log( + new Date(), + accountRef, + 'log response: ', + JSON.stringify(data, null, 2), + ); + + if (typeof data.req_id === 'string') { + const topics = data.req_id.split(','); + if (topics.length) { + console.log(new Date(), accountRef, 'Subscribed to topics: ', topics); + return resolve(); + } + } + }); + websocketClient.on('reconnect', ({ wsKey }) => { + console.log( + new Date(), + accountRef, + 'ws automatically reconnecting.... ', + wsKey, + ); + }); + websocketClient.on('reconnected', (data) => { + console.log(new Date(), accountRef, 'ws has reconnected ', data?.wsKey); + }); + websocketClient.on('exception', (data) => { + console.error(new Date(), accountRef, 'ws exception: ', data); + }); + }); +} + +(async () => { + try { + const onSubscribed = setWsClientEventListeners(wsClient, 'demoAcc'); + + wsClient.subscribe(['position', 'account', 'order'], 'v3Private'); + + // Simple promise to ensure we're subscribed before trying anything else + await onSubscribed; + + // Start trading + const balResponse1 = await restClient.getBalances(); + console.log('balResponse1: ', JSON.stringify(balResponse1, null, 2)); + } catch (e) { + console.error('request failed: ', e); + } +})(); diff --git a/examples/auth/rest-private-rsa.md b/examples/auth/rest-private-rsa.md new file mode 100644 index 0000000..3149266 --- /dev/null +++ b/examples/auth/rest-private-rsa.md @@ -0,0 +1,109 @@ +# RSA Authentication with Bitget APIs in Node.js, JavaScript & TypeScript + +## Creating RSA Keys + +Officially, Bitget recommends downloading and running a key generator from their repo. Guidance for this can be found on the Bitget's website when trying to add a new RSA API key. + +However, openssl can be used to create the public & private key files using the following steps: + +```bash +# Generate a private key with either 2048 or 4096 bit length +openssl genrsa -out rsa-private-key.pem 4096 + +# Generate a corresponding public key +openssl rsa -in rsa-private-key.pem -pubout -out rsa-public-key.pem +``` + +## Using the RSA public key to get an API key from Bitget + +Once created, keep your **private key** completely secret! The **public** key needs to be provided to Bitget when creating new API credentials with the "Self-generated" option. + +Your public key should look something like this: + +```pem +-----BEGIN PUBLIC KEY----- +MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA1uWxxOXZUaX6AeZszf4x +rBsU6axA5ipwxG7VPihVgssphDrrSOD0hZqnBmtF2bvT9ee1U0XOfMn+H+J5SH+1 +jgUpfioqH0L+KXl6wmLoPsadgfJz0SiQlFnKTkDXvMmecr6cdMHi2qNEx4CMc68C +obvQ4Voz5qqpDwbohGtJh0p10PB//0Ejcoz0UwrTDq8BGeFmWa9pL/7h2vHtw+QU +UxlnGmt98M8KkKqqvVicMK+IVtng/QlDw9ofG2kQcbBkPRaTjNI+8ULtCDH0sOkZ +nT8PtGm4sEwmWH/dRWtUTWkMnUwCzuo/rWPb7WMprW2pKDTrLjUAr9M161t3Xa6W +JO03K3NOxupy7ilululLY8d/WKWYDOZMvS5bPiPRUoZqlJneC0CT/2q1W6GfWzsT +DCDTpgq/Ao7jTtnME9iadpwvFn0nMtNgJSrFDWPq8vKY9pRcEp/Na5qvIEOQIFnp +/kIDPuMf+LZwO8lGFO3jnndY+62835rm7t6ZNM3NLoNCarvUCEasobgDJHw7x7c1 +fW/OxYtLrWGdMpsP0MewgGJZXcT7mvlBjQ+JWLoyIc5rYMIDw9RLWUPnrlRCxvPp +sD9kDX7eaipdoik5yLyMaRvd16Vt9Bck/9pbSHazm41m/nd4KCZeGdsvrAA2beww +zFWQQV9EX6/VLBgbnGTsMe0CAwEAAQ== +-----END PUBLIC KEY----- +``` + +Submit this in the "Upload public key" form, shown when creating a new API key on Bitget and choosing the "self-generated"/RSA option. + +Note: the "-----BEGIN PUBLIC KEY-----" and "-----END PUBLIC KEY-----" header & footer can be included. + +After using the public key to create a new API key, you will be given an API Key such as the following: + +``` +SIHqWcDeRoj6gkOjLjQh1dnV1CD7IgwQTfL4LVa8wu04zNTYVSmJBIHsjQjgwWqt +``` + +This is the first piece, used as the "apiKey" in the [rest-private-rsa.ts](./rest-private-rsa.ts) example. + +## Using the RSA private key for RSA authentication with Bitget APIs in Node.js + +Your private key, if generated with the above steps, should look something like this (but with much more text): + +```pem +-----BEGIN RSA PRIVATE KEY----- +uayyi6wFTaNeG1/WCqhrowj2kCx8eB6NDZYl+OS9ZI9WC +q/44iFERNuP0TXvQx8tgvSZXyu4/G618QzKh0Ii1uAATt2upa8dp1uGl2U7EqBE8 +p5y4pPzJuwvB3j6LQON20u2Wpbg8PQZACMfKym7lYDO+9MloK/gAQpyeYJzbw92C +YE/ymq4JVjCMCQKCAQEA4/X0I9TO8vT0D0l83o693QA3C09uSZ6j9Obx5UrtDnA9 +sMkkRoe+R/vvIpVDzukMEEOmCuxbcdPoniVUKlTooK0Llo6JJ1l8CdFzQsOR97Pe +csB6pxkLLH2qHx05xPBy4PyoB +-----END RSA PRIVATE KEY----- +``` + +This is your secret, you should never share this with anyone, not even Bitget! Treat this like a password. + +As part of this authentication process, your private key is used to generate a signature (using `RSA-SHA256`). This SDK handles this process automatically for you. RSA authentication is automatically detected if the "api_secret" parameter contains the words "PRIVATE KEY", such as the header shown in the example above. + +From here, simply use the key provided by Bitget as the `api_key` parameter and your private key (with the header) as the `api_secret` parameter. + +Based on the above example, the following would prepare the main REST client using the above credentials: + +```typescript +// Received after creating a new API key with a self-generated RSA public key on Bitget +const API_KEY = 'bg_0866563123123123123f567e83e52fd'; + +// The self-generated RSA private key, this is never directly given to Bitget, but used to generate a signature +// Note: this MUST include the "BEGIN PRIVATE KEY" header so that the SDK understands this is RSA auth +const rsaPrivateKey = ` +-----BEGIN PRIVATE KEY----- +MIIJQQIBADANBgkqhkiG9w0BAQEFAASCCSswggknAgEAAoICAQC4kNgO71O0xkuH +FjHnr5pimpEeiGPAtDTAeJoS55+kVrh3ThHsm0ARf36zimU +gwrCWAnKqPlbqzWzs9mH9JvZWrEaOgWy +8wMSJ21vtz1rRJhfaUUsOC1KLoWyvzqWW44zKaxoKSqCUMJqDbxIq7RjGlmc8KGJ +scFWRSdfGEEpvqLlpTLoEtWHZP0pUUamSWrH/IgieFFhKaOPvmED24DJAlqSeEFw +z7TW4dfWPRgjCRu4AAfgCtjb+3/7ONeQfx5XFvKFM7VNi/9sRh+alRqpzKrlI +79bM1p/egrC4c8KUqrNk2s5c3HIU......THISISANEXAMPLE +-----END PRIVATE KEY----- +`; + +// This is set by you when registering your RSA API key in Bitget's website. +const API_PASS = 'TestingRSA'; + +const client = new RestClientV2({ + apiKey: API_KEY, + apiSecret: rsaPrivateKey, + apiPass: API_PASS, +}); + +const clientV3 = new RestClientV3({ + apiKey: API_KEY, + apiSecret: rsaPrivateKey, + apiPass: API_PASS, +}); +``` + +For a complete example, refer to the [rest-private-rsa.ts](./rest-private-rsa.ts) file on GitHub. diff --git a/examples/auth/rest-private-rsa.ts b/examples/auth/rest-private-rsa.ts new file mode 100644 index 0000000..21ffdc5 --- /dev/null +++ b/examples/auth/rest-private-rsa.ts @@ -0,0 +1,57 @@ +import { RestClientV2, RestClientV3 } from '../../src'; + +// Import frmo NPM: +// import { RestClientV2, RestClientV3 } from 'bitget-api'; +// or if you prefer require: +// const { RestClientV2, RestClientV3 } = require('bitget-api'); + +// Received after creating a new API key with a self-generated RSA public key on Bitget +const API_KEY = 'bg_0866563123123123123f567e83e52fd'; + +// The self-generated RSA private key, this is never directly given to Bitget, but used to generate a signature +// Note: this MUST include the "BEGIN PRIVATE KEY" header so that the SDK understands this is RSA auth +const rsaPrivateKey = ` +-----BEGIN PRIVATE KEY----- +MIIJQQIBADANBgkqhkiG9w0BAQEFAASCCSswggknAgEAAoICAQC4kNgO71O0xkuH +FjHnr5pimpEeiGPAtDTAeJoS55+kVrh3ThHsm0ARf36zimU +gwrCWAnKqPlbqzWzs9mH9JvZWrEaOgWy +8wMSJ21vtz1rRJhfaUUsOC1KLoWyvzqWW44zKaxoKSqCUMJqDbxIq7RjGlmc8KGJ +scFWRSdfGEEpvqLlpTLoEtWHZP0pUUamSWrH/IgieFFhKaOPvmED24DJAlqSeEFw +z7TW4dfWPRgjCRu4AAfgCtjb+3/7ONeQfx5XFvKFM7VNi/9sRh+alRqpzKrlI +79bM1p/egrC4c8KUqrNk2s5c3HIU......THISISANEXAMPLE +-----END PRIVATE KEY----- +`; + +// This is set by you when registering your RSA API key in Bitget's website. +const API_PASS = 'TestingRSA'; + +const client = new RestClientV2({ + apiKey: API_KEY, + apiSecret: rsaPrivateKey, + apiPass: API_PASS, +}); + +const clientV3 = new RestClientV3({ + apiKey: API_KEY, + apiSecret: rsaPrivateKey, + apiPass: API_PASS, +}); + +// const wsClient = new WebsocketClientV2({ +// apiKey: API_KEY, +// apiSecret: rsaPrivateKey, +// apiPass: API_PASS, +// }); + +(async () => { + try { + console.log('V2 private api call result: ', await client.getBalances()); + } catch (e) { + console.error('V2 request failed: ', e); + } + try { + console.log('V3 private api call result: ', await clientV3.getBalances()); + } catch (e) { + console.error('V3 request failed: ', e); + } +})(); diff --git a/package-lock.json b/package-lock.json index 6802d65..d2d78df 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "bitget-api", - "version": "2.3.6", + "version": "3.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "bitget-api", - "version": "2.3.6", + "version": "3.0.0", "license": "MIT", "dependencies": { "axios": "^1.6.1", diff --git a/package.json b/package.json index fa152ba..333edfd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bitget-api", - "version": "2.3.6", + "version": "3.0.0", "description": "Node.js & JavaScript SDK for Bitget REST APIs & WebSockets, with TypeScript & end-to-end tests.", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/index.ts b/src/index.ts index 310d90a..a39c706 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,6 +2,7 @@ export * from './broker-client'; export * from './constants/enum'; export * from './futures-client'; export * from './rest-client-v2'; +export * from './rest-client-v3'; export * from './spot-client'; export * from './types'; export * from './util'; diff --git a/src/rest-client-v3.ts b/src/rest-client-v3.ts index dbc90ff..5468b9c 100644 --- a/src/rest-client-v3.ts +++ b/src/rest-client-v3.ts @@ -357,7 +357,7 @@ export class RestClientV3 extends BaseRestClient { /** * Get Account Assets */ - getAccountAssets(): Promise> { + getBalances(): Promise> { return this.getPrivate('/api/v3/account/assets'); } diff --git a/src/types/websockets/ws-general.ts b/src/types/websockets/ws-general.ts index 3b554a0..5fd9e6d 100644 --- a/src/types/websockets/ws-general.ts +++ b/src/types/websockets/ws-general.ts @@ -206,7 +206,6 @@ export interface WSClientConfigurableOptions { wsUrl?: string; - // TODO: /** * Allows you to provide a custom "signMessage" function, e.g. to use node's much faster createHmac method * diff --git a/src/util/BaseRestClient.ts b/src/util/BaseRestClient.ts index 9bd41d9..ab7218b 100644 --- a/src/util/BaseRestClient.ts +++ b/src/util/BaseRestClient.ts @@ -2,12 +2,12 @@ import axios, { AxiosRequestConfig, AxiosResponse, Method } from 'axios'; import https from 'https'; import { RestClientType } from '../types'; -import { signMessage } from './node-support'; import { getRestBaseUrl, RestClientOptions, serializeParams, } from './requestUtils'; +import { SignAlgorithm, SignEncodeMethod, signMessage } from './webCryptoAPI'; import { neverGuard } from './websocket-util'; interface SignedRequest { @@ -257,6 +257,18 @@ export default abstract class BaseRestClient { }; } + private async signMessage( + paramsStr: string, + secret: string, + method: SignEncodeMethod, + algorithm: SignAlgorithm, + ): Promise { + if (typeof this.options.customSignMessageFn === 'function') { + return this.options.customSignMessageFn(paramsStr, secret); + } + return await signMessage(paramsStr, secret, method, algorithm); + } + /** * @private sign request and set recv window */ @@ -303,7 +315,7 @@ export default abstract class BaseRestClient { // console.log('sign params: ', paramsStr); - res.sign = await signMessage( + res.sign = await this.signMessage( paramsStr, this.apiSecret, 'base64', diff --git a/src/util/browser-support.ts b/src/util/browser-support.ts deleted file mode 100644 index 0069d01..0000000 --- a/src/util/browser-support.ts +++ /dev/null @@ -1,51 +0,0 @@ -function bufferToB64(buffer: ArrayBuffer): string { - let binary = ''; - const bytes = new Uint8Array(buffer); - const len = bytes.byteLength; - for (let i = 0; i < len; i++) { - binary += String.fromCharCode(bytes[i]); - } - return globalThis.btoa(binary); -} - -export type SignEncodeMethod = 'hex' | 'base64'; -export type SignAlgorithm = 'SHA-256' | 'SHA-512'; - -export async function signMessage( - message: string, - secret: string, - method: SignEncodeMethod, -): Promise { - const encoder = new TextEncoder(); - const key = await window.crypto.subtle.importKey( - 'raw', - encoder.encode(secret), - { name: 'HMAC', hash: { name: 'SHA-256' } }, - false, - ['sign'], - ); - - const signature = await window.crypto.subtle.sign( - 'HMAC', - key, - encoder.encode(message), - ); - - switch (method) { - case 'hex': { - return Array.prototype.map - .call(new Uint8Array(signature), (x: any) => - ('00' + x.toString(16)).slice(-2), - ) - .join(''); - } - case 'base64': { - return bufferToB64(signature); - } - default: { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - ((x: never) => {})(method); - throw new Error(`Unhandled sign method: ${method}`); - } - } -} diff --git a/src/util/node-support.ts b/src/util/node-support.ts deleted file mode 100644 index c18b674..0000000 --- a/src/util/node-support.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { constants, createHmac, createSign, sign } from 'crypto'; - -import * as webCrypto from './webCryptoAPI'; -import { SignAlgorithm, SignEncodeMethod } from './webCryptoAPI'; - -/** This is async because the browser version uses a promise (browser-support) */ -export async function signMessage( - message: string, - secret: string, - method: SignEncodeMethod, - algorithm: SignAlgorithm, - pemEncodeMethod: SignEncodeMethod = method, -): Promise { - const signType = webCrypto.getSignKeyType(secret); - - if (secret.includes('PRIVATE KEY') && typeof createSign === 'function') { - if (signType === 'RSASSA-PKCS1-v1_5') { - return createSign('RSA-SHA256') - .update(message) - .sign(secret, pemEncodeMethod); - } - - // fallback to ed25519 - // ed25519 requires b64 encoding - const ed25519Method: SignEncodeMethod = 'base64'; - - return sign(null, Buffer.from(message), { - key: secret, - padding: constants.RSA_PKCS1_PSS_PADDING, - saltLength: constants.RSA_PSS_SALTLEN_DIGEST, - }).toString(ed25519Method); - } - - // fallback to hmac - if (typeof createHmac === 'function') { - return createHmac('sha256', secret).update(message).digest(method); - } - - // fallback to web crypto api methods - return webCrypto.signMessage(message, secret, method, algorithm); - - // switch (method) { - // case 'hex': { - // return hmac.digest('hex'); - // } - // case 'base64': { - // return hmac.digest().toString('base64'); - // } - // default: { - // // eslint-disable-next-line @typescript-eslint/no-unused-vars - // ((x: never) => {})(method); - // throw new Error(`Unhandled sign method: ${method}`); - // } - // } -} diff --git a/src/util/requestUtils.ts b/src/util/requestUtils.ts index 673fec7..ec03a5a 100644 --- a/src/util/requestUtils.ts +++ b/src/util/requestUtils.ts @@ -51,6 +51,13 @@ export interface RestClientOptions { * Default: 1000 (defaults comes from https agent) */ keepAliveMsecs?: number; + + /** + * Allows you to provide a custom "signMessage" function, e.g. to use node's much faster createHmac method + * + * Look in the examples folder for a demonstration on using node's createHmac instead. + */ + customSignMessageFn?: (message: string, secret: string) => Promise; } export function serializeParams( diff --git a/src/util/websocket-util.ts b/src/util/websocket-util.ts index e8af763..1f51874 100644 --- a/src/util/websocket-util.ts +++ b/src/util/websocket-util.ts @@ -9,7 +9,6 @@ import { WsTopicSubscribePublicArgsV2, } from '../types'; import { DefaultLogger } from './logger'; -import { signMessage } from './node-support'; export const WS_LOGGER_CATEGORY = { category: 'bitget-ws' }; @@ -250,35 +249,6 @@ export function neverGuard(x: never, msg: string): Error { return new Error(`Unhandled value exception "${x}", ${msg}`); } -export async function getWsAuthSignature( - apiKey: string | undefined, - apiSecret: string | undefined, - apiPass: string | undefined, - recvWindow: number = 0, -): Promise<{ - expiresAt: number; - signature: string; -}> { - if (!apiKey || !apiSecret || !apiPass) { - throw new Error( - 'Cannot auth - missing api key, secret or passcode in config', - ); - } - const signatureExpiresAt = ((Date.now() + recvWindow) / 1000).toFixed(0); - - const signature = await signMessage( - signatureExpiresAt + 'GET' + '/user/verify', - apiSecret, - 'base64', - 'SHA-256', - ); - - return { - expiresAt: Number(signatureExpiresAt), - signature, - }; -} - /** * #305: ws.terminate() is undefined in browsers. * This only works in node.js, not in browsers. diff --git a/src/websocket-client-legacy-v1.ts b/src/websocket-client-legacy-v1.ts index 55b7cf6..6da974a 100644 --- a/src/websocket-client-legacy-v1.ts +++ b/src/websocket-client-legacy-v1.ts @@ -13,7 +13,6 @@ import { import { DefaultLogger, getMaxTopicsPerSubscribeEvent, - getWsAuthSignature, getWsKeyForTopic, isPrivateChannel, isWsPong, @@ -23,6 +22,7 @@ import { WS_BASE_URL_MAP, WS_KEY_MAP, } from './util'; +import { signMessage } from './util/webCryptoAPI'; import WsStore from './util/WsStore'; import { WsConnectionStateEnum } from './util/WsStore.types'; @@ -275,12 +275,41 @@ export class WebsocketClientLegacyV1 extends EventEmitter { this.emit('exception', { ...error, wsKey }); } + private async getWsAuthSignature( + apiKey: string | undefined, + apiSecret: string | undefined, + apiPass: string | undefined, + recvWindow: number = 0, + ): Promise<{ + expiresAt: number; + signature: string; + }> { + if (!apiKey || !apiSecret || !apiPass) { + throw new Error( + 'Cannot auth - missing api key, secret or passcode in config', + ); + } + const signatureExpiresAt = ((Date.now() + recvWindow) / 1000).toFixed(0); + + const signature = await signMessage( + signatureExpiresAt + 'GET' + '/user/verify', + apiSecret, + 'base64', + 'SHA-256', + ); + + return { + expiresAt: Number(signatureExpiresAt), + signature, + }; + } + /** Get a signature, build the auth request and send it */ private async sendAuthRequest(wsKey: WsKey): Promise { try { const { apiKey, apiSecret, apiPass, recvWindow } = this.options; - const { signature, expiresAt } = await getWsAuthSignature( + const { signature, expiresAt } = await this.getWsAuthSignature( apiKey, apiSecret, apiPass, diff --git a/src/websocket-client-v2.ts b/src/websocket-client-v2.ts index 6bbfe19..274497b 100644 --- a/src/websocket-client-v2.ts +++ b/src/websocket-client-v2.ts @@ -22,8 +22,11 @@ import { WS_KEY_MAP, WsTopicRequest, } from './util'; -import { signMessage } from './util/node-support'; -import { SignAlgorithm } from './util/webCryptoAPI'; +import { + SignAlgorithm, + SignEncodeMethod, + signMessage, +} from './util/webCryptoAPI'; const WS_LOGGER_CATEGORY = { category: 'bitget-ws' }; @@ -334,7 +337,7 @@ export class WebsocketClientV2 extends BaseWebsocketClient< private async signMessage( paramsStr: string, secret: string, - method: 'hex' | 'base64', + method: SignEncodeMethod, algorithm: SignAlgorithm, ): Promise { if (typeof this.options.customSignMessageFn === 'function') { diff --git a/webpack/webpack.config.js b/webpack/webpack.config.js index 9386e58..d783327 100644 --- a/webpack/webpack.config.js +++ b/webpack/webpack.config.js @@ -17,13 +17,10 @@ function generateConfig(name) { resolve: { // Add '.ts' and '.tsx' as resolvable extensions. - extensions: ['.webpack.js', '.web.js', '.ts', '.tsx', '.js'], + extensions: [".webpack.js", ".web.js", ".ts", ".tsx", ".js"], alias: { - [path.resolve(__dirname, '../lib/util/node-support.js')]: path.resolve( - __dirname, - '../lib/util/browser-support.js', - ), - }, + process: "process/browser", + } }, module: { From b5f583e416041a7edd53a7b3ccebea2b3e47c670 Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Mon, 21 Jul 2025 14:52:41 +0100 Subject: [PATCH 30/57] chore(): update readme --- README.md | 2 +- examples/deprecated-V1-Websockets/ws-private.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2754a11..da51929 100644 --- a/README.md +++ b/README.md @@ -394,7 +394,7 @@ For more examples, including how to use websockets with Bitget, check the [examp ### Customise logging -Pass a custom logger which supports the log methods `silly`, `debug`, `notice`, `info`, `warning` and `error`, or override methods from the default logger as desired. +Pass a custom logger which supports the log methods `trace`, `info` and `error`, or override methods from the default logger as desired. ```javascript import { WebsocketClientV2, DefaultLogger } from 'bitget-api'; diff --git a/examples/deprecated-V1-Websockets/ws-private.ts b/examples/deprecated-V1-Websockets/ws-private.ts index eb92bb4..24ce5a3 100644 --- a/examples/deprecated-V1-Websockets/ws-private.ts +++ b/examples/deprecated-V1-Websockets/ws-private.ts @@ -6,7 +6,7 @@ import { DefaultLogger, WebsocketClientLegacyV1 } from '../../src'; (async () => { const logger = { ...DefaultLogger, - trace: (...params) => console.log('silly', ...params), + trace: (...params) => console.log('trace', ...params), }; logger.info('Starting private V1 websocket'); From c8086ba2c327e296a17b4c6e4a5ad4d71d016be9 Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Mon, 21 Jul 2025 14:58:57 +0100 Subject: [PATCH 31/57] chore(): update comment --- src/types/websockets/ws-api-request.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/websockets/ws-api-request.ts b/src/types/websockets/ws-api-request.ts index 6094de6..19bedc7 100644 --- a/src/types/websockets/ws-api-request.ts +++ b/src/types/websockets/ws-api-request.ts @@ -6,7 +6,7 @@ export interface WSAPIPlaceOrderRequestV3 { side: 'buy' | 'sell'; posSide?: 'long' | 'short'; timeInForce?: 'gtc' | 'ioc' | 'fok' | 'post_only'; - reduceOnly?: 'YES' | 'NO'; // TODO: not supported by batch place? Sent question to Bitget 18th Jul + reduceOnly?: 'YES' | 'NO'; // Note: reduceOnly is not supported for batch place WS API. Might be supported starting late Q4 2025, but not supported yet. clientOid?: string; stpMode?: 'none' | 'cancel_taker' | 'cancel_maker' | 'cancel_both'; tpTriggerBy?: 'market' | 'mark'; From 2494740fdc24ec5d9805aa6b8cf2d968cd397bc9 Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Mon, 21 Jul 2025 15:04:21 +0100 Subject: [PATCH 32/57] chore(): update error message --- src/websocket-client-legacy-v1.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/websocket-client-legacy-v1.ts b/src/websocket-client-legacy-v1.ts index 6da974a..cc4c673 100644 --- a/src/websocket-client-legacy-v1.ts +++ b/src/websocket-client-legacy-v1.ts @@ -116,8 +116,6 @@ export class WebsocketClientLegacyV1 extends EventEmitter { // Persist this topic to the expected topics list this.wsStore.addTopic(wsKey, topic); - // TODO: tidy up unsubscribe too, also in other connectors - // if connected, send subscription request if ( this.wsStore.isConnectionState(wsKey, WsConnectionStateEnum.CONNECTED) @@ -164,7 +162,6 @@ export class WebsocketClientLegacyV1 extends EventEmitter { this.wsStore.deleteTopic(getWsKeyForTopic(topic, isPrivateTopic), topic), ); - // TODO: should this really happen on each wsKey?? seems weird this.wsStore.getKeys().forEach((wsKey: WsKey) => { // unsubscribe request only necessary if active connection exists if ( @@ -683,10 +680,12 @@ export class WebsocketClientLegacyV1 extends EventEmitter { return WS_BASE_URL_MAP.mixv1.all[networkKey]; } case WS_KEY_MAP.v2Private: - case WS_KEY_MAP.v2Public: + case WS_KEY_MAP.v2Public: { + throw new Error('Use the WebsocketClientV2 for V2 websockets'); + } case WS_KEY_MAP.v3Private: case WS_KEY_MAP.v3Public: { - throw new Error('Use the WebsocketClientV2 for V2 websockets'); //TODO: update error msg + throw new Error('Use the WebsocketClientV3 for V3 websockets'); } default: { this.logger.error('getWsUrl(): Unhandled wsKey: ', { From c96cbfd313772b9b3235caa130943a993b5e2c76 Mon Sep 17 00:00:00 2001 From: JJ-Cro Date: Mon, 21 Jul 2025 16:32:34 +0200 Subject: [PATCH 33/57] feat(): added v3 examples and updated v3 readme --- README.md | 59 +++++--- examples/V3/rest-private-UTA-futures.ts | 32 ++++ examples/V3/rest-private-UTA-spot.ts | 31 ++++ examples/V3/rest-public-UTA-futures.ts | 24 +++ examples/V3/rest-public-UTA-spot.ts | 21 +++ examples/V3/rest-trade-UTA-futures.ts | 185 ++++++++++++++++++++++++ examples/V3/rest-trade-UTA-spot.ts | 129 +++++++++++++++++ src/index.ts | 1 + 8 files changed, 462 insertions(+), 20 deletions(-) create mode 100644 examples/V3/rest-private-UTA-futures.ts create mode 100644 examples/V3/rest-private-UTA-spot.ts create mode 100644 examples/V3/rest-public-UTA-futures.ts create mode 100644 examples/V3/rest-public-UTA-spot.ts create mode 100644 examples/V3/rest-trade-UTA-futures.ts create mode 100644 examples/V3/rest-trade-UTA-spot.ts diff --git a/README.md b/README.md index e8b3ad3..d5cab23 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,30 @@ import { RestClientV3 } from 'bitget-api'; // or if you prefer require: // const { RestClientV3 } = require('bitget-api'); -// TODO: REST V3 example here, similar to V2 +// note the single quotes, preventing special characters such as $ from being incorrectly passed +const client = new RestClientV3({ + apiKey: process.env.API_KEY_COM || 'insert_api_key_here';, + apiSecret: process.env.API_KEY_COM || 'insert_api_key_here';, + apiPass: process.env.API_KEY_COM || 'insert_api_key_here';, +}); + +(async () => { + try { + console.log(await client.getAccountAssets()); + + const newOrder = await client.submitNewOrder({ + category: 'USDT-FUTURES', + orderType: 'market', + side: 'buy', + qty: '0.001', + symbol: 'BTCUSDT', + }); + + console.log('Order submitted: ', newOrder); + } catch (e) { + console.error('request failed: ', e); + } +})(); ``` #### V2 REST APIs @@ -140,13 +163,11 @@ const API_KEY = 'xxx'; const API_SECRET = 'yyy'; const API_PASS = 'zzz'; -const client = new RestClientV2( - { - apiKey: API_KEY, - apiSecret: API_SECRET, - apiPass: API_PASS, - }, -); +const client = new RestClientV2({ + apiKey: API_KEY, + apiSecret: API_SECRET, + apiPass: API_PASS, +}); // For public-only API calls, simply don't provide a key & secret or set them to undefined // const client = new RestClientV2(); @@ -179,6 +200,7 @@ client All WebSocket functionality is supported via the WebsocketClient. Since there are currently 3 generations of Bitget's API, there are 3 WebsocketClient classes in this Node.js, JavaScript & TypeScript SDK for Bitget. Use the following guidance to decide which one to use: + - Unified Trading Account / V3 (latest generation): - For receiving data, use the [WebsocketClientV3](./src/websocket-client-v3.ts). - For sending orders via WebSockets, use the [WebsocketAPIClient](./src/websocket-api-client.ts). @@ -203,21 +225,19 @@ This integration looks & feels like a REST API client, but uses WebSockets, via A simple example is below, but for a more thorough example, check the example here: [./examples/V3/ws-api-client-trade.ts](./examples/V3/ws-api-client-trade.ts) ```typescript -import { WebsocketAPIClient } from "bitget-api"; +import { WebsocketAPIClient } from 'bitget-api'; // or if you prefer require: // const { WebsocketAPIClient } = require("bitget-api"); // Make an instance of the WS API Client class with your API keys -const wsClient = new WebsocketAPIClient( - { - apiKey: API_KEY, - apiSecret: API_SECRET, - apiPass: API_PASS, +const wsClient = new WebsocketAPIClient({ + apiKey: API_KEY, + apiSecret: API_SECRET, + apiPass: API_PASS, - // Whether to use the demo trading wss connection - // demoTrading: true, - } -); + // Whether to use the demo trading wss connection + // demoTrading: true, +}); async function start() { // Start using it like a REST API. All actions are sent via a persisted WebSocket connection. @@ -242,7 +262,7 @@ async function start() { } } -start().catch(e => console.error("Exception in example: ". e)); +start().catch((e) => console.error('Exception in example: '.e)); ``` ###### Receiving realtime data @@ -382,7 +402,6 @@ wsClient.subscribe( ); ``` - For more examples, including how to use websockets with Bitget, check the [examples](./examples/) and [test](./test/) folders. --- diff --git a/examples/V3/rest-private-UTA-futures.ts b/examples/V3/rest-private-UTA-futures.ts new file mode 100644 index 0000000..d606c79 --- /dev/null +++ b/examples/V3/rest-private-UTA-futures.ts @@ -0,0 +1,32 @@ +import { RestClientV3 } from '../../src/index'; + +// or +// import { RestClientV3 } from 'bitget-api'; + +// read from environmental variables +const API_KEY = process.env.API_KEY_COM; +const API_SECRET = process.env.API_SECRET_COM; +const API_PASS = process.env.API_PASS_COM; + +// If running from CLI in unix, you can pass env vars as such: +// API_KEY_COM='lkm12n3-2ba3-1mxf-fn13-lkm12n3a' API_SECRET_COM='035B2B9637E1BDFFEE2646BFBDDB8CE4' API_PASSPHRASE_COM='ComplexPa$$!23$5^' ts-node examples/V3/rest-private-futures.ts + +// note the single quotes, preventing special characters such as $ from being incorrectly passed + +const client = new RestClientV3({ + apiKey: API_KEY, + apiSecret: API_SECRET, + apiPass: API_PASS, + // apiKey: 'apiKeyHere', + // apiSecret: 'apiSecretHere', + // apiPass: 'apiPassHere', +}); + +/** This is a simple script wrapped in a immediately invoked function expression, designed to check account assets for futures trading */ +(async () => { + try { + console.log(await client.getAccountAssets()); + } catch (e) { + console.error('request failed: ', e); + } +})(); diff --git a/examples/V3/rest-private-UTA-spot.ts b/examples/V3/rest-private-UTA-spot.ts new file mode 100644 index 0000000..cb057bc --- /dev/null +++ b/examples/V3/rest-private-UTA-spot.ts @@ -0,0 +1,31 @@ +import { RestClientV3 } from '../../src/index'; + +// or +// import { RestClientV3 } from 'bitget-api'; + +// read from environmental variables +const API_KEY = process.env.API_KEY_COM; +const API_SECRET = process.env.API_SECRET_COM; +const API_PASS = process.env.API_PASS_COM; +// If running from CLI in unix, you can pass env vars as such: +// API_KEY_COM='lkm12n3-2ba3-1mxf-fn13-lkm12n3a' API_SECRET_COM='035B2B9637E1BDFFEE2646BFBDDB8CE4' API_PASSPHRASE_COM='ComplexPa$$!23$5^' ts-node examples/V3/rest-private-spot.ts + +// note the single quotes, preventing special characters such as $ from being incorrectly passed + +const client = new RestClientV3({ + apiKey: API_KEY, + apiSecret: API_SECRET, + apiPass: API_PASS, + // apiKey: 'apiKeyHere', + // apiSecret: 'apiSecretHere', + // apiPass: 'apiPassHere', +}); + +/** This is a simple script wrapped in a immediately invoked function expression, designed to check account assets */ +(async () => { + try { + console.log(await client.getAccountAssets()); + } catch (e) { + console.error('request failed: ', e); + } +})(); diff --git a/examples/V3/rest-public-UTA-futures.ts b/examples/V3/rest-public-UTA-futures.ts new file mode 100644 index 0000000..e7a03d3 --- /dev/null +++ b/examples/V3/rest-public-UTA-futures.ts @@ -0,0 +1,24 @@ +import { RestClientV3 } from '../../src/index'; + +// or +// import { RestClientV3 } from 'bitget-api'; + +const restClient = new RestClientV3(); + +const symbol = 'BTCUSDT'; + +(async () => { + try { + const response = await restClient.getCandles({ + symbol, + category: 'USDT-FUTURES', + interval: '1m', + }); + + console.table(response.data); + + console.log('getCandles returned ' + response.data.length + ' candles'); + } catch (e) { + console.error('request failed: ', e); + } +})(); diff --git a/examples/V3/rest-public-UTA-spot.ts b/examples/V3/rest-public-UTA-spot.ts new file mode 100644 index 0000000..9f01ff9 --- /dev/null +++ b/examples/V3/rest-public-UTA-spot.ts @@ -0,0 +1,21 @@ +import { RestClientV3 } from '../../src/index'; + +// or +// import { RestClientV3 } from 'bitget-api'; + +const restClient = new RestClientV3(); + +(async () => { + try { + const response = await restClient.getCandles({ + symbol: 'BTCUSDT', + category: 'SPOT', + interval: '1m', + }); + + console.table(response.data); + console.log('getCandles: ', response.data.length); + } catch (e) { + console.error('request failed: ', e); + } +})(); diff --git a/examples/V3/rest-trade-UTA-futures.ts b/examples/V3/rest-trade-UTA-futures.ts new file mode 100644 index 0000000..d946ca8 --- /dev/null +++ b/examples/V3/rest-trade-UTA-futures.ts @@ -0,0 +1,185 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import { + PlaceOrderRequestV3, + RestClientV3, + WebsocketClientV3, +} from '../../src'; + +// or +// import { PlaceOrderRequestV3, RestClientV3, WebsocketClientV3 } from '../src'; + +// read from environmental variables +const API_KEY = process.env.API_KEY_COM; +const API_SECRET = process.env.API_SECRET_COM; +const API_PASS = process.env.API_PASS_COM; + +// If running from CLI in unix, you can pass env vars as such: +// API_KEY_COM='lkm12n3-2ba3-1mxf-fn13-lkm12n3a' API_SECRET_COM='035B2B9637E1BDFFEE2646BFBDDB8CE4' API_PASSPHRASE_COM='ComplexPa$$!23$5^' ts-node examples/V3/rest-trade-futures.ts + +// note the single quotes, preventing special characters such as $ from being incorrectly passed + +const client = new RestClientV3({ + apiKey: API_KEY, + apiSecret: API_SECRET, + apiPass: API_PASS, + // apiKey: 'apiKeyHere', + // apiSecret: 'apiSecretHere', + // apiPass: 'apiPassHere', +}); + +const wsClient = new WebsocketClientV3({ + apiKey: API_KEY, + apiSecret: API_SECRET, + apiPass: API_PASS, +}); + +function logWSEvent(type, data) { + console.log(new Date(), `WS ${type} event: `, data); +} + +// simple sleep function +function promiseSleep(milliseconds) { + return new Promise((resolve) => setTimeout(resolve, milliseconds)); +} + +/** + * This is a simple script wrapped in a immediately invoked function expression (to execute the below workflow immediately). + * + * It is designed to: + * - open a private websocket channel to log account events + * - check for any available USDT balance in the account + * - immediately open a minimum sized long position on BTCUSDT + * - check active positions + * - immediately send closing orders for any active futures positions + * - check positions again + * + */ +(async () => { + try { + // Add event listeners to log websocket events on account + wsClient.on('update', (data) => logWSEvent('update', data)); + + wsClient.on('open', (data) => logWSEvent('open', data)); + wsClient.on('response', (data) => logWSEvent('response', data)); + wsClient.on('reconnect', (data) => logWSEvent('reconnect', data)); + wsClient.on('reconnected', (data) => logWSEvent('reconnected', data)); + wsClient.on('authenticated', (data) => logWSEvent('authenticated', data)); + wsClient.on('exception', (data) => logWSEvent('exception', data)); + + // Subscribe to private topics for UTA account + wsClient.subscribe( + { + topic: 'account', + payload: { + instType: 'UTA', + }, + }, + 'v3Private', + ); + + // Subscribe to position updates + wsClient.subscribe( + { + topic: 'position', + payload: { + instType: 'UTA', + }, + }, + 'v3Private', + ); + + // Subscribe to order updates + wsClient.subscribe( + { + topic: 'order', + payload: { + instType: 'UTA', + }, + }, + 'v3Private', + ); + + // wait briefly for ws to be ready (could also use the response or authenticated events, to make sure topics are subscribed to before starting) + await promiseSleep(2.5 * 1000); + + const symbol = 'BTCUSDT'; + + const balanceResult = await client.getAccountAssets(); + const accountBalance = balanceResult.data; + + const usdtAsset = accountBalance.assets?.find( + (asset) => asset.coin === 'USDT', + ); + const usdtAmount = usdtAsset ? Number(usdtAsset.available) : 0; + + console.log('USDT balance: ', usdtAmount); + + if (!usdtAmount) { + console.error('No USDT to trade'); + return; + } + + const symbolRulesResult = await client.getInstruments({ + category: 'USDT-FUTURES', + symbol: symbol, + }); + const bitcoinUSDFuturesRule = symbolRulesResult.data.find( + (row) => row.symbol === symbol, + ); + + console.log('symbol rules: ', bitcoinUSDFuturesRule); + if (!bitcoinUSDFuturesRule) { + console.error('Failed to get trading rules for ' + symbol); + return; + } + + const order: PlaceOrderRequestV3 = { + category: 'USDT-FUTURES', + orderType: 'market', + side: 'buy', + qty: bitcoinUSDFuturesRule.minOrderQty, + symbol: symbol, + } as const; + + console.log('placing order: ', order); + + const result = await client.submitNewOrder(order); + + console.log('order result: ', result); + + const positionsResult = await client.getCurrentPosition({ + category: 'USDT-FUTURES', + }); + const positionsToClose = positionsResult.data.list.filter( + (pos) => pos.total !== '0', + ); + + console.log('open positions to close: ', positionsToClose); + + // Loop through any active positions and send a closing market order on each position + for (const position of positionsToClose) { + const closingSide = position.posSide === 'long' ? 'sell' : 'buy'; + const closingOrder: PlaceOrderRequestV3 = { + category: 'USDT-FUTURES', + orderType: 'market', + side: closingSide, + qty: position.total, + symbol: position.symbol, + }; + + console.log('closing position with market order: ', closingOrder); + + const result = await client.submitNewOrder(closingOrder); + console.log('position closing order result: ', result); + } + + console.log( + 'positions after closing all: ', + await client.getCurrentPosition({ + category: 'USDT-FUTURES', + }), + ); + } catch (e) { + console.error('request failed: ', e); + } +})(); diff --git a/examples/V3/rest-trade-UTA-spot.ts b/examples/V3/rest-trade-UTA-spot.ts new file mode 100644 index 0000000..fbf9267 --- /dev/null +++ b/examples/V3/rest-trade-UTA-spot.ts @@ -0,0 +1,129 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import { + PlaceOrderRequestV3, + RestClientV3, + WebsocketClientV3, +} from '../../src/index'; + +// import { RestClientV3, WebsocketClientV3 } from '../src/index'; + +// read from environmental variables +const API_KEY = process.env.API_KEY_COM; +const API_SECRET = process.env.API_SECRET_COM; +const API_PASS = process.env.API_PASS_COM; + +// If running from CLI in unix, you can pass env vars as such: +// API_KEY_COM='lkm12n3-2ba3-1mxf-fn13-lkm12n3a' API_SECRET_COM='035B2B9637E1BDFFEE2646BFBDDB8CE4' API_PASSPHRASE_COM='ComplexPa$$!23$5^' ts-node examples/V3/rest-trade-spot.ts + +// note the single quotes, preventing special characters such as $ from being incorrectly passed + +const client = new RestClientV3({ + apiKey: API_KEY, + apiSecret: API_SECRET, + apiPass: API_PASS, + // apiKey: 'apiKeyHere', + // apiSecret: 'apiSecretHere', + // apiPass: 'apiPassHere', +}); + +const wsClient = new WebsocketClientV3({ + apiKey: API_KEY, + apiSecret: API_SECRET, + apiPass: API_PASS, +}); + +function logWSEvent(type, data) { + console.log(new Date(), `WS ${type} event: `, data); +} + +// simple sleep function +function promiseSleep(milliseconds) { + return new Promise((resolve) => setTimeout(resolve, milliseconds)); +} + +/** This is a simple script wrapped in a immediately invoked function expression, designed to check for any available BTC balance and immediately sell the full amount for USDT */ +(async () => { + try { + // Add event listeners to log websocket events on account + wsClient.on('update', (data) => logWSEvent('update', data)); + wsClient.on('open', (data) => logWSEvent('open', data)); + wsClient.on('response', (data) => logWSEvent('response', data)); + wsClient.on('reconnect', (data) => logWSEvent('reconnect', data)); + wsClient.on('reconnected', (data) => logWSEvent('reconnected', data)); + wsClient.on('authenticated', (data) => logWSEvent('authenticated', data)); + wsClient.on('exception', (data) => logWSEvent('exception', data)); + + // Subscribe to private account topics + // Account updates for UTA (unified trading account) + wsClient.subscribe( + { + topic: 'account', + payload: { + instType: 'UTA', + }, + }, + 'v3Private', + ); + + // Order updates for spot + wsClient.subscribe( + { + topic: 'order', + payload: { + instType: 'UTA', + }, + }, + 'v3Private', + ); + + // wait briefly for ws to be ready (could also use the response or authenticated events, to make sure topics are subscribed to before starting) + await promiseSleep(2.5 * 1000); + + const balanceResult = await client.getAccountAssets(); + const allBalances = balanceResult.data; + + const balanceBTC = allBalances.assets?.find( + (bal) => bal.coin === 'BTC' || bal.coin === 'btc', + ); + const btcAmount = + Number(allBalances.usdtEquity) > 0 ? Number(balanceBTC.available) : 0; + console.log('balance: ', JSON.stringify(allBalances, null, 2)); + console.log('BTC balance result: ', balanceBTC); + + if (!btcAmount) { + console.error('No BTC to trade'); + return; + } + + console.log(`BTC available: ${btcAmount}`); + const symbol = 'BTCUSDT'; + + const symbolsResult = await client.getInstruments({ + category: 'SPOT', + symbol: symbol, + }); + const btcRules = symbolsResult.data.find((rule) => rule.symbol === symbol); + console.log('btc trading rules: ', btcRules); + if (!btcRules) { + return console.log('no rules found for trading ' + symbol); + } + + const quantity = btcRules.minOrderQty; + + const order: PlaceOrderRequestV3 = { + symbol: symbol, + side: 'sell', + orderType: 'market', + category: 'SPOT', + qty: quantity, + } as const; + + console.log('submitting order: ', order); + + const sellResult = await client.submitNewOrder(order); + + console.log('sell result: ', sellResult); + } catch (e) { + console.error('request failed: ', e); + } +})(); diff --git a/src/index.ts b/src/index.ts index 310d90a..a39c706 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,6 +2,7 @@ export * from './broker-client'; export * from './constants/enum'; export * from './futures-client'; export * from './rest-client-v2'; +export * from './rest-client-v3'; export * from './spot-client'; export * from './types'; export * from './util'; From d0e8a2c6e195df0e719b205aa8c807695b92c7ec Mon Sep 17 00:00:00 2001 From: JJ-Cro Date: Mon, 21 Jul 2025 16:40:26 +0200 Subject: [PATCH 34/57] chore(): edit fn names --- README.md | 2 +- examples/V3/rest-private-UTA-spot.ts | 31 ------------------- ...private-UTA-futures.ts => rest-private.ts} | 2 +- examples/V3/rest-trade-UTA-futures.ts | 2 +- examples/V3/rest-trade-UTA-spot.ts | 2 +- 5 files changed, 4 insertions(+), 35 deletions(-) delete mode 100644 examples/V3/rest-private-UTA-spot.ts rename examples/V3/{rest-private-UTA-futures.ts => rest-private.ts} (95%) diff --git a/README.md b/README.md index 8a5608d..b6ef374 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,7 @@ const client = new RestClientV3({ (async () => { try { - console.log(await client.getAccountAssets()); + console.log(await client.getBalances()); const newOrder = await client.submitNewOrder({ category: 'USDT-FUTURES', diff --git a/examples/V3/rest-private-UTA-spot.ts b/examples/V3/rest-private-UTA-spot.ts deleted file mode 100644 index cb057bc..0000000 --- a/examples/V3/rest-private-UTA-spot.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { RestClientV3 } from '../../src/index'; - -// or -// import { RestClientV3 } from 'bitget-api'; - -// read from environmental variables -const API_KEY = process.env.API_KEY_COM; -const API_SECRET = process.env.API_SECRET_COM; -const API_PASS = process.env.API_PASS_COM; -// If running from CLI in unix, you can pass env vars as such: -// API_KEY_COM='lkm12n3-2ba3-1mxf-fn13-lkm12n3a' API_SECRET_COM='035B2B9637E1BDFFEE2646BFBDDB8CE4' API_PASSPHRASE_COM='ComplexPa$$!23$5^' ts-node examples/V3/rest-private-spot.ts - -// note the single quotes, preventing special characters such as $ from being incorrectly passed - -const client = new RestClientV3({ - apiKey: API_KEY, - apiSecret: API_SECRET, - apiPass: API_PASS, - // apiKey: 'apiKeyHere', - // apiSecret: 'apiSecretHere', - // apiPass: 'apiPassHere', -}); - -/** This is a simple script wrapped in a immediately invoked function expression, designed to check account assets */ -(async () => { - try { - console.log(await client.getAccountAssets()); - } catch (e) { - console.error('request failed: ', e); - } -})(); diff --git a/examples/V3/rest-private-UTA-futures.ts b/examples/V3/rest-private.ts similarity index 95% rename from examples/V3/rest-private-UTA-futures.ts rename to examples/V3/rest-private.ts index d606c79..79bcdf3 100644 --- a/examples/V3/rest-private-UTA-futures.ts +++ b/examples/V3/rest-private.ts @@ -25,7 +25,7 @@ const client = new RestClientV3({ /** This is a simple script wrapped in a immediately invoked function expression, designed to check account assets for futures trading */ (async () => { try { - console.log(await client.getAccountAssets()); + console.log(await client.getBalances()); } catch (e) { console.error('request failed: ', e); } diff --git a/examples/V3/rest-trade-UTA-futures.ts b/examples/V3/rest-trade-UTA-futures.ts index d946ca8..529092f 100644 --- a/examples/V3/rest-trade-UTA-futures.ts +++ b/examples/V3/rest-trade-UTA-futures.ts @@ -104,7 +104,7 @@ function promiseSleep(milliseconds) { const symbol = 'BTCUSDT'; - const balanceResult = await client.getAccountAssets(); + const balanceResult = await client.getBalances(); const accountBalance = balanceResult.data; const usdtAsset = accountBalance.assets?.find( diff --git a/examples/V3/rest-trade-UTA-spot.ts b/examples/V3/rest-trade-UTA-spot.ts index fbf9267..8096af3 100644 --- a/examples/V3/rest-trade-UTA-spot.ts +++ b/examples/V3/rest-trade-UTA-spot.ts @@ -79,7 +79,7 @@ function promiseSleep(milliseconds) { // wait briefly for ws to be ready (could also use the response or authenticated events, to make sure topics are subscribed to before starting) await promiseSleep(2.5 * 1000); - const balanceResult = await client.getAccountAssets(); + const balanceResult = await client.getBalances(); const allBalances = balanceResult.data; const balanceBTC = allBalances.assets?.find( From 0438706f1610fa66850ca388d1d52e087a265b59 Mon Sep 17 00:00:00 2001 From: JJ-Cro Date: Mon, 21 Jul 2025 16:44:21 +0200 Subject: [PATCH 35/57] CHORE(): fix typo --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b6ef374..e2ad93f 100644 --- a/README.md +++ b/README.md @@ -128,8 +128,8 @@ import { RestClientV3 } from 'bitget-api'; // note the single quotes, preventing special characters such as $ from being incorrectly passed const client = new RestClientV3({ apiKey: process.env.API_KEY_COM || 'insert_api_key_here';, - apiSecret: process.env.API_KEY_COM || 'insert_api_key_here';, - apiPass: process.env.API_KEY_COM || 'insert_api_key_here';, + apiSecret: process.env.API_SECRET_COM || 'insert_api_secret_here';, + apiPass: process.env.API_PASS_COM || 'insert_api_pass_here';, }); (async () => { From bb9b19e5602cbab2757a110021b9d1aec77b30d4 Mon Sep 17 00:00:00 2001 From: JJ-Cro Date: Mon, 21 Jul 2025 16:46:02 +0200 Subject: [PATCH 36/57] chore(): fix typo --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e2ad93f..63cb1b3 100644 --- a/README.md +++ b/README.md @@ -127,9 +127,9 @@ import { RestClientV3 } from 'bitget-api'; // note the single quotes, preventing special characters such as $ from being incorrectly passed const client = new RestClientV3({ - apiKey: process.env.API_KEY_COM || 'insert_api_key_here';, - apiSecret: process.env.API_SECRET_COM || 'insert_api_secret_here';, - apiPass: process.env.API_PASS_COM || 'insert_api_pass_here';, + apiKey: process.env.API_KEY_COM || 'insert_api_key_here', + apiSecret: process.env.API_SECRET_COM || 'insert_api_secret_here', + apiPass: process.env.API_PASS_COM || 'insert_api_pass_here', }); (async () => { From 5d6eb2d9d83fc60a2873bb84dd71f2aa5e27a16a Mon Sep 17 00:00:00 2001 From: JJ-Cro Date: Mon, 21 Jul 2025 16:55:46 +0200 Subject: [PATCH 37/57] feat(): added all examles and endpoint map --- docs/endpointFunctionList.md | 86 ++++++++++++++++++- .../apidoc/RestClientV3/batchModifyOrders.js | 22 +++++ examples/apidoc/RestClientV3/bindLoanUid.js | 22 +++++ .../apidoc/RestClientV3/cancelAllOrders.js | 22 +++++ .../apidoc/RestClientV3/cancelBatchOrders.js | 22 +++++ examples/apidoc/RestClientV3/cancelOrder.js | 22 +++++ .../RestClientV3/cancelStrategyOrder.js | 22 +++++ .../apidoc/RestClientV3/closeAllPositions.js | 22 +++++ .../apidoc/RestClientV3/countdownCancelAll.js | 22 +++++ .../apidoc/RestClientV3/createSubAccount.js | 22 +++++ .../RestClientV3/createSubAccountApiKey.js | 22 +++++ .../RestClientV3/deleteSubAccountApiKey.js | 22 +++++ .../apidoc/RestClientV3/freezeSubAccount.js | 22 +++++ .../apidoc/RestClientV3/getAccountSettings.js | 22 +++++ examples/apidoc/RestClientV3/getBalances.js | 22 +++++ examples/apidoc/RestClientV3/getCandles.js | 22 +++++ .../apidoc/RestClientV3/getContractsOi.js | 22 +++++ .../apidoc/RestClientV3/getConvertRecords.js | 22 +++++ .../RestClientV3/getCurrentFundingRate.js | 22 +++++ .../apidoc/RestClientV3/getCurrentPosition.js | 22 +++++ examples/apidoc/RestClientV3/getDeductInfo.js | 22 +++++ .../apidoc/RestClientV3/getDepositAddress.js | 22 +++++ .../apidoc/RestClientV3/getDepositRecords.js | 22 +++++ .../apidoc/RestClientV3/getDiscountRate.js | 22 +++++ examples/apidoc/RestClientV3/getFeeRate.js | 22 +++++ examples/apidoc/RestClientV3/getFills.js | 22 +++++ .../RestClientV3/getFinancialRecords.js | 22 +++++ .../apidoc/RestClientV3/getFundingAssets.js | 22 +++++ .../apidoc/RestClientV3/getHistoryCandles.js | 22 +++++ .../RestClientV3/getHistoryFundingRate.js | 22 +++++ .../apidoc/RestClientV3/getHistoryOrders.js | 22 +++++ .../RestClientV3/getHistoryStrategyOrders.js | 22 +++++ .../apidoc/RestClientV3/getInstruments.js | 22 +++++ .../apidoc/RestClientV3/getLoanLTVConvert.js | 22 +++++ .../RestClientV3/getLoanMarginCoinInfo.js | 22 +++++ examples/apidoc/RestClientV3/getLoanOrder.js | 22 +++++ .../apidoc/RestClientV3/getLoanProductInfo.js | 22 +++++ .../RestClientV3/getLoanRepaidHistory.js | 22 +++++ .../apidoc/RestClientV3/getLoanRiskUnit.js | 22 +++++ .../apidoc/RestClientV3/getLoanSymbols.js | 22 +++++ .../apidoc/RestClientV3/getLoanTransfered.js | 22 +++++ .../apidoc/RestClientV3/getMarginLoans.js | 22 +++++ .../RestClientV3/getMaxOpenAvailable.js | 22 +++++ .../apidoc/RestClientV3/getOpenInterest.js | 22 +++++ examples/apidoc/RestClientV3/getOrderBook.js | 22 +++++ examples/apidoc/RestClientV3/getOrderInfo.js | 22 +++++ .../apidoc/RestClientV3/getPaymentCoins.js | 22 +++++ .../apidoc/RestClientV3/getPositionHistory.js | 22 +++++ .../apidoc/RestClientV3/getPositionTier.js | 22 +++++ .../apidoc/RestClientV3/getRepayableCoins.js | 22 +++++ .../apidoc/RestClientV3/getRiskReserve.js | 22 +++++ examples/apidoc/RestClientV3/getServerTime.js | 22 +++++ .../RestClientV3/getSubAccountApiKeys.js | 22 +++++ .../apidoc/RestClientV3/getSubAccountList.js | 22 +++++ .../RestClientV3/getSubDepositAddress.js | 22 +++++ .../RestClientV3/getSubDepositRecords.js | 22 +++++ .../RestClientV3/getSubTransferRecords.js | 22 +++++ .../RestClientV3/getSubUnifiedAssets.js | 22 +++++ examples/apidoc/RestClientV3/getTickers.js | 22 +++++ examples/apidoc/RestClientV3/getTradeFills.js | 22 +++++ .../RestClientV3/getTransferableCoins.js | 22 +++++ .../apidoc/RestClientV3/getUnfilledOrders.js | 22 +++++ .../RestClientV3/getUnfilledStrategyOrders.js | 22 +++++ .../apidoc/RestClientV3/getWithdrawRecords.js | 22 +++++ examples/apidoc/RestClientV3/modifyOrder.js | 22 +++++ .../RestClientV3/modifyStrategyOrder.js | 22 +++++ .../apidoc/RestClientV3/placeBatchOrders.js | 22 +++++ examples/apidoc/RestClientV3/setHoldMode.js | 22 +++++ examples/apidoc/RestClientV3/setLeverage.js | 22 +++++ .../apidoc/RestClientV3/subAccountTransfer.js | 22 +++++ .../apidoc/RestClientV3/submitNewOrder.js | 22 +++++ examples/apidoc/RestClientV3/submitRepay.js | 22 +++++ .../RestClientV3/submitStrategyOrder.js | 22 +++++ .../apidoc/RestClientV3/submitTransfer.js | 22 +++++ .../apidoc/RestClientV3/submitWithdraw.js | 22 +++++ examples/apidoc/RestClientV3/switchDeduct.js | 22 +++++ .../RestClientV3/updateSubAccountApiKey.js | 22 +++++ 77 files changed, 1757 insertions(+), 1 deletion(-) create mode 100644 examples/apidoc/RestClientV3/batchModifyOrders.js create mode 100644 examples/apidoc/RestClientV3/bindLoanUid.js create mode 100644 examples/apidoc/RestClientV3/cancelAllOrders.js create mode 100644 examples/apidoc/RestClientV3/cancelBatchOrders.js create mode 100644 examples/apidoc/RestClientV3/cancelOrder.js create mode 100644 examples/apidoc/RestClientV3/cancelStrategyOrder.js create mode 100644 examples/apidoc/RestClientV3/closeAllPositions.js create mode 100644 examples/apidoc/RestClientV3/countdownCancelAll.js create mode 100644 examples/apidoc/RestClientV3/createSubAccount.js create mode 100644 examples/apidoc/RestClientV3/createSubAccountApiKey.js create mode 100644 examples/apidoc/RestClientV3/deleteSubAccountApiKey.js create mode 100644 examples/apidoc/RestClientV3/freezeSubAccount.js create mode 100644 examples/apidoc/RestClientV3/getAccountSettings.js create mode 100644 examples/apidoc/RestClientV3/getBalances.js create mode 100644 examples/apidoc/RestClientV3/getCandles.js create mode 100644 examples/apidoc/RestClientV3/getContractsOi.js create mode 100644 examples/apidoc/RestClientV3/getConvertRecords.js create mode 100644 examples/apidoc/RestClientV3/getCurrentFundingRate.js create mode 100644 examples/apidoc/RestClientV3/getCurrentPosition.js create mode 100644 examples/apidoc/RestClientV3/getDeductInfo.js create mode 100644 examples/apidoc/RestClientV3/getDepositAddress.js create mode 100644 examples/apidoc/RestClientV3/getDepositRecords.js create mode 100644 examples/apidoc/RestClientV3/getDiscountRate.js create mode 100644 examples/apidoc/RestClientV3/getFeeRate.js create mode 100644 examples/apidoc/RestClientV3/getFills.js create mode 100644 examples/apidoc/RestClientV3/getFinancialRecords.js create mode 100644 examples/apidoc/RestClientV3/getFundingAssets.js create mode 100644 examples/apidoc/RestClientV3/getHistoryCandles.js create mode 100644 examples/apidoc/RestClientV3/getHistoryFundingRate.js create mode 100644 examples/apidoc/RestClientV3/getHistoryOrders.js create mode 100644 examples/apidoc/RestClientV3/getHistoryStrategyOrders.js create mode 100644 examples/apidoc/RestClientV3/getInstruments.js create mode 100644 examples/apidoc/RestClientV3/getLoanLTVConvert.js create mode 100644 examples/apidoc/RestClientV3/getLoanMarginCoinInfo.js create mode 100644 examples/apidoc/RestClientV3/getLoanOrder.js create mode 100644 examples/apidoc/RestClientV3/getLoanProductInfo.js create mode 100644 examples/apidoc/RestClientV3/getLoanRepaidHistory.js create mode 100644 examples/apidoc/RestClientV3/getLoanRiskUnit.js create mode 100644 examples/apidoc/RestClientV3/getLoanSymbols.js create mode 100644 examples/apidoc/RestClientV3/getLoanTransfered.js create mode 100644 examples/apidoc/RestClientV3/getMarginLoans.js create mode 100644 examples/apidoc/RestClientV3/getMaxOpenAvailable.js create mode 100644 examples/apidoc/RestClientV3/getOpenInterest.js create mode 100644 examples/apidoc/RestClientV3/getOrderBook.js create mode 100644 examples/apidoc/RestClientV3/getOrderInfo.js create mode 100644 examples/apidoc/RestClientV3/getPaymentCoins.js create mode 100644 examples/apidoc/RestClientV3/getPositionHistory.js create mode 100644 examples/apidoc/RestClientV3/getPositionTier.js create mode 100644 examples/apidoc/RestClientV3/getRepayableCoins.js create mode 100644 examples/apidoc/RestClientV3/getRiskReserve.js create mode 100644 examples/apidoc/RestClientV3/getServerTime.js create mode 100644 examples/apidoc/RestClientV3/getSubAccountApiKeys.js create mode 100644 examples/apidoc/RestClientV3/getSubAccountList.js create mode 100644 examples/apidoc/RestClientV3/getSubDepositAddress.js create mode 100644 examples/apidoc/RestClientV3/getSubDepositRecords.js create mode 100644 examples/apidoc/RestClientV3/getSubTransferRecords.js create mode 100644 examples/apidoc/RestClientV3/getSubUnifiedAssets.js create mode 100644 examples/apidoc/RestClientV3/getTickers.js create mode 100644 examples/apidoc/RestClientV3/getTradeFills.js create mode 100644 examples/apidoc/RestClientV3/getTransferableCoins.js create mode 100644 examples/apidoc/RestClientV3/getUnfilledOrders.js create mode 100644 examples/apidoc/RestClientV3/getUnfilledStrategyOrders.js create mode 100644 examples/apidoc/RestClientV3/getWithdrawRecords.js create mode 100644 examples/apidoc/RestClientV3/modifyOrder.js create mode 100644 examples/apidoc/RestClientV3/modifyStrategyOrder.js create mode 100644 examples/apidoc/RestClientV3/placeBatchOrders.js create mode 100644 examples/apidoc/RestClientV3/setHoldMode.js create mode 100644 examples/apidoc/RestClientV3/setLeverage.js create mode 100644 examples/apidoc/RestClientV3/subAccountTransfer.js create mode 100644 examples/apidoc/RestClientV3/submitNewOrder.js create mode 100644 examples/apidoc/RestClientV3/submitRepay.js create mode 100644 examples/apidoc/RestClientV3/submitStrategyOrder.js create mode 100644 examples/apidoc/RestClientV3/submitTransfer.js create mode 100644 examples/apidoc/RestClientV3/submitWithdraw.js create mode 100644 examples/apidoc/RestClientV3/switchDeduct.js create mode 100644 examples/apidoc/RestClientV3/updateSubAccountApiKey.js diff --git a/docs/endpointFunctionList.md b/docs/endpointFunctionList.md index c3a99b2..f1eb891 100644 --- a/docs/endpointFunctionList.md +++ b/docs/endpointFunctionList.md @@ -20,6 +20,7 @@ All REST clients are in the [src](/src) folder. For usage examples, make sure to List of clients: - [rest-client-v2](#rest-client-v2ts) +- [rest-client-v3](#rest-client-v3ts) If anything is missing or wrong, please open an issue or let us know in our [Node.js Traders](https://t.me/nodetraders) telegram group! @@ -305,4 +306,87 @@ This table includes all endpoints from the official Exchange API docs and corres | [getLoanPledgeRateHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2863) | :closed_lock_with_key: | GET | `/api/v2/earn/loan/revise-history` | | [getLoanHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2869) | :closed_lock_with_key: | GET | `/api/v2/earn/loan/borrow-history` | | [getLoanDebts()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2875) | :closed_lock_with_key: | GET | `/api/v2/earn/loan/debts` | -| [getLoanLiquidationRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2879) | :closed_lock_with_key: | GET | `/api/v2/earn/loan/reduces` | \ No newline at end of file +| [getLoanLiquidationRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2879) | :closed_lock_with_key: | GET | `/api/v2/earn/loan/reduces` | + +# rest-client-v3.ts + +This table includes all endpoints from the official Exchange API docs and corresponding SDK functions for each endpoint that are found in [rest-client-v3.ts](/src/rest-client-v3.ts). + +| Function | AUTH | HTTP Method | Endpoint | +| -------- | :------: | :------: | -------- | +| [getServerTime()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L215) | | GET | `/api/v3/public/time` | +| [getInstruments()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L232) | | GET | `/api/v3/market/instruments` | +| [getTickers()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L241) | | GET | `/api/v3/market/tickers` | +| [getOrderBook()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L248) | | GET | `/api/v3/market/orderbook` | +| [getFills()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L257) | | GET | `/api/v3/market/fills` | +| [getOpenInterest()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L266) | | GET | `/api/v3/market/open-interest` | +| [getCandles()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L275) | | GET | `/api/v3/market/candles` | +| [getHistoryCandles()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L284) | | GET | `/api/v3/market/history-candles` | +| [getCurrentFundingRate()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L293) | | GET | `/api/v3/market/current-fund-rate` | +| [getHistoryFundingRate()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L302) | | GET | `/api/v3/market/history-fund-rate` | +| [getRiskReserve()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L311) | | GET | `/api/v3/market/risk-reserve` | +| [getDiscountRate()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L320) | | GET | `/api/v3/market/discount-rate` | +| [getMarginLoans()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L327) | | GET | `/api/v3/market/margin-loans` | +| [getPositionTier()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L336) | | GET | `/api/v3/market/position-tier` | +| [getContractsOi()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L345) | | GET | `/api/v3/market/oi-limit` | +| [getBalances()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L360) | :closed_lock_with_key: | GET | `/api/v3/account/assets` | +| [getFundingAssets()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L367) | :closed_lock_with_key: | GET | `/api/v3/account/funding-assets` | +| [getAccountSettings()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L376) | :closed_lock_with_key: | GET | `/api/v3/account/settings` | +| [setLeverage()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L383) | :closed_lock_with_key: | POST | `/api/v3/account/set-leverage` | +| [setHoldMode()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L390) | :closed_lock_with_key: | POST | `/api/v3/account/set-hold-mode` | +| [getFinancialRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L399) | :closed_lock_with_key: | GET | `/api/v3/account/financial-records` | +| [getRepayableCoins()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L411) | :closed_lock_with_key: | GET | `/api/v3/account/repayable-coins` | +| [getPaymentCoins()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L423) | :closed_lock_with_key: | GET | `/api/v3/account/payment-coins` | +| [submitRepay()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L435) | :closed_lock_with_key: | POST | `/api/v3/account/repay` | +| [getConvertRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L442) | :closed_lock_with_key: | GET | `/api/v3/account/convert-records` | +| [switchDeduct()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L454) | :closed_lock_with_key: | POST | `/api/v3/account/switch-deduct` | +| [getDeductInfo()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L461) | :closed_lock_with_key: | GET | `/api/v3/account/deduct-info` | +| [getFeeRate()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L472) | :closed_lock_with_key: | GET | `/api/v3/account/fee-rate` | +| [createSubAccount()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L490) | :closed_lock_with_key: | POST | `/api/v3/user/create-sub` | +| [freezeSubAccount()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L499) | :closed_lock_with_key: | POST | `/api/v3/user/freeze-sub` | +| [getSubUnifiedAssets()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L508) | :closed_lock_with_key: | GET | `/api/v3/account/sub-unified-assets` | +| [getSubAccountList()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L517) | :closed_lock_with_key: | GET | `/api/v3/user/sub-list` | +| [createSubAccountApiKey()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L530) | :closed_lock_with_key: | POST | `/api/v3/user/create-sub-api` | +| [updateSubAccountApiKey()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L539) | :closed_lock_with_key: | POST | `/api/v3/user/update-sub-api` | +| [deleteSubAccountApiKey()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L548) | :closed_lock_with_key: | POST | `/api/v3/user/delete-sub-api` | +| [getSubAccountApiKeys()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L557) | :closed_lock_with_key: | GET | `/api/v3/user/sub-api-list` | +| [getTransferableCoins()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L576) | :closed_lock_with_key: | GET | `/api/v3/account/transferable-coins` | +| [submitTransfer()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L585) | :closed_lock_with_key: | POST | `/api/v3/account/transfer` | +| [subAccountTransfer()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L594) | :closed_lock_with_key: | POST | `/api/v3/account/sub-transfer` | +| [getSubTransferRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L606) | :closed_lock_with_key: | GET | `/api/v3/account/sub-transfer-record` | +| [getDepositAddress()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L624) | :closed_lock_with_key: | GET | `/api/v3/account/deposit-address` | +| [getSubDepositAddress()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L633) | :closed_lock_with_key: | GET | `/api/v3/account/sub-deposit-address` | +| [getDepositRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L642) | :closed_lock_with_key: | GET | `/api/v3/account/deposit-records` | +| [getSubDepositRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L651) | :closed_lock_with_key: | POST | `/api/v3/account/sub-deposit-records` | +| [submitWithdraw()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L666) | :closed_lock_with_key: | POST | `/api/v3/account/withdraw` | +| [getWithdrawRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L675) | :closed_lock_with_key: | GET | `/api/v3/account/withdrawl-records` | +| [submitNewOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L690) | :closed_lock_with_key: | POST | `/api/v3/trade/place-order` | +| [modifyOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L699) | :closed_lock_with_key: | POST | `/api/v3/trade/modify-order` | +| [cancelOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L708) | :closed_lock_with_key: | POST | `/api/v3/trade/cancel-order` | +| [placeBatchOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L717) | :closed_lock_with_key: | POST | `/api/v3/trade/place-batch` | +| [batchModifyOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L726) | :closed_lock_with_key: | POST | `/api/v3/trade/batch-modify-order` | +| [cancelBatchOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L735) | :closed_lock_with_key: | POST | `/api/v3/trade/cancel-batch` | +| [cancelAllOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L744) | :closed_lock_with_key: | POST | `/api/v3/trade/cancel-symbol-order` | +| [closeAllPositions()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L753) | :closed_lock_with_key: | POST | `/api/v3/trade/close-positions` | +| [getOrderInfo()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L762) | :closed_lock_with_key: | GET | `/api/v3/trade/order-info` | +| [getUnfilledOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L771) | :closed_lock_with_key: | GET | `/api/v3/trade/unfilled-orders` | +| [getHistoryOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L783) | :closed_lock_with_key: | GET | `/api/v3/trade/history-orders` | +| [getTradeFills()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L795) | :closed_lock_with_key: | GET | `/api/v3/trade/fills` | +| [getCurrentPosition()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L807) | :closed_lock_with_key: | GET | `/api/v3/position/current-position` | +| [getPositionHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L818) | :closed_lock_with_key: | GET | `/api/v3/position/history-position` | +| [getMaxOpenAvailable()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L830) | :closed_lock_with_key: | POST | `/api/v3/account/max-open-available` | +| [countdownCancelAll()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L839) | :closed_lock_with_key: | POST | `/api/v3/trade/countdown-cancel-all` | +| [getLoanTransfered()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L854) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/transfered` | +| [getLoanSymbols()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L863) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/symbols` | +| [getLoanRiskUnit()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L872) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/risk-unit` | +| [getLoanRepaidHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L883) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/repaid-history` | +| [getLoanProductInfo()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L892) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/product-infos` | +| [getLoanOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L901) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/loan-order` | +| [getLoanLTVConvert()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L910) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/ltv-convert` | +| [getLoanMarginCoinInfo()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L919) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/ensure-coins-convert` | +| [bindLoanUid()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L931) | :closed_lock_with_key: | POST | `/api/v3/ins-loan/bind-uid` | +| [submitStrategyOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L946) | :closed_lock_with_key: | POST | `/api/v3/trade/place-strategy-order` | +| [modifyStrategyOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L955) | :closed_lock_with_key: | POST | `/api/v3/trade/modify-strategy-order` | +| [cancelStrategyOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L964) | :closed_lock_with_key: | POST | `/api/v3/trade/cancel-strategy-order` | +| [getUnfilledStrategyOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L973) | :closed_lock_with_key: | GET | `/api/v3/trade/unfilled-strategy-orders` | +| [getHistoryStrategyOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L982) | :closed_lock_with_key: | GET | `/api/v3/trade/history-strategy-orders` | \ No newline at end of file diff --git a/examples/apidoc/RestClientV3/batchModifyOrders.js b/examples/apidoc/RestClientV3/batchModifyOrders.js new file mode 100644 index 0000000..a4e3832 --- /dev/null +++ b/examples/apidoc/RestClientV3/batchModifyOrders.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/trade/batch-modify-order + // METHOD: POST + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.batchModifyOrders(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/bindLoanUid.js b/examples/apidoc/RestClientV3/bindLoanUid.js new file mode 100644 index 0000000..35df10d --- /dev/null +++ b/examples/apidoc/RestClientV3/bindLoanUid.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/ins-loan/bind-uid + // METHOD: POST + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.bindLoanUid(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/cancelAllOrders.js b/examples/apidoc/RestClientV3/cancelAllOrders.js new file mode 100644 index 0000000..55bd4a1 --- /dev/null +++ b/examples/apidoc/RestClientV3/cancelAllOrders.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/trade/cancel-symbol-order + // METHOD: POST + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.cancelAllOrders(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/cancelBatchOrders.js b/examples/apidoc/RestClientV3/cancelBatchOrders.js new file mode 100644 index 0000000..d36a415 --- /dev/null +++ b/examples/apidoc/RestClientV3/cancelBatchOrders.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/trade/cancel-batch + // METHOD: POST + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.cancelBatchOrders(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/cancelOrder.js b/examples/apidoc/RestClientV3/cancelOrder.js new file mode 100644 index 0000000..221a5ab --- /dev/null +++ b/examples/apidoc/RestClientV3/cancelOrder.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/trade/cancel-order + // METHOD: POST + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.cancelOrder(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/cancelStrategyOrder.js b/examples/apidoc/RestClientV3/cancelStrategyOrder.js new file mode 100644 index 0000000..2f1de6e --- /dev/null +++ b/examples/apidoc/RestClientV3/cancelStrategyOrder.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/trade/cancel-strategy-order + // METHOD: POST + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.cancelStrategyOrder(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/closeAllPositions.js b/examples/apidoc/RestClientV3/closeAllPositions.js new file mode 100644 index 0000000..3dd57dc --- /dev/null +++ b/examples/apidoc/RestClientV3/closeAllPositions.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/trade/close-positions + // METHOD: POST + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.closeAllPositions(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/countdownCancelAll.js b/examples/apidoc/RestClientV3/countdownCancelAll.js new file mode 100644 index 0000000..a049a9a --- /dev/null +++ b/examples/apidoc/RestClientV3/countdownCancelAll.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/trade/countdown-cancel-all + // METHOD: POST + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.countdownCancelAll(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/createSubAccount.js b/examples/apidoc/RestClientV3/createSubAccount.js new file mode 100644 index 0000000..c21ff6a --- /dev/null +++ b/examples/apidoc/RestClientV3/createSubAccount.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/user/create-sub + // METHOD: POST + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.createSubAccount(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/createSubAccountApiKey.js b/examples/apidoc/RestClientV3/createSubAccountApiKey.js new file mode 100644 index 0000000..53bc722 --- /dev/null +++ b/examples/apidoc/RestClientV3/createSubAccountApiKey.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/user/create-sub-api + // METHOD: POST + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.createSubAccountApiKey(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/deleteSubAccountApiKey.js b/examples/apidoc/RestClientV3/deleteSubAccountApiKey.js new file mode 100644 index 0000000..fd2472a --- /dev/null +++ b/examples/apidoc/RestClientV3/deleteSubAccountApiKey.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/user/delete-sub-api + // METHOD: POST + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.deleteSubAccountApiKey(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/freezeSubAccount.js b/examples/apidoc/RestClientV3/freezeSubAccount.js new file mode 100644 index 0000000..8a1a833 --- /dev/null +++ b/examples/apidoc/RestClientV3/freezeSubAccount.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/user/freeze-sub + // METHOD: POST + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.freezeSubAccount(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getAccountSettings.js b/examples/apidoc/RestClientV3/getAccountSettings.js new file mode 100644 index 0000000..45902e2 --- /dev/null +++ b/examples/apidoc/RestClientV3/getAccountSettings.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/account/settings + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getAccountSettings(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getBalances.js b/examples/apidoc/RestClientV3/getBalances.js new file mode 100644 index 0000000..18d6329 --- /dev/null +++ b/examples/apidoc/RestClientV3/getBalances.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/account/assets + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getBalances(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getCandles.js b/examples/apidoc/RestClientV3/getCandles.js new file mode 100644 index 0000000..949e2ce --- /dev/null +++ b/examples/apidoc/RestClientV3/getCandles.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/market/candles + // METHOD: GET + // PUBLIC: YES + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getCandles(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getContractsOi.js b/examples/apidoc/RestClientV3/getContractsOi.js new file mode 100644 index 0000000..90b4f4c --- /dev/null +++ b/examples/apidoc/RestClientV3/getContractsOi.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/market/oi-limit + // METHOD: GET + // PUBLIC: YES + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getContractsOi(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getConvertRecords.js b/examples/apidoc/RestClientV3/getConvertRecords.js new file mode 100644 index 0000000..18a7c5d --- /dev/null +++ b/examples/apidoc/RestClientV3/getConvertRecords.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/account/convert-records + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getConvertRecords(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getCurrentFundingRate.js b/examples/apidoc/RestClientV3/getCurrentFundingRate.js new file mode 100644 index 0000000..5df9028 --- /dev/null +++ b/examples/apidoc/RestClientV3/getCurrentFundingRate.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/market/current-fund-rate + // METHOD: GET + // PUBLIC: YES + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getCurrentFundingRate(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getCurrentPosition.js b/examples/apidoc/RestClientV3/getCurrentPosition.js new file mode 100644 index 0000000..7dc4ac4 --- /dev/null +++ b/examples/apidoc/RestClientV3/getCurrentPosition.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/position/current-position + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getCurrentPosition(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getDeductInfo.js b/examples/apidoc/RestClientV3/getDeductInfo.js new file mode 100644 index 0000000..64f5339 --- /dev/null +++ b/examples/apidoc/RestClientV3/getDeductInfo.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/account/deduct-info + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getDeductInfo(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getDepositAddress.js b/examples/apidoc/RestClientV3/getDepositAddress.js new file mode 100644 index 0000000..7a743fb --- /dev/null +++ b/examples/apidoc/RestClientV3/getDepositAddress.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/account/deposit-address + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getDepositAddress(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getDepositRecords.js b/examples/apidoc/RestClientV3/getDepositRecords.js new file mode 100644 index 0000000..f28e07a --- /dev/null +++ b/examples/apidoc/RestClientV3/getDepositRecords.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/account/deposit-records + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getDepositRecords(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getDiscountRate.js b/examples/apidoc/RestClientV3/getDiscountRate.js new file mode 100644 index 0000000..b214736 --- /dev/null +++ b/examples/apidoc/RestClientV3/getDiscountRate.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/market/discount-rate + // METHOD: GET + // PUBLIC: YES + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getDiscountRate(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getFeeRate.js b/examples/apidoc/RestClientV3/getFeeRate.js new file mode 100644 index 0000000..acf80e5 --- /dev/null +++ b/examples/apidoc/RestClientV3/getFeeRate.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/account/fee-rate + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getFeeRate(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getFills.js b/examples/apidoc/RestClientV3/getFills.js new file mode 100644 index 0000000..f19d390 --- /dev/null +++ b/examples/apidoc/RestClientV3/getFills.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/market/fills + // METHOD: GET + // PUBLIC: YES + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getFills(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getFinancialRecords.js b/examples/apidoc/RestClientV3/getFinancialRecords.js new file mode 100644 index 0000000..ff8f8ea --- /dev/null +++ b/examples/apidoc/RestClientV3/getFinancialRecords.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/account/financial-records + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getFinancialRecords(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getFundingAssets.js b/examples/apidoc/RestClientV3/getFundingAssets.js new file mode 100644 index 0000000..85ebd67 --- /dev/null +++ b/examples/apidoc/RestClientV3/getFundingAssets.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/account/funding-assets + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getFundingAssets(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getHistoryCandles.js b/examples/apidoc/RestClientV3/getHistoryCandles.js new file mode 100644 index 0000000..7baab6b --- /dev/null +++ b/examples/apidoc/RestClientV3/getHistoryCandles.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/market/history-candles + // METHOD: GET + // PUBLIC: YES + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getHistoryCandles(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getHistoryFundingRate.js b/examples/apidoc/RestClientV3/getHistoryFundingRate.js new file mode 100644 index 0000000..44b4369 --- /dev/null +++ b/examples/apidoc/RestClientV3/getHistoryFundingRate.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/market/history-fund-rate + // METHOD: GET + // PUBLIC: YES + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getHistoryFundingRate(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getHistoryOrders.js b/examples/apidoc/RestClientV3/getHistoryOrders.js new file mode 100644 index 0000000..63b4d0f --- /dev/null +++ b/examples/apidoc/RestClientV3/getHistoryOrders.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/trade/history-orders + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getHistoryOrders(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getHistoryStrategyOrders.js b/examples/apidoc/RestClientV3/getHistoryStrategyOrders.js new file mode 100644 index 0000000..0fc81c9 --- /dev/null +++ b/examples/apidoc/RestClientV3/getHistoryStrategyOrders.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/trade/history-strategy-orders + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getHistoryStrategyOrders(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getInstruments.js b/examples/apidoc/RestClientV3/getInstruments.js new file mode 100644 index 0000000..6f77e1c --- /dev/null +++ b/examples/apidoc/RestClientV3/getInstruments.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/market/instruments + // METHOD: GET + // PUBLIC: YES + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getInstruments(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getLoanLTVConvert.js b/examples/apidoc/RestClientV3/getLoanLTVConvert.js new file mode 100644 index 0000000..88108a0 --- /dev/null +++ b/examples/apidoc/RestClientV3/getLoanLTVConvert.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/ins-loan/ltv-convert + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getLoanLTVConvert(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getLoanMarginCoinInfo.js b/examples/apidoc/RestClientV3/getLoanMarginCoinInfo.js new file mode 100644 index 0000000..dd6edc2 --- /dev/null +++ b/examples/apidoc/RestClientV3/getLoanMarginCoinInfo.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/ins-loan/ensure-coins-convert + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getLoanMarginCoinInfo(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getLoanOrder.js b/examples/apidoc/RestClientV3/getLoanOrder.js new file mode 100644 index 0000000..a469dfb --- /dev/null +++ b/examples/apidoc/RestClientV3/getLoanOrder.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/ins-loan/loan-order + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getLoanOrder(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getLoanProductInfo.js b/examples/apidoc/RestClientV3/getLoanProductInfo.js new file mode 100644 index 0000000..77b257b --- /dev/null +++ b/examples/apidoc/RestClientV3/getLoanProductInfo.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/ins-loan/product-infos + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getLoanProductInfo(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getLoanRepaidHistory.js b/examples/apidoc/RestClientV3/getLoanRepaidHistory.js new file mode 100644 index 0000000..b09ac31 --- /dev/null +++ b/examples/apidoc/RestClientV3/getLoanRepaidHistory.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/ins-loan/repaid-history + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getLoanRepaidHistory(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getLoanRiskUnit.js b/examples/apidoc/RestClientV3/getLoanRiskUnit.js new file mode 100644 index 0000000..9b425c3 --- /dev/null +++ b/examples/apidoc/RestClientV3/getLoanRiskUnit.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/ins-loan/risk-unit + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getLoanRiskUnit(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getLoanSymbols.js b/examples/apidoc/RestClientV3/getLoanSymbols.js new file mode 100644 index 0000000..390712f --- /dev/null +++ b/examples/apidoc/RestClientV3/getLoanSymbols.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/ins-loan/symbols + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getLoanSymbols(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getLoanTransfered.js b/examples/apidoc/RestClientV3/getLoanTransfered.js new file mode 100644 index 0000000..f5e66b6 --- /dev/null +++ b/examples/apidoc/RestClientV3/getLoanTransfered.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/ins-loan/transfered + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getLoanTransfered(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getMarginLoans.js b/examples/apidoc/RestClientV3/getMarginLoans.js new file mode 100644 index 0000000..10c639e --- /dev/null +++ b/examples/apidoc/RestClientV3/getMarginLoans.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/market/margin-loans + // METHOD: GET + // PUBLIC: YES + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getMarginLoans(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getMaxOpenAvailable.js b/examples/apidoc/RestClientV3/getMaxOpenAvailable.js new file mode 100644 index 0000000..5b73ab7 --- /dev/null +++ b/examples/apidoc/RestClientV3/getMaxOpenAvailable.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/account/max-open-available + // METHOD: POST + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getMaxOpenAvailable(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getOpenInterest.js b/examples/apidoc/RestClientV3/getOpenInterest.js new file mode 100644 index 0000000..2a6b63d --- /dev/null +++ b/examples/apidoc/RestClientV3/getOpenInterest.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/market/open-interest + // METHOD: GET + // PUBLIC: YES + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getOpenInterest(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getOrderBook.js b/examples/apidoc/RestClientV3/getOrderBook.js new file mode 100644 index 0000000..e1cbefe --- /dev/null +++ b/examples/apidoc/RestClientV3/getOrderBook.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/market/orderbook + // METHOD: GET + // PUBLIC: YES + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getOrderBook(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getOrderInfo.js b/examples/apidoc/RestClientV3/getOrderInfo.js new file mode 100644 index 0000000..ada47a8 --- /dev/null +++ b/examples/apidoc/RestClientV3/getOrderInfo.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/trade/order-info + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getOrderInfo(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getPaymentCoins.js b/examples/apidoc/RestClientV3/getPaymentCoins.js new file mode 100644 index 0000000..4052ccf --- /dev/null +++ b/examples/apidoc/RestClientV3/getPaymentCoins.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/account/payment-coins + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getPaymentCoins(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getPositionHistory.js b/examples/apidoc/RestClientV3/getPositionHistory.js new file mode 100644 index 0000000..f6b3512 --- /dev/null +++ b/examples/apidoc/RestClientV3/getPositionHistory.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/position/history-position + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getPositionHistory(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getPositionTier.js b/examples/apidoc/RestClientV3/getPositionTier.js new file mode 100644 index 0000000..6e06e87 --- /dev/null +++ b/examples/apidoc/RestClientV3/getPositionTier.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/market/position-tier + // METHOD: GET + // PUBLIC: YES + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getPositionTier(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getRepayableCoins.js b/examples/apidoc/RestClientV3/getRepayableCoins.js new file mode 100644 index 0000000..7767ae9 --- /dev/null +++ b/examples/apidoc/RestClientV3/getRepayableCoins.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/account/repayable-coins + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getRepayableCoins(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getRiskReserve.js b/examples/apidoc/RestClientV3/getRiskReserve.js new file mode 100644 index 0000000..7866533 --- /dev/null +++ b/examples/apidoc/RestClientV3/getRiskReserve.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/market/risk-reserve + // METHOD: GET + // PUBLIC: YES + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getRiskReserve(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getServerTime.js b/examples/apidoc/RestClientV3/getServerTime.js new file mode 100644 index 0000000..cf8c1a0 --- /dev/null +++ b/examples/apidoc/RestClientV3/getServerTime.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/public/time + // METHOD: GET + // PUBLIC: YES + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getServerTime(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getSubAccountApiKeys.js b/examples/apidoc/RestClientV3/getSubAccountApiKeys.js new file mode 100644 index 0000000..38d4491 --- /dev/null +++ b/examples/apidoc/RestClientV3/getSubAccountApiKeys.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/user/sub-api-list + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getSubAccountApiKeys(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getSubAccountList.js b/examples/apidoc/RestClientV3/getSubAccountList.js new file mode 100644 index 0000000..e94c9a7 --- /dev/null +++ b/examples/apidoc/RestClientV3/getSubAccountList.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/user/sub-list + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getSubAccountList(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getSubDepositAddress.js b/examples/apidoc/RestClientV3/getSubDepositAddress.js new file mode 100644 index 0000000..ae5fa49 --- /dev/null +++ b/examples/apidoc/RestClientV3/getSubDepositAddress.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/account/sub-deposit-address + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getSubDepositAddress(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getSubDepositRecords.js b/examples/apidoc/RestClientV3/getSubDepositRecords.js new file mode 100644 index 0000000..ccc644d --- /dev/null +++ b/examples/apidoc/RestClientV3/getSubDepositRecords.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/account/sub-deposit-records + // METHOD: POST + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getSubDepositRecords(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getSubTransferRecords.js b/examples/apidoc/RestClientV3/getSubTransferRecords.js new file mode 100644 index 0000000..413f871 --- /dev/null +++ b/examples/apidoc/RestClientV3/getSubTransferRecords.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/account/sub-transfer-record + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getSubTransferRecords(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getSubUnifiedAssets.js b/examples/apidoc/RestClientV3/getSubUnifiedAssets.js new file mode 100644 index 0000000..894f5f1 --- /dev/null +++ b/examples/apidoc/RestClientV3/getSubUnifiedAssets.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/account/sub-unified-assets + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getSubUnifiedAssets(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getTickers.js b/examples/apidoc/RestClientV3/getTickers.js new file mode 100644 index 0000000..576d2dc --- /dev/null +++ b/examples/apidoc/RestClientV3/getTickers.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/market/tickers + // METHOD: GET + // PUBLIC: YES + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getTickers(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getTradeFills.js b/examples/apidoc/RestClientV3/getTradeFills.js new file mode 100644 index 0000000..b25bcd0 --- /dev/null +++ b/examples/apidoc/RestClientV3/getTradeFills.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/trade/fills + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getTradeFills(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getTransferableCoins.js b/examples/apidoc/RestClientV3/getTransferableCoins.js new file mode 100644 index 0000000..4263fb9 --- /dev/null +++ b/examples/apidoc/RestClientV3/getTransferableCoins.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/account/transferable-coins + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getTransferableCoins(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getUnfilledOrders.js b/examples/apidoc/RestClientV3/getUnfilledOrders.js new file mode 100644 index 0000000..6253de5 --- /dev/null +++ b/examples/apidoc/RestClientV3/getUnfilledOrders.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/trade/unfilled-orders + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getUnfilledOrders(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getUnfilledStrategyOrders.js b/examples/apidoc/RestClientV3/getUnfilledStrategyOrders.js new file mode 100644 index 0000000..7b3bdc6 --- /dev/null +++ b/examples/apidoc/RestClientV3/getUnfilledStrategyOrders.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/trade/unfilled-strategy-orders + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getUnfilledStrategyOrders(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getWithdrawRecords.js b/examples/apidoc/RestClientV3/getWithdrawRecords.js new file mode 100644 index 0000000..fe70cc7 --- /dev/null +++ b/examples/apidoc/RestClientV3/getWithdrawRecords.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/account/withdrawl-records + // METHOD: GET + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getWithdrawRecords(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/modifyOrder.js b/examples/apidoc/RestClientV3/modifyOrder.js new file mode 100644 index 0000000..b6d6fc6 --- /dev/null +++ b/examples/apidoc/RestClientV3/modifyOrder.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/trade/modify-order + // METHOD: POST + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.modifyOrder(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/modifyStrategyOrder.js b/examples/apidoc/RestClientV3/modifyStrategyOrder.js new file mode 100644 index 0000000..c56b870 --- /dev/null +++ b/examples/apidoc/RestClientV3/modifyStrategyOrder.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/trade/modify-strategy-order + // METHOD: POST + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.modifyStrategyOrder(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/placeBatchOrders.js b/examples/apidoc/RestClientV3/placeBatchOrders.js new file mode 100644 index 0000000..247317e --- /dev/null +++ b/examples/apidoc/RestClientV3/placeBatchOrders.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/trade/place-batch + // METHOD: POST + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.placeBatchOrders(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/setHoldMode.js b/examples/apidoc/RestClientV3/setHoldMode.js new file mode 100644 index 0000000..d5bc304 --- /dev/null +++ b/examples/apidoc/RestClientV3/setHoldMode.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/account/set-hold-mode + // METHOD: POST + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.setHoldMode(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/setLeverage.js b/examples/apidoc/RestClientV3/setLeverage.js new file mode 100644 index 0000000..280680c --- /dev/null +++ b/examples/apidoc/RestClientV3/setLeverage.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/account/set-leverage + // METHOD: POST + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.setLeverage(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/subAccountTransfer.js b/examples/apidoc/RestClientV3/subAccountTransfer.js new file mode 100644 index 0000000..7e763ad --- /dev/null +++ b/examples/apidoc/RestClientV3/subAccountTransfer.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/account/sub-transfer + // METHOD: POST + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.subAccountTransfer(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/submitNewOrder.js b/examples/apidoc/RestClientV3/submitNewOrder.js new file mode 100644 index 0000000..638e88a --- /dev/null +++ b/examples/apidoc/RestClientV3/submitNewOrder.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/trade/place-order + // METHOD: POST + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.submitNewOrder(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/submitRepay.js b/examples/apidoc/RestClientV3/submitRepay.js new file mode 100644 index 0000000..3b64abf --- /dev/null +++ b/examples/apidoc/RestClientV3/submitRepay.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/account/repay + // METHOD: POST + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.submitRepay(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/submitStrategyOrder.js b/examples/apidoc/RestClientV3/submitStrategyOrder.js new file mode 100644 index 0000000..ea77178 --- /dev/null +++ b/examples/apidoc/RestClientV3/submitStrategyOrder.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/trade/place-strategy-order + // METHOD: POST + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.submitStrategyOrder(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/submitTransfer.js b/examples/apidoc/RestClientV3/submitTransfer.js new file mode 100644 index 0000000..3d75683 --- /dev/null +++ b/examples/apidoc/RestClientV3/submitTransfer.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/account/transfer + // METHOD: POST + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.submitTransfer(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/submitWithdraw.js b/examples/apidoc/RestClientV3/submitWithdraw.js new file mode 100644 index 0000000..0794e73 --- /dev/null +++ b/examples/apidoc/RestClientV3/submitWithdraw.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/account/withdraw + // METHOD: POST + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.submitWithdraw(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/switchDeduct.js b/examples/apidoc/RestClientV3/switchDeduct.js new file mode 100644 index 0000000..2b15b95 --- /dev/null +++ b/examples/apidoc/RestClientV3/switchDeduct.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/account/switch-deduct + // METHOD: POST + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.switchDeduct(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/updateSubAccountApiKey.js b/examples/apidoc/RestClientV3/updateSubAccountApiKey.js new file mode 100644 index 0000000..37074f0 --- /dev/null +++ b/examples/apidoc/RestClientV3/updateSubAccountApiKey.js @@ -0,0 +1,22 @@ +const { RestClientV3 } = require('bitget-api'); + + + // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange + // This Bitget API SDK is available on npm via "npm install bitget-api" + // ENDPOINT: /api/v3/user/update-sub-api + // METHOD: POST + // PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.updateSubAccountApiKey(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); From 8d263864e914247f45fe4433d2ee7b26bb3f5479 Mon Sep 17 00:00:00 2001 From: JJ-Cro Date: Mon, 21 Jul 2025 17:17:33 +0200 Subject: [PATCH 38/57] feat(): added automatic wsapi client map --- docs/endpointFunctionList.md | 16 ++++++++++- .../WebsocketAPIClient/cancelBatchOrders.js | 27 +++++++++++++++++++ .../apidoc/WebsocketAPIClient/cancelOrder.js | 27 +++++++++++++++++++ .../WebsocketAPIClient/placeBatchOrders.js | 27 +++++++++++++++++++ .../WebsocketAPIClient/submitNewOrder.js | 27 +++++++++++++++++++ 5 files changed, 123 insertions(+), 1 deletion(-) create mode 100644 examples/apidoc/WebsocketAPIClient/cancelBatchOrders.js create mode 100644 examples/apidoc/WebsocketAPIClient/cancelOrder.js create mode 100644 examples/apidoc/WebsocketAPIClient/placeBatchOrders.js create mode 100644 examples/apidoc/WebsocketAPIClient/submitNewOrder.js diff --git a/docs/endpointFunctionList.md b/docs/endpointFunctionList.md index f1eb891..b099abd 100644 --- a/docs/endpointFunctionList.md +++ b/docs/endpointFunctionList.md @@ -21,6 +21,7 @@ All REST clients are in the [src](/src) folder. For usage examples, make sure to List of clients: - [rest-client-v2](#rest-client-v2ts) - [rest-client-v3](#rest-client-v3ts) +- [websocket-api-client](#websocket-api-clientts) If anything is missing or wrong, please open an issue or let us know in our [Node.js Traders](https://t.me/nodetraders) telegram group! @@ -389,4 +390,17 @@ This table includes all endpoints from the official Exchange API docs and corres | [modifyStrategyOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L955) | :closed_lock_with_key: | POST | `/api/v3/trade/modify-strategy-order` | | [cancelStrategyOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L964) | :closed_lock_with_key: | POST | `/api/v3/trade/cancel-strategy-order` | | [getUnfilledStrategyOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L973) | :closed_lock_with_key: | GET | `/api/v3/trade/unfilled-strategy-orders` | -| [getHistoryStrategyOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L982) | :closed_lock_with_key: | GET | `/api/v3/trade/history-strategy-orders` | \ No newline at end of file +| [getHistoryStrategyOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L982) | :closed_lock_with_key: | GET | `/api/v3/trade/history-strategy-orders` | + +# websocket-api-client.ts + +This table includes all endpoints from the official Exchange API docs and corresponding SDK functions for each endpoint that are found in [websocket-api-client.ts](/src/websocket-api-client.ts). + +This client provides WebSocket API endpoints which allow for faster interactions with the Bitget API via a WebSocket connection. + +| Function | AUTH | HTTP Method | Endpoint | +| -------- | :------: | :------: | -------- | +| [submitNewOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/websocket-api-client.ts#L78) | | WS | `place-order` | +| [placeBatchOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/websocket-api-client.ts#L97) | | WS | `batch-place` | +| [cancelOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/websocket-api-client.ts#L121) | | WS | `cancel-order` | +| [cancelBatchOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/websocket-api-client.ts#L140) | | WS | `batch-cancel` | \ No newline at end of file diff --git a/examples/apidoc/WebsocketAPIClient/cancelBatchOrders.js b/examples/apidoc/WebsocketAPIClient/cancelBatchOrders.js new file mode 100644 index 0000000..c0c105f --- /dev/null +++ b/examples/apidoc/WebsocketAPIClient/cancelBatchOrders.js @@ -0,0 +1,27 @@ +const { WebsocketAPIClient } = require('bitget-api'); + +// This example shows how to call this Bitget WebSocket API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// WS API ENDPOINT: batch-cancel +// METHOD: WebSocket API +// PUBLIC: YES + +// Create a WebSocket API client instance +const client = new WebsocketAPIClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +// The WebSocket connection is established automatically when needed +// You can use the client to make requests immediately + +// Example use of the cancelBatchOrders method +client.cancelBatchOrders(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); + diff --git a/examples/apidoc/WebsocketAPIClient/cancelOrder.js b/examples/apidoc/WebsocketAPIClient/cancelOrder.js new file mode 100644 index 0000000..4765093 --- /dev/null +++ b/examples/apidoc/WebsocketAPIClient/cancelOrder.js @@ -0,0 +1,27 @@ +const { WebsocketAPIClient } = require('bitget-api'); + +// This example shows how to call this Bitget WebSocket API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// WS API ENDPOINT: cancel-order +// METHOD: WebSocket API +// PUBLIC: YES + +// Create a WebSocket API client instance +const client = new WebsocketAPIClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +// The WebSocket connection is established automatically when needed +// You can use the client to make requests immediately + +// Example use of the cancelOrder method +client.cancelOrder(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); + diff --git a/examples/apidoc/WebsocketAPIClient/placeBatchOrders.js b/examples/apidoc/WebsocketAPIClient/placeBatchOrders.js new file mode 100644 index 0000000..d94de4c --- /dev/null +++ b/examples/apidoc/WebsocketAPIClient/placeBatchOrders.js @@ -0,0 +1,27 @@ +const { WebsocketAPIClient } = require('bitget-api'); + +// This example shows how to call this Bitget WebSocket API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// WS API ENDPOINT: batch-place +// METHOD: WebSocket API +// PUBLIC: YES + +// Create a WebSocket API client instance +const client = new WebsocketAPIClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +// The WebSocket connection is established automatically when needed +// You can use the client to make requests immediately + +// Example use of the placeBatchOrders method +client.placeBatchOrders(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); + diff --git a/examples/apidoc/WebsocketAPIClient/submitNewOrder.js b/examples/apidoc/WebsocketAPIClient/submitNewOrder.js new file mode 100644 index 0000000..118cfba --- /dev/null +++ b/examples/apidoc/WebsocketAPIClient/submitNewOrder.js @@ -0,0 +1,27 @@ +const { WebsocketAPIClient } = require('bitget-api'); + +// This example shows how to call this Bitget WebSocket API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// WS API ENDPOINT: place-order +// METHOD: WebSocket API +// PUBLIC: YES + +// Create a WebSocket API client instance +const client = new WebsocketAPIClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +// The WebSocket connection is established automatically when needed +// You can use the client to make requests immediately + +// Example use of the submitNewOrder method +client.submitNewOrder(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); + From 9fd9ae21166610d2e4e82b8e09e69e630cdd0ac2 Mon Sep 17 00:00:00 2001 From: JJ-Cro Date: Mon, 21 Jul 2025 17:31:06 +0200 Subject: [PATCH 39/57] chore(): change require with import --- .../batchCreateVirtualSubaccountAndAPIKey.js | 14 ++++++++------ examples/apidoc/RestClientV2/borrowLoan.js | 14 ++++++++------ .../apidoc/RestClientV2/cancelSpotFollowerOrder.js | 14 ++++++++------ .../RestClientV2/closeFuturesFollowerPositions.js | 14 ++++++++------ .../apidoc/RestClientV2/closeFuturesTraderOrder.js | 14 ++++++++------ examples/apidoc/RestClientV2/convert.js | 14 ++++++++------ examples/apidoc/RestClientV2/convertBGB.js | 14 ++++++++------ examples/apidoc/RestClientV2/createSubaccount.js | 14 ++++++++------ .../apidoc/RestClientV2/createSubaccountApiKey.js | 14 ++++++++------ .../RestClientV2/createSubaccountDepositAddress.js | 14 ++++++++------ .../apidoc/RestClientV2/createVirtualSubaccount.js | 14 ++++++++------ .../RestClientV2/createVirtualSubaccountAPIKey.js | 14 ++++++++------ examples/apidoc/RestClientV2/earnRedeemSavings.js | 14 ++++++++------ .../apidoc/RestClientV2/earnSubscribeSavings.js | 14 ++++++++------ .../RestClientV2/futuresBatchCancelOrders.js | 14 ++++++++------ .../RestClientV2/futuresBatchSubmitOrders.js | 14 ++++++++------ .../apidoc/RestClientV2/futuresCancelAllOrders.js | 14 ++++++++------ examples/apidoc/RestClientV2/futuresCancelOrder.js | 14 ++++++++------ .../apidoc/RestClientV2/futuresCancelPlanOrder.js | 14 ++++++++------ .../RestClientV2/futuresFlashClosePositions.js | 14 ++++++++------ examples/apidoc/RestClientV2/futuresModifyOrder.js | 14 ++++++++------ .../apidoc/RestClientV2/futuresModifyPlanOrder.js | 14 ++++++++------ .../apidoc/RestClientV2/futuresModifyTPSLPOrder.js | 14 ++++++++------ examples/apidoc/RestClientV2/futuresSubmitOrder.js | 14 ++++++++------ .../apidoc/RestClientV2/futuresSubmitPlanOrder.js | 14 ++++++++------ .../apidoc/RestClientV2/futuresSubmitReversal.js | 14 ++++++++------ .../apidoc/RestClientV2/futuresSubmitTPSLOrder.js | 14 ++++++++------ examples/apidoc/RestClientV2/getAnnouncements.js | 14 ++++++++------ examples/apidoc/RestClientV2/getBalances.js | 14 ++++++++------ examples/apidoc/RestClientV2/getBotAccount.js | 14 ++++++++------ examples/apidoc/RestClientV2/getBrokerInfo.js | 14 ++++++++------ examples/apidoc/RestClientV2/getBrokerTraders.js | 14 ++++++++------ .../getBrokerTradersHistoricalOrders.js | 14 ++++++++------ .../RestClientV2/getBrokerTradersPendingOrders.js | 14 ++++++++------ examples/apidoc/RestClientV2/getConvertBGBCoins.js | 14 ++++++++------ .../apidoc/RestClientV2/getConvertBGBHistory.js | 14 ++++++++------ examples/apidoc/RestClientV2/getConvertCoins.js | 14 ++++++++------ examples/apidoc/RestClientV2/getConvertHistory.js | 14 ++++++++------ .../apidoc/RestClientV2/getConvertQuotedPrice.js | 14 ++++++++------ examples/apidoc/RestClientV2/getEarnAccount.js | 14 ++++++++------ .../apidoc/RestClientV2/getEarnSavingsAccount.js | 14 ++++++++------ .../apidoc/RestClientV2/getEarnSavingsAssets.js | 14 ++++++++------ .../apidoc/RestClientV2/getEarnSavingsProducts.js | 14 ++++++++------ .../apidoc/RestClientV2/getEarnSavingsRecords.js | 14 ++++++++------ .../RestClientV2/getEarnSavingsRedemptionResult.js | 14 ++++++++------ .../RestClientV2/getEarnSavingsSubscription.js | 14 ++++++++------ .../getEarnSavingsSubscriptionResult.js | 14 ++++++++------ examples/apidoc/RestClientV2/getFundingAssets.js | 14 ++++++++------ .../apidoc/RestClientV2/getFuturesAccountAsset.js | 14 ++++++++------ .../apidoc/RestClientV2/getFuturesAccountAssets.js | 14 ++++++++------ .../apidoc/RestClientV2/getFuturesAccountBills.js | 14 ++++++++------ .../getFuturesActiveBuySellVolumeData.js | 14 ++++++++------ .../getFuturesActiveLongShortAccountData.js | 14 ++++++++------ .../getFuturesActiveLongShortPositionData.js | 14 ++++++++------ .../getFuturesActiveTakerBuySellVolumeData.js | 14 ++++++++------ .../apidoc/RestClientV2/getFuturesAllTickers.js | 14 ++++++++------ examples/apidoc/RestClientV2/getFuturesCandles.js | 14 ++++++++------ .../RestClientV2/getFuturesContractConfig.js | 14 ++++++++------ .../RestClientV2/getFuturesCurrentFundingRate.js | 14 ++++++++------ .../apidoc/RestClientV2/getFuturesDiscountRate.js | 14 ++++++++------ examples/apidoc/RestClientV2/getFuturesFills.js | 14 ++++++++------ .../getFuturesFollowerCurrentOrders.js | 14 ++++++++------ .../RestClientV2/getFuturesFollowerFollowLimit.js | 14 ++++++++------ .../getFuturesFollowerHistoryOrders.js | 14 ++++++++------ .../RestClientV2/getFuturesFollowerSettings.js | 14 ++++++++------ .../RestClientV2/getFuturesFollowerTraders.js | 14 ++++++++------ .../RestClientV2/getFuturesHistoricCandles.js | 14 ++++++++------ .../RestClientV2/getFuturesHistoricFundingRates.js | 14 ++++++++------ .../getFuturesHistoricIndexPriceCandles.js | 14 ++++++++------ .../getFuturesHistoricMarkPriceCandles.js | 14 ++++++++------ .../RestClientV2/getFuturesHistoricOrderFills.js | 14 ++++++++------ .../RestClientV2/getFuturesHistoricOrders.js | 14 ++++++++------ .../RestClientV2/getFuturesHistoricPlanOrders.js | 14 ++++++++------ .../RestClientV2/getFuturesHistoricPositions.js | 14 ++++++++------ .../RestClientV2/getFuturesHistoricTrades.js | 14 ++++++++------ .../RestClientV2/getFuturesInterestExchangeRate.js | 14 ++++++++------ .../RestClientV2/getFuturesInterestHistory.js | 14 ++++++++------ .../RestClientV2/getFuturesInterestRateHistory.js | 14 ++++++++------ .../RestClientV2/getFuturesLongShortRatio.js | 14 ++++++++------ .../apidoc/RestClientV2/getFuturesMergeDepth.js | 14 ++++++++------ .../RestClientV2/getFuturesNextFundingTime.js | 14 ++++++++------ .../apidoc/RestClientV2/getFuturesOpenCount.js | 14 ++++++++------ .../apidoc/RestClientV2/getFuturesOpenInterest.js | 14 ++++++++------ .../apidoc/RestClientV2/getFuturesOpenOrders.js | 14 ++++++++------ examples/apidoc/RestClientV2/getFuturesOrder.js | 14 ++++++++------ .../apidoc/RestClientV2/getFuturesPlanOrders.js | 14 ++++++++------ examples/apidoc/RestClientV2/getFuturesPosition.js | 14 ++++++++------ .../apidoc/RestClientV2/getFuturesPositionTier.js | 14 ++++++++------ .../apidoc/RestClientV2/getFuturesPositions.js | 14 ++++++++------ .../apidoc/RestClientV2/getFuturesRecentTrades.js | 14 ++++++++------ .../RestClientV2/getFuturesSubAccountAssets.js | 14 ++++++++------ .../apidoc/RestClientV2/getFuturesSymbolPrice.js | 14 ++++++++------ examples/apidoc/RestClientV2/getFuturesTicker.js | 14 ++++++++------ .../RestClientV2/getFuturesTraderCurrentOrder.js | 14 ++++++++------ .../RestClientV2/getFuturesTraderFollowers.js | 14 ++++++++------ .../RestClientV2/getFuturesTraderHistoryOrders.js | 14 ++++++++------ .../apidoc/RestClientV2/getFuturesTraderOrder.js | 14 ++++++++------ .../RestClientV2/getFuturesTraderProfitHistory.js | 14 ++++++++------ .../RestClientV2/getFuturesTraderProfitShare.js | 14 ++++++++------ .../getFuturesTraderProfitShareGroup.js | 14 ++++++++------ .../getFuturesTraderProfitShareHistory.js | 14 ++++++++------ .../RestClientV2/getFuturesTraderSymbolSettings.js | 14 ++++++++------ .../RestClientV2/getFuturesTransactionRecords.js | 14 ++++++++------ .../RestClientV2/getFuturesTriggerSubOrder.js | 14 ++++++++------ .../apidoc/RestClientV2/getFuturesVIPFeeRate.js | 14 ++++++++------ .../getIsolatedMarginBorrowingRatio.js | 14 ++++++++------ examples/apidoc/RestClientV2/getLoanCurrencies.js | 14 ++++++++------ examples/apidoc/RestClientV2/getLoanDebts.js | 14 ++++++++------ .../getLoanEstInterestAndBorrowable.js | 14 ++++++++------ examples/apidoc/RestClientV2/getLoanHistory.js | 14 ++++++++------ .../RestClientV2/getLoanLiquidationRecords.js | 14 ++++++++------ .../RestClientV2/getLoanPledgeRateHistory.js | 14 ++++++++------ .../apidoc/RestClientV2/getMarginAccountAssets.js | 14 ++++++++------ .../apidoc/RestClientV2/getMarginBorrowHistory.js | 14 ++++++++------ .../apidoc/RestClientV2/getMarginCurrencies.js | 14 ++++++++------ .../RestClientV2/getMarginFinancialHistory.js | 14 ++++++++------ .../RestClientV2/getMarginFlashRepayResult.js | 14 ++++++++------ .../RestClientV2/getMarginHistoricOrderFills.js | 14 ++++++++------ .../apidoc/RestClientV2/getMarginHistoricOrders.js | 14 ++++++++------ .../RestClientV2/getMarginInterestHistory.js | 14 ++++++++------ .../getMarginInterestRateAndMaxBorrowable.js | 14 ++++++++------ .../RestClientV2/getMarginLiquidationHistory.js | 14 ++++++++------ .../RestClientV2/getMarginLiquidationOrders.js | 14 ++++++++------ .../apidoc/RestClientV2/getMarginLoanGrowthRate.js | 14 ++++++++------ .../apidoc/RestClientV2/getMarginMaxBorrowable.js | 14 ++++++++------ .../RestClientV2/getMarginMaxTransferable.js | 14 ++++++++------ .../apidoc/RestClientV2/getMarginOpenOrders.js | 14 ++++++++------ .../apidoc/RestClientV2/getMarginRepayHistory.js | 14 ++++++++------ examples/apidoc/RestClientV2/getMarginRiskRate.js | 14 ++++++++------ .../RestClientV2/getMarginTierConfiguration.js | 14 ++++++++------ .../RestClientV2/getMarginTransactionRecords.js | 14 ++++++++------ .../apidoc/RestClientV2/getOngoingLoanOrders.js | 14 ++++++++------ .../getP2PMerchantAdvertisementList.js | 14 ++++++++------ examples/apidoc/RestClientV2/getP2PMerchantInfo.js | 14 ++++++++------ examples/apidoc/RestClientV2/getP2PMerchantList.js | 14 ++++++++------ .../apidoc/RestClientV2/getP2PMerchantOrders.js | 14 ++++++++------ .../RestClientV2/getP2PTransactionRecords.js | 14 ++++++++------ examples/apidoc/RestClientV2/getRepayHistory.js | 14 ++++++++------ examples/apidoc/RestClientV2/getServerTime.js | 14 ++++++++------ examples/apidoc/RestClientV2/getSharkfinAccount.js | 14 ++++++++------ examples/apidoc/RestClientV2/getSharkfinAssets.js | 14 ++++++++------ .../apidoc/RestClientV2/getSharkfinProducts.js | 14 ++++++++------ examples/apidoc/RestClientV2/getSharkfinRecords.js | 14 ++++++++------ .../apidoc/RestClientV2/getSharkfinSubscription.js | 14 ++++++++------ .../RestClientV2/getSharkfinSubscriptionResult.js | 14 ++++++++------ examples/apidoc/RestClientV2/getSpotAccount.js | 14 ++++++++------ .../apidoc/RestClientV2/getSpotAccountAssets.js | 14 ++++++++------ .../apidoc/RestClientV2/getSpotAccountBills.js | 14 ++++++++------ .../apidoc/RestClientV2/getSpotBGBDeductInfo.js | 14 ++++++++------ examples/apidoc/RestClientV2/getSpotCandles.js | 14 ++++++++------ examples/apidoc/RestClientV2/getSpotCoinInfo.js | 14 ++++++++------ .../RestClientV2/getSpotCurrentPlanOrders.js | 14 ++++++++------ .../apidoc/RestClientV2/getSpotDepositAddress.js | 14 ++++++++------ .../apidoc/RestClientV2/getSpotDepositHistory.js | 14 ++++++++------ examples/apidoc/RestClientV2/getSpotFills.js | 14 ++++++++------ .../getSpotFollowerCurrentTraderSymbols.js | 14 ++++++++------ .../RestClientV2/getSpotFollowerHistoryOrders.js | 14 ++++++++------ .../RestClientV2/getSpotFollowerOpenOrders.js | 14 ++++++++------ .../apidoc/RestClientV2/getSpotFollowerSettings.js | 14 ++++++++------ .../apidoc/RestClientV2/getSpotFollowerTraders.js | 14 ++++++++------ examples/apidoc/RestClientV2/getSpotFundFlow.js | 14 ++++++++------ .../apidoc/RestClientV2/getSpotFundNetFlowData.js | 14 ++++++++------ .../apidoc/RestClientV2/getSpotHistoricCandles.js | 14 ++++++++------ .../apidoc/RestClientV2/getSpotHistoricOrders.js | 14 ++++++++------ .../RestClientV2/getSpotHistoricPlanOrders.js | 14 ++++++++------ .../apidoc/RestClientV2/getSpotHistoricTrades.js | 14 ++++++++------ .../RestClientV2/getSpotMainSubTransferRecord.js | 14 ++++++++------ examples/apidoc/RestClientV2/getSpotMergeDepth.js | 14 ++++++++------ examples/apidoc/RestClientV2/getSpotOpenOrders.js | 14 ++++++++------ examples/apidoc/RestClientV2/getSpotOrder.js | 14 ++++++++------ .../apidoc/RestClientV2/getSpotOrderBookDepth.js | 14 ++++++++------ .../apidoc/RestClientV2/getSpotPlanSubOrder.js | 14 ++++++++------ .../apidoc/RestClientV2/getSpotRecentTrades.js | 14 ++++++++------ .../apidoc/RestClientV2/getSpotSubAccountAssets.js | 14 ++++++++------ .../RestClientV2/getSpotSubDepositAddress.js | 14 ++++++++------ examples/apidoc/RestClientV2/getSpotSymbolInfo.js | 14 ++++++++------ examples/apidoc/RestClientV2/getSpotTicker.js | 14 ++++++++------ .../RestClientV2/getSpotTraderConfiguration.js | 14 ++++++++------ .../RestClientV2/getSpotTraderCurrentOrders.js | 14 ++++++++------ .../apidoc/RestClientV2/getSpotTraderFollowers.js | 14 ++++++++------ .../RestClientV2/getSpotTraderHistoryOrders.js | 14 ++++++++------ .../RestClientV2/getSpotTraderHistoryProfit.js | 14 ++++++++------ examples/apidoc/RestClientV2/getSpotTraderOrder.js | 14 ++++++++------ .../apidoc/RestClientV2/getSpotTraderProfit.js | 14 ++++++++------ .../RestClientV2/getSpotTraderSymbolSettings.js | 14 ++++++++------ .../RestClientV2/getSpotTraderUnrealizedProfit.js | 14 ++++++++------ .../RestClientV2/getSpotTransactionRecords.js | 14 ++++++++------ .../apidoc/RestClientV2/getSpotTransferHistory.js | 14 ++++++++------ .../RestClientV2/getSpotTransferableCoins.js | 14 ++++++++------ examples/apidoc/RestClientV2/getSpotVIPFeeRate.js | 14 ++++++++------ .../apidoc/RestClientV2/getSpotWhaleNetFlowData.js | 14 ++++++++------ .../RestClientV2/getSpotWithdrawalHistory.js | 14 ++++++++------ .../RestClientV2/getSubAccountDepositRecords.js | 14 ++++++++------ .../apidoc/RestClientV2/getSubaccountApiKey.js | 14 ++++++++------ examples/apidoc/RestClientV2/getSubaccountEmail.js | 14 ++++++++------ .../RestClientV2/getSubaccountFuturesAssets.js | 14 ++++++++------ .../apidoc/RestClientV2/getSubaccountSpotAssets.js | 14 ++++++++------ examples/apidoc/RestClientV2/getSubaccounts.js | 14 ++++++++------ .../RestClientV2/getTradeDataSupportSymbols.js | 14 ++++++++------ examples/apidoc/RestClientV2/getTradeRate.js | 14 ++++++++------ .../RestClientV2/getVirtualSubaccountAPIKeys.js | 14 ++++++++------ .../apidoc/RestClientV2/getVirtualSubaccounts.js | 14 ++++++++------ .../apidoc/RestClientV2/marginBatchCancelOrders.js | 14 ++++++++------ .../apidoc/RestClientV2/marginBatchSubmitOrders.js | 14 ++++++++------ examples/apidoc/RestClientV2/marginBorrow.js | 14 ++++++++------ examples/apidoc/RestClientV2/marginCancelOrder.js | 14 ++++++++------ examples/apidoc/RestClientV2/marginFlashRepay.js | 14 ++++++++------ examples/apidoc/RestClientV2/marginRepay.js | 14 ++++++++------ examples/apidoc/RestClientV2/marginSubmitOrder.js | 14 ++++++++------ .../RestClientV2/modifyFuturesTraderOrderTPSL.js | 14 ++++++++------ .../RestClientV2/modifySpotTraderOrderTPSL.js | 14 ++++++++------ examples/apidoc/RestClientV2/modifySubaccount.js | 14 ++++++++------ .../apidoc/RestClientV2/modifySubaccountApiKey.js | 14 ++++++++------ .../apidoc/RestClientV2/modifySubaccountEmail.js | 14 ++++++++------ .../apidoc/RestClientV2/modifyVirtualSubaccount.js | 14 ++++++++------ .../RestClientV2/modifyVirtualSubaccountAPIKey.js | 14 ++++++++------ .../RestClientV2/removeFuturesTraderFollower.js | 14 ++++++++------ .../RestClientV2/removeSpotTraderFollowers.js | 14 ++++++++------ examples/apidoc/RestClientV2/repayLoan.js | 14 ++++++++------ examples/apidoc/RestClientV2/sellSpotFollower.js | 14 ++++++++------ examples/apidoc/RestClientV2/sellSpotTrader.js | 14 ++++++++------ .../apidoc/RestClientV2/setFuturesAssetMode.js | 14 ++++++++------ examples/apidoc/RestClientV2/setFuturesLeverage.js | 14 ++++++++------ .../apidoc/RestClientV2/setFuturesMarginMode.js | 14 ++++++++------ .../RestClientV2/setFuturesPositionAutoMargin.js | 14 ++++++++------ .../RestClientV2/setFuturesPositionMargin.js | 14 ++++++++------ .../apidoc/RestClientV2/setFuturesPositionMode.js | 14 ++++++++------ .../apidoc/RestClientV2/spotBatchCancelOrders.js | 14 ++++++++------ .../RestClientV2/spotBatchCancelandSubmitOrder.js | 14 ++++++++------ .../apidoc/RestClientV2/spotBatchSubmitOrders.js | 14 ++++++++------ examples/apidoc/RestClientV2/spotCancelOrder.js | 14 ++++++++------ .../apidoc/RestClientV2/spotCancelPlanOrder.js | 14 ++++++++------ .../apidoc/RestClientV2/spotCancelPlanOrders.js | 14 ++++++++------ .../apidoc/RestClientV2/spotCancelSymbolOrder.js | 14 ++++++++------ .../apidoc/RestClientV2/spotCancelWithdrawal.js | 14 ++++++++------ .../RestClientV2/spotCancelandSubmitOrder.js | 14 ++++++++------ .../RestClientV2/spotModifyDepositAccount.js | 14 ++++++++------ .../apidoc/RestClientV2/spotModifyPlanOrder.js | 14 ++++++++------ examples/apidoc/RestClientV2/spotSubTransfer.js | 14 ++++++++------ examples/apidoc/RestClientV2/spotSubmitOrder.js | 14 ++++++++------ .../apidoc/RestClientV2/spotSubmitPlanOrder.js | 14 ++++++++------ .../apidoc/RestClientV2/spotSwitchBGBDeduct.js | 14 ++++++++------ examples/apidoc/RestClientV2/spotTransfer.js | 14 ++++++++------ examples/apidoc/RestClientV2/spotWithdraw.js | 14 ++++++++------ .../RestClientV2/subaccountDepositRecords.js | 14 ++++++++------ .../RestClientV2/subaccountSetAutoTransfer.js | 14 ++++++++------ .../apidoc/RestClientV2/subaccountWithdrawal.js | 14 ++++++++------ .../RestClientV2/subaccountWithdrawalRecords.js | 14 ++++++++------ examples/apidoc/RestClientV2/subscribeSharkfin.js | 14 ++++++++------ .../apidoc/RestClientV2/unfollowFuturesTrader.js | 14 ++++++++------ examples/apidoc/RestClientV2/unfollowSpotTrader.js | 14 ++++++++------ .../RestClientV2/updateFuturesFollowerSettings.js | 14 ++++++++------ .../RestClientV2/updateFuturesFollowerTPSL.js | 14 ++++++++------ .../updateFuturesTraderGlobalSettings.js | 14 ++++++++------ .../updateFuturesTraderSymbolSettings.js | 14 ++++++++------ .../apidoc/RestClientV2/updateLoanPledgeRate.js | 14 ++++++++------ .../RestClientV2/updateSpotFollowerSettings.js | 14 ++++++++------ .../apidoc/RestClientV2/updateSpotFollowerTPSL.js | 14 ++++++++------ examples/apidoc/RestClientV3/batchModifyOrders.js | 14 ++++++++------ examples/apidoc/RestClientV3/bindLoanUid.js | 14 ++++++++------ examples/apidoc/RestClientV3/cancelAllOrders.js | 14 ++++++++------ examples/apidoc/RestClientV3/cancelBatchOrders.js | 14 ++++++++------ examples/apidoc/RestClientV3/cancelOrder.js | 14 ++++++++------ .../apidoc/RestClientV3/cancelStrategyOrder.js | 14 ++++++++------ examples/apidoc/RestClientV3/closeAllPositions.js | 14 ++++++++------ examples/apidoc/RestClientV3/countdownCancelAll.js | 14 ++++++++------ examples/apidoc/RestClientV3/createSubAccount.js | 14 ++++++++------ .../apidoc/RestClientV3/createSubAccountApiKey.js | 14 ++++++++------ .../apidoc/RestClientV3/deleteSubAccountApiKey.js | 14 ++++++++------ examples/apidoc/RestClientV3/freezeSubAccount.js | 14 ++++++++------ examples/apidoc/RestClientV3/getAccountSettings.js | 14 ++++++++------ examples/apidoc/RestClientV3/getBalances.js | 14 ++++++++------ examples/apidoc/RestClientV3/getCandles.js | 14 ++++++++------ examples/apidoc/RestClientV3/getContractsOi.js | 14 ++++++++------ examples/apidoc/RestClientV3/getConvertRecords.js | 14 ++++++++------ .../apidoc/RestClientV3/getCurrentFundingRate.js | 14 ++++++++------ examples/apidoc/RestClientV3/getCurrentPosition.js | 14 ++++++++------ examples/apidoc/RestClientV3/getDeductInfo.js | 14 ++++++++------ examples/apidoc/RestClientV3/getDepositAddress.js | 14 ++++++++------ examples/apidoc/RestClientV3/getDepositRecords.js | 14 ++++++++------ examples/apidoc/RestClientV3/getDiscountRate.js | 14 ++++++++------ examples/apidoc/RestClientV3/getFeeRate.js | 14 ++++++++------ examples/apidoc/RestClientV3/getFills.js | 14 ++++++++------ .../apidoc/RestClientV3/getFinancialRecords.js | 14 ++++++++------ examples/apidoc/RestClientV3/getFundingAssets.js | 14 ++++++++------ examples/apidoc/RestClientV3/getHistoryCandles.js | 14 ++++++++------ .../apidoc/RestClientV3/getHistoryFundingRate.js | 14 ++++++++------ examples/apidoc/RestClientV3/getHistoryOrders.js | 14 ++++++++------ .../RestClientV3/getHistoryStrategyOrders.js | 14 ++++++++------ examples/apidoc/RestClientV3/getInstruments.js | 14 ++++++++------ examples/apidoc/RestClientV3/getLoanLTVConvert.js | 14 ++++++++------ .../apidoc/RestClientV3/getLoanMarginCoinInfo.js | 14 ++++++++------ examples/apidoc/RestClientV3/getLoanOrder.js | 14 ++++++++------ examples/apidoc/RestClientV3/getLoanProductInfo.js | 14 ++++++++------ .../apidoc/RestClientV3/getLoanRepaidHistory.js | 14 ++++++++------ examples/apidoc/RestClientV3/getLoanRiskUnit.js | 14 ++++++++------ examples/apidoc/RestClientV3/getLoanSymbols.js | 14 ++++++++------ examples/apidoc/RestClientV3/getLoanTransfered.js | 14 ++++++++------ examples/apidoc/RestClientV3/getMarginLoans.js | 14 ++++++++------ .../apidoc/RestClientV3/getMaxOpenAvailable.js | 14 ++++++++------ examples/apidoc/RestClientV3/getOpenInterest.js | 14 ++++++++------ examples/apidoc/RestClientV3/getOrderBook.js | 14 ++++++++------ examples/apidoc/RestClientV3/getOrderInfo.js | 14 ++++++++------ examples/apidoc/RestClientV3/getPaymentCoins.js | 14 ++++++++------ examples/apidoc/RestClientV3/getPositionHistory.js | 14 ++++++++------ examples/apidoc/RestClientV3/getPositionTier.js | 14 ++++++++------ examples/apidoc/RestClientV3/getRepayableCoins.js | 14 ++++++++------ examples/apidoc/RestClientV3/getRiskReserve.js | 14 ++++++++------ examples/apidoc/RestClientV3/getServerTime.js | 14 ++++++++------ .../apidoc/RestClientV3/getSubAccountApiKeys.js | 14 ++++++++------ examples/apidoc/RestClientV3/getSubAccountList.js | 14 ++++++++------ .../apidoc/RestClientV3/getSubDepositAddress.js | 14 ++++++++------ .../apidoc/RestClientV3/getSubDepositRecords.js | 14 ++++++++------ .../apidoc/RestClientV3/getSubTransferRecords.js | 14 ++++++++------ .../apidoc/RestClientV3/getSubUnifiedAssets.js | 14 ++++++++------ examples/apidoc/RestClientV3/getTickers.js | 14 ++++++++------ examples/apidoc/RestClientV3/getTradeFills.js | 14 ++++++++------ .../apidoc/RestClientV3/getTransferableCoins.js | 14 ++++++++------ examples/apidoc/RestClientV3/getUnfilledOrders.js | 14 ++++++++------ .../RestClientV3/getUnfilledStrategyOrders.js | 14 ++++++++------ examples/apidoc/RestClientV3/getWithdrawRecords.js | 14 ++++++++------ examples/apidoc/RestClientV3/modifyOrder.js | 14 ++++++++------ .../apidoc/RestClientV3/modifyStrategyOrder.js | 14 ++++++++------ examples/apidoc/RestClientV3/placeBatchOrders.js | 14 ++++++++------ examples/apidoc/RestClientV3/setHoldMode.js | 14 ++++++++------ examples/apidoc/RestClientV3/setLeverage.js | 14 ++++++++------ examples/apidoc/RestClientV3/subAccountTransfer.js | 14 ++++++++------ examples/apidoc/RestClientV3/submitNewOrder.js | 14 ++++++++------ examples/apidoc/RestClientV3/submitRepay.js | 14 ++++++++------ .../apidoc/RestClientV3/submitStrategyOrder.js | 14 ++++++++------ examples/apidoc/RestClientV3/submitTransfer.js | 14 ++++++++------ examples/apidoc/RestClientV3/submitWithdraw.js | 14 ++++++++------ examples/apidoc/RestClientV3/switchDeduct.js | 14 ++++++++------ .../apidoc/RestClientV3/updateSubAccountApiKey.js | 14 ++++++++------ .../apidoc/WebsocketAPIClient/cancelBatchOrders.js | 4 +++- examples/apidoc/WebsocketAPIClient/cancelOrder.js | 4 +++- .../apidoc/WebsocketAPIClient/placeBatchOrders.js | 4 +++- .../apidoc/WebsocketAPIClient/submitNewOrder.js | 4 +++- 338 files changed, 2684 insertions(+), 2008 deletions(-) diff --git a/examples/apidoc/RestClientV2/batchCreateVirtualSubaccountAndAPIKey.js b/examples/apidoc/RestClientV2/batchCreateVirtualSubaccountAndAPIKey.js index 99a29d3..2e3a42f 100644 --- a/examples/apidoc/RestClientV2/batchCreateVirtualSubaccountAndAPIKey.js +++ b/examples/apidoc/RestClientV2/batchCreateVirtualSubaccountAndAPIKey.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/user/batch-create-subaccount-and-apikey - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/user/batch-create-subaccount-and-apikey +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/borrowLoan.js b/examples/apidoc/RestClientV2/borrowLoan.js index 6dd6dc9..c4f46c1 100644 --- a/examples/apidoc/RestClientV2/borrowLoan.js +++ b/examples/apidoc/RestClientV2/borrowLoan.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/loan/borrow - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/loan/borrow +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/cancelSpotFollowerOrder.js b/examples/apidoc/RestClientV2/cancelSpotFollowerOrder.js index 5b4f7e8..56f71c8 100644 --- a/examples/apidoc/RestClientV2/cancelSpotFollowerOrder.js +++ b/examples/apidoc/RestClientV2/cancelSpotFollowerOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-follower/stop-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-follower/stop-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/closeFuturesFollowerPositions.js b/examples/apidoc/RestClientV2/closeFuturesFollowerPositions.js index 5e69e5b..5bd4af8 100644 --- a/examples/apidoc/RestClientV2/closeFuturesFollowerPositions.js +++ b/examples/apidoc/RestClientV2/closeFuturesFollowerPositions.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-follower/close-positions - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-follower/close-positions +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/closeFuturesTraderOrder.js b/examples/apidoc/RestClientV2/closeFuturesTraderOrder.js index 61cf75b..6b7fe8b 100644 --- a/examples/apidoc/RestClientV2/closeFuturesTraderOrder.js +++ b/examples/apidoc/RestClientV2/closeFuturesTraderOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-trader/order-close-positions - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-trader/order-close-positions +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/convert.js b/examples/apidoc/RestClientV2/convert.js index 4875fdb..1079a92 100644 --- a/examples/apidoc/RestClientV2/convert.js +++ b/examples/apidoc/RestClientV2/convert.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/convert/trade - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/convert/trade +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/convertBGB.js b/examples/apidoc/RestClientV2/convertBGB.js index 6bc4662..770f31a 100644 --- a/examples/apidoc/RestClientV2/convertBGB.js +++ b/examples/apidoc/RestClientV2/convertBGB.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/convert/bgb-convert - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/convert/bgb-convert +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/createSubaccount.js b/examples/apidoc/RestClientV2/createSubaccount.js index e3ed3e5..2882a59 100644 --- a/examples/apidoc/RestClientV2/createSubaccount.js +++ b/examples/apidoc/RestClientV2/createSubaccount.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/broker/account/create-subaccount - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/broker/account/create-subaccount +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/createSubaccountApiKey.js b/examples/apidoc/RestClientV2/createSubaccountApiKey.js index 7210a91..7e842c6 100644 --- a/examples/apidoc/RestClientV2/createSubaccountApiKey.js +++ b/examples/apidoc/RestClientV2/createSubaccountApiKey.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/broker/manage/create-subaccount-apikey - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/broker/manage/create-subaccount-apikey +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/createSubaccountDepositAddress.js b/examples/apidoc/RestClientV2/createSubaccountDepositAddress.js index f0043a2..b97db9e 100644 --- a/examples/apidoc/RestClientV2/createSubaccountDepositAddress.js +++ b/examples/apidoc/RestClientV2/createSubaccountDepositAddress.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/broker/account/subaccount-address - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/broker/account/subaccount-address +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/createVirtualSubaccount.js b/examples/apidoc/RestClientV2/createVirtualSubaccount.js index 8ef4b97..e53a2ab 100644 --- a/examples/apidoc/RestClientV2/createVirtualSubaccount.js +++ b/examples/apidoc/RestClientV2/createVirtualSubaccount.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/user/create-virtual-subaccount - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/user/create-virtual-subaccount +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/createVirtualSubaccountAPIKey.js b/examples/apidoc/RestClientV2/createVirtualSubaccountAPIKey.js index 419e7f4..92cda9a 100644 --- a/examples/apidoc/RestClientV2/createVirtualSubaccountAPIKey.js +++ b/examples/apidoc/RestClientV2/createVirtualSubaccountAPIKey.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/user/create-virtual-subaccount-apikey - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/user/create-virtual-subaccount-apikey +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/earnRedeemSavings.js b/examples/apidoc/RestClientV2/earnRedeemSavings.js index c84d16d..2b7ad14 100644 --- a/examples/apidoc/RestClientV2/earnRedeemSavings.js +++ b/examples/apidoc/RestClientV2/earnRedeemSavings.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/savings/redeem - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/savings/redeem +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/earnSubscribeSavings.js b/examples/apidoc/RestClientV2/earnSubscribeSavings.js index 5933bde..9303a88 100644 --- a/examples/apidoc/RestClientV2/earnSubscribeSavings.js +++ b/examples/apidoc/RestClientV2/earnSubscribeSavings.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/savings/subscribe - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/savings/subscribe +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/futuresBatchCancelOrders.js b/examples/apidoc/RestClientV2/futuresBatchCancelOrders.js index cbe6234..5101382 100644 --- a/examples/apidoc/RestClientV2/futuresBatchCancelOrders.js +++ b/examples/apidoc/RestClientV2/futuresBatchCancelOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/batch-cancel-orders - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/batch-cancel-orders +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/futuresBatchSubmitOrders.js b/examples/apidoc/RestClientV2/futuresBatchSubmitOrders.js index 679209c..d129aa1 100644 --- a/examples/apidoc/RestClientV2/futuresBatchSubmitOrders.js +++ b/examples/apidoc/RestClientV2/futuresBatchSubmitOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/batch-place-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/batch-place-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/futuresCancelAllOrders.js b/examples/apidoc/RestClientV2/futuresCancelAllOrders.js index 2e547ff..b2be2a0 100644 --- a/examples/apidoc/RestClientV2/futuresCancelAllOrders.js +++ b/examples/apidoc/RestClientV2/futuresCancelAllOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/cancel-all-orders - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/cancel-all-orders +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/futuresCancelOrder.js b/examples/apidoc/RestClientV2/futuresCancelOrder.js index f4209c8..b448282 100644 --- a/examples/apidoc/RestClientV2/futuresCancelOrder.js +++ b/examples/apidoc/RestClientV2/futuresCancelOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/cancel-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/cancel-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/futuresCancelPlanOrder.js b/examples/apidoc/RestClientV2/futuresCancelPlanOrder.js index 12927ea..d5f0ac6 100644 --- a/examples/apidoc/RestClientV2/futuresCancelPlanOrder.js +++ b/examples/apidoc/RestClientV2/futuresCancelPlanOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/cancel-plan-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/cancel-plan-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/futuresFlashClosePositions.js b/examples/apidoc/RestClientV2/futuresFlashClosePositions.js index 23af149..cf7b352 100644 --- a/examples/apidoc/RestClientV2/futuresFlashClosePositions.js +++ b/examples/apidoc/RestClientV2/futuresFlashClosePositions.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/close-positions - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/close-positions +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/futuresModifyOrder.js b/examples/apidoc/RestClientV2/futuresModifyOrder.js index 63abe6b..36725e0 100644 --- a/examples/apidoc/RestClientV2/futuresModifyOrder.js +++ b/examples/apidoc/RestClientV2/futuresModifyOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/modify-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/modify-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/futuresModifyPlanOrder.js b/examples/apidoc/RestClientV2/futuresModifyPlanOrder.js index dc3752e..d6d2708 100644 --- a/examples/apidoc/RestClientV2/futuresModifyPlanOrder.js +++ b/examples/apidoc/RestClientV2/futuresModifyPlanOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/modify-plan-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/modify-plan-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/futuresModifyTPSLPOrder.js b/examples/apidoc/RestClientV2/futuresModifyTPSLPOrder.js index fb646c3..ebc81e3 100644 --- a/examples/apidoc/RestClientV2/futuresModifyTPSLPOrder.js +++ b/examples/apidoc/RestClientV2/futuresModifyTPSLPOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/modify-tpsl-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/modify-tpsl-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/futuresSubmitOrder.js b/examples/apidoc/RestClientV2/futuresSubmitOrder.js index 87d7841..14e7479 100644 --- a/examples/apidoc/RestClientV2/futuresSubmitOrder.js +++ b/examples/apidoc/RestClientV2/futuresSubmitOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/place-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/place-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/futuresSubmitPlanOrder.js b/examples/apidoc/RestClientV2/futuresSubmitPlanOrder.js index be966c8..0f49e01 100644 --- a/examples/apidoc/RestClientV2/futuresSubmitPlanOrder.js +++ b/examples/apidoc/RestClientV2/futuresSubmitPlanOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/place-plan-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/place-plan-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/futuresSubmitReversal.js b/examples/apidoc/RestClientV2/futuresSubmitReversal.js index 7d76422..120d224 100644 --- a/examples/apidoc/RestClientV2/futuresSubmitReversal.js +++ b/examples/apidoc/RestClientV2/futuresSubmitReversal.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/click-backhand - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/click-backhand +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/futuresSubmitTPSLOrder.js b/examples/apidoc/RestClientV2/futuresSubmitTPSLOrder.js index 28cb1a9..b2c0b73 100644 --- a/examples/apidoc/RestClientV2/futuresSubmitTPSLOrder.js +++ b/examples/apidoc/RestClientV2/futuresSubmitTPSLOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/place-tpsl-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/place-tpsl-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getAnnouncements.js b/examples/apidoc/RestClientV2/getAnnouncements.js index 012d9ef..42b3960 100644 --- a/examples/apidoc/RestClientV2/getAnnouncements.js +++ b/examples/apidoc/RestClientV2/getAnnouncements.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/public/annoucements - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/public/annoucements +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getBalances.js b/examples/apidoc/RestClientV2/getBalances.js index 1d4d541..49e9856 100644 --- a/examples/apidoc/RestClientV2/getBalances.js +++ b/examples/apidoc/RestClientV2/getBalances.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/account/all-account-balance - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/account/all-account-balance +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getBotAccount.js b/examples/apidoc/RestClientV2/getBotAccount.js index 1148068..edf0ac5 100644 --- a/examples/apidoc/RestClientV2/getBotAccount.js +++ b/examples/apidoc/RestClientV2/getBotAccount.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/account/bot-assets - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/account/bot-assets +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getBrokerInfo.js b/examples/apidoc/RestClientV2/getBrokerInfo.js index eed0166..4a824d0 100644 --- a/examples/apidoc/RestClientV2/getBrokerInfo.js +++ b/examples/apidoc/RestClientV2/getBrokerInfo.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/broker/account/info - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/broker/account/info +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getBrokerTraders.js b/examples/apidoc/RestClientV2/getBrokerTraders.js index c061bec..55e8b62 100644 --- a/examples/apidoc/RestClientV2/getBrokerTraders.js +++ b/examples/apidoc/RestClientV2/getBrokerTraders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-broker/query-traders - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-broker/query-traders +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getBrokerTradersHistoricalOrders.js b/examples/apidoc/RestClientV2/getBrokerTradersHistoricalOrders.js index 76113d3..2351b3b 100644 --- a/examples/apidoc/RestClientV2/getBrokerTradersHistoricalOrders.js +++ b/examples/apidoc/RestClientV2/getBrokerTradersHistoricalOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-broker/query-history-traces - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-broker/query-history-traces +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getBrokerTradersPendingOrders.js b/examples/apidoc/RestClientV2/getBrokerTradersPendingOrders.js index 58d5a2d..3ec2898 100644 --- a/examples/apidoc/RestClientV2/getBrokerTradersPendingOrders.js +++ b/examples/apidoc/RestClientV2/getBrokerTradersPendingOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-broker/query-current-traces - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-broker/query-current-traces +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getConvertBGBCoins.js b/examples/apidoc/RestClientV2/getConvertBGBCoins.js index 9b9c363..5919059 100644 --- a/examples/apidoc/RestClientV2/getConvertBGBCoins.js +++ b/examples/apidoc/RestClientV2/getConvertBGBCoins.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/convert/bgb-convert-coin-list - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/convert/bgb-convert-coin-list +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getConvertBGBHistory.js b/examples/apidoc/RestClientV2/getConvertBGBHistory.js index acd463e..e931650 100644 --- a/examples/apidoc/RestClientV2/getConvertBGBHistory.js +++ b/examples/apidoc/RestClientV2/getConvertBGBHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/convert/bgb-convert-records - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/convert/bgb-convert-records +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getConvertCoins.js b/examples/apidoc/RestClientV2/getConvertCoins.js index c1771ec..b8d5996 100644 --- a/examples/apidoc/RestClientV2/getConvertCoins.js +++ b/examples/apidoc/RestClientV2/getConvertCoins.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/convert/currencies - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/convert/currencies +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getConvertHistory.js b/examples/apidoc/RestClientV2/getConvertHistory.js index 0767c9b..6c88a8a 100644 --- a/examples/apidoc/RestClientV2/getConvertHistory.js +++ b/examples/apidoc/RestClientV2/getConvertHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/convert/convert-record - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/convert/convert-record +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getConvertQuotedPrice.js b/examples/apidoc/RestClientV2/getConvertQuotedPrice.js index d4436f8..f9c43cf 100644 --- a/examples/apidoc/RestClientV2/getConvertQuotedPrice.js +++ b/examples/apidoc/RestClientV2/getConvertQuotedPrice.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/convert/quoted-price - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/convert/quoted-price +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getEarnAccount.js b/examples/apidoc/RestClientV2/getEarnAccount.js index e79860e..34d6231 100644 --- a/examples/apidoc/RestClientV2/getEarnAccount.js +++ b/examples/apidoc/RestClientV2/getEarnAccount.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/account/assets - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/account/assets +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getEarnSavingsAccount.js b/examples/apidoc/RestClientV2/getEarnSavingsAccount.js index 97b1c24..d695ca1 100644 --- a/examples/apidoc/RestClientV2/getEarnSavingsAccount.js +++ b/examples/apidoc/RestClientV2/getEarnSavingsAccount.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/savings/account - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/savings/account +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getEarnSavingsAssets.js b/examples/apidoc/RestClientV2/getEarnSavingsAssets.js index d11df41..13771a5 100644 --- a/examples/apidoc/RestClientV2/getEarnSavingsAssets.js +++ b/examples/apidoc/RestClientV2/getEarnSavingsAssets.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/savings/assets - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/savings/assets +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getEarnSavingsProducts.js b/examples/apidoc/RestClientV2/getEarnSavingsProducts.js index 4754841..fd8325a 100644 --- a/examples/apidoc/RestClientV2/getEarnSavingsProducts.js +++ b/examples/apidoc/RestClientV2/getEarnSavingsProducts.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/savings/product - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/savings/product +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getEarnSavingsRecords.js b/examples/apidoc/RestClientV2/getEarnSavingsRecords.js index 38d916f..548b2d3 100644 --- a/examples/apidoc/RestClientV2/getEarnSavingsRecords.js +++ b/examples/apidoc/RestClientV2/getEarnSavingsRecords.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/savings/records - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/savings/records +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getEarnSavingsRedemptionResult.js b/examples/apidoc/RestClientV2/getEarnSavingsRedemptionResult.js index 8f40ebe..a7f289c 100644 --- a/examples/apidoc/RestClientV2/getEarnSavingsRedemptionResult.js +++ b/examples/apidoc/RestClientV2/getEarnSavingsRedemptionResult.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/savings/redeem-result - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/savings/redeem-result +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getEarnSavingsSubscription.js b/examples/apidoc/RestClientV2/getEarnSavingsSubscription.js index 023d131..b1e5a93 100644 --- a/examples/apidoc/RestClientV2/getEarnSavingsSubscription.js +++ b/examples/apidoc/RestClientV2/getEarnSavingsSubscription.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/savings/subscribe-info - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/savings/subscribe-info +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getEarnSavingsSubscriptionResult.js b/examples/apidoc/RestClientV2/getEarnSavingsSubscriptionResult.js index 2897eba..d550de9 100644 --- a/examples/apidoc/RestClientV2/getEarnSavingsSubscriptionResult.js +++ b/examples/apidoc/RestClientV2/getEarnSavingsSubscriptionResult.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/savings/subscribe-result - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/savings/subscribe-result +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFundingAssets.js b/examples/apidoc/RestClientV2/getFundingAssets.js index 9fdb0fd..796d941 100644 --- a/examples/apidoc/RestClientV2/getFundingAssets.js +++ b/examples/apidoc/RestClientV2/getFundingAssets.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/account/funding-assets - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/account/funding-assets +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesAccountAsset.js b/examples/apidoc/RestClientV2/getFuturesAccountAsset.js index e1f05f7..a57f7cf 100644 --- a/examples/apidoc/RestClientV2/getFuturesAccountAsset.js +++ b/examples/apidoc/RestClientV2/getFuturesAccountAsset.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/account/account - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/account/account +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesAccountAssets.js b/examples/apidoc/RestClientV2/getFuturesAccountAssets.js index 5213afd..556f786 100644 --- a/examples/apidoc/RestClientV2/getFuturesAccountAssets.js +++ b/examples/apidoc/RestClientV2/getFuturesAccountAssets.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/account/accounts - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/account/accounts +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesAccountBills.js b/examples/apidoc/RestClientV2/getFuturesAccountBills.js index e5dae37..64c29d7 100644 --- a/examples/apidoc/RestClientV2/getFuturesAccountBills.js +++ b/examples/apidoc/RestClientV2/getFuturesAccountBills.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/account/bill - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/account/bill +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesActiveBuySellVolumeData.js b/examples/apidoc/RestClientV2/getFuturesActiveBuySellVolumeData.js index c776593..3814c8c 100644 --- a/examples/apidoc/RestClientV2/getFuturesActiveBuySellVolumeData.js +++ b/examples/apidoc/RestClientV2/getFuturesActiveBuySellVolumeData.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/long-short - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/long-short +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesActiveLongShortAccountData.js b/examples/apidoc/RestClientV2/getFuturesActiveLongShortAccountData.js index 78991d5..afda9dc 100644 --- a/examples/apidoc/RestClientV2/getFuturesActiveLongShortAccountData.js +++ b/examples/apidoc/RestClientV2/getFuturesActiveLongShortAccountData.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/account-long-short - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/account-long-short +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesActiveLongShortPositionData.js b/examples/apidoc/RestClientV2/getFuturesActiveLongShortPositionData.js index bf2df0d..9bbdc86 100644 --- a/examples/apidoc/RestClientV2/getFuturesActiveLongShortPositionData.js +++ b/examples/apidoc/RestClientV2/getFuturesActiveLongShortPositionData.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/position-long-short - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/position-long-short +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesActiveTakerBuySellVolumeData.js b/examples/apidoc/RestClientV2/getFuturesActiveTakerBuySellVolumeData.js index 987ab6e..e005401 100644 --- a/examples/apidoc/RestClientV2/getFuturesActiveTakerBuySellVolumeData.js +++ b/examples/apidoc/RestClientV2/getFuturesActiveTakerBuySellVolumeData.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/taker-buy-sell - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/taker-buy-sell +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesAllTickers.js b/examples/apidoc/RestClientV2/getFuturesAllTickers.js index ea46971..eaa044e 100644 --- a/examples/apidoc/RestClientV2/getFuturesAllTickers.js +++ b/examples/apidoc/RestClientV2/getFuturesAllTickers.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/tickers - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/tickers +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesCandles.js b/examples/apidoc/RestClientV2/getFuturesCandles.js index b87fef8..acbede0 100644 --- a/examples/apidoc/RestClientV2/getFuturesCandles.js +++ b/examples/apidoc/RestClientV2/getFuturesCandles.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/candles - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/candles +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesContractConfig.js b/examples/apidoc/RestClientV2/getFuturesContractConfig.js index 9611fa3..70cacb8 100644 --- a/examples/apidoc/RestClientV2/getFuturesContractConfig.js +++ b/examples/apidoc/RestClientV2/getFuturesContractConfig.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/contracts - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/contracts +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesCurrentFundingRate.js b/examples/apidoc/RestClientV2/getFuturesCurrentFundingRate.js index 9052cd8..d4fb0cd 100644 --- a/examples/apidoc/RestClientV2/getFuturesCurrentFundingRate.js +++ b/examples/apidoc/RestClientV2/getFuturesCurrentFundingRate.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/current-fund-rate - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/current-fund-rate +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesDiscountRate.js b/examples/apidoc/RestClientV2/getFuturesDiscountRate.js index 4a931f0..70f13ad 100644 --- a/examples/apidoc/RestClientV2/getFuturesDiscountRate.js +++ b/examples/apidoc/RestClientV2/getFuturesDiscountRate.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/discount-rate - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/discount-rate +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesFills.js b/examples/apidoc/RestClientV2/getFuturesFills.js index 13ccea4..5cd3015 100644 --- a/examples/apidoc/RestClientV2/getFuturesFills.js +++ b/examples/apidoc/RestClientV2/getFuturesFills.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/fills - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/fills +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesFollowerCurrentOrders.js b/examples/apidoc/RestClientV2/getFuturesFollowerCurrentOrders.js index d6710e4..8f4dab7 100644 --- a/examples/apidoc/RestClientV2/getFuturesFollowerCurrentOrders.js +++ b/examples/apidoc/RestClientV2/getFuturesFollowerCurrentOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-follower/query-current-orders - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-follower/query-current-orders +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesFollowerFollowLimit.js b/examples/apidoc/RestClientV2/getFuturesFollowerFollowLimit.js index 4659cf4..353102d 100644 --- a/examples/apidoc/RestClientV2/getFuturesFollowerFollowLimit.js +++ b/examples/apidoc/RestClientV2/getFuturesFollowerFollowLimit.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-follower/query-quantity-limit - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-follower/query-quantity-limit +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesFollowerHistoryOrders.js b/examples/apidoc/RestClientV2/getFuturesFollowerHistoryOrders.js index f360b9e..887df7b 100644 --- a/examples/apidoc/RestClientV2/getFuturesFollowerHistoryOrders.js +++ b/examples/apidoc/RestClientV2/getFuturesFollowerHistoryOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-follower/query-history-orders - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-follower/query-history-orders +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesFollowerSettings.js b/examples/apidoc/RestClientV2/getFuturesFollowerSettings.js index 990088b..0be02d8 100644 --- a/examples/apidoc/RestClientV2/getFuturesFollowerSettings.js +++ b/examples/apidoc/RestClientV2/getFuturesFollowerSettings.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-follower/query-settings - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-follower/query-settings +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesFollowerTraders.js b/examples/apidoc/RestClientV2/getFuturesFollowerTraders.js index 9ad859b..37a77cb 100644 --- a/examples/apidoc/RestClientV2/getFuturesFollowerTraders.js +++ b/examples/apidoc/RestClientV2/getFuturesFollowerTraders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-follower/query-traders - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-follower/query-traders +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricCandles.js b/examples/apidoc/RestClientV2/getFuturesHistoricCandles.js index a811862..9c07c07 100644 --- a/examples/apidoc/RestClientV2/getFuturesHistoricCandles.js +++ b/examples/apidoc/RestClientV2/getFuturesHistoricCandles.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/history-candles - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/history-candles +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricFundingRates.js b/examples/apidoc/RestClientV2/getFuturesHistoricFundingRates.js index c8d2969..dfb6195 100644 --- a/examples/apidoc/RestClientV2/getFuturesHistoricFundingRates.js +++ b/examples/apidoc/RestClientV2/getFuturesHistoricFundingRates.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/history-fund-rate - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/history-fund-rate +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricIndexPriceCandles.js b/examples/apidoc/RestClientV2/getFuturesHistoricIndexPriceCandles.js index adf4fee..6d1c77e 100644 --- a/examples/apidoc/RestClientV2/getFuturesHistoricIndexPriceCandles.js +++ b/examples/apidoc/RestClientV2/getFuturesHistoricIndexPriceCandles.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/history-index-candles - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/history-index-candles +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricMarkPriceCandles.js b/examples/apidoc/RestClientV2/getFuturesHistoricMarkPriceCandles.js index 59c4961..e0fa512 100644 --- a/examples/apidoc/RestClientV2/getFuturesHistoricMarkPriceCandles.js +++ b/examples/apidoc/RestClientV2/getFuturesHistoricMarkPriceCandles.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/history-mark-candles - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/history-mark-candles +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricOrderFills.js b/examples/apidoc/RestClientV2/getFuturesHistoricOrderFills.js index 9cef3f5..71c6ef6 100644 --- a/examples/apidoc/RestClientV2/getFuturesHistoricOrderFills.js +++ b/examples/apidoc/RestClientV2/getFuturesHistoricOrderFills.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/fill-history - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/fill-history +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricOrders.js b/examples/apidoc/RestClientV2/getFuturesHistoricOrders.js index 7af6a47..99ddca7 100644 --- a/examples/apidoc/RestClientV2/getFuturesHistoricOrders.js +++ b/examples/apidoc/RestClientV2/getFuturesHistoricOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/orders-history - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/orders-history +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricPlanOrders.js b/examples/apidoc/RestClientV2/getFuturesHistoricPlanOrders.js index 2d71037..180be83 100644 --- a/examples/apidoc/RestClientV2/getFuturesHistoricPlanOrders.js +++ b/examples/apidoc/RestClientV2/getFuturesHistoricPlanOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/orders-plan-history - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/orders-plan-history +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricPositions.js b/examples/apidoc/RestClientV2/getFuturesHistoricPositions.js index 623df9c..44ff98c 100644 --- a/examples/apidoc/RestClientV2/getFuturesHistoricPositions.js +++ b/examples/apidoc/RestClientV2/getFuturesHistoricPositions.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/position/history-position - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/position/history-position +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricTrades.js b/examples/apidoc/RestClientV2/getFuturesHistoricTrades.js index b347b03..41b0f35 100644 --- a/examples/apidoc/RestClientV2/getFuturesHistoricTrades.js +++ b/examples/apidoc/RestClientV2/getFuturesHistoricTrades.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/fills-history - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/fills-history +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesInterestExchangeRate.js b/examples/apidoc/RestClientV2/getFuturesInterestExchangeRate.js index 609090e..8e24134 100644 --- a/examples/apidoc/RestClientV2/getFuturesInterestExchangeRate.js +++ b/examples/apidoc/RestClientV2/getFuturesInterestExchangeRate.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/exchange-rate - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/exchange-rate +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesInterestHistory.js b/examples/apidoc/RestClientV2/getFuturesInterestHistory.js index 38ba5e8..0a6e126 100644 --- a/examples/apidoc/RestClientV2/getFuturesInterestHistory.js +++ b/examples/apidoc/RestClientV2/getFuturesInterestHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/account/interest-history - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/account/interest-history +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesInterestRateHistory.js b/examples/apidoc/RestClientV2/getFuturesInterestRateHistory.js index fc4f08e..bd87732 100644 --- a/examples/apidoc/RestClientV2/getFuturesInterestRateHistory.js +++ b/examples/apidoc/RestClientV2/getFuturesInterestRateHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/union-interest-rate-history - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/union-interest-rate-history +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesLongShortRatio.js b/examples/apidoc/RestClientV2/getFuturesLongShortRatio.js index ca3ad8d..5429a8c 100644 --- a/examples/apidoc/RestClientV2/getFuturesLongShortRatio.js +++ b/examples/apidoc/RestClientV2/getFuturesLongShortRatio.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/long-short-ratio - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/long-short-ratio +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesMergeDepth.js b/examples/apidoc/RestClientV2/getFuturesMergeDepth.js index 50d92b8..216f24b 100644 --- a/examples/apidoc/RestClientV2/getFuturesMergeDepth.js +++ b/examples/apidoc/RestClientV2/getFuturesMergeDepth.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/merge-depth - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/merge-depth +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesNextFundingTime.js b/examples/apidoc/RestClientV2/getFuturesNextFundingTime.js index 1e2fb78..008c003 100644 --- a/examples/apidoc/RestClientV2/getFuturesNextFundingTime.js +++ b/examples/apidoc/RestClientV2/getFuturesNextFundingTime.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/funding-time - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/funding-time +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesOpenCount.js b/examples/apidoc/RestClientV2/getFuturesOpenCount.js index bcf2cc2..b211beb 100644 --- a/examples/apidoc/RestClientV2/getFuturesOpenCount.js +++ b/examples/apidoc/RestClientV2/getFuturesOpenCount.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/account/open-count - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/account/open-count +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesOpenInterest.js b/examples/apidoc/RestClientV2/getFuturesOpenInterest.js index 271b81e..e9f02cc 100644 --- a/examples/apidoc/RestClientV2/getFuturesOpenInterest.js +++ b/examples/apidoc/RestClientV2/getFuturesOpenInterest.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/open-interest - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/open-interest +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesOpenOrders.js b/examples/apidoc/RestClientV2/getFuturesOpenOrders.js index fe745a5..5d2693f 100644 --- a/examples/apidoc/RestClientV2/getFuturesOpenOrders.js +++ b/examples/apidoc/RestClientV2/getFuturesOpenOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/orders-pending - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/orders-pending +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesOrder.js b/examples/apidoc/RestClientV2/getFuturesOrder.js index cd8d709..f7ec057 100644 --- a/examples/apidoc/RestClientV2/getFuturesOrder.js +++ b/examples/apidoc/RestClientV2/getFuturesOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/detail - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/detail +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesPlanOrders.js b/examples/apidoc/RestClientV2/getFuturesPlanOrders.js index d520320..72bdb15 100644 --- a/examples/apidoc/RestClientV2/getFuturesPlanOrders.js +++ b/examples/apidoc/RestClientV2/getFuturesPlanOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/orders-plan-pending - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/orders-plan-pending +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesPosition.js b/examples/apidoc/RestClientV2/getFuturesPosition.js index 18dbd67..eb4b43a 100644 --- a/examples/apidoc/RestClientV2/getFuturesPosition.js +++ b/examples/apidoc/RestClientV2/getFuturesPosition.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/position/single-position - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/position/single-position +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesPositionTier.js b/examples/apidoc/RestClientV2/getFuturesPositionTier.js index e43e954..1f72477 100644 --- a/examples/apidoc/RestClientV2/getFuturesPositionTier.js +++ b/examples/apidoc/RestClientV2/getFuturesPositionTier.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/query-position-lever - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/query-position-lever +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesPositions.js b/examples/apidoc/RestClientV2/getFuturesPositions.js index dbc5db6..9485a5a 100644 --- a/examples/apidoc/RestClientV2/getFuturesPositions.js +++ b/examples/apidoc/RestClientV2/getFuturesPositions.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/position/all-position - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/position/all-position +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesRecentTrades.js b/examples/apidoc/RestClientV2/getFuturesRecentTrades.js index fc3191c..a80f55d 100644 --- a/examples/apidoc/RestClientV2/getFuturesRecentTrades.js +++ b/examples/apidoc/RestClientV2/getFuturesRecentTrades.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/fills - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/fills +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesSubAccountAssets.js b/examples/apidoc/RestClientV2/getFuturesSubAccountAssets.js index fa69040..8ba91bb 100644 --- a/examples/apidoc/RestClientV2/getFuturesSubAccountAssets.js +++ b/examples/apidoc/RestClientV2/getFuturesSubAccountAssets.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/account/sub-account-assets - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/account/sub-account-assets +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesSymbolPrice.js b/examples/apidoc/RestClientV2/getFuturesSymbolPrice.js index 734638f..1993020 100644 --- a/examples/apidoc/RestClientV2/getFuturesSymbolPrice.js +++ b/examples/apidoc/RestClientV2/getFuturesSymbolPrice.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/symbol-price - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/symbol-price +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesTicker.js b/examples/apidoc/RestClientV2/getFuturesTicker.js index 0bd69d3..daaa8f1 100644 --- a/examples/apidoc/RestClientV2/getFuturesTicker.js +++ b/examples/apidoc/RestClientV2/getFuturesTicker.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/ticker - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/ticker +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesTraderCurrentOrder.js b/examples/apidoc/RestClientV2/getFuturesTraderCurrentOrder.js index 9fa4997..9913322 100644 --- a/examples/apidoc/RestClientV2/getFuturesTraderCurrentOrder.js +++ b/examples/apidoc/RestClientV2/getFuturesTraderCurrentOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-trader/order-current-track - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-trader/order-current-track +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesTraderFollowers.js b/examples/apidoc/RestClientV2/getFuturesTraderFollowers.js index 1449322..38bbc82 100644 --- a/examples/apidoc/RestClientV2/getFuturesTraderFollowers.js +++ b/examples/apidoc/RestClientV2/getFuturesTraderFollowers.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-trader/config-query-followers - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-trader/config-query-followers +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesTraderHistoryOrders.js b/examples/apidoc/RestClientV2/getFuturesTraderHistoryOrders.js index b9ed0dc..71bcdd0 100644 --- a/examples/apidoc/RestClientV2/getFuturesTraderHistoryOrders.js +++ b/examples/apidoc/RestClientV2/getFuturesTraderHistoryOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-trader/order-history-track - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-trader/order-history-track +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesTraderOrder.js b/examples/apidoc/RestClientV2/getFuturesTraderOrder.js index 1464926..b3e0252 100644 --- a/examples/apidoc/RestClientV2/getFuturesTraderOrder.js +++ b/examples/apidoc/RestClientV2/getFuturesTraderOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-trader/order-total-detail - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-trader/order-total-detail +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesTraderProfitHistory.js b/examples/apidoc/RestClientV2/getFuturesTraderProfitHistory.js index eb08282..bec1125 100644 --- a/examples/apidoc/RestClientV2/getFuturesTraderProfitHistory.js +++ b/examples/apidoc/RestClientV2/getFuturesTraderProfitHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-trader/profit-history-summarys - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-trader/profit-history-summarys +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesTraderProfitShare.js b/examples/apidoc/RestClientV2/getFuturesTraderProfitShare.js index 4e35c63..3ac549b 100644 --- a/examples/apidoc/RestClientV2/getFuturesTraderProfitShare.js +++ b/examples/apidoc/RestClientV2/getFuturesTraderProfitShare.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-trader/profit-details - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-trader/profit-details +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesTraderProfitShareGroup.js b/examples/apidoc/RestClientV2/getFuturesTraderProfitShareGroup.js index 58ae827..ef3e24f 100644 --- a/examples/apidoc/RestClientV2/getFuturesTraderProfitShareGroup.js +++ b/examples/apidoc/RestClientV2/getFuturesTraderProfitShareGroup.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-trader/profits-group-coin-date - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-trader/profits-group-coin-date +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesTraderProfitShareHistory.js b/examples/apidoc/RestClientV2/getFuturesTraderProfitShareHistory.js index fede5be..01e2df5 100644 --- a/examples/apidoc/RestClientV2/getFuturesTraderProfitShareHistory.js +++ b/examples/apidoc/RestClientV2/getFuturesTraderProfitShareHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-trader/profit-history-details - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-trader/profit-history-details +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesTraderSymbolSettings.js b/examples/apidoc/RestClientV2/getFuturesTraderSymbolSettings.js index 23bfee4..e8441c9 100644 --- a/examples/apidoc/RestClientV2/getFuturesTraderSymbolSettings.js +++ b/examples/apidoc/RestClientV2/getFuturesTraderSymbolSettings.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-trader/config-query-symbols - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-trader/config-query-symbols +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesTransactionRecords.js b/examples/apidoc/RestClientV2/getFuturesTransactionRecords.js index b36bc5d..cf7df58 100644 --- a/examples/apidoc/RestClientV2/getFuturesTransactionRecords.js +++ b/examples/apidoc/RestClientV2/getFuturesTransactionRecords.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/tax/future-record - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/tax/future-record +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesTriggerSubOrder.js b/examples/apidoc/RestClientV2/getFuturesTriggerSubOrder.js index 72bfc28..3245c5f 100644 --- a/examples/apidoc/RestClientV2/getFuturesTriggerSubOrder.js +++ b/examples/apidoc/RestClientV2/getFuturesTriggerSubOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/plan-sub-order - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/plan-sub-order +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesVIPFeeRate.js b/examples/apidoc/RestClientV2/getFuturesVIPFeeRate.js index f0ea200..4c19cae 100644 --- a/examples/apidoc/RestClientV2/getFuturesVIPFeeRate.js +++ b/examples/apidoc/RestClientV2/getFuturesVIPFeeRate.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/vip-fee-rate - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/vip-fee-rate +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getIsolatedMarginBorrowingRatio.js b/examples/apidoc/RestClientV2/getIsolatedMarginBorrowingRatio.js index ab5ac6b..bfdcbe1 100644 --- a/examples/apidoc/RestClientV2/getIsolatedMarginBorrowingRatio.js +++ b/examples/apidoc/RestClientV2/getIsolatedMarginBorrowingRatio.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/isolated-borrow-rate - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/isolated-borrow-rate +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getLoanCurrencies.js b/examples/apidoc/RestClientV2/getLoanCurrencies.js index 14c8bcf..6d30672 100644 --- a/examples/apidoc/RestClientV2/getLoanCurrencies.js +++ b/examples/apidoc/RestClientV2/getLoanCurrencies.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/loan/public/coinInfos - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/loan/public/coinInfos +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getLoanDebts.js b/examples/apidoc/RestClientV2/getLoanDebts.js index a96a170..8809c67 100644 --- a/examples/apidoc/RestClientV2/getLoanDebts.js +++ b/examples/apidoc/RestClientV2/getLoanDebts.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/loan/debts - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/loan/debts +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getLoanEstInterestAndBorrowable.js b/examples/apidoc/RestClientV2/getLoanEstInterestAndBorrowable.js index e7f957f..f981b32 100644 --- a/examples/apidoc/RestClientV2/getLoanEstInterestAndBorrowable.js +++ b/examples/apidoc/RestClientV2/getLoanEstInterestAndBorrowable.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/loan/public/hour-interest - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/loan/public/hour-interest +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getLoanHistory.js b/examples/apidoc/RestClientV2/getLoanHistory.js index fb93e61..59642da 100644 --- a/examples/apidoc/RestClientV2/getLoanHistory.js +++ b/examples/apidoc/RestClientV2/getLoanHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/loan/borrow-history - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/loan/borrow-history +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getLoanLiquidationRecords.js b/examples/apidoc/RestClientV2/getLoanLiquidationRecords.js index 4db54e8..42670e2 100644 --- a/examples/apidoc/RestClientV2/getLoanLiquidationRecords.js +++ b/examples/apidoc/RestClientV2/getLoanLiquidationRecords.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/loan/reduces - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/loan/reduces +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getLoanPledgeRateHistory.js b/examples/apidoc/RestClientV2/getLoanPledgeRateHistory.js index d9b57dc..6533334 100644 --- a/examples/apidoc/RestClientV2/getLoanPledgeRateHistory.js +++ b/examples/apidoc/RestClientV2/getLoanPledgeRateHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/loan/revise-history - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/loan/revise-history +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginAccountAssets.js b/examples/apidoc/RestClientV2/getMarginAccountAssets.js index 2aac869..9df3228 100644 --- a/examples/apidoc/RestClientV2/getMarginAccountAssets.js +++ b/examples/apidoc/RestClientV2/getMarginAccountAssets.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/account/assets - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/account/assets +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginBorrowHistory.js b/examples/apidoc/RestClientV2/getMarginBorrowHistory.js index f4d2820..0b0f72f 100644 --- a/examples/apidoc/RestClientV2/getMarginBorrowHistory.js +++ b/examples/apidoc/RestClientV2/getMarginBorrowHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/borrow-history - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/borrow-history +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginCurrencies.js b/examples/apidoc/RestClientV2/getMarginCurrencies.js index 2e167d1..f7edb81 100644 --- a/examples/apidoc/RestClientV2/getMarginCurrencies.js +++ b/examples/apidoc/RestClientV2/getMarginCurrencies.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/currencies - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/currencies +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginFinancialHistory.js b/examples/apidoc/RestClientV2/getMarginFinancialHistory.js index d644e63..f163401 100644 --- a/examples/apidoc/RestClientV2/getMarginFinancialHistory.js +++ b/examples/apidoc/RestClientV2/getMarginFinancialHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/financial-records - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/financial-records +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginFlashRepayResult.js b/examples/apidoc/RestClientV2/getMarginFlashRepayResult.js index 8091d1c..19b1787 100644 --- a/examples/apidoc/RestClientV2/getMarginFlashRepayResult.js +++ b/examples/apidoc/RestClientV2/getMarginFlashRepayResult.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/account/query-flash-repay-status - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/account/query-flash-repay-status +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginHistoricOrderFills.js b/examples/apidoc/RestClientV2/getMarginHistoricOrderFills.js index 9975618..74ef54a 100644 --- a/examples/apidoc/RestClientV2/getMarginHistoricOrderFills.js +++ b/examples/apidoc/RestClientV2/getMarginHistoricOrderFills.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/fills - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/fills +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginHistoricOrders.js b/examples/apidoc/RestClientV2/getMarginHistoricOrders.js index d2dc187..d0fd474 100644 --- a/examples/apidoc/RestClientV2/getMarginHistoricOrders.js +++ b/examples/apidoc/RestClientV2/getMarginHistoricOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/history-orders - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/history-orders +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginInterestHistory.js b/examples/apidoc/RestClientV2/getMarginInterestHistory.js index b578841..2e7456c 100644 --- a/examples/apidoc/RestClientV2/getMarginInterestHistory.js +++ b/examples/apidoc/RestClientV2/getMarginInterestHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/interest-history - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/interest-history +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginInterestRateAndMaxBorrowable.js b/examples/apidoc/RestClientV2/getMarginInterestRateAndMaxBorrowable.js index dc2564e..60a72a2 100644 --- a/examples/apidoc/RestClientV2/getMarginInterestRateAndMaxBorrowable.js +++ b/examples/apidoc/RestClientV2/getMarginInterestRateAndMaxBorrowable.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/interest-rate-and-limit - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/interest-rate-and-limit +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginLiquidationHistory.js b/examples/apidoc/RestClientV2/getMarginLiquidationHistory.js index 655aef1..e6dcebd 100644 --- a/examples/apidoc/RestClientV2/getMarginLiquidationHistory.js +++ b/examples/apidoc/RestClientV2/getMarginLiquidationHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/liquidation-history - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/liquidation-history +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginLiquidationOrders.js b/examples/apidoc/RestClientV2/getMarginLiquidationOrders.js index a14db9f..83408f4 100644 --- a/examples/apidoc/RestClientV2/getMarginLiquidationOrders.js +++ b/examples/apidoc/RestClientV2/getMarginLiquidationOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/liquidation-order - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/liquidation-order +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginLoanGrowthRate.js b/examples/apidoc/RestClientV2/getMarginLoanGrowthRate.js index 1eb66fc..7a20269 100644 --- a/examples/apidoc/RestClientV2/getMarginLoanGrowthRate.js +++ b/examples/apidoc/RestClientV2/getMarginLoanGrowthRate.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/loan-growth - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/loan-growth +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginMaxBorrowable.js b/examples/apidoc/RestClientV2/getMarginMaxBorrowable.js index c48be91..530dc57 100644 --- a/examples/apidoc/RestClientV2/getMarginMaxBorrowable.js +++ b/examples/apidoc/RestClientV2/getMarginMaxBorrowable.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/account/max-borrowable-amount - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/account/max-borrowable-amount +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginMaxTransferable.js b/examples/apidoc/RestClientV2/getMarginMaxTransferable.js index 38704d6..d467e22 100644 --- a/examples/apidoc/RestClientV2/getMarginMaxTransferable.js +++ b/examples/apidoc/RestClientV2/getMarginMaxTransferable.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/account/max-transfer-out-amount - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/account/max-transfer-out-amount +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginOpenOrders.js b/examples/apidoc/RestClientV2/getMarginOpenOrders.js index 8e8dbbd..bac1416 100644 --- a/examples/apidoc/RestClientV2/getMarginOpenOrders.js +++ b/examples/apidoc/RestClientV2/getMarginOpenOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/open-orders - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/open-orders +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginRepayHistory.js b/examples/apidoc/RestClientV2/getMarginRepayHistory.js index d5d78fa..20d6db7 100644 --- a/examples/apidoc/RestClientV2/getMarginRepayHistory.js +++ b/examples/apidoc/RestClientV2/getMarginRepayHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/repay-history - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/repay-history +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginRiskRate.js b/examples/apidoc/RestClientV2/getMarginRiskRate.js index 24474d6..5b27f0d 100644 --- a/examples/apidoc/RestClientV2/getMarginRiskRate.js +++ b/examples/apidoc/RestClientV2/getMarginRiskRate.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/account/risk-rate - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/account/risk-rate +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginTierConfiguration.js b/examples/apidoc/RestClientV2/getMarginTierConfiguration.js index c749223..58c17b6 100644 --- a/examples/apidoc/RestClientV2/getMarginTierConfiguration.js +++ b/examples/apidoc/RestClientV2/getMarginTierConfiguration.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/tier-data - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/tier-data +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginTransactionRecords.js b/examples/apidoc/RestClientV2/getMarginTransactionRecords.js index 2afdf6a..c2e29e7 100644 --- a/examples/apidoc/RestClientV2/getMarginTransactionRecords.js +++ b/examples/apidoc/RestClientV2/getMarginTransactionRecords.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/tax/margin-record - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/tax/margin-record +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getOngoingLoanOrders.js b/examples/apidoc/RestClientV2/getOngoingLoanOrders.js index 39c37e3..0e6f317 100644 --- a/examples/apidoc/RestClientV2/getOngoingLoanOrders.js +++ b/examples/apidoc/RestClientV2/getOngoingLoanOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/loan/ongoing-orders - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/loan/ongoing-orders +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getP2PMerchantAdvertisementList.js b/examples/apidoc/RestClientV2/getP2PMerchantAdvertisementList.js index 85d4dae..719b1c2 100644 --- a/examples/apidoc/RestClientV2/getP2PMerchantAdvertisementList.js +++ b/examples/apidoc/RestClientV2/getP2PMerchantAdvertisementList.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/p2p/advList - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/p2p/advList +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getP2PMerchantInfo.js b/examples/apidoc/RestClientV2/getP2PMerchantInfo.js index fe99f91..59e4ed0 100644 --- a/examples/apidoc/RestClientV2/getP2PMerchantInfo.js +++ b/examples/apidoc/RestClientV2/getP2PMerchantInfo.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/p2p/merchantInfo - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/p2p/merchantInfo +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getP2PMerchantList.js b/examples/apidoc/RestClientV2/getP2PMerchantList.js index 68d68ab..4351e49 100644 --- a/examples/apidoc/RestClientV2/getP2PMerchantList.js +++ b/examples/apidoc/RestClientV2/getP2PMerchantList.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/p2p/merchantList - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/p2p/merchantList +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getP2PMerchantOrders.js b/examples/apidoc/RestClientV2/getP2PMerchantOrders.js index 3830a02..9fea932 100644 --- a/examples/apidoc/RestClientV2/getP2PMerchantOrders.js +++ b/examples/apidoc/RestClientV2/getP2PMerchantOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/p2p/orderList - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/p2p/orderList +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getP2PTransactionRecords.js b/examples/apidoc/RestClientV2/getP2PTransactionRecords.js index fc9cced..9730b8a 100644 --- a/examples/apidoc/RestClientV2/getP2PTransactionRecords.js +++ b/examples/apidoc/RestClientV2/getP2PTransactionRecords.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/tax/p2p-record - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/tax/p2p-record +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getRepayHistory.js b/examples/apidoc/RestClientV2/getRepayHistory.js index fb5e97c..3942ce6 100644 --- a/examples/apidoc/RestClientV2/getRepayHistory.js +++ b/examples/apidoc/RestClientV2/getRepayHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/loan/repay-history - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/loan/repay-history +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getServerTime.js b/examples/apidoc/RestClientV2/getServerTime.js index 41b99c6..d91a284 100644 --- a/examples/apidoc/RestClientV2/getServerTime.js +++ b/examples/apidoc/RestClientV2/getServerTime.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/public/time - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/public/time +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSharkfinAccount.js b/examples/apidoc/RestClientV2/getSharkfinAccount.js index 0d5d7a4..c5cc294 100644 --- a/examples/apidoc/RestClientV2/getSharkfinAccount.js +++ b/examples/apidoc/RestClientV2/getSharkfinAccount.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/sharkfin/account - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/sharkfin/account +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSharkfinAssets.js b/examples/apidoc/RestClientV2/getSharkfinAssets.js index 5245599..76e0b3b 100644 --- a/examples/apidoc/RestClientV2/getSharkfinAssets.js +++ b/examples/apidoc/RestClientV2/getSharkfinAssets.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/sharkfin/assets - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/sharkfin/assets +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSharkfinProducts.js b/examples/apidoc/RestClientV2/getSharkfinProducts.js index ee94787..7485eb6 100644 --- a/examples/apidoc/RestClientV2/getSharkfinProducts.js +++ b/examples/apidoc/RestClientV2/getSharkfinProducts.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/sharkfin/product - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/sharkfin/product +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSharkfinRecords.js b/examples/apidoc/RestClientV2/getSharkfinRecords.js index 3c1a053..54b17af 100644 --- a/examples/apidoc/RestClientV2/getSharkfinRecords.js +++ b/examples/apidoc/RestClientV2/getSharkfinRecords.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/sharkfin/records - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/sharkfin/records +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSharkfinSubscription.js b/examples/apidoc/RestClientV2/getSharkfinSubscription.js index 50fc624..0afd6cc 100644 --- a/examples/apidoc/RestClientV2/getSharkfinSubscription.js +++ b/examples/apidoc/RestClientV2/getSharkfinSubscription.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/sharkfin/subscribe-info - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/sharkfin/subscribe-info +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSharkfinSubscriptionResult.js b/examples/apidoc/RestClientV2/getSharkfinSubscriptionResult.js index 8ba1fd4..035e721 100644 --- a/examples/apidoc/RestClientV2/getSharkfinSubscriptionResult.js +++ b/examples/apidoc/RestClientV2/getSharkfinSubscriptionResult.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/sharkfin/subscribe-result - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/sharkfin/subscribe-result +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotAccount.js b/examples/apidoc/RestClientV2/getSpotAccount.js index 6a079aa..2f88266 100644 --- a/examples/apidoc/RestClientV2/getSpotAccount.js +++ b/examples/apidoc/RestClientV2/getSpotAccount.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/account/info - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/account/info +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotAccountAssets.js b/examples/apidoc/RestClientV2/getSpotAccountAssets.js index 745828b..99245a9 100644 --- a/examples/apidoc/RestClientV2/getSpotAccountAssets.js +++ b/examples/apidoc/RestClientV2/getSpotAccountAssets.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/account/assets - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/account/assets +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotAccountBills.js b/examples/apidoc/RestClientV2/getSpotAccountBills.js index cb908ae..c5428c8 100644 --- a/examples/apidoc/RestClientV2/getSpotAccountBills.js +++ b/examples/apidoc/RestClientV2/getSpotAccountBills.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/account/bills - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/account/bills +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotBGBDeductInfo.js b/examples/apidoc/RestClientV2/getSpotBGBDeductInfo.js index 8071e30..12f27d5 100644 --- a/examples/apidoc/RestClientV2/getSpotBGBDeductInfo.js +++ b/examples/apidoc/RestClientV2/getSpotBGBDeductInfo.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/account/deduct-info - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/account/deduct-info +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotCandles.js b/examples/apidoc/RestClientV2/getSpotCandles.js index 5473646..c0a7f93 100644 --- a/examples/apidoc/RestClientV2/getSpotCandles.js +++ b/examples/apidoc/RestClientV2/getSpotCandles.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/market/candles - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/market/candles +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotCoinInfo.js b/examples/apidoc/RestClientV2/getSpotCoinInfo.js index 4616e68..accf0f7 100644 --- a/examples/apidoc/RestClientV2/getSpotCoinInfo.js +++ b/examples/apidoc/RestClientV2/getSpotCoinInfo.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/public/coins - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/public/coins +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotCurrentPlanOrders.js b/examples/apidoc/RestClientV2/getSpotCurrentPlanOrders.js index 3191bbd..2bb3c52 100644 --- a/examples/apidoc/RestClientV2/getSpotCurrentPlanOrders.js +++ b/examples/apidoc/RestClientV2/getSpotCurrentPlanOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/current-plan-order - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/current-plan-order +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotDepositAddress.js b/examples/apidoc/RestClientV2/getSpotDepositAddress.js index 94fa6a5..ef6055e 100644 --- a/examples/apidoc/RestClientV2/getSpotDepositAddress.js +++ b/examples/apidoc/RestClientV2/getSpotDepositAddress.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/wallet/deposit-address - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/wallet/deposit-address +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotDepositHistory.js b/examples/apidoc/RestClientV2/getSpotDepositHistory.js index e28d743..f794cca 100644 --- a/examples/apidoc/RestClientV2/getSpotDepositHistory.js +++ b/examples/apidoc/RestClientV2/getSpotDepositHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/wallet/deposit-records - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/wallet/deposit-records +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotFills.js b/examples/apidoc/RestClientV2/getSpotFills.js index 91b4290..1ea3729 100644 --- a/examples/apidoc/RestClientV2/getSpotFills.js +++ b/examples/apidoc/RestClientV2/getSpotFills.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/fills - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/fills +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotFollowerCurrentTraderSymbols.js b/examples/apidoc/RestClientV2/getSpotFollowerCurrentTraderSymbols.js index 78fe575..9b34a68 100644 --- a/examples/apidoc/RestClientV2/getSpotFollowerCurrentTraderSymbols.js +++ b/examples/apidoc/RestClientV2/getSpotFollowerCurrentTraderSymbols.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-follower/query-trader-symbols - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-follower/query-trader-symbols +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotFollowerHistoryOrders.js b/examples/apidoc/RestClientV2/getSpotFollowerHistoryOrders.js index 73b7a14..feb5c07 100644 --- a/examples/apidoc/RestClientV2/getSpotFollowerHistoryOrders.js +++ b/examples/apidoc/RestClientV2/getSpotFollowerHistoryOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-follower/query-history-orders - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-follower/query-history-orders +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotFollowerOpenOrders.js b/examples/apidoc/RestClientV2/getSpotFollowerOpenOrders.js index 289540d..52a473f 100644 --- a/examples/apidoc/RestClientV2/getSpotFollowerOpenOrders.js +++ b/examples/apidoc/RestClientV2/getSpotFollowerOpenOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-follower/query-current-orders - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-follower/query-current-orders +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotFollowerSettings.js b/examples/apidoc/RestClientV2/getSpotFollowerSettings.js index dfe790a..563f2f9 100644 --- a/examples/apidoc/RestClientV2/getSpotFollowerSettings.js +++ b/examples/apidoc/RestClientV2/getSpotFollowerSettings.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-follower/query-settings - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-follower/query-settings +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotFollowerTraders.js b/examples/apidoc/RestClientV2/getSpotFollowerTraders.js index ab007cf..a5254bf 100644 --- a/examples/apidoc/RestClientV2/getSpotFollowerTraders.js +++ b/examples/apidoc/RestClientV2/getSpotFollowerTraders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-follower/query-traders - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-follower/query-traders +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotFundFlow.js b/examples/apidoc/RestClientV2/getSpotFundFlow.js index 0874441..746998c 100644 --- a/examples/apidoc/RestClientV2/getSpotFundFlow.js +++ b/examples/apidoc/RestClientV2/getSpotFundFlow.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/market/fund-flow - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/market/fund-flow +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotFundNetFlowData.js b/examples/apidoc/RestClientV2/getSpotFundNetFlowData.js index 2828722..bf8af8a 100644 --- a/examples/apidoc/RestClientV2/getSpotFundNetFlowData.js +++ b/examples/apidoc/RestClientV2/getSpotFundNetFlowData.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/market/fund-net-flow - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/market/fund-net-flow +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotHistoricCandles.js b/examples/apidoc/RestClientV2/getSpotHistoricCandles.js index 60b4d93..6db5ce6 100644 --- a/examples/apidoc/RestClientV2/getSpotHistoricCandles.js +++ b/examples/apidoc/RestClientV2/getSpotHistoricCandles.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/market/history-candles - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/market/history-candles +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotHistoricOrders.js b/examples/apidoc/RestClientV2/getSpotHistoricOrders.js index 62439c5..cd41456 100644 --- a/examples/apidoc/RestClientV2/getSpotHistoricOrders.js +++ b/examples/apidoc/RestClientV2/getSpotHistoricOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/history-orders - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/history-orders +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotHistoricPlanOrders.js b/examples/apidoc/RestClientV2/getSpotHistoricPlanOrders.js index 099f507..b910ca6 100644 --- a/examples/apidoc/RestClientV2/getSpotHistoricPlanOrders.js +++ b/examples/apidoc/RestClientV2/getSpotHistoricPlanOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/history-plan-order - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/history-plan-order +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotHistoricTrades.js b/examples/apidoc/RestClientV2/getSpotHistoricTrades.js index acf8e04..4399da5 100644 --- a/examples/apidoc/RestClientV2/getSpotHistoricTrades.js +++ b/examples/apidoc/RestClientV2/getSpotHistoricTrades.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/market/fills-history - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/market/fills-history +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotMainSubTransferRecord.js b/examples/apidoc/RestClientV2/getSpotMainSubTransferRecord.js index da20b41..026d30e 100644 --- a/examples/apidoc/RestClientV2/getSpotMainSubTransferRecord.js +++ b/examples/apidoc/RestClientV2/getSpotMainSubTransferRecord.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/account/sub-main-trans-record - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/account/sub-main-trans-record +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotMergeDepth.js b/examples/apidoc/RestClientV2/getSpotMergeDepth.js index a0be8f2..b011731 100644 --- a/examples/apidoc/RestClientV2/getSpotMergeDepth.js +++ b/examples/apidoc/RestClientV2/getSpotMergeDepth.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/market/merge-depth - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/market/merge-depth +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotOpenOrders.js b/examples/apidoc/RestClientV2/getSpotOpenOrders.js index 6ce4bca..36cb83c 100644 --- a/examples/apidoc/RestClientV2/getSpotOpenOrders.js +++ b/examples/apidoc/RestClientV2/getSpotOpenOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/unfilled-orders - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/unfilled-orders +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotOrder.js b/examples/apidoc/RestClientV2/getSpotOrder.js index 03e87ee..1fd27b6 100644 --- a/examples/apidoc/RestClientV2/getSpotOrder.js +++ b/examples/apidoc/RestClientV2/getSpotOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/orderInfo - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/orderInfo +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotOrderBookDepth.js b/examples/apidoc/RestClientV2/getSpotOrderBookDepth.js index 2e41762..33635dc 100644 --- a/examples/apidoc/RestClientV2/getSpotOrderBookDepth.js +++ b/examples/apidoc/RestClientV2/getSpotOrderBookDepth.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/market/orderbook - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/market/orderbook +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotPlanSubOrder.js b/examples/apidoc/RestClientV2/getSpotPlanSubOrder.js index ff83738..884b955 100644 --- a/examples/apidoc/RestClientV2/getSpotPlanSubOrder.js +++ b/examples/apidoc/RestClientV2/getSpotPlanSubOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/plan-sub-order - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/plan-sub-order +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotRecentTrades.js b/examples/apidoc/RestClientV2/getSpotRecentTrades.js index 5187d46..8c7b64f 100644 --- a/examples/apidoc/RestClientV2/getSpotRecentTrades.js +++ b/examples/apidoc/RestClientV2/getSpotRecentTrades.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/market/fills - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/market/fills +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotSubAccountAssets.js b/examples/apidoc/RestClientV2/getSpotSubAccountAssets.js index eed9e02..a33b5a5 100644 --- a/examples/apidoc/RestClientV2/getSpotSubAccountAssets.js +++ b/examples/apidoc/RestClientV2/getSpotSubAccountAssets.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/account/subaccount-assets - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/account/subaccount-assets +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotSubDepositAddress.js b/examples/apidoc/RestClientV2/getSpotSubDepositAddress.js index 5eb8bd6..466d617 100644 --- a/examples/apidoc/RestClientV2/getSpotSubDepositAddress.js +++ b/examples/apidoc/RestClientV2/getSpotSubDepositAddress.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/wallet/subaccount-deposit-address - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/wallet/subaccount-deposit-address +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotSymbolInfo.js b/examples/apidoc/RestClientV2/getSpotSymbolInfo.js index e0efddd..55db7bf 100644 --- a/examples/apidoc/RestClientV2/getSpotSymbolInfo.js +++ b/examples/apidoc/RestClientV2/getSpotSymbolInfo.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/public/symbols - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/public/symbols +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotTicker.js b/examples/apidoc/RestClientV2/getSpotTicker.js index f1fee26..3359504 100644 --- a/examples/apidoc/RestClientV2/getSpotTicker.js +++ b/examples/apidoc/RestClientV2/getSpotTicker.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/market/tickers - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/market/tickers +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotTraderConfiguration.js b/examples/apidoc/RestClientV2/getSpotTraderConfiguration.js index 546b5ba..13bcc23 100644 --- a/examples/apidoc/RestClientV2/getSpotTraderConfiguration.js +++ b/examples/apidoc/RestClientV2/getSpotTraderConfiguration.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-trader/config-query-settings - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-trader/config-query-settings +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotTraderCurrentOrders.js b/examples/apidoc/RestClientV2/getSpotTraderCurrentOrders.js index 03b4ee7..9050f9e 100644 --- a/examples/apidoc/RestClientV2/getSpotTraderCurrentOrders.js +++ b/examples/apidoc/RestClientV2/getSpotTraderCurrentOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-trader/order-current-track - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-trader/order-current-track +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotTraderFollowers.js b/examples/apidoc/RestClientV2/getSpotTraderFollowers.js index 2b27c95..0f67c09 100644 --- a/examples/apidoc/RestClientV2/getSpotTraderFollowers.js +++ b/examples/apidoc/RestClientV2/getSpotTraderFollowers.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-trader/config-query-followers - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-trader/config-query-followers +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotTraderHistoryOrders.js b/examples/apidoc/RestClientV2/getSpotTraderHistoryOrders.js index 6aa48a8..d489537 100644 --- a/examples/apidoc/RestClientV2/getSpotTraderHistoryOrders.js +++ b/examples/apidoc/RestClientV2/getSpotTraderHistoryOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-trader/order-history-track - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-trader/order-history-track +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotTraderHistoryProfit.js b/examples/apidoc/RestClientV2/getSpotTraderHistoryProfit.js index fa821de..b4c7d02 100644 --- a/examples/apidoc/RestClientV2/getSpotTraderHistoryProfit.js +++ b/examples/apidoc/RestClientV2/getSpotTraderHistoryProfit.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-trader/profit-history-details - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-trader/profit-history-details +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotTraderOrder.js b/examples/apidoc/RestClientV2/getSpotTraderOrder.js index 54aeb01..61e71e8 100644 --- a/examples/apidoc/RestClientV2/getSpotTraderOrder.js +++ b/examples/apidoc/RestClientV2/getSpotTraderOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-trader/order-total-detail - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-trader/order-total-detail +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotTraderProfit.js b/examples/apidoc/RestClientV2/getSpotTraderProfit.js index 2391c75..57805ba 100644 --- a/examples/apidoc/RestClientV2/getSpotTraderProfit.js +++ b/examples/apidoc/RestClientV2/getSpotTraderProfit.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-trader/profit-summarys - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-trader/profit-summarys +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotTraderSymbolSettings.js b/examples/apidoc/RestClientV2/getSpotTraderSymbolSettings.js index fdfe74a..39b0642 100644 --- a/examples/apidoc/RestClientV2/getSpotTraderSymbolSettings.js +++ b/examples/apidoc/RestClientV2/getSpotTraderSymbolSettings.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-trader/config-setting-symbols - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-trader/config-setting-symbols +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotTraderUnrealizedProfit.js b/examples/apidoc/RestClientV2/getSpotTraderUnrealizedProfit.js index e516609..7aaac28 100644 --- a/examples/apidoc/RestClientV2/getSpotTraderUnrealizedProfit.js +++ b/examples/apidoc/RestClientV2/getSpotTraderUnrealizedProfit.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-trader/profit-details - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-trader/profit-details +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotTransactionRecords.js b/examples/apidoc/RestClientV2/getSpotTransactionRecords.js index 46ec672..0f2f07e 100644 --- a/examples/apidoc/RestClientV2/getSpotTransactionRecords.js +++ b/examples/apidoc/RestClientV2/getSpotTransactionRecords.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/tax/spot-record - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/tax/spot-record +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotTransferHistory.js b/examples/apidoc/RestClientV2/getSpotTransferHistory.js index 2212253..6d1e56c 100644 --- a/examples/apidoc/RestClientV2/getSpotTransferHistory.js +++ b/examples/apidoc/RestClientV2/getSpotTransferHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/account/transferRecords - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/account/transferRecords +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotTransferableCoins.js b/examples/apidoc/RestClientV2/getSpotTransferableCoins.js index 7d09b8e..5bf1e26 100644 --- a/examples/apidoc/RestClientV2/getSpotTransferableCoins.js +++ b/examples/apidoc/RestClientV2/getSpotTransferableCoins.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/wallet/transfer-coin-info - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/wallet/transfer-coin-info +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotVIPFeeRate.js b/examples/apidoc/RestClientV2/getSpotVIPFeeRate.js index 54bc25a..d7174b3 100644 --- a/examples/apidoc/RestClientV2/getSpotVIPFeeRate.js +++ b/examples/apidoc/RestClientV2/getSpotVIPFeeRate.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/market/vip-fee-rate - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/market/vip-fee-rate +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotWhaleNetFlowData.js b/examples/apidoc/RestClientV2/getSpotWhaleNetFlowData.js index b6f4007..d1c608d 100644 --- a/examples/apidoc/RestClientV2/getSpotWhaleNetFlowData.js +++ b/examples/apidoc/RestClientV2/getSpotWhaleNetFlowData.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/market/whale-net-flow - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/market/whale-net-flow +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotWithdrawalHistory.js b/examples/apidoc/RestClientV2/getSpotWithdrawalHistory.js index 3ae53e7..45202bb 100644 --- a/examples/apidoc/RestClientV2/getSpotWithdrawalHistory.js +++ b/examples/apidoc/RestClientV2/getSpotWithdrawalHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/wallet/withdrawal-records - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/wallet/withdrawal-records +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSubAccountDepositRecords.js b/examples/apidoc/RestClientV2/getSubAccountDepositRecords.js index 3df92a4..3bc456e 100644 --- a/examples/apidoc/RestClientV2/getSubAccountDepositRecords.js +++ b/examples/apidoc/RestClientV2/getSubAccountDepositRecords.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/wallet/subaccount-deposit-records - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/wallet/subaccount-deposit-records +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSubaccountApiKey.js b/examples/apidoc/RestClientV2/getSubaccountApiKey.js index db4d09a..473e06b 100644 --- a/examples/apidoc/RestClientV2/getSubaccountApiKey.js +++ b/examples/apidoc/RestClientV2/getSubaccountApiKey.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/broker/manage/subaccount-apikey-list - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/broker/manage/subaccount-apikey-list +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSubaccountEmail.js b/examples/apidoc/RestClientV2/getSubaccountEmail.js index fd08413..b8918c0 100644 --- a/examples/apidoc/RestClientV2/getSubaccountEmail.js +++ b/examples/apidoc/RestClientV2/getSubaccountEmail.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/broker/account/subaccount-email - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/broker/account/subaccount-email +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSubaccountFuturesAssets.js b/examples/apidoc/RestClientV2/getSubaccountFuturesAssets.js index 17c8c13..e013dfb 100644 --- a/examples/apidoc/RestClientV2/getSubaccountFuturesAssets.js +++ b/examples/apidoc/RestClientV2/getSubaccountFuturesAssets.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/broker/account/subaccount-future-assets - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/broker/account/subaccount-future-assets +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSubaccountSpotAssets.js b/examples/apidoc/RestClientV2/getSubaccountSpotAssets.js index c842a8e..f274da8 100644 --- a/examples/apidoc/RestClientV2/getSubaccountSpotAssets.js +++ b/examples/apidoc/RestClientV2/getSubaccountSpotAssets.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/broker/account/subaccount-spot-assets - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/broker/account/subaccount-spot-assets +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSubaccounts.js b/examples/apidoc/RestClientV2/getSubaccounts.js index e8b9cbd..ba28809 100644 --- a/examples/apidoc/RestClientV2/getSubaccounts.js +++ b/examples/apidoc/RestClientV2/getSubaccounts.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/broker/account/subaccount-list - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/broker/account/subaccount-list +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getTradeDataSupportSymbols.js b/examples/apidoc/RestClientV2/getTradeDataSupportSymbols.js index dc3f009..629cab4 100644 --- a/examples/apidoc/RestClientV2/getTradeDataSupportSymbols.js +++ b/examples/apidoc/RestClientV2/getTradeDataSupportSymbols.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/market/support-symbols - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/market/support-symbols +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getTradeRate.js b/examples/apidoc/RestClientV2/getTradeRate.js index 4f14c7b..1b6dbae 100644 --- a/examples/apidoc/RestClientV2/getTradeRate.js +++ b/examples/apidoc/RestClientV2/getTradeRate.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/common/trade-rate - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/common/trade-rate +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getVirtualSubaccountAPIKeys.js b/examples/apidoc/RestClientV2/getVirtualSubaccountAPIKeys.js index 64daf62..f638cd9 100644 --- a/examples/apidoc/RestClientV2/getVirtualSubaccountAPIKeys.js +++ b/examples/apidoc/RestClientV2/getVirtualSubaccountAPIKeys.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/user/virtual-subaccount-apikey-list - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/user/virtual-subaccount-apikey-list +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getVirtualSubaccounts.js b/examples/apidoc/RestClientV2/getVirtualSubaccounts.js index eb3bfe0..e794d06 100644 --- a/examples/apidoc/RestClientV2/getVirtualSubaccounts.js +++ b/examples/apidoc/RestClientV2/getVirtualSubaccounts.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/user/virtual-subaccount-list - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/user/virtual-subaccount-list +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/marginBatchCancelOrders.js b/examples/apidoc/RestClientV2/marginBatchCancelOrders.js index 1e6b0e5..ece8889 100644 --- a/examples/apidoc/RestClientV2/marginBatchCancelOrders.js +++ b/examples/apidoc/RestClientV2/marginBatchCancelOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/batch-cancel-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/batch-cancel-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/marginBatchSubmitOrders.js b/examples/apidoc/RestClientV2/marginBatchSubmitOrders.js index 98262c8..dfb332b 100644 --- a/examples/apidoc/RestClientV2/marginBatchSubmitOrders.js +++ b/examples/apidoc/RestClientV2/marginBatchSubmitOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/batch-place-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/batch-place-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/marginBorrow.js b/examples/apidoc/RestClientV2/marginBorrow.js index 7e988e1..e957a54 100644 --- a/examples/apidoc/RestClientV2/marginBorrow.js +++ b/examples/apidoc/RestClientV2/marginBorrow.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/account/borrow - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/account/borrow +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/marginCancelOrder.js b/examples/apidoc/RestClientV2/marginCancelOrder.js index 26d4849..c6741d0 100644 --- a/examples/apidoc/RestClientV2/marginCancelOrder.js +++ b/examples/apidoc/RestClientV2/marginCancelOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/cancel-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/cancel-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/marginFlashRepay.js b/examples/apidoc/RestClientV2/marginFlashRepay.js index ab430f9..8de5ebc 100644 --- a/examples/apidoc/RestClientV2/marginFlashRepay.js +++ b/examples/apidoc/RestClientV2/marginFlashRepay.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/account/flash-repay - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/account/flash-repay +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/marginRepay.js b/examples/apidoc/RestClientV2/marginRepay.js index 913e884..21129f3 100644 --- a/examples/apidoc/RestClientV2/marginRepay.js +++ b/examples/apidoc/RestClientV2/marginRepay.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/account/repay - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/account/repay +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/marginSubmitOrder.js b/examples/apidoc/RestClientV2/marginSubmitOrder.js index c221b6a..8e2bded 100644 --- a/examples/apidoc/RestClientV2/marginSubmitOrder.js +++ b/examples/apidoc/RestClientV2/marginSubmitOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/place-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/place-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/modifyFuturesTraderOrderTPSL.js b/examples/apidoc/RestClientV2/modifyFuturesTraderOrderTPSL.js index 27a5a88..4f67c14 100644 --- a/examples/apidoc/RestClientV2/modifyFuturesTraderOrderTPSL.js +++ b/examples/apidoc/RestClientV2/modifyFuturesTraderOrderTPSL.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-trader/order-modify-tpsl - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-trader/order-modify-tpsl +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/modifySpotTraderOrderTPSL.js b/examples/apidoc/RestClientV2/modifySpotTraderOrderTPSL.js index b635cbb..57341d1 100644 --- a/examples/apidoc/RestClientV2/modifySpotTraderOrderTPSL.js +++ b/examples/apidoc/RestClientV2/modifySpotTraderOrderTPSL.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-trader/order-modify-tpsl - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-trader/order-modify-tpsl +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/modifySubaccount.js b/examples/apidoc/RestClientV2/modifySubaccount.js index 7e0ee3d..61079fc 100644 --- a/examples/apidoc/RestClientV2/modifySubaccount.js +++ b/examples/apidoc/RestClientV2/modifySubaccount.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/broker/account/modify-subaccount - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/broker/account/modify-subaccount +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/modifySubaccountApiKey.js b/examples/apidoc/RestClientV2/modifySubaccountApiKey.js index 161b600..893ebe7 100644 --- a/examples/apidoc/RestClientV2/modifySubaccountApiKey.js +++ b/examples/apidoc/RestClientV2/modifySubaccountApiKey.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/broker/manage/modify-subaccount-apikey - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/broker/manage/modify-subaccount-apikey +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/modifySubaccountEmail.js b/examples/apidoc/RestClientV2/modifySubaccountEmail.js index 5c056e5..9b36cc4 100644 --- a/examples/apidoc/RestClientV2/modifySubaccountEmail.js +++ b/examples/apidoc/RestClientV2/modifySubaccountEmail.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/broker/account/modify-subaccount-email - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/broker/account/modify-subaccount-email +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/modifyVirtualSubaccount.js b/examples/apidoc/RestClientV2/modifyVirtualSubaccount.js index 32ab1f3..a93a36d 100644 --- a/examples/apidoc/RestClientV2/modifyVirtualSubaccount.js +++ b/examples/apidoc/RestClientV2/modifyVirtualSubaccount.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/user/modify-virtual-subaccount - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/user/modify-virtual-subaccount +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/modifyVirtualSubaccountAPIKey.js b/examples/apidoc/RestClientV2/modifyVirtualSubaccountAPIKey.js index a29acf7..fb19daa 100644 --- a/examples/apidoc/RestClientV2/modifyVirtualSubaccountAPIKey.js +++ b/examples/apidoc/RestClientV2/modifyVirtualSubaccountAPIKey.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/user/modify-virtual-subaccount-apikey - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/user/modify-virtual-subaccount-apikey +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/removeFuturesTraderFollower.js b/examples/apidoc/RestClientV2/removeFuturesTraderFollower.js index 056aacd..f528d27 100644 --- a/examples/apidoc/RestClientV2/removeFuturesTraderFollower.js +++ b/examples/apidoc/RestClientV2/removeFuturesTraderFollower.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-trader/config-remove-follower - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-trader/config-remove-follower +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/removeSpotTraderFollowers.js b/examples/apidoc/RestClientV2/removeSpotTraderFollowers.js index c423a29..93682cd 100644 --- a/examples/apidoc/RestClientV2/removeSpotTraderFollowers.js +++ b/examples/apidoc/RestClientV2/removeSpotTraderFollowers.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-trader/config-remove-follower - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-trader/config-remove-follower +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/repayLoan.js b/examples/apidoc/RestClientV2/repayLoan.js index ff62b04..58da34e 100644 --- a/examples/apidoc/RestClientV2/repayLoan.js +++ b/examples/apidoc/RestClientV2/repayLoan.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/loan/repay - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/loan/repay +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/sellSpotFollower.js b/examples/apidoc/RestClientV2/sellSpotFollower.js index f22d172..9d2702c 100644 --- a/examples/apidoc/RestClientV2/sellSpotFollower.js +++ b/examples/apidoc/RestClientV2/sellSpotFollower.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-follower/order-close-tracking - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-follower/order-close-tracking +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/sellSpotTrader.js b/examples/apidoc/RestClientV2/sellSpotTrader.js index b1444a9..79dbedb 100644 --- a/examples/apidoc/RestClientV2/sellSpotTrader.js +++ b/examples/apidoc/RestClientV2/sellSpotTrader.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-trader/order-close-tracking - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-trader/order-close-tracking +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/setFuturesAssetMode.js b/examples/apidoc/RestClientV2/setFuturesAssetMode.js index 9802c37..61fc855 100644 --- a/examples/apidoc/RestClientV2/setFuturesAssetMode.js +++ b/examples/apidoc/RestClientV2/setFuturesAssetMode.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/account/set-asset-mode - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/account/set-asset-mode +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/setFuturesLeverage.js b/examples/apidoc/RestClientV2/setFuturesLeverage.js index 04734be..3fccb5a 100644 --- a/examples/apidoc/RestClientV2/setFuturesLeverage.js +++ b/examples/apidoc/RestClientV2/setFuturesLeverage.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/account/set-leverage - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/account/set-leverage +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/setFuturesMarginMode.js b/examples/apidoc/RestClientV2/setFuturesMarginMode.js index 5ca224c..42e20b0 100644 --- a/examples/apidoc/RestClientV2/setFuturesMarginMode.js +++ b/examples/apidoc/RestClientV2/setFuturesMarginMode.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/account/set-margin-mode - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/account/set-margin-mode +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/setFuturesPositionAutoMargin.js b/examples/apidoc/RestClientV2/setFuturesPositionAutoMargin.js index 236f792..938d91f 100644 --- a/examples/apidoc/RestClientV2/setFuturesPositionAutoMargin.js +++ b/examples/apidoc/RestClientV2/setFuturesPositionAutoMargin.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/account/set-auto-margin - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/account/set-auto-margin +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/setFuturesPositionMargin.js b/examples/apidoc/RestClientV2/setFuturesPositionMargin.js index 3df8d31..80809d5 100644 --- a/examples/apidoc/RestClientV2/setFuturesPositionMargin.js +++ b/examples/apidoc/RestClientV2/setFuturesPositionMargin.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/account/set-margin - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/account/set-margin +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/setFuturesPositionMode.js b/examples/apidoc/RestClientV2/setFuturesPositionMode.js index 4c7d999..a0751ec 100644 --- a/examples/apidoc/RestClientV2/setFuturesPositionMode.js +++ b/examples/apidoc/RestClientV2/setFuturesPositionMode.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/account/set-position-mode - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/account/set-position-mode +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotBatchCancelOrders.js b/examples/apidoc/RestClientV2/spotBatchCancelOrders.js index 176ac5f..7a5d7cd 100644 --- a/examples/apidoc/RestClientV2/spotBatchCancelOrders.js +++ b/examples/apidoc/RestClientV2/spotBatchCancelOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/batch-cancel-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/batch-cancel-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotBatchCancelandSubmitOrder.js b/examples/apidoc/RestClientV2/spotBatchCancelandSubmitOrder.js index 8cec9f5..b127836 100644 --- a/examples/apidoc/RestClientV2/spotBatchCancelandSubmitOrder.js +++ b/examples/apidoc/RestClientV2/spotBatchCancelandSubmitOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/batch-cancel-replace-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/batch-cancel-replace-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotBatchSubmitOrders.js b/examples/apidoc/RestClientV2/spotBatchSubmitOrders.js index eead0fe..34bb04e 100644 --- a/examples/apidoc/RestClientV2/spotBatchSubmitOrders.js +++ b/examples/apidoc/RestClientV2/spotBatchSubmitOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/batch-orders - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/batch-orders +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotCancelOrder.js b/examples/apidoc/RestClientV2/spotCancelOrder.js index d85ddf5..fd3c130 100644 --- a/examples/apidoc/RestClientV2/spotCancelOrder.js +++ b/examples/apidoc/RestClientV2/spotCancelOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/cancel-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/cancel-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotCancelPlanOrder.js b/examples/apidoc/RestClientV2/spotCancelPlanOrder.js index 623894c..6786b1c 100644 --- a/examples/apidoc/RestClientV2/spotCancelPlanOrder.js +++ b/examples/apidoc/RestClientV2/spotCancelPlanOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/cancel-plan-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/cancel-plan-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotCancelPlanOrders.js b/examples/apidoc/RestClientV2/spotCancelPlanOrders.js index e4c3f0c..f62fd59 100644 --- a/examples/apidoc/RestClientV2/spotCancelPlanOrders.js +++ b/examples/apidoc/RestClientV2/spotCancelPlanOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/batch-cancel-plan-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/batch-cancel-plan-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotCancelSymbolOrder.js b/examples/apidoc/RestClientV2/spotCancelSymbolOrder.js index 48c47a5..1ee5b39 100644 --- a/examples/apidoc/RestClientV2/spotCancelSymbolOrder.js +++ b/examples/apidoc/RestClientV2/spotCancelSymbolOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/cancel-symbol-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/cancel-symbol-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotCancelWithdrawal.js b/examples/apidoc/RestClientV2/spotCancelWithdrawal.js index 7d7005c..991d72e 100644 --- a/examples/apidoc/RestClientV2/spotCancelWithdrawal.js +++ b/examples/apidoc/RestClientV2/spotCancelWithdrawal.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/wallet/cancel-withdrawal - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/wallet/cancel-withdrawal +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotCancelandSubmitOrder.js b/examples/apidoc/RestClientV2/spotCancelandSubmitOrder.js index 9e163f0..96b881a 100644 --- a/examples/apidoc/RestClientV2/spotCancelandSubmitOrder.js +++ b/examples/apidoc/RestClientV2/spotCancelandSubmitOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/cancel-replace-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/cancel-replace-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotModifyDepositAccount.js b/examples/apidoc/RestClientV2/spotModifyDepositAccount.js index 69bff2f..cd683e2 100644 --- a/examples/apidoc/RestClientV2/spotModifyDepositAccount.js +++ b/examples/apidoc/RestClientV2/spotModifyDepositAccount.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/wallet/modify-deposit-account - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/wallet/modify-deposit-account +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotModifyPlanOrder.js b/examples/apidoc/RestClientV2/spotModifyPlanOrder.js index 0649d92..bab61b3 100644 --- a/examples/apidoc/RestClientV2/spotModifyPlanOrder.js +++ b/examples/apidoc/RestClientV2/spotModifyPlanOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/modify-plan-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/modify-plan-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotSubTransfer.js b/examples/apidoc/RestClientV2/spotSubTransfer.js index 8156af9..956fff6 100644 --- a/examples/apidoc/RestClientV2/spotSubTransfer.js +++ b/examples/apidoc/RestClientV2/spotSubTransfer.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/wallet/subaccount-transfer - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/wallet/subaccount-transfer +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotSubmitOrder.js b/examples/apidoc/RestClientV2/spotSubmitOrder.js index 673860c..d9a3042 100644 --- a/examples/apidoc/RestClientV2/spotSubmitOrder.js +++ b/examples/apidoc/RestClientV2/spotSubmitOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/place-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/place-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotSubmitPlanOrder.js b/examples/apidoc/RestClientV2/spotSubmitPlanOrder.js index 6875c7e..d62cdd2 100644 --- a/examples/apidoc/RestClientV2/spotSubmitPlanOrder.js +++ b/examples/apidoc/RestClientV2/spotSubmitPlanOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/place-plan-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/place-plan-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotSwitchBGBDeduct.js b/examples/apidoc/RestClientV2/spotSwitchBGBDeduct.js index ab29a32..b4f6cf1 100644 --- a/examples/apidoc/RestClientV2/spotSwitchBGBDeduct.js +++ b/examples/apidoc/RestClientV2/spotSwitchBGBDeduct.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/account/switch-deduct - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/account/switch-deduct +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotTransfer.js b/examples/apidoc/RestClientV2/spotTransfer.js index a07c3b8..c4499a3 100644 --- a/examples/apidoc/RestClientV2/spotTransfer.js +++ b/examples/apidoc/RestClientV2/spotTransfer.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/wallet/transfer - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/wallet/transfer +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotWithdraw.js b/examples/apidoc/RestClientV2/spotWithdraw.js index 1862419..02f36c8 100644 --- a/examples/apidoc/RestClientV2/spotWithdraw.js +++ b/examples/apidoc/RestClientV2/spotWithdraw.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/wallet/withdrawal - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/wallet/withdrawal +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/subaccountDepositRecords.js b/examples/apidoc/RestClientV2/subaccountDepositRecords.js index 2957ca6..306ffbe 100644 --- a/examples/apidoc/RestClientV2/subaccountDepositRecords.js +++ b/examples/apidoc/RestClientV2/subaccountDepositRecords.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/broker/subaccount-deposit - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/broker/subaccount-deposit +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/subaccountSetAutoTransfer.js b/examples/apidoc/RestClientV2/subaccountSetAutoTransfer.js index 060412b..96949ae 100644 --- a/examples/apidoc/RestClientV2/subaccountSetAutoTransfer.js +++ b/examples/apidoc/RestClientV2/subaccountSetAutoTransfer.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/broker/account/set-subaccount-autotransfer - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/broker/account/set-subaccount-autotransfer +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/subaccountWithdrawal.js b/examples/apidoc/RestClientV2/subaccountWithdrawal.js index 1213c93..5a1ef58 100644 --- a/examples/apidoc/RestClientV2/subaccountWithdrawal.js +++ b/examples/apidoc/RestClientV2/subaccountWithdrawal.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/broker/account/subaccount-withdrawal - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/broker/account/subaccount-withdrawal +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/subaccountWithdrawalRecords.js b/examples/apidoc/RestClientV2/subaccountWithdrawalRecords.js index d8b8c76..a9a16c0 100644 --- a/examples/apidoc/RestClientV2/subaccountWithdrawalRecords.js +++ b/examples/apidoc/RestClientV2/subaccountWithdrawalRecords.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/broker/subaccount-withdrawal - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/broker/subaccount-withdrawal +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/subscribeSharkfin.js b/examples/apidoc/RestClientV2/subscribeSharkfin.js index 5e69da1..bdbc328 100644 --- a/examples/apidoc/RestClientV2/subscribeSharkfin.js +++ b/examples/apidoc/RestClientV2/subscribeSharkfin.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/sharkfin/subscribe - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/sharkfin/subscribe +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/unfollowFuturesTrader.js b/examples/apidoc/RestClientV2/unfollowFuturesTrader.js index 6de9d0a..696a28e 100644 --- a/examples/apidoc/RestClientV2/unfollowFuturesTrader.js +++ b/examples/apidoc/RestClientV2/unfollowFuturesTrader.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-follower/cancel-trader - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-follower/cancel-trader +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/unfollowSpotTrader.js b/examples/apidoc/RestClientV2/unfollowSpotTrader.js index 8a0756f..d3d6677 100644 --- a/examples/apidoc/RestClientV2/unfollowSpotTrader.js +++ b/examples/apidoc/RestClientV2/unfollowSpotTrader.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-follower/cancel-trader - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-follower/cancel-trader +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/updateFuturesFollowerSettings.js b/examples/apidoc/RestClientV2/updateFuturesFollowerSettings.js index 83da6cd..fa5944e 100644 --- a/examples/apidoc/RestClientV2/updateFuturesFollowerSettings.js +++ b/examples/apidoc/RestClientV2/updateFuturesFollowerSettings.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-follower/settings - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-follower/settings +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/updateFuturesFollowerTPSL.js b/examples/apidoc/RestClientV2/updateFuturesFollowerTPSL.js index ee4de79..dcf987c 100644 --- a/examples/apidoc/RestClientV2/updateFuturesFollowerTPSL.js +++ b/examples/apidoc/RestClientV2/updateFuturesFollowerTPSL.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-follower/setting-tpsl - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-follower/setting-tpsl +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/updateFuturesTraderGlobalSettings.js b/examples/apidoc/RestClientV2/updateFuturesTraderGlobalSettings.js index 323e120..78b40aa 100644 --- a/examples/apidoc/RestClientV2/updateFuturesTraderGlobalSettings.js +++ b/examples/apidoc/RestClientV2/updateFuturesTraderGlobalSettings.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-trader/config-settings-base - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-trader/config-settings-base +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/updateFuturesTraderSymbolSettings.js b/examples/apidoc/RestClientV2/updateFuturesTraderSymbolSettings.js index 1420f03..207569a 100644 --- a/examples/apidoc/RestClientV2/updateFuturesTraderSymbolSettings.js +++ b/examples/apidoc/RestClientV2/updateFuturesTraderSymbolSettings.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-trader/config-setting-symbols - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-trader/config-setting-symbols +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/updateLoanPledgeRate.js b/examples/apidoc/RestClientV2/updateLoanPledgeRate.js index d6ee388..ab8b426 100644 --- a/examples/apidoc/RestClientV2/updateLoanPledgeRate.js +++ b/examples/apidoc/RestClientV2/updateLoanPledgeRate.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/loan/revise-pledge - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/loan/revise-pledge +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/updateSpotFollowerSettings.js b/examples/apidoc/RestClientV2/updateSpotFollowerSettings.js index 42b21e6..9770e9c 100644 --- a/examples/apidoc/RestClientV2/updateSpotFollowerSettings.js +++ b/examples/apidoc/RestClientV2/updateSpotFollowerSettings.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-follower/settings - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-follower/settings +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/updateSpotFollowerTPSL.js b/examples/apidoc/RestClientV2/updateSpotFollowerTPSL.js index a2ec7e7..0700689 100644 --- a/examples/apidoc/RestClientV2/updateSpotFollowerTPSL.js +++ b/examples/apidoc/RestClientV2/updateSpotFollowerTPSL.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-follower/setting-tpsl - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-follower/setting-tpsl +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/batchModifyOrders.js b/examples/apidoc/RestClientV3/batchModifyOrders.js index a4e3832..8f1c3c3 100644 --- a/examples/apidoc/RestClientV3/batchModifyOrders.js +++ b/examples/apidoc/RestClientV3/batchModifyOrders.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/trade/batch-modify-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/batch-modify-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/bindLoanUid.js b/examples/apidoc/RestClientV3/bindLoanUid.js index 35df10d..83b3b0b 100644 --- a/examples/apidoc/RestClientV3/bindLoanUid.js +++ b/examples/apidoc/RestClientV3/bindLoanUid.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/ins-loan/bind-uid - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/ins-loan/bind-uid +// METHOD: POST +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/cancelAllOrders.js b/examples/apidoc/RestClientV3/cancelAllOrders.js index 55bd4a1..1842208 100644 --- a/examples/apidoc/RestClientV3/cancelAllOrders.js +++ b/examples/apidoc/RestClientV3/cancelAllOrders.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/trade/cancel-symbol-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/cancel-symbol-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/cancelBatchOrders.js b/examples/apidoc/RestClientV3/cancelBatchOrders.js index d36a415..65b05c9 100644 --- a/examples/apidoc/RestClientV3/cancelBatchOrders.js +++ b/examples/apidoc/RestClientV3/cancelBatchOrders.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/trade/cancel-batch - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/cancel-batch +// METHOD: POST +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/cancelOrder.js b/examples/apidoc/RestClientV3/cancelOrder.js index 221a5ab..1f0e8f9 100644 --- a/examples/apidoc/RestClientV3/cancelOrder.js +++ b/examples/apidoc/RestClientV3/cancelOrder.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/trade/cancel-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/cancel-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/cancelStrategyOrder.js b/examples/apidoc/RestClientV3/cancelStrategyOrder.js index 2f1de6e..bc4ac9c 100644 --- a/examples/apidoc/RestClientV3/cancelStrategyOrder.js +++ b/examples/apidoc/RestClientV3/cancelStrategyOrder.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/trade/cancel-strategy-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/cancel-strategy-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/closeAllPositions.js b/examples/apidoc/RestClientV3/closeAllPositions.js index 3dd57dc..d2feb52 100644 --- a/examples/apidoc/RestClientV3/closeAllPositions.js +++ b/examples/apidoc/RestClientV3/closeAllPositions.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/trade/close-positions - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/close-positions +// METHOD: POST +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/countdownCancelAll.js b/examples/apidoc/RestClientV3/countdownCancelAll.js index a049a9a..13f22cd 100644 --- a/examples/apidoc/RestClientV3/countdownCancelAll.js +++ b/examples/apidoc/RestClientV3/countdownCancelAll.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/trade/countdown-cancel-all - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/countdown-cancel-all +// METHOD: POST +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/createSubAccount.js b/examples/apidoc/RestClientV3/createSubAccount.js index c21ff6a..a302012 100644 --- a/examples/apidoc/RestClientV3/createSubAccount.js +++ b/examples/apidoc/RestClientV3/createSubAccount.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/user/create-sub - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/user/create-sub +// METHOD: POST +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/createSubAccountApiKey.js b/examples/apidoc/RestClientV3/createSubAccountApiKey.js index 53bc722..b4ef1ad 100644 --- a/examples/apidoc/RestClientV3/createSubAccountApiKey.js +++ b/examples/apidoc/RestClientV3/createSubAccountApiKey.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/user/create-sub-api - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/user/create-sub-api +// METHOD: POST +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/deleteSubAccountApiKey.js b/examples/apidoc/RestClientV3/deleteSubAccountApiKey.js index fd2472a..eb1d30c 100644 --- a/examples/apidoc/RestClientV3/deleteSubAccountApiKey.js +++ b/examples/apidoc/RestClientV3/deleteSubAccountApiKey.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/user/delete-sub-api - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/user/delete-sub-api +// METHOD: POST +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/freezeSubAccount.js b/examples/apidoc/RestClientV3/freezeSubAccount.js index 8a1a833..31b9be1 100644 --- a/examples/apidoc/RestClientV3/freezeSubAccount.js +++ b/examples/apidoc/RestClientV3/freezeSubAccount.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/user/freeze-sub - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/user/freeze-sub +// METHOD: POST +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getAccountSettings.js b/examples/apidoc/RestClientV3/getAccountSettings.js index 45902e2..4972b20 100644 --- a/examples/apidoc/RestClientV3/getAccountSettings.js +++ b/examples/apidoc/RestClientV3/getAccountSettings.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/account/settings - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/settings +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getBalances.js b/examples/apidoc/RestClientV3/getBalances.js index 18d6329..5ae13bf 100644 --- a/examples/apidoc/RestClientV3/getBalances.js +++ b/examples/apidoc/RestClientV3/getBalances.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/account/assets - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/assets +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getCandles.js b/examples/apidoc/RestClientV3/getCandles.js index 949e2ce..82072bb 100644 --- a/examples/apidoc/RestClientV3/getCandles.js +++ b/examples/apidoc/RestClientV3/getCandles.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/market/candles - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/market/candles +// METHOD: GET +// PUBLIC: YES const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getContractsOi.js b/examples/apidoc/RestClientV3/getContractsOi.js index 90b4f4c..bfc6629 100644 --- a/examples/apidoc/RestClientV3/getContractsOi.js +++ b/examples/apidoc/RestClientV3/getContractsOi.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/market/oi-limit - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/market/oi-limit +// METHOD: GET +// PUBLIC: YES const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getConvertRecords.js b/examples/apidoc/RestClientV3/getConvertRecords.js index 18a7c5d..8782b18 100644 --- a/examples/apidoc/RestClientV3/getConvertRecords.js +++ b/examples/apidoc/RestClientV3/getConvertRecords.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/account/convert-records - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/convert-records +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getCurrentFundingRate.js b/examples/apidoc/RestClientV3/getCurrentFundingRate.js index 5df9028..a62bb57 100644 --- a/examples/apidoc/RestClientV3/getCurrentFundingRate.js +++ b/examples/apidoc/RestClientV3/getCurrentFundingRate.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/market/current-fund-rate - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/market/current-fund-rate +// METHOD: GET +// PUBLIC: YES const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getCurrentPosition.js b/examples/apidoc/RestClientV3/getCurrentPosition.js index 7dc4ac4..4af5845 100644 --- a/examples/apidoc/RestClientV3/getCurrentPosition.js +++ b/examples/apidoc/RestClientV3/getCurrentPosition.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/position/current-position - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/position/current-position +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getDeductInfo.js b/examples/apidoc/RestClientV3/getDeductInfo.js index 64f5339..b7888fe 100644 --- a/examples/apidoc/RestClientV3/getDeductInfo.js +++ b/examples/apidoc/RestClientV3/getDeductInfo.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/account/deduct-info - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/deduct-info +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getDepositAddress.js b/examples/apidoc/RestClientV3/getDepositAddress.js index 7a743fb..fe1680e 100644 --- a/examples/apidoc/RestClientV3/getDepositAddress.js +++ b/examples/apidoc/RestClientV3/getDepositAddress.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/account/deposit-address - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/deposit-address +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getDepositRecords.js b/examples/apidoc/RestClientV3/getDepositRecords.js index f28e07a..384aeb8 100644 --- a/examples/apidoc/RestClientV3/getDepositRecords.js +++ b/examples/apidoc/RestClientV3/getDepositRecords.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/account/deposit-records - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/deposit-records +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getDiscountRate.js b/examples/apidoc/RestClientV3/getDiscountRate.js index b214736..fec9ec8 100644 --- a/examples/apidoc/RestClientV3/getDiscountRate.js +++ b/examples/apidoc/RestClientV3/getDiscountRate.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/market/discount-rate - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/market/discount-rate +// METHOD: GET +// PUBLIC: YES const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getFeeRate.js b/examples/apidoc/RestClientV3/getFeeRate.js index acf80e5..3e8fe1a 100644 --- a/examples/apidoc/RestClientV3/getFeeRate.js +++ b/examples/apidoc/RestClientV3/getFeeRate.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/account/fee-rate - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/fee-rate +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getFills.js b/examples/apidoc/RestClientV3/getFills.js index f19d390..e1a2de1 100644 --- a/examples/apidoc/RestClientV3/getFills.js +++ b/examples/apidoc/RestClientV3/getFills.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/market/fills - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/market/fills +// METHOD: GET +// PUBLIC: YES const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getFinancialRecords.js b/examples/apidoc/RestClientV3/getFinancialRecords.js index ff8f8ea..6395f3c 100644 --- a/examples/apidoc/RestClientV3/getFinancialRecords.js +++ b/examples/apidoc/RestClientV3/getFinancialRecords.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/account/financial-records - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/financial-records +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getFundingAssets.js b/examples/apidoc/RestClientV3/getFundingAssets.js index 85ebd67..2160b79 100644 --- a/examples/apidoc/RestClientV3/getFundingAssets.js +++ b/examples/apidoc/RestClientV3/getFundingAssets.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/account/funding-assets - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/funding-assets +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getHistoryCandles.js b/examples/apidoc/RestClientV3/getHistoryCandles.js index 7baab6b..f172c75 100644 --- a/examples/apidoc/RestClientV3/getHistoryCandles.js +++ b/examples/apidoc/RestClientV3/getHistoryCandles.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/market/history-candles - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/market/history-candles +// METHOD: GET +// PUBLIC: YES const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getHistoryFundingRate.js b/examples/apidoc/RestClientV3/getHistoryFundingRate.js index 44b4369..2b3a36a 100644 --- a/examples/apidoc/RestClientV3/getHistoryFundingRate.js +++ b/examples/apidoc/RestClientV3/getHistoryFundingRate.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/market/history-fund-rate - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/market/history-fund-rate +// METHOD: GET +// PUBLIC: YES const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getHistoryOrders.js b/examples/apidoc/RestClientV3/getHistoryOrders.js index 63b4d0f..1d38089 100644 --- a/examples/apidoc/RestClientV3/getHistoryOrders.js +++ b/examples/apidoc/RestClientV3/getHistoryOrders.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/trade/history-orders - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/history-orders +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getHistoryStrategyOrders.js b/examples/apidoc/RestClientV3/getHistoryStrategyOrders.js index 0fc81c9..cc60a89 100644 --- a/examples/apidoc/RestClientV3/getHistoryStrategyOrders.js +++ b/examples/apidoc/RestClientV3/getHistoryStrategyOrders.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/trade/history-strategy-orders - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/history-strategy-orders +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getInstruments.js b/examples/apidoc/RestClientV3/getInstruments.js index 6f77e1c..c0d7fa9 100644 --- a/examples/apidoc/RestClientV3/getInstruments.js +++ b/examples/apidoc/RestClientV3/getInstruments.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/market/instruments - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/market/instruments +// METHOD: GET +// PUBLIC: YES const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getLoanLTVConvert.js b/examples/apidoc/RestClientV3/getLoanLTVConvert.js index 88108a0..3e2a590 100644 --- a/examples/apidoc/RestClientV3/getLoanLTVConvert.js +++ b/examples/apidoc/RestClientV3/getLoanLTVConvert.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/ins-loan/ltv-convert - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/ins-loan/ltv-convert +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getLoanMarginCoinInfo.js b/examples/apidoc/RestClientV3/getLoanMarginCoinInfo.js index dd6edc2..f35d00f 100644 --- a/examples/apidoc/RestClientV3/getLoanMarginCoinInfo.js +++ b/examples/apidoc/RestClientV3/getLoanMarginCoinInfo.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/ins-loan/ensure-coins-convert - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/ins-loan/ensure-coins-convert +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getLoanOrder.js b/examples/apidoc/RestClientV3/getLoanOrder.js index a469dfb..94869f1 100644 --- a/examples/apidoc/RestClientV3/getLoanOrder.js +++ b/examples/apidoc/RestClientV3/getLoanOrder.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/ins-loan/loan-order - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/ins-loan/loan-order +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getLoanProductInfo.js b/examples/apidoc/RestClientV3/getLoanProductInfo.js index 77b257b..9231355 100644 --- a/examples/apidoc/RestClientV3/getLoanProductInfo.js +++ b/examples/apidoc/RestClientV3/getLoanProductInfo.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/ins-loan/product-infos - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/ins-loan/product-infos +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getLoanRepaidHistory.js b/examples/apidoc/RestClientV3/getLoanRepaidHistory.js index b09ac31..1c7f97a 100644 --- a/examples/apidoc/RestClientV3/getLoanRepaidHistory.js +++ b/examples/apidoc/RestClientV3/getLoanRepaidHistory.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/ins-loan/repaid-history - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/ins-loan/repaid-history +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getLoanRiskUnit.js b/examples/apidoc/RestClientV3/getLoanRiskUnit.js index 9b425c3..8a79303 100644 --- a/examples/apidoc/RestClientV3/getLoanRiskUnit.js +++ b/examples/apidoc/RestClientV3/getLoanRiskUnit.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/ins-loan/risk-unit - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/ins-loan/risk-unit +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getLoanSymbols.js b/examples/apidoc/RestClientV3/getLoanSymbols.js index 390712f..e3caca3 100644 --- a/examples/apidoc/RestClientV3/getLoanSymbols.js +++ b/examples/apidoc/RestClientV3/getLoanSymbols.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/ins-loan/symbols - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/ins-loan/symbols +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getLoanTransfered.js b/examples/apidoc/RestClientV3/getLoanTransfered.js index f5e66b6..6abdca4 100644 --- a/examples/apidoc/RestClientV3/getLoanTransfered.js +++ b/examples/apidoc/RestClientV3/getLoanTransfered.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/ins-loan/transfered - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/ins-loan/transfered +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getMarginLoans.js b/examples/apidoc/RestClientV3/getMarginLoans.js index 10c639e..8888f52 100644 --- a/examples/apidoc/RestClientV3/getMarginLoans.js +++ b/examples/apidoc/RestClientV3/getMarginLoans.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/market/margin-loans - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/market/margin-loans +// METHOD: GET +// PUBLIC: YES const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getMaxOpenAvailable.js b/examples/apidoc/RestClientV3/getMaxOpenAvailable.js index 5b73ab7..f95e19e 100644 --- a/examples/apidoc/RestClientV3/getMaxOpenAvailable.js +++ b/examples/apidoc/RestClientV3/getMaxOpenAvailable.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/account/max-open-available - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/max-open-available +// METHOD: POST +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getOpenInterest.js b/examples/apidoc/RestClientV3/getOpenInterest.js index 2a6b63d..92031f7 100644 --- a/examples/apidoc/RestClientV3/getOpenInterest.js +++ b/examples/apidoc/RestClientV3/getOpenInterest.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/market/open-interest - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/market/open-interest +// METHOD: GET +// PUBLIC: YES const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getOrderBook.js b/examples/apidoc/RestClientV3/getOrderBook.js index e1cbefe..be5a3c0 100644 --- a/examples/apidoc/RestClientV3/getOrderBook.js +++ b/examples/apidoc/RestClientV3/getOrderBook.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/market/orderbook - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/market/orderbook +// METHOD: GET +// PUBLIC: YES const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getOrderInfo.js b/examples/apidoc/RestClientV3/getOrderInfo.js index ada47a8..97e9637 100644 --- a/examples/apidoc/RestClientV3/getOrderInfo.js +++ b/examples/apidoc/RestClientV3/getOrderInfo.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/trade/order-info - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/order-info +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getPaymentCoins.js b/examples/apidoc/RestClientV3/getPaymentCoins.js index 4052ccf..5ecf9b8 100644 --- a/examples/apidoc/RestClientV3/getPaymentCoins.js +++ b/examples/apidoc/RestClientV3/getPaymentCoins.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/account/payment-coins - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/payment-coins +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getPositionHistory.js b/examples/apidoc/RestClientV3/getPositionHistory.js index f6b3512..b25cea4 100644 --- a/examples/apidoc/RestClientV3/getPositionHistory.js +++ b/examples/apidoc/RestClientV3/getPositionHistory.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/position/history-position - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/position/history-position +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getPositionTier.js b/examples/apidoc/RestClientV3/getPositionTier.js index 6e06e87..e9825f9 100644 --- a/examples/apidoc/RestClientV3/getPositionTier.js +++ b/examples/apidoc/RestClientV3/getPositionTier.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/market/position-tier - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/market/position-tier +// METHOD: GET +// PUBLIC: YES const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getRepayableCoins.js b/examples/apidoc/RestClientV3/getRepayableCoins.js index 7767ae9..a8c8f13 100644 --- a/examples/apidoc/RestClientV3/getRepayableCoins.js +++ b/examples/apidoc/RestClientV3/getRepayableCoins.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/account/repayable-coins - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/repayable-coins +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getRiskReserve.js b/examples/apidoc/RestClientV3/getRiskReserve.js index 7866533..caf209a 100644 --- a/examples/apidoc/RestClientV3/getRiskReserve.js +++ b/examples/apidoc/RestClientV3/getRiskReserve.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/market/risk-reserve - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/market/risk-reserve +// METHOD: GET +// PUBLIC: YES const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getServerTime.js b/examples/apidoc/RestClientV3/getServerTime.js index cf8c1a0..d01fe48 100644 --- a/examples/apidoc/RestClientV3/getServerTime.js +++ b/examples/apidoc/RestClientV3/getServerTime.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/public/time - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/public/time +// METHOD: GET +// PUBLIC: YES const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getSubAccountApiKeys.js b/examples/apidoc/RestClientV3/getSubAccountApiKeys.js index 38d4491..42fbbb2 100644 --- a/examples/apidoc/RestClientV3/getSubAccountApiKeys.js +++ b/examples/apidoc/RestClientV3/getSubAccountApiKeys.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/user/sub-api-list - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/user/sub-api-list +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getSubAccountList.js b/examples/apidoc/RestClientV3/getSubAccountList.js index e94c9a7..e200761 100644 --- a/examples/apidoc/RestClientV3/getSubAccountList.js +++ b/examples/apidoc/RestClientV3/getSubAccountList.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/user/sub-list - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/user/sub-list +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getSubDepositAddress.js b/examples/apidoc/RestClientV3/getSubDepositAddress.js index ae5fa49..85116d3 100644 --- a/examples/apidoc/RestClientV3/getSubDepositAddress.js +++ b/examples/apidoc/RestClientV3/getSubDepositAddress.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/account/sub-deposit-address - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/sub-deposit-address +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getSubDepositRecords.js b/examples/apidoc/RestClientV3/getSubDepositRecords.js index ccc644d..aa6508d 100644 --- a/examples/apidoc/RestClientV3/getSubDepositRecords.js +++ b/examples/apidoc/RestClientV3/getSubDepositRecords.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/account/sub-deposit-records - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/sub-deposit-records +// METHOD: POST +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getSubTransferRecords.js b/examples/apidoc/RestClientV3/getSubTransferRecords.js index 413f871..f0f86b7 100644 --- a/examples/apidoc/RestClientV3/getSubTransferRecords.js +++ b/examples/apidoc/RestClientV3/getSubTransferRecords.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/account/sub-transfer-record - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/sub-transfer-record +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getSubUnifiedAssets.js b/examples/apidoc/RestClientV3/getSubUnifiedAssets.js index 894f5f1..228d79b 100644 --- a/examples/apidoc/RestClientV3/getSubUnifiedAssets.js +++ b/examples/apidoc/RestClientV3/getSubUnifiedAssets.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/account/sub-unified-assets - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/sub-unified-assets +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getTickers.js b/examples/apidoc/RestClientV3/getTickers.js index 576d2dc..7deb6a6 100644 --- a/examples/apidoc/RestClientV3/getTickers.js +++ b/examples/apidoc/RestClientV3/getTickers.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/market/tickers - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/market/tickers +// METHOD: GET +// PUBLIC: YES const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getTradeFills.js b/examples/apidoc/RestClientV3/getTradeFills.js index b25bcd0..7ea3e46 100644 --- a/examples/apidoc/RestClientV3/getTradeFills.js +++ b/examples/apidoc/RestClientV3/getTradeFills.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/trade/fills - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/fills +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getTransferableCoins.js b/examples/apidoc/RestClientV3/getTransferableCoins.js index 4263fb9..3ed4313 100644 --- a/examples/apidoc/RestClientV3/getTransferableCoins.js +++ b/examples/apidoc/RestClientV3/getTransferableCoins.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/account/transferable-coins - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/transferable-coins +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getUnfilledOrders.js b/examples/apidoc/RestClientV3/getUnfilledOrders.js index 6253de5..fe547d3 100644 --- a/examples/apidoc/RestClientV3/getUnfilledOrders.js +++ b/examples/apidoc/RestClientV3/getUnfilledOrders.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/trade/unfilled-orders - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/unfilled-orders +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getUnfilledStrategyOrders.js b/examples/apidoc/RestClientV3/getUnfilledStrategyOrders.js index 7b3bdc6..28f0103 100644 --- a/examples/apidoc/RestClientV3/getUnfilledStrategyOrders.js +++ b/examples/apidoc/RestClientV3/getUnfilledStrategyOrders.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/trade/unfilled-strategy-orders - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/unfilled-strategy-orders +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/getWithdrawRecords.js b/examples/apidoc/RestClientV3/getWithdrawRecords.js index fe70cc7..e1bd2a5 100644 --- a/examples/apidoc/RestClientV3/getWithdrawRecords.js +++ b/examples/apidoc/RestClientV3/getWithdrawRecords.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/account/withdrawl-records - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/withdrawl-records +// METHOD: GET +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/modifyOrder.js b/examples/apidoc/RestClientV3/modifyOrder.js index b6d6fc6..ad8f1e1 100644 --- a/examples/apidoc/RestClientV3/modifyOrder.js +++ b/examples/apidoc/RestClientV3/modifyOrder.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/trade/modify-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/modify-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/modifyStrategyOrder.js b/examples/apidoc/RestClientV3/modifyStrategyOrder.js index c56b870..3cc9c42 100644 --- a/examples/apidoc/RestClientV3/modifyStrategyOrder.js +++ b/examples/apidoc/RestClientV3/modifyStrategyOrder.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/trade/modify-strategy-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/modify-strategy-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/placeBatchOrders.js b/examples/apidoc/RestClientV3/placeBatchOrders.js index 247317e..8906050 100644 --- a/examples/apidoc/RestClientV3/placeBatchOrders.js +++ b/examples/apidoc/RestClientV3/placeBatchOrders.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/trade/place-batch - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/place-batch +// METHOD: POST +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/setHoldMode.js b/examples/apidoc/RestClientV3/setHoldMode.js index d5bc304..a43bb73 100644 --- a/examples/apidoc/RestClientV3/setHoldMode.js +++ b/examples/apidoc/RestClientV3/setHoldMode.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/account/set-hold-mode - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/set-hold-mode +// METHOD: POST +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/setLeverage.js b/examples/apidoc/RestClientV3/setLeverage.js index 280680c..72f9b0f 100644 --- a/examples/apidoc/RestClientV3/setLeverage.js +++ b/examples/apidoc/RestClientV3/setLeverage.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/account/set-leverage - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/set-leverage +// METHOD: POST +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/subAccountTransfer.js b/examples/apidoc/RestClientV3/subAccountTransfer.js index 7e763ad..3a28fae 100644 --- a/examples/apidoc/RestClientV3/subAccountTransfer.js +++ b/examples/apidoc/RestClientV3/subAccountTransfer.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/account/sub-transfer - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/sub-transfer +// METHOD: POST +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/submitNewOrder.js b/examples/apidoc/RestClientV3/submitNewOrder.js index 638e88a..833cc59 100644 --- a/examples/apidoc/RestClientV3/submitNewOrder.js +++ b/examples/apidoc/RestClientV3/submitNewOrder.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/trade/place-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/place-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/submitRepay.js b/examples/apidoc/RestClientV3/submitRepay.js index 3b64abf..695f02d 100644 --- a/examples/apidoc/RestClientV3/submitRepay.js +++ b/examples/apidoc/RestClientV3/submitRepay.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/account/repay - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/repay +// METHOD: POST +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/submitStrategyOrder.js b/examples/apidoc/RestClientV3/submitStrategyOrder.js index ea77178..90e1cb9 100644 --- a/examples/apidoc/RestClientV3/submitStrategyOrder.js +++ b/examples/apidoc/RestClientV3/submitStrategyOrder.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/trade/place-strategy-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/place-strategy-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/submitTransfer.js b/examples/apidoc/RestClientV3/submitTransfer.js index 3d75683..881c46f 100644 --- a/examples/apidoc/RestClientV3/submitTransfer.js +++ b/examples/apidoc/RestClientV3/submitTransfer.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/account/transfer - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/transfer +// METHOD: POST +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/submitWithdraw.js b/examples/apidoc/RestClientV3/submitWithdraw.js index 0794e73..0c819f9 100644 --- a/examples/apidoc/RestClientV3/submitWithdraw.js +++ b/examples/apidoc/RestClientV3/submitWithdraw.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/account/withdraw - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/withdraw +// METHOD: POST +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/switchDeduct.js b/examples/apidoc/RestClientV3/switchDeduct.js index 2b15b95..5cddf2c 100644 --- a/examples/apidoc/RestClientV3/switchDeduct.js +++ b/examples/apidoc/RestClientV3/switchDeduct.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/account/switch-deduct - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/switch-deduct +// METHOD: POST +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/updateSubAccountApiKey.js b/examples/apidoc/RestClientV3/updateSubAccountApiKey.js index 37074f0..fa5fc74 100644 --- a/examples/apidoc/RestClientV3/updateSubAccountApiKey.js +++ b/examples/apidoc/RestClientV3/updateSubAccountApiKey.js @@ -1,11 +1,13 @@ -const { RestClientV3 } = require('bitget-api'); +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +//const { RestClientV3 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v3/user/update-sub-api - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/user/update-sub-api +// METHOD: POST +// PUBLIC: NO const client = new RestClientV3({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/WebsocketAPIClient/cancelBatchOrders.js b/examples/apidoc/WebsocketAPIClient/cancelBatchOrders.js index c0c105f..922d0aa 100644 --- a/examples/apidoc/WebsocketAPIClient/cancelBatchOrders.js +++ b/examples/apidoc/WebsocketAPIClient/cancelBatchOrders.js @@ -1,4 +1,6 @@ -const { WebsocketAPIClient } = require('bitget-api'); +import { WebsocketAPIClient } from 'bitget-api'; +// or if you want to use the require syntax +//const { WebsocketAPIClient } = require('bitget-api'); // This example shows how to call this Bitget WebSocket API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange // This Bitget API SDK is available on npm via "npm install bitget-api" diff --git a/examples/apidoc/WebsocketAPIClient/cancelOrder.js b/examples/apidoc/WebsocketAPIClient/cancelOrder.js index 4765093..1844844 100644 --- a/examples/apidoc/WebsocketAPIClient/cancelOrder.js +++ b/examples/apidoc/WebsocketAPIClient/cancelOrder.js @@ -1,4 +1,6 @@ -const { WebsocketAPIClient } = require('bitget-api'); +import { WebsocketAPIClient } from 'bitget-api'; +// or if you want to use the require syntax +//const { WebsocketAPIClient } = require('bitget-api'); // This example shows how to call this Bitget WebSocket API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange // This Bitget API SDK is available on npm via "npm install bitget-api" diff --git a/examples/apidoc/WebsocketAPIClient/placeBatchOrders.js b/examples/apidoc/WebsocketAPIClient/placeBatchOrders.js index d94de4c..e4c1776 100644 --- a/examples/apidoc/WebsocketAPIClient/placeBatchOrders.js +++ b/examples/apidoc/WebsocketAPIClient/placeBatchOrders.js @@ -1,4 +1,6 @@ -const { WebsocketAPIClient } = require('bitget-api'); +import { WebsocketAPIClient } from 'bitget-api'; +// or if you want to use the require syntax +//const { WebsocketAPIClient } = require('bitget-api'); // This example shows how to call this Bitget WebSocket API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange // This Bitget API SDK is available on npm via "npm install bitget-api" diff --git a/examples/apidoc/WebsocketAPIClient/submitNewOrder.js b/examples/apidoc/WebsocketAPIClient/submitNewOrder.js index 118cfba..99e87d9 100644 --- a/examples/apidoc/WebsocketAPIClient/submitNewOrder.js +++ b/examples/apidoc/WebsocketAPIClient/submitNewOrder.js @@ -1,4 +1,6 @@ -const { WebsocketAPIClient } = require('bitget-api'); +import { WebsocketAPIClient } from 'bitget-api'; +// or if you want to use the require syntax +//const { WebsocketAPIClient } = require('bitget-api'); // This example shows how to call this Bitget WebSocket API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange // This Bitget API SDK is available on npm via "npm install bitget-api" From 2519db74857b8f78a9e8127d9b56b61465904285 Mon Sep 17 00:00:00 2001 From: JJ-Cro Date: Mon, 21 Jul 2025 17:35:04 +0200 Subject: [PATCH 40/57] chore(): small typo in regex --- .../RestClientV2/batchCreateVirtualSubaccountAndAPIKey.js | 2 +- examples/apidoc/RestClientV2/borrowLoan.js | 2 +- examples/apidoc/RestClientV2/cancelSpotFollowerOrder.js | 2 +- examples/apidoc/RestClientV2/closeFuturesFollowerPositions.js | 2 +- examples/apidoc/RestClientV2/closeFuturesTraderOrder.js | 2 +- examples/apidoc/RestClientV2/convert.js | 2 +- examples/apidoc/RestClientV2/convertBGB.js | 2 +- examples/apidoc/RestClientV2/createSubaccount.js | 2 +- examples/apidoc/RestClientV2/createSubaccountApiKey.js | 2 +- examples/apidoc/RestClientV2/createSubaccountDepositAddress.js | 2 +- examples/apidoc/RestClientV2/createVirtualSubaccount.js | 2 +- examples/apidoc/RestClientV2/createVirtualSubaccountAPIKey.js | 2 +- examples/apidoc/RestClientV2/earnRedeemSavings.js | 2 +- examples/apidoc/RestClientV2/earnSubscribeSavings.js | 2 +- examples/apidoc/RestClientV2/futuresBatchCancelOrders.js | 2 +- examples/apidoc/RestClientV2/futuresBatchSubmitOrders.js | 2 +- examples/apidoc/RestClientV2/futuresCancelAllOrders.js | 2 +- examples/apidoc/RestClientV2/futuresCancelOrder.js | 2 +- examples/apidoc/RestClientV2/futuresCancelPlanOrder.js | 2 +- examples/apidoc/RestClientV2/futuresFlashClosePositions.js | 2 +- examples/apidoc/RestClientV2/futuresModifyOrder.js | 2 +- examples/apidoc/RestClientV2/futuresModifyPlanOrder.js | 2 +- examples/apidoc/RestClientV2/futuresModifyTPSLPOrder.js | 2 +- examples/apidoc/RestClientV2/futuresSubmitOrder.js | 2 +- examples/apidoc/RestClientV2/futuresSubmitPlanOrder.js | 2 +- examples/apidoc/RestClientV2/futuresSubmitReversal.js | 2 +- examples/apidoc/RestClientV2/futuresSubmitTPSLOrder.js | 2 +- examples/apidoc/RestClientV2/getAnnouncements.js | 2 +- examples/apidoc/RestClientV2/getBalances.js | 2 +- examples/apidoc/RestClientV2/getBotAccount.js | 2 +- examples/apidoc/RestClientV2/getBrokerInfo.js | 2 +- examples/apidoc/RestClientV2/getBrokerTraders.js | 2 +- .../apidoc/RestClientV2/getBrokerTradersHistoricalOrders.js | 2 +- examples/apidoc/RestClientV2/getBrokerTradersPendingOrders.js | 2 +- examples/apidoc/RestClientV2/getConvertBGBCoins.js | 2 +- examples/apidoc/RestClientV2/getConvertBGBHistory.js | 2 +- examples/apidoc/RestClientV2/getConvertCoins.js | 2 +- examples/apidoc/RestClientV2/getConvertHistory.js | 2 +- examples/apidoc/RestClientV2/getConvertQuotedPrice.js | 2 +- examples/apidoc/RestClientV2/getEarnAccount.js | 2 +- examples/apidoc/RestClientV2/getEarnSavingsAccount.js | 2 +- examples/apidoc/RestClientV2/getEarnSavingsAssets.js | 2 +- examples/apidoc/RestClientV2/getEarnSavingsProducts.js | 2 +- examples/apidoc/RestClientV2/getEarnSavingsRecords.js | 2 +- examples/apidoc/RestClientV2/getEarnSavingsRedemptionResult.js | 2 +- examples/apidoc/RestClientV2/getEarnSavingsSubscription.js | 2 +- .../apidoc/RestClientV2/getEarnSavingsSubscriptionResult.js | 2 +- examples/apidoc/RestClientV2/getFundingAssets.js | 2 +- examples/apidoc/RestClientV2/getFuturesAccountAsset.js | 2 +- examples/apidoc/RestClientV2/getFuturesAccountAssets.js | 2 +- examples/apidoc/RestClientV2/getFuturesAccountBills.js | 2 +- .../apidoc/RestClientV2/getFuturesActiveBuySellVolumeData.js | 2 +- .../apidoc/RestClientV2/getFuturesActiveLongShortAccountData.js | 2 +- .../RestClientV2/getFuturesActiveLongShortPositionData.js | 2 +- .../RestClientV2/getFuturesActiveTakerBuySellVolumeData.js | 2 +- examples/apidoc/RestClientV2/getFuturesAllTickers.js | 2 +- examples/apidoc/RestClientV2/getFuturesCandles.js | 2 +- examples/apidoc/RestClientV2/getFuturesContractConfig.js | 2 +- examples/apidoc/RestClientV2/getFuturesCurrentFundingRate.js | 2 +- examples/apidoc/RestClientV2/getFuturesDiscountRate.js | 2 +- examples/apidoc/RestClientV2/getFuturesFills.js | 2 +- examples/apidoc/RestClientV2/getFuturesFollowerCurrentOrders.js | 2 +- examples/apidoc/RestClientV2/getFuturesFollowerFollowLimit.js | 2 +- examples/apidoc/RestClientV2/getFuturesFollowerHistoryOrders.js | 2 +- examples/apidoc/RestClientV2/getFuturesFollowerSettings.js | 2 +- examples/apidoc/RestClientV2/getFuturesFollowerTraders.js | 2 +- examples/apidoc/RestClientV2/getFuturesHistoricCandles.js | 2 +- examples/apidoc/RestClientV2/getFuturesHistoricFundingRates.js | 2 +- .../apidoc/RestClientV2/getFuturesHistoricIndexPriceCandles.js | 2 +- .../apidoc/RestClientV2/getFuturesHistoricMarkPriceCandles.js | 2 +- examples/apidoc/RestClientV2/getFuturesHistoricOrderFills.js | 2 +- examples/apidoc/RestClientV2/getFuturesHistoricOrders.js | 2 +- examples/apidoc/RestClientV2/getFuturesHistoricPlanOrders.js | 2 +- examples/apidoc/RestClientV2/getFuturesHistoricPositions.js | 2 +- examples/apidoc/RestClientV2/getFuturesHistoricTrades.js | 2 +- examples/apidoc/RestClientV2/getFuturesInterestExchangeRate.js | 2 +- examples/apidoc/RestClientV2/getFuturesInterestHistory.js | 2 +- examples/apidoc/RestClientV2/getFuturesInterestRateHistory.js | 2 +- examples/apidoc/RestClientV2/getFuturesLongShortRatio.js | 2 +- examples/apidoc/RestClientV2/getFuturesMergeDepth.js | 2 +- examples/apidoc/RestClientV2/getFuturesNextFundingTime.js | 2 +- examples/apidoc/RestClientV2/getFuturesOpenCount.js | 2 +- examples/apidoc/RestClientV2/getFuturesOpenInterest.js | 2 +- examples/apidoc/RestClientV2/getFuturesOpenOrders.js | 2 +- examples/apidoc/RestClientV2/getFuturesOrder.js | 2 +- examples/apidoc/RestClientV2/getFuturesPlanOrders.js | 2 +- examples/apidoc/RestClientV2/getFuturesPosition.js | 2 +- examples/apidoc/RestClientV2/getFuturesPositionTier.js | 2 +- examples/apidoc/RestClientV2/getFuturesPositions.js | 2 +- examples/apidoc/RestClientV2/getFuturesRecentTrades.js | 2 +- examples/apidoc/RestClientV2/getFuturesSubAccountAssets.js | 2 +- examples/apidoc/RestClientV2/getFuturesSymbolPrice.js | 2 +- examples/apidoc/RestClientV2/getFuturesTicker.js | 2 +- examples/apidoc/RestClientV2/getFuturesTraderCurrentOrder.js | 2 +- examples/apidoc/RestClientV2/getFuturesTraderFollowers.js | 2 +- examples/apidoc/RestClientV2/getFuturesTraderHistoryOrders.js | 2 +- examples/apidoc/RestClientV2/getFuturesTraderOrder.js | 2 +- examples/apidoc/RestClientV2/getFuturesTraderProfitHistory.js | 2 +- examples/apidoc/RestClientV2/getFuturesTraderProfitShare.js | 2 +- .../apidoc/RestClientV2/getFuturesTraderProfitShareGroup.js | 2 +- .../apidoc/RestClientV2/getFuturesTraderProfitShareHistory.js | 2 +- examples/apidoc/RestClientV2/getFuturesTraderSymbolSettings.js | 2 +- examples/apidoc/RestClientV2/getFuturesTransactionRecords.js | 2 +- examples/apidoc/RestClientV2/getFuturesTriggerSubOrder.js | 2 +- examples/apidoc/RestClientV2/getFuturesVIPFeeRate.js | 2 +- examples/apidoc/RestClientV2/getIsolatedMarginBorrowingRatio.js | 2 +- examples/apidoc/RestClientV2/getLoanCurrencies.js | 2 +- examples/apidoc/RestClientV2/getLoanDebts.js | 2 +- examples/apidoc/RestClientV2/getLoanEstInterestAndBorrowable.js | 2 +- examples/apidoc/RestClientV2/getLoanHistory.js | 2 +- examples/apidoc/RestClientV2/getLoanLiquidationRecords.js | 2 +- examples/apidoc/RestClientV2/getLoanPledgeRateHistory.js | 2 +- examples/apidoc/RestClientV2/getMarginAccountAssets.js | 2 +- examples/apidoc/RestClientV2/getMarginBorrowHistory.js | 2 +- examples/apidoc/RestClientV2/getMarginCurrencies.js | 2 +- examples/apidoc/RestClientV2/getMarginFinancialHistory.js | 2 +- examples/apidoc/RestClientV2/getMarginFlashRepayResult.js | 2 +- examples/apidoc/RestClientV2/getMarginHistoricOrderFills.js | 2 +- examples/apidoc/RestClientV2/getMarginHistoricOrders.js | 2 +- examples/apidoc/RestClientV2/getMarginInterestHistory.js | 2 +- .../RestClientV2/getMarginInterestRateAndMaxBorrowable.js | 2 +- examples/apidoc/RestClientV2/getMarginLiquidationHistory.js | 2 +- examples/apidoc/RestClientV2/getMarginLiquidationOrders.js | 2 +- examples/apidoc/RestClientV2/getMarginLoanGrowthRate.js | 2 +- examples/apidoc/RestClientV2/getMarginMaxBorrowable.js | 2 +- examples/apidoc/RestClientV2/getMarginMaxTransferable.js | 2 +- examples/apidoc/RestClientV2/getMarginOpenOrders.js | 2 +- examples/apidoc/RestClientV2/getMarginRepayHistory.js | 2 +- examples/apidoc/RestClientV2/getMarginRiskRate.js | 2 +- examples/apidoc/RestClientV2/getMarginTierConfiguration.js | 2 +- examples/apidoc/RestClientV2/getMarginTransactionRecords.js | 2 +- examples/apidoc/RestClientV2/getOngoingLoanOrders.js | 2 +- examples/apidoc/RestClientV2/getP2PMerchantAdvertisementList.js | 2 +- examples/apidoc/RestClientV2/getP2PMerchantInfo.js | 2 +- examples/apidoc/RestClientV2/getP2PMerchantList.js | 2 +- examples/apidoc/RestClientV2/getP2PMerchantOrders.js | 2 +- examples/apidoc/RestClientV2/getP2PTransactionRecords.js | 2 +- examples/apidoc/RestClientV2/getRepayHistory.js | 2 +- examples/apidoc/RestClientV2/getServerTime.js | 2 +- examples/apidoc/RestClientV2/getSharkfinAccount.js | 2 +- examples/apidoc/RestClientV2/getSharkfinAssets.js | 2 +- examples/apidoc/RestClientV2/getSharkfinProducts.js | 2 +- examples/apidoc/RestClientV2/getSharkfinRecords.js | 2 +- examples/apidoc/RestClientV2/getSharkfinSubscription.js | 2 +- examples/apidoc/RestClientV2/getSharkfinSubscriptionResult.js | 2 +- examples/apidoc/RestClientV2/getSpotAccount.js | 2 +- examples/apidoc/RestClientV2/getSpotAccountAssets.js | 2 +- examples/apidoc/RestClientV2/getSpotAccountBills.js | 2 +- examples/apidoc/RestClientV2/getSpotBGBDeductInfo.js | 2 +- examples/apidoc/RestClientV2/getSpotCandles.js | 2 +- examples/apidoc/RestClientV2/getSpotCoinInfo.js | 2 +- examples/apidoc/RestClientV2/getSpotCurrentPlanOrders.js | 2 +- examples/apidoc/RestClientV2/getSpotDepositAddress.js | 2 +- examples/apidoc/RestClientV2/getSpotDepositHistory.js | 2 +- examples/apidoc/RestClientV2/getSpotFills.js | 2 +- .../apidoc/RestClientV2/getSpotFollowerCurrentTraderSymbols.js | 2 +- examples/apidoc/RestClientV2/getSpotFollowerHistoryOrders.js | 2 +- examples/apidoc/RestClientV2/getSpotFollowerOpenOrders.js | 2 +- examples/apidoc/RestClientV2/getSpotFollowerSettings.js | 2 +- examples/apidoc/RestClientV2/getSpotFollowerTraders.js | 2 +- examples/apidoc/RestClientV2/getSpotFundFlow.js | 2 +- examples/apidoc/RestClientV2/getSpotFundNetFlowData.js | 2 +- examples/apidoc/RestClientV2/getSpotHistoricCandles.js | 2 +- examples/apidoc/RestClientV2/getSpotHistoricOrders.js | 2 +- examples/apidoc/RestClientV2/getSpotHistoricPlanOrders.js | 2 +- examples/apidoc/RestClientV2/getSpotHistoricTrades.js | 2 +- examples/apidoc/RestClientV2/getSpotMainSubTransferRecord.js | 2 +- examples/apidoc/RestClientV2/getSpotMergeDepth.js | 2 +- examples/apidoc/RestClientV2/getSpotOpenOrders.js | 2 +- examples/apidoc/RestClientV2/getSpotOrder.js | 2 +- examples/apidoc/RestClientV2/getSpotOrderBookDepth.js | 2 +- examples/apidoc/RestClientV2/getSpotPlanSubOrder.js | 2 +- examples/apidoc/RestClientV2/getSpotRecentTrades.js | 2 +- examples/apidoc/RestClientV2/getSpotSubAccountAssets.js | 2 +- examples/apidoc/RestClientV2/getSpotSubDepositAddress.js | 2 +- examples/apidoc/RestClientV2/getSpotSymbolInfo.js | 2 +- examples/apidoc/RestClientV2/getSpotTicker.js | 2 +- examples/apidoc/RestClientV2/getSpotTraderConfiguration.js | 2 +- examples/apidoc/RestClientV2/getSpotTraderCurrentOrders.js | 2 +- examples/apidoc/RestClientV2/getSpotTraderFollowers.js | 2 +- examples/apidoc/RestClientV2/getSpotTraderHistoryOrders.js | 2 +- examples/apidoc/RestClientV2/getSpotTraderHistoryProfit.js | 2 +- examples/apidoc/RestClientV2/getSpotTraderOrder.js | 2 +- examples/apidoc/RestClientV2/getSpotTraderProfit.js | 2 +- examples/apidoc/RestClientV2/getSpotTraderSymbolSettings.js | 2 +- examples/apidoc/RestClientV2/getSpotTraderUnrealizedProfit.js | 2 +- examples/apidoc/RestClientV2/getSpotTransactionRecords.js | 2 +- examples/apidoc/RestClientV2/getSpotTransferHistory.js | 2 +- examples/apidoc/RestClientV2/getSpotTransferableCoins.js | 2 +- examples/apidoc/RestClientV2/getSpotVIPFeeRate.js | 2 +- examples/apidoc/RestClientV2/getSpotWhaleNetFlowData.js | 2 +- examples/apidoc/RestClientV2/getSpotWithdrawalHistory.js | 2 +- examples/apidoc/RestClientV2/getSubAccountDepositRecords.js | 2 +- examples/apidoc/RestClientV2/getSubaccountApiKey.js | 2 +- examples/apidoc/RestClientV2/getSubaccountEmail.js | 2 +- examples/apidoc/RestClientV2/getSubaccountFuturesAssets.js | 2 +- examples/apidoc/RestClientV2/getSubaccountSpotAssets.js | 2 +- examples/apidoc/RestClientV2/getSubaccounts.js | 2 +- examples/apidoc/RestClientV2/getTradeDataSupportSymbols.js | 2 +- examples/apidoc/RestClientV2/getTradeRate.js | 2 +- examples/apidoc/RestClientV2/getVirtualSubaccountAPIKeys.js | 2 +- examples/apidoc/RestClientV2/getVirtualSubaccounts.js | 2 +- examples/apidoc/RestClientV2/marginBatchCancelOrders.js | 2 +- examples/apidoc/RestClientV2/marginBatchSubmitOrders.js | 2 +- examples/apidoc/RestClientV2/marginBorrow.js | 2 +- examples/apidoc/RestClientV2/marginCancelOrder.js | 2 +- examples/apidoc/RestClientV2/marginFlashRepay.js | 2 +- examples/apidoc/RestClientV2/marginRepay.js | 2 +- examples/apidoc/RestClientV2/marginSubmitOrder.js | 2 +- examples/apidoc/RestClientV2/modifyFuturesTraderOrderTPSL.js | 2 +- examples/apidoc/RestClientV2/modifySpotTraderOrderTPSL.js | 2 +- examples/apidoc/RestClientV2/modifySubaccount.js | 2 +- examples/apidoc/RestClientV2/modifySubaccountApiKey.js | 2 +- examples/apidoc/RestClientV2/modifySubaccountEmail.js | 2 +- examples/apidoc/RestClientV2/modifyVirtualSubaccount.js | 2 +- examples/apidoc/RestClientV2/modifyVirtualSubaccountAPIKey.js | 2 +- examples/apidoc/RestClientV2/removeFuturesTraderFollower.js | 2 +- examples/apidoc/RestClientV2/removeSpotTraderFollowers.js | 2 +- examples/apidoc/RestClientV2/repayLoan.js | 2 +- examples/apidoc/RestClientV2/sellSpotFollower.js | 2 +- examples/apidoc/RestClientV2/sellSpotTrader.js | 2 +- examples/apidoc/RestClientV2/setFuturesAssetMode.js | 2 +- examples/apidoc/RestClientV2/setFuturesLeverage.js | 2 +- examples/apidoc/RestClientV2/setFuturesMarginMode.js | 2 +- examples/apidoc/RestClientV2/setFuturesPositionAutoMargin.js | 2 +- examples/apidoc/RestClientV2/setFuturesPositionMargin.js | 2 +- examples/apidoc/RestClientV2/setFuturesPositionMode.js | 2 +- examples/apidoc/RestClientV2/spotBatchCancelOrders.js | 2 +- examples/apidoc/RestClientV2/spotBatchCancelandSubmitOrder.js | 2 +- examples/apidoc/RestClientV2/spotBatchSubmitOrders.js | 2 +- examples/apidoc/RestClientV2/spotCancelOrder.js | 2 +- examples/apidoc/RestClientV2/spotCancelPlanOrder.js | 2 +- examples/apidoc/RestClientV2/spotCancelPlanOrders.js | 2 +- examples/apidoc/RestClientV2/spotCancelSymbolOrder.js | 2 +- examples/apidoc/RestClientV2/spotCancelWithdrawal.js | 2 +- examples/apidoc/RestClientV2/spotCancelandSubmitOrder.js | 2 +- examples/apidoc/RestClientV2/spotModifyDepositAccount.js | 2 +- examples/apidoc/RestClientV2/spotModifyPlanOrder.js | 2 +- examples/apidoc/RestClientV2/spotSubTransfer.js | 2 +- examples/apidoc/RestClientV2/spotSubmitOrder.js | 2 +- examples/apidoc/RestClientV2/spotSubmitPlanOrder.js | 2 +- examples/apidoc/RestClientV2/spotSwitchBGBDeduct.js | 2 +- examples/apidoc/RestClientV2/spotTransfer.js | 2 +- examples/apidoc/RestClientV2/spotWithdraw.js | 2 +- examples/apidoc/RestClientV2/subaccountDepositRecords.js | 2 +- examples/apidoc/RestClientV2/subaccountSetAutoTransfer.js | 2 +- examples/apidoc/RestClientV2/subaccountWithdrawal.js | 2 +- examples/apidoc/RestClientV2/subaccountWithdrawalRecords.js | 2 +- examples/apidoc/RestClientV2/subscribeSharkfin.js | 2 +- examples/apidoc/RestClientV2/unfollowFuturesTrader.js | 2 +- examples/apidoc/RestClientV2/unfollowSpotTrader.js | 2 +- examples/apidoc/RestClientV2/updateFuturesFollowerSettings.js | 2 +- examples/apidoc/RestClientV2/updateFuturesFollowerTPSL.js | 2 +- .../apidoc/RestClientV2/updateFuturesTraderGlobalSettings.js | 2 +- .../apidoc/RestClientV2/updateFuturesTraderSymbolSettings.js | 2 +- examples/apidoc/RestClientV2/updateLoanPledgeRate.js | 2 +- examples/apidoc/RestClientV2/updateSpotFollowerSettings.js | 2 +- examples/apidoc/RestClientV2/updateSpotFollowerTPSL.js | 2 +- examples/apidoc/RestClientV3/batchModifyOrders.js | 2 +- examples/apidoc/RestClientV3/bindLoanUid.js | 2 +- examples/apidoc/RestClientV3/cancelAllOrders.js | 2 +- examples/apidoc/RestClientV3/cancelBatchOrders.js | 2 +- examples/apidoc/RestClientV3/cancelOrder.js | 2 +- examples/apidoc/RestClientV3/cancelStrategyOrder.js | 2 +- examples/apidoc/RestClientV3/closeAllPositions.js | 2 +- examples/apidoc/RestClientV3/countdownCancelAll.js | 2 +- examples/apidoc/RestClientV3/createSubAccount.js | 2 +- examples/apidoc/RestClientV3/createSubAccountApiKey.js | 2 +- examples/apidoc/RestClientV3/deleteSubAccountApiKey.js | 2 +- examples/apidoc/RestClientV3/freezeSubAccount.js | 2 +- examples/apidoc/RestClientV3/getAccountSettings.js | 2 +- examples/apidoc/RestClientV3/getBalances.js | 2 +- examples/apidoc/RestClientV3/getCandles.js | 2 +- examples/apidoc/RestClientV3/getContractsOi.js | 2 +- examples/apidoc/RestClientV3/getConvertRecords.js | 2 +- examples/apidoc/RestClientV3/getCurrentFundingRate.js | 2 +- examples/apidoc/RestClientV3/getCurrentPosition.js | 2 +- examples/apidoc/RestClientV3/getDeductInfo.js | 2 +- examples/apidoc/RestClientV3/getDepositAddress.js | 2 +- examples/apidoc/RestClientV3/getDepositRecords.js | 2 +- examples/apidoc/RestClientV3/getDiscountRate.js | 2 +- examples/apidoc/RestClientV3/getFeeRate.js | 2 +- examples/apidoc/RestClientV3/getFills.js | 2 +- examples/apidoc/RestClientV3/getFinancialRecords.js | 2 +- examples/apidoc/RestClientV3/getFundingAssets.js | 2 +- examples/apidoc/RestClientV3/getHistoryCandles.js | 2 +- examples/apidoc/RestClientV3/getHistoryFundingRate.js | 2 +- examples/apidoc/RestClientV3/getHistoryOrders.js | 2 +- examples/apidoc/RestClientV3/getHistoryStrategyOrders.js | 2 +- examples/apidoc/RestClientV3/getInstruments.js | 2 +- examples/apidoc/RestClientV3/getLoanLTVConvert.js | 2 +- examples/apidoc/RestClientV3/getLoanMarginCoinInfo.js | 2 +- examples/apidoc/RestClientV3/getLoanOrder.js | 2 +- examples/apidoc/RestClientV3/getLoanProductInfo.js | 2 +- examples/apidoc/RestClientV3/getLoanRepaidHistory.js | 2 +- examples/apidoc/RestClientV3/getLoanRiskUnit.js | 2 +- examples/apidoc/RestClientV3/getLoanSymbols.js | 2 +- examples/apidoc/RestClientV3/getLoanTransfered.js | 2 +- examples/apidoc/RestClientV3/getMarginLoans.js | 2 +- examples/apidoc/RestClientV3/getMaxOpenAvailable.js | 2 +- examples/apidoc/RestClientV3/getOpenInterest.js | 2 +- examples/apidoc/RestClientV3/getOrderBook.js | 2 +- examples/apidoc/RestClientV3/getOrderInfo.js | 2 +- examples/apidoc/RestClientV3/getPaymentCoins.js | 2 +- examples/apidoc/RestClientV3/getPositionHistory.js | 2 +- examples/apidoc/RestClientV3/getPositionTier.js | 2 +- examples/apidoc/RestClientV3/getRepayableCoins.js | 2 +- examples/apidoc/RestClientV3/getRiskReserve.js | 2 +- examples/apidoc/RestClientV3/getServerTime.js | 2 +- examples/apidoc/RestClientV3/getSubAccountApiKeys.js | 2 +- examples/apidoc/RestClientV3/getSubAccountList.js | 2 +- examples/apidoc/RestClientV3/getSubDepositAddress.js | 2 +- examples/apidoc/RestClientV3/getSubDepositRecords.js | 2 +- examples/apidoc/RestClientV3/getSubTransferRecords.js | 2 +- examples/apidoc/RestClientV3/getSubUnifiedAssets.js | 2 +- examples/apidoc/RestClientV3/getTickers.js | 2 +- examples/apidoc/RestClientV3/getTradeFills.js | 2 +- examples/apidoc/RestClientV3/getTransferableCoins.js | 2 +- examples/apidoc/RestClientV3/getUnfilledOrders.js | 2 +- examples/apidoc/RestClientV3/getUnfilledStrategyOrders.js | 2 +- examples/apidoc/RestClientV3/getWithdrawRecords.js | 2 +- examples/apidoc/RestClientV3/modifyOrder.js | 2 +- examples/apidoc/RestClientV3/modifyStrategyOrder.js | 2 +- examples/apidoc/RestClientV3/placeBatchOrders.js | 2 +- examples/apidoc/RestClientV3/setHoldMode.js | 2 +- examples/apidoc/RestClientV3/setLeverage.js | 2 +- examples/apidoc/RestClientV3/subAccountTransfer.js | 2 +- examples/apidoc/RestClientV3/submitNewOrder.js | 2 +- examples/apidoc/RestClientV3/submitRepay.js | 2 +- examples/apidoc/RestClientV3/submitStrategyOrder.js | 2 +- examples/apidoc/RestClientV3/submitTransfer.js | 2 +- examples/apidoc/RestClientV3/submitWithdraw.js | 2 +- examples/apidoc/RestClientV3/switchDeduct.js | 2 +- examples/apidoc/RestClientV3/updateSubAccountApiKey.js | 2 +- examples/apidoc/WebsocketAPIClient/cancelBatchOrders.js | 2 +- examples/apidoc/WebsocketAPIClient/cancelOrder.js | 2 +- examples/apidoc/WebsocketAPIClient/placeBatchOrders.js | 2 +- examples/apidoc/WebsocketAPIClient/submitNewOrder.js | 2 +- 338 files changed, 338 insertions(+), 338 deletions(-) diff --git a/examples/apidoc/RestClientV2/batchCreateVirtualSubaccountAndAPIKey.js b/examples/apidoc/RestClientV2/batchCreateVirtualSubaccountAndAPIKey.js index 2e3a42f..7d4269a 100644 --- a/examples/apidoc/RestClientV2/batchCreateVirtualSubaccountAndAPIKey.js +++ b/examples/apidoc/RestClientV2/batchCreateVirtualSubaccountAndAPIKey.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/borrowLoan.js b/examples/apidoc/RestClientV2/borrowLoan.js index c4f46c1..a08dd40 100644 --- a/examples/apidoc/RestClientV2/borrowLoan.js +++ b/examples/apidoc/RestClientV2/borrowLoan.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/cancelSpotFollowerOrder.js b/examples/apidoc/RestClientV2/cancelSpotFollowerOrder.js index 56f71c8..9db3669 100644 --- a/examples/apidoc/RestClientV2/cancelSpotFollowerOrder.js +++ b/examples/apidoc/RestClientV2/cancelSpotFollowerOrder.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/closeFuturesFollowerPositions.js b/examples/apidoc/RestClientV2/closeFuturesFollowerPositions.js index 5bd4af8..ffa1a99 100644 --- a/examples/apidoc/RestClientV2/closeFuturesFollowerPositions.js +++ b/examples/apidoc/RestClientV2/closeFuturesFollowerPositions.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/closeFuturesTraderOrder.js b/examples/apidoc/RestClientV2/closeFuturesTraderOrder.js index 6b7fe8b..05be41c 100644 --- a/examples/apidoc/RestClientV2/closeFuturesTraderOrder.js +++ b/examples/apidoc/RestClientV2/closeFuturesTraderOrder.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/convert.js b/examples/apidoc/RestClientV2/convert.js index 1079a92..7d5bdcd 100644 --- a/examples/apidoc/RestClientV2/convert.js +++ b/examples/apidoc/RestClientV2/convert.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/convertBGB.js b/examples/apidoc/RestClientV2/convertBGB.js index 770f31a..522e4da 100644 --- a/examples/apidoc/RestClientV2/convertBGB.js +++ b/examples/apidoc/RestClientV2/convertBGB.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/createSubaccount.js b/examples/apidoc/RestClientV2/createSubaccount.js index 2882a59..c0ce3e5 100644 --- a/examples/apidoc/RestClientV2/createSubaccount.js +++ b/examples/apidoc/RestClientV2/createSubaccount.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/createSubaccountApiKey.js b/examples/apidoc/RestClientV2/createSubaccountApiKey.js index 7e842c6..c4e31af 100644 --- a/examples/apidoc/RestClientV2/createSubaccountApiKey.js +++ b/examples/apidoc/RestClientV2/createSubaccountApiKey.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/createSubaccountDepositAddress.js b/examples/apidoc/RestClientV2/createSubaccountDepositAddress.js index b97db9e..3522061 100644 --- a/examples/apidoc/RestClientV2/createSubaccountDepositAddress.js +++ b/examples/apidoc/RestClientV2/createSubaccountDepositAddress.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/createVirtualSubaccount.js b/examples/apidoc/RestClientV2/createVirtualSubaccount.js index e53a2ab..3c4acbb 100644 --- a/examples/apidoc/RestClientV2/createVirtualSubaccount.js +++ b/examples/apidoc/RestClientV2/createVirtualSubaccount.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/createVirtualSubaccountAPIKey.js b/examples/apidoc/RestClientV2/createVirtualSubaccountAPIKey.js index 92cda9a..56835fb 100644 --- a/examples/apidoc/RestClientV2/createVirtualSubaccountAPIKey.js +++ b/examples/apidoc/RestClientV2/createVirtualSubaccountAPIKey.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/earnRedeemSavings.js b/examples/apidoc/RestClientV2/earnRedeemSavings.js index 2b7ad14..1ddcf7c 100644 --- a/examples/apidoc/RestClientV2/earnRedeemSavings.js +++ b/examples/apidoc/RestClientV2/earnRedeemSavings.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/earnSubscribeSavings.js b/examples/apidoc/RestClientV2/earnSubscribeSavings.js index 9303a88..60f9d58 100644 --- a/examples/apidoc/RestClientV2/earnSubscribeSavings.js +++ b/examples/apidoc/RestClientV2/earnSubscribeSavings.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/futuresBatchCancelOrders.js b/examples/apidoc/RestClientV2/futuresBatchCancelOrders.js index 5101382..36348a4 100644 --- a/examples/apidoc/RestClientV2/futuresBatchCancelOrders.js +++ b/examples/apidoc/RestClientV2/futuresBatchCancelOrders.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/futuresBatchSubmitOrders.js b/examples/apidoc/RestClientV2/futuresBatchSubmitOrders.js index d129aa1..88624cb 100644 --- a/examples/apidoc/RestClientV2/futuresBatchSubmitOrders.js +++ b/examples/apidoc/RestClientV2/futuresBatchSubmitOrders.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/futuresCancelAllOrders.js b/examples/apidoc/RestClientV2/futuresCancelAllOrders.js index b2be2a0..c00ec44 100644 --- a/examples/apidoc/RestClientV2/futuresCancelAllOrders.js +++ b/examples/apidoc/RestClientV2/futuresCancelAllOrders.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/futuresCancelOrder.js b/examples/apidoc/RestClientV2/futuresCancelOrder.js index b448282..32350b7 100644 --- a/examples/apidoc/RestClientV2/futuresCancelOrder.js +++ b/examples/apidoc/RestClientV2/futuresCancelOrder.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/futuresCancelPlanOrder.js b/examples/apidoc/RestClientV2/futuresCancelPlanOrder.js index d5f0ac6..6fc9a55 100644 --- a/examples/apidoc/RestClientV2/futuresCancelPlanOrder.js +++ b/examples/apidoc/RestClientV2/futuresCancelPlanOrder.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/futuresFlashClosePositions.js b/examples/apidoc/RestClientV2/futuresFlashClosePositions.js index cf7b352..5acd7c9 100644 --- a/examples/apidoc/RestClientV2/futuresFlashClosePositions.js +++ b/examples/apidoc/RestClientV2/futuresFlashClosePositions.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/futuresModifyOrder.js b/examples/apidoc/RestClientV2/futuresModifyOrder.js index 36725e0..3738901 100644 --- a/examples/apidoc/RestClientV2/futuresModifyOrder.js +++ b/examples/apidoc/RestClientV2/futuresModifyOrder.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/futuresModifyPlanOrder.js b/examples/apidoc/RestClientV2/futuresModifyPlanOrder.js index d6d2708..552c761 100644 --- a/examples/apidoc/RestClientV2/futuresModifyPlanOrder.js +++ b/examples/apidoc/RestClientV2/futuresModifyPlanOrder.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/futuresModifyTPSLPOrder.js b/examples/apidoc/RestClientV2/futuresModifyTPSLPOrder.js index ebc81e3..a45b5a5 100644 --- a/examples/apidoc/RestClientV2/futuresModifyTPSLPOrder.js +++ b/examples/apidoc/RestClientV2/futuresModifyTPSLPOrder.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/futuresSubmitOrder.js b/examples/apidoc/RestClientV2/futuresSubmitOrder.js index 14e7479..7d289fe 100644 --- a/examples/apidoc/RestClientV2/futuresSubmitOrder.js +++ b/examples/apidoc/RestClientV2/futuresSubmitOrder.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/futuresSubmitPlanOrder.js b/examples/apidoc/RestClientV2/futuresSubmitPlanOrder.js index 0f49e01..4ed20e3 100644 --- a/examples/apidoc/RestClientV2/futuresSubmitPlanOrder.js +++ b/examples/apidoc/RestClientV2/futuresSubmitPlanOrder.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/futuresSubmitReversal.js b/examples/apidoc/RestClientV2/futuresSubmitReversal.js index 120d224..363e15c 100644 --- a/examples/apidoc/RestClientV2/futuresSubmitReversal.js +++ b/examples/apidoc/RestClientV2/futuresSubmitReversal.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/futuresSubmitTPSLOrder.js b/examples/apidoc/RestClientV2/futuresSubmitTPSLOrder.js index b2c0b73..b3552bd 100644 --- a/examples/apidoc/RestClientV2/futuresSubmitTPSLOrder.js +++ b/examples/apidoc/RestClientV2/futuresSubmitTPSLOrder.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getAnnouncements.js b/examples/apidoc/RestClientV2/getAnnouncements.js index 42b3960..049f4db 100644 --- a/examples/apidoc/RestClientV2/getAnnouncements.js +++ b/examples/apidoc/RestClientV2/getAnnouncements.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getBalances.js b/examples/apidoc/RestClientV2/getBalances.js index 49e9856..1545ef3 100644 --- a/examples/apidoc/RestClientV2/getBalances.js +++ b/examples/apidoc/RestClientV2/getBalances.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getBotAccount.js b/examples/apidoc/RestClientV2/getBotAccount.js index edf0ac5..a778fb6 100644 --- a/examples/apidoc/RestClientV2/getBotAccount.js +++ b/examples/apidoc/RestClientV2/getBotAccount.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getBrokerInfo.js b/examples/apidoc/RestClientV2/getBrokerInfo.js index 4a824d0..9ddbb5e 100644 --- a/examples/apidoc/RestClientV2/getBrokerInfo.js +++ b/examples/apidoc/RestClientV2/getBrokerInfo.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getBrokerTraders.js b/examples/apidoc/RestClientV2/getBrokerTraders.js index 55e8b62..0f111fc 100644 --- a/examples/apidoc/RestClientV2/getBrokerTraders.js +++ b/examples/apidoc/RestClientV2/getBrokerTraders.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getBrokerTradersHistoricalOrders.js b/examples/apidoc/RestClientV2/getBrokerTradersHistoricalOrders.js index 2351b3b..c60c99d 100644 --- a/examples/apidoc/RestClientV2/getBrokerTradersHistoricalOrders.js +++ b/examples/apidoc/RestClientV2/getBrokerTradersHistoricalOrders.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getBrokerTradersPendingOrders.js b/examples/apidoc/RestClientV2/getBrokerTradersPendingOrders.js index 3ec2898..3386d0d 100644 --- a/examples/apidoc/RestClientV2/getBrokerTradersPendingOrders.js +++ b/examples/apidoc/RestClientV2/getBrokerTradersPendingOrders.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getConvertBGBCoins.js b/examples/apidoc/RestClientV2/getConvertBGBCoins.js index 5919059..d381266 100644 --- a/examples/apidoc/RestClientV2/getConvertBGBCoins.js +++ b/examples/apidoc/RestClientV2/getConvertBGBCoins.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getConvertBGBHistory.js b/examples/apidoc/RestClientV2/getConvertBGBHistory.js index e931650..6a63f73 100644 --- a/examples/apidoc/RestClientV2/getConvertBGBHistory.js +++ b/examples/apidoc/RestClientV2/getConvertBGBHistory.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getConvertCoins.js b/examples/apidoc/RestClientV2/getConvertCoins.js index b8d5996..9c82857 100644 --- a/examples/apidoc/RestClientV2/getConvertCoins.js +++ b/examples/apidoc/RestClientV2/getConvertCoins.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getConvertHistory.js b/examples/apidoc/RestClientV2/getConvertHistory.js index 6c88a8a..de401b3 100644 --- a/examples/apidoc/RestClientV2/getConvertHistory.js +++ b/examples/apidoc/RestClientV2/getConvertHistory.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getConvertQuotedPrice.js b/examples/apidoc/RestClientV2/getConvertQuotedPrice.js index f9c43cf..e5282e6 100644 --- a/examples/apidoc/RestClientV2/getConvertQuotedPrice.js +++ b/examples/apidoc/RestClientV2/getConvertQuotedPrice.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getEarnAccount.js b/examples/apidoc/RestClientV2/getEarnAccount.js index 34d6231..b5eef4e 100644 --- a/examples/apidoc/RestClientV2/getEarnAccount.js +++ b/examples/apidoc/RestClientV2/getEarnAccount.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getEarnSavingsAccount.js b/examples/apidoc/RestClientV2/getEarnSavingsAccount.js index d695ca1..e8163dd 100644 --- a/examples/apidoc/RestClientV2/getEarnSavingsAccount.js +++ b/examples/apidoc/RestClientV2/getEarnSavingsAccount.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getEarnSavingsAssets.js b/examples/apidoc/RestClientV2/getEarnSavingsAssets.js index 13771a5..b71432b 100644 --- a/examples/apidoc/RestClientV2/getEarnSavingsAssets.js +++ b/examples/apidoc/RestClientV2/getEarnSavingsAssets.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getEarnSavingsProducts.js b/examples/apidoc/RestClientV2/getEarnSavingsProducts.js index fd8325a..bfd420a 100644 --- a/examples/apidoc/RestClientV2/getEarnSavingsProducts.js +++ b/examples/apidoc/RestClientV2/getEarnSavingsProducts.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getEarnSavingsRecords.js b/examples/apidoc/RestClientV2/getEarnSavingsRecords.js index 548b2d3..80b03c8 100644 --- a/examples/apidoc/RestClientV2/getEarnSavingsRecords.js +++ b/examples/apidoc/RestClientV2/getEarnSavingsRecords.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getEarnSavingsRedemptionResult.js b/examples/apidoc/RestClientV2/getEarnSavingsRedemptionResult.js index a7f289c..c1f2d06 100644 --- a/examples/apidoc/RestClientV2/getEarnSavingsRedemptionResult.js +++ b/examples/apidoc/RestClientV2/getEarnSavingsRedemptionResult.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getEarnSavingsSubscription.js b/examples/apidoc/RestClientV2/getEarnSavingsSubscription.js index b1e5a93..98de670 100644 --- a/examples/apidoc/RestClientV2/getEarnSavingsSubscription.js +++ b/examples/apidoc/RestClientV2/getEarnSavingsSubscription.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getEarnSavingsSubscriptionResult.js b/examples/apidoc/RestClientV2/getEarnSavingsSubscriptionResult.js index d550de9..ae43c61 100644 --- a/examples/apidoc/RestClientV2/getEarnSavingsSubscriptionResult.js +++ b/examples/apidoc/RestClientV2/getEarnSavingsSubscriptionResult.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFundingAssets.js b/examples/apidoc/RestClientV2/getFundingAssets.js index 796d941..b2ae81c 100644 --- a/examples/apidoc/RestClientV2/getFundingAssets.js +++ b/examples/apidoc/RestClientV2/getFundingAssets.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesAccountAsset.js b/examples/apidoc/RestClientV2/getFuturesAccountAsset.js index a57f7cf..c8c95db 100644 --- a/examples/apidoc/RestClientV2/getFuturesAccountAsset.js +++ b/examples/apidoc/RestClientV2/getFuturesAccountAsset.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesAccountAssets.js b/examples/apidoc/RestClientV2/getFuturesAccountAssets.js index 556f786..5189818 100644 --- a/examples/apidoc/RestClientV2/getFuturesAccountAssets.js +++ b/examples/apidoc/RestClientV2/getFuturesAccountAssets.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesAccountBills.js b/examples/apidoc/RestClientV2/getFuturesAccountBills.js index 64c29d7..94dbd29 100644 --- a/examples/apidoc/RestClientV2/getFuturesAccountBills.js +++ b/examples/apidoc/RestClientV2/getFuturesAccountBills.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesActiveBuySellVolumeData.js b/examples/apidoc/RestClientV2/getFuturesActiveBuySellVolumeData.js index 3814c8c..1152034 100644 --- a/examples/apidoc/RestClientV2/getFuturesActiveBuySellVolumeData.js +++ b/examples/apidoc/RestClientV2/getFuturesActiveBuySellVolumeData.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesActiveLongShortAccountData.js b/examples/apidoc/RestClientV2/getFuturesActiveLongShortAccountData.js index afda9dc..c141837 100644 --- a/examples/apidoc/RestClientV2/getFuturesActiveLongShortAccountData.js +++ b/examples/apidoc/RestClientV2/getFuturesActiveLongShortAccountData.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesActiveLongShortPositionData.js b/examples/apidoc/RestClientV2/getFuturesActiveLongShortPositionData.js index 9bbdc86..66b3527 100644 --- a/examples/apidoc/RestClientV2/getFuturesActiveLongShortPositionData.js +++ b/examples/apidoc/RestClientV2/getFuturesActiveLongShortPositionData.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesActiveTakerBuySellVolumeData.js b/examples/apidoc/RestClientV2/getFuturesActiveTakerBuySellVolumeData.js index e005401..c1e3da0 100644 --- a/examples/apidoc/RestClientV2/getFuturesActiveTakerBuySellVolumeData.js +++ b/examples/apidoc/RestClientV2/getFuturesActiveTakerBuySellVolumeData.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesAllTickers.js b/examples/apidoc/RestClientV2/getFuturesAllTickers.js index eaa044e..4767c80 100644 --- a/examples/apidoc/RestClientV2/getFuturesAllTickers.js +++ b/examples/apidoc/RestClientV2/getFuturesAllTickers.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesCandles.js b/examples/apidoc/RestClientV2/getFuturesCandles.js index acbede0..2b2575c 100644 --- a/examples/apidoc/RestClientV2/getFuturesCandles.js +++ b/examples/apidoc/RestClientV2/getFuturesCandles.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesContractConfig.js b/examples/apidoc/RestClientV2/getFuturesContractConfig.js index 70cacb8..29e5e0d 100644 --- a/examples/apidoc/RestClientV2/getFuturesContractConfig.js +++ b/examples/apidoc/RestClientV2/getFuturesContractConfig.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesCurrentFundingRate.js b/examples/apidoc/RestClientV2/getFuturesCurrentFundingRate.js index d4fb0cd..55cf34e 100644 --- a/examples/apidoc/RestClientV2/getFuturesCurrentFundingRate.js +++ b/examples/apidoc/RestClientV2/getFuturesCurrentFundingRate.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesDiscountRate.js b/examples/apidoc/RestClientV2/getFuturesDiscountRate.js index 70f13ad..24dbb15 100644 --- a/examples/apidoc/RestClientV2/getFuturesDiscountRate.js +++ b/examples/apidoc/RestClientV2/getFuturesDiscountRate.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesFills.js b/examples/apidoc/RestClientV2/getFuturesFills.js index 5cd3015..14610e4 100644 --- a/examples/apidoc/RestClientV2/getFuturesFills.js +++ b/examples/apidoc/RestClientV2/getFuturesFills.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesFollowerCurrentOrders.js b/examples/apidoc/RestClientV2/getFuturesFollowerCurrentOrders.js index 8f4dab7..739a99d 100644 --- a/examples/apidoc/RestClientV2/getFuturesFollowerCurrentOrders.js +++ b/examples/apidoc/RestClientV2/getFuturesFollowerCurrentOrders.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesFollowerFollowLimit.js b/examples/apidoc/RestClientV2/getFuturesFollowerFollowLimit.js index 353102d..24eebdb 100644 --- a/examples/apidoc/RestClientV2/getFuturesFollowerFollowLimit.js +++ b/examples/apidoc/RestClientV2/getFuturesFollowerFollowLimit.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesFollowerHistoryOrders.js b/examples/apidoc/RestClientV2/getFuturesFollowerHistoryOrders.js index 887df7b..666d451 100644 --- a/examples/apidoc/RestClientV2/getFuturesFollowerHistoryOrders.js +++ b/examples/apidoc/RestClientV2/getFuturesFollowerHistoryOrders.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesFollowerSettings.js b/examples/apidoc/RestClientV2/getFuturesFollowerSettings.js index 0be02d8..c7565d1 100644 --- a/examples/apidoc/RestClientV2/getFuturesFollowerSettings.js +++ b/examples/apidoc/RestClientV2/getFuturesFollowerSettings.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesFollowerTraders.js b/examples/apidoc/RestClientV2/getFuturesFollowerTraders.js index 37a77cb..dc68ef8 100644 --- a/examples/apidoc/RestClientV2/getFuturesFollowerTraders.js +++ b/examples/apidoc/RestClientV2/getFuturesFollowerTraders.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricCandles.js b/examples/apidoc/RestClientV2/getFuturesHistoricCandles.js index 9c07c07..a1de8ca 100644 --- a/examples/apidoc/RestClientV2/getFuturesHistoricCandles.js +++ b/examples/apidoc/RestClientV2/getFuturesHistoricCandles.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricFundingRates.js b/examples/apidoc/RestClientV2/getFuturesHistoricFundingRates.js index dfb6195..82a0314 100644 --- a/examples/apidoc/RestClientV2/getFuturesHistoricFundingRates.js +++ b/examples/apidoc/RestClientV2/getFuturesHistoricFundingRates.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricIndexPriceCandles.js b/examples/apidoc/RestClientV2/getFuturesHistoricIndexPriceCandles.js index 6d1c77e..0ac3e2f 100644 --- a/examples/apidoc/RestClientV2/getFuturesHistoricIndexPriceCandles.js +++ b/examples/apidoc/RestClientV2/getFuturesHistoricIndexPriceCandles.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricMarkPriceCandles.js b/examples/apidoc/RestClientV2/getFuturesHistoricMarkPriceCandles.js index e0fa512..b4be03e 100644 --- a/examples/apidoc/RestClientV2/getFuturesHistoricMarkPriceCandles.js +++ b/examples/apidoc/RestClientV2/getFuturesHistoricMarkPriceCandles.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricOrderFills.js b/examples/apidoc/RestClientV2/getFuturesHistoricOrderFills.js index 71c6ef6..a2c7660 100644 --- a/examples/apidoc/RestClientV2/getFuturesHistoricOrderFills.js +++ b/examples/apidoc/RestClientV2/getFuturesHistoricOrderFills.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricOrders.js b/examples/apidoc/RestClientV2/getFuturesHistoricOrders.js index 99ddca7..2c18286 100644 --- a/examples/apidoc/RestClientV2/getFuturesHistoricOrders.js +++ b/examples/apidoc/RestClientV2/getFuturesHistoricOrders.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricPlanOrders.js b/examples/apidoc/RestClientV2/getFuturesHistoricPlanOrders.js index 180be83..b73b16e 100644 --- a/examples/apidoc/RestClientV2/getFuturesHistoricPlanOrders.js +++ b/examples/apidoc/RestClientV2/getFuturesHistoricPlanOrders.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricPositions.js b/examples/apidoc/RestClientV2/getFuturesHistoricPositions.js index 44ff98c..a984c45 100644 --- a/examples/apidoc/RestClientV2/getFuturesHistoricPositions.js +++ b/examples/apidoc/RestClientV2/getFuturesHistoricPositions.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricTrades.js b/examples/apidoc/RestClientV2/getFuturesHistoricTrades.js index 41b0f35..f8dd127 100644 --- a/examples/apidoc/RestClientV2/getFuturesHistoricTrades.js +++ b/examples/apidoc/RestClientV2/getFuturesHistoricTrades.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesInterestExchangeRate.js b/examples/apidoc/RestClientV2/getFuturesInterestExchangeRate.js index 8e24134..eb98422 100644 --- a/examples/apidoc/RestClientV2/getFuturesInterestExchangeRate.js +++ b/examples/apidoc/RestClientV2/getFuturesInterestExchangeRate.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesInterestHistory.js b/examples/apidoc/RestClientV2/getFuturesInterestHistory.js index 0a6e126..db3eafd 100644 --- a/examples/apidoc/RestClientV2/getFuturesInterestHistory.js +++ b/examples/apidoc/RestClientV2/getFuturesInterestHistory.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesInterestRateHistory.js b/examples/apidoc/RestClientV2/getFuturesInterestRateHistory.js index bd87732..dc72e8b 100644 --- a/examples/apidoc/RestClientV2/getFuturesInterestRateHistory.js +++ b/examples/apidoc/RestClientV2/getFuturesInterestRateHistory.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesLongShortRatio.js b/examples/apidoc/RestClientV2/getFuturesLongShortRatio.js index 5429a8c..f181196 100644 --- a/examples/apidoc/RestClientV2/getFuturesLongShortRatio.js +++ b/examples/apidoc/RestClientV2/getFuturesLongShortRatio.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesMergeDepth.js b/examples/apidoc/RestClientV2/getFuturesMergeDepth.js index 216f24b..6a585d3 100644 --- a/examples/apidoc/RestClientV2/getFuturesMergeDepth.js +++ b/examples/apidoc/RestClientV2/getFuturesMergeDepth.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesNextFundingTime.js b/examples/apidoc/RestClientV2/getFuturesNextFundingTime.js index 008c003..1cf21a0 100644 --- a/examples/apidoc/RestClientV2/getFuturesNextFundingTime.js +++ b/examples/apidoc/RestClientV2/getFuturesNextFundingTime.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesOpenCount.js b/examples/apidoc/RestClientV2/getFuturesOpenCount.js index b211beb..3fd5511 100644 --- a/examples/apidoc/RestClientV2/getFuturesOpenCount.js +++ b/examples/apidoc/RestClientV2/getFuturesOpenCount.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesOpenInterest.js b/examples/apidoc/RestClientV2/getFuturesOpenInterest.js index e9f02cc..c6b4cda 100644 --- a/examples/apidoc/RestClientV2/getFuturesOpenInterest.js +++ b/examples/apidoc/RestClientV2/getFuturesOpenInterest.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesOpenOrders.js b/examples/apidoc/RestClientV2/getFuturesOpenOrders.js index 5d2693f..7a53c27 100644 --- a/examples/apidoc/RestClientV2/getFuturesOpenOrders.js +++ b/examples/apidoc/RestClientV2/getFuturesOpenOrders.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesOrder.js b/examples/apidoc/RestClientV2/getFuturesOrder.js index f7ec057..eecf660 100644 --- a/examples/apidoc/RestClientV2/getFuturesOrder.js +++ b/examples/apidoc/RestClientV2/getFuturesOrder.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesPlanOrders.js b/examples/apidoc/RestClientV2/getFuturesPlanOrders.js index 72bdb15..61ab0d8 100644 --- a/examples/apidoc/RestClientV2/getFuturesPlanOrders.js +++ b/examples/apidoc/RestClientV2/getFuturesPlanOrders.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesPosition.js b/examples/apidoc/RestClientV2/getFuturesPosition.js index eb4b43a..1709551 100644 --- a/examples/apidoc/RestClientV2/getFuturesPosition.js +++ b/examples/apidoc/RestClientV2/getFuturesPosition.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesPositionTier.js b/examples/apidoc/RestClientV2/getFuturesPositionTier.js index 1f72477..22557c3 100644 --- a/examples/apidoc/RestClientV2/getFuturesPositionTier.js +++ b/examples/apidoc/RestClientV2/getFuturesPositionTier.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesPositions.js b/examples/apidoc/RestClientV2/getFuturesPositions.js index 9485a5a..a05f81e 100644 --- a/examples/apidoc/RestClientV2/getFuturesPositions.js +++ b/examples/apidoc/RestClientV2/getFuturesPositions.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesRecentTrades.js b/examples/apidoc/RestClientV2/getFuturesRecentTrades.js index a80f55d..6e08a9d 100644 --- a/examples/apidoc/RestClientV2/getFuturesRecentTrades.js +++ b/examples/apidoc/RestClientV2/getFuturesRecentTrades.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesSubAccountAssets.js b/examples/apidoc/RestClientV2/getFuturesSubAccountAssets.js index 8ba91bb..9d4e403 100644 --- a/examples/apidoc/RestClientV2/getFuturesSubAccountAssets.js +++ b/examples/apidoc/RestClientV2/getFuturesSubAccountAssets.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesSymbolPrice.js b/examples/apidoc/RestClientV2/getFuturesSymbolPrice.js index 1993020..1bbe105 100644 --- a/examples/apidoc/RestClientV2/getFuturesSymbolPrice.js +++ b/examples/apidoc/RestClientV2/getFuturesSymbolPrice.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesTicker.js b/examples/apidoc/RestClientV2/getFuturesTicker.js index daaa8f1..5d88282 100644 --- a/examples/apidoc/RestClientV2/getFuturesTicker.js +++ b/examples/apidoc/RestClientV2/getFuturesTicker.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesTraderCurrentOrder.js b/examples/apidoc/RestClientV2/getFuturesTraderCurrentOrder.js index 9913322..c92ce3a 100644 --- a/examples/apidoc/RestClientV2/getFuturesTraderCurrentOrder.js +++ b/examples/apidoc/RestClientV2/getFuturesTraderCurrentOrder.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesTraderFollowers.js b/examples/apidoc/RestClientV2/getFuturesTraderFollowers.js index 38bbc82..b3c9ee4 100644 --- a/examples/apidoc/RestClientV2/getFuturesTraderFollowers.js +++ b/examples/apidoc/RestClientV2/getFuturesTraderFollowers.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesTraderHistoryOrders.js b/examples/apidoc/RestClientV2/getFuturesTraderHistoryOrders.js index 71bcdd0..44fbdc5 100644 --- a/examples/apidoc/RestClientV2/getFuturesTraderHistoryOrders.js +++ b/examples/apidoc/RestClientV2/getFuturesTraderHistoryOrders.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesTraderOrder.js b/examples/apidoc/RestClientV2/getFuturesTraderOrder.js index b3e0252..8202285 100644 --- a/examples/apidoc/RestClientV2/getFuturesTraderOrder.js +++ b/examples/apidoc/RestClientV2/getFuturesTraderOrder.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesTraderProfitHistory.js b/examples/apidoc/RestClientV2/getFuturesTraderProfitHistory.js index bec1125..0897edd 100644 --- a/examples/apidoc/RestClientV2/getFuturesTraderProfitHistory.js +++ b/examples/apidoc/RestClientV2/getFuturesTraderProfitHistory.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesTraderProfitShare.js b/examples/apidoc/RestClientV2/getFuturesTraderProfitShare.js index 3ac549b..a16a5d0 100644 --- a/examples/apidoc/RestClientV2/getFuturesTraderProfitShare.js +++ b/examples/apidoc/RestClientV2/getFuturesTraderProfitShare.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesTraderProfitShareGroup.js b/examples/apidoc/RestClientV2/getFuturesTraderProfitShareGroup.js index ef3e24f..0320d94 100644 --- a/examples/apidoc/RestClientV2/getFuturesTraderProfitShareGroup.js +++ b/examples/apidoc/RestClientV2/getFuturesTraderProfitShareGroup.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesTraderProfitShareHistory.js b/examples/apidoc/RestClientV2/getFuturesTraderProfitShareHistory.js index 01e2df5..c77d61d 100644 --- a/examples/apidoc/RestClientV2/getFuturesTraderProfitShareHistory.js +++ b/examples/apidoc/RestClientV2/getFuturesTraderProfitShareHistory.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesTraderSymbolSettings.js b/examples/apidoc/RestClientV2/getFuturesTraderSymbolSettings.js index e8441c9..8461eda 100644 --- a/examples/apidoc/RestClientV2/getFuturesTraderSymbolSettings.js +++ b/examples/apidoc/RestClientV2/getFuturesTraderSymbolSettings.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesTransactionRecords.js b/examples/apidoc/RestClientV2/getFuturesTransactionRecords.js index cf7df58..fce8584 100644 --- a/examples/apidoc/RestClientV2/getFuturesTransactionRecords.js +++ b/examples/apidoc/RestClientV2/getFuturesTransactionRecords.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesTriggerSubOrder.js b/examples/apidoc/RestClientV2/getFuturesTriggerSubOrder.js index 3245c5f..10a1190 100644 --- a/examples/apidoc/RestClientV2/getFuturesTriggerSubOrder.js +++ b/examples/apidoc/RestClientV2/getFuturesTriggerSubOrder.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getFuturesVIPFeeRate.js b/examples/apidoc/RestClientV2/getFuturesVIPFeeRate.js index 4c19cae..b234867 100644 --- a/examples/apidoc/RestClientV2/getFuturesVIPFeeRate.js +++ b/examples/apidoc/RestClientV2/getFuturesVIPFeeRate.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getIsolatedMarginBorrowingRatio.js b/examples/apidoc/RestClientV2/getIsolatedMarginBorrowingRatio.js index bfdcbe1..b4c16a3 100644 --- a/examples/apidoc/RestClientV2/getIsolatedMarginBorrowingRatio.js +++ b/examples/apidoc/RestClientV2/getIsolatedMarginBorrowingRatio.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getLoanCurrencies.js b/examples/apidoc/RestClientV2/getLoanCurrencies.js index 6d30672..bb89890 100644 --- a/examples/apidoc/RestClientV2/getLoanCurrencies.js +++ b/examples/apidoc/RestClientV2/getLoanCurrencies.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getLoanDebts.js b/examples/apidoc/RestClientV2/getLoanDebts.js index 8809c67..267d01d 100644 --- a/examples/apidoc/RestClientV2/getLoanDebts.js +++ b/examples/apidoc/RestClientV2/getLoanDebts.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getLoanEstInterestAndBorrowable.js b/examples/apidoc/RestClientV2/getLoanEstInterestAndBorrowable.js index f981b32..eef0ed4 100644 --- a/examples/apidoc/RestClientV2/getLoanEstInterestAndBorrowable.js +++ b/examples/apidoc/RestClientV2/getLoanEstInterestAndBorrowable.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getLoanHistory.js b/examples/apidoc/RestClientV2/getLoanHistory.js index 59642da..1562d54 100644 --- a/examples/apidoc/RestClientV2/getLoanHistory.js +++ b/examples/apidoc/RestClientV2/getLoanHistory.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getLoanLiquidationRecords.js b/examples/apidoc/RestClientV2/getLoanLiquidationRecords.js index 42670e2..4cd7605 100644 --- a/examples/apidoc/RestClientV2/getLoanLiquidationRecords.js +++ b/examples/apidoc/RestClientV2/getLoanLiquidationRecords.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getLoanPledgeRateHistory.js b/examples/apidoc/RestClientV2/getLoanPledgeRateHistory.js index 6533334..8b5c3e6 100644 --- a/examples/apidoc/RestClientV2/getLoanPledgeRateHistory.js +++ b/examples/apidoc/RestClientV2/getLoanPledgeRateHistory.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getMarginAccountAssets.js b/examples/apidoc/RestClientV2/getMarginAccountAssets.js index 9df3228..4d55c50 100644 --- a/examples/apidoc/RestClientV2/getMarginAccountAssets.js +++ b/examples/apidoc/RestClientV2/getMarginAccountAssets.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getMarginBorrowHistory.js b/examples/apidoc/RestClientV2/getMarginBorrowHistory.js index 0b0f72f..da08fc3 100644 --- a/examples/apidoc/RestClientV2/getMarginBorrowHistory.js +++ b/examples/apidoc/RestClientV2/getMarginBorrowHistory.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getMarginCurrencies.js b/examples/apidoc/RestClientV2/getMarginCurrencies.js index f7edb81..f6a56cb 100644 --- a/examples/apidoc/RestClientV2/getMarginCurrencies.js +++ b/examples/apidoc/RestClientV2/getMarginCurrencies.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getMarginFinancialHistory.js b/examples/apidoc/RestClientV2/getMarginFinancialHistory.js index f163401..06d992b 100644 --- a/examples/apidoc/RestClientV2/getMarginFinancialHistory.js +++ b/examples/apidoc/RestClientV2/getMarginFinancialHistory.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getMarginFlashRepayResult.js b/examples/apidoc/RestClientV2/getMarginFlashRepayResult.js index 19b1787..992fbb5 100644 --- a/examples/apidoc/RestClientV2/getMarginFlashRepayResult.js +++ b/examples/apidoc/RestClientV2/getMarginFlashRepayResult.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getMarginHistoricOrderFills.js b/examples/apidoc/RestClientV2/getMarginHistoricOrderFills.js index 74ef54a..a968649 100644 --- a/examples/apidoc/RestClientV2/getMarginHistoricOrderFills.js +++ b/examples/apidoc/RestClientV2/getMarginHistoricOrderFills.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getMarginHistoricOrders.js b/examples/apidoc/RestClientV2/getMarginHistoricOrders.js index d0fd474..2b0928b 100644 --- a/examples/apidoc/RestClientV2/getMarginHistoricOrders.js +++ b/examples/apidoc/RestClientV2/getMarginHistoricOrders.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getMarginInterestHistory.js b/examples/apidoc/RestClientV2/getMarginInterestHistory.js index 2e7456c..df4c507 100644 --- a/examples/apidoc/RestClientV2/getMarginInterestHistory.js +++ b/examples/apidoc/RestClientV2/getMarginInterestHistory.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getMarginInterestRateAndMaxBorrowable.js b/examples/apidoc/RestClientV2/getMarginInterestRateAndMaxBorrowable.js index 60a72a2..ea0fb46 100644 --- a/examples/apidoc/RestClientV2/getMarginInterestRateAndMaxBorrowable.js +++ b/examples/apidoc/RestClientV2/getMarginInterestRateAndMaxBorrowable.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getMarginLiquidationHistory.js b/examples/apidoc/RestClientV2/getMarginLiquidationHistory.js index e6dcebd..06cbe11 100644 --- a/examples/apidoc/RestClientV2/getMarginLiquidationHistory.js +++ b/examples/apidoc/RestClientV2/getMarginLiquidationHistory.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getMarginLiquidationOrders.js b/examples/apidoc/RestClientV2/getMarginLiquidationOrders.js index 83408f4..d579b67 100644 --- a/examples/apidoc/RestClientV2/getMarginLiquidationOrders.js +++ b/examples/apidoc/RestClientV2/getMarginLiquidationOrders.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getMarginLoanGrowthRate.js b/examples/apidoc/RestClientV2/getMarginLoanGrowthRate.js index 7a20269..4f0d719 100644 --- a/examples/apidoc/RestClientV2/getMarginLoanGrowthRate.js +++ b/examples/apidoc/RestClientV2/getMarginLoanGrowthRate.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getMarginMaxBorrowable.js b/examples/apidoc/RestClientV2/getMarginMaxBorrowable.js index 530dc57..411e117 100644 --- a/examples/apidoc/RestClientV2/getMarginMaxBorrowable.js +++ b/examples/apidoc/RestClientV2/getMarginMaxBorrowable.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getMarginMaxTransferable.js b/examples/apidoc/RestClientV2/getMarginMaxTransferable.js index d467e22..edf0372 100644 --- a/examples/apidoc/RestClientV2/getMarginMaxTransferable.js +++ b/examples/apidoc/RestClientV2/getMarginMaxTransferable.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getMarginOpenOrders.js b/examples/apidoc/RestClientV2/getMarginOpenOrders.js index bac1416..9205040 100644 --- a/examples/apidoc/RestClientV2/getMarginOpenOrders.js +++ b/examples/apidoc/RestClientV2/getMarginOpenOrders.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getMarginRepayHistory.js b/examples/apidoc/RestClientV2/getMarginRepayHistory.js index 20d6db7..93ccea9 100644 --- a/examples/apidoc/RestClientV2/getMarginRepayHistory.js +++ b/examples/apidoc/RestClientV2/getMarginRepayHistory.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getMarginRiskRate.js b/examples/apidoc/RestClientV2/getMarginRiskRate.js index 5b27f0d..e02e83d 100644 --- a/examples/apidoc/RestClientV2/getMarginRiskRate.js +++ b/examples/apidoc/RestClientV2/getMarginRiskRate.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getMarginTierConfiguration.js b/examples/apidoc/RestClientV2/getMarginTierConfiguration.js index 58c17b6..f72a4c9 100644 --- a/examples/apidoc/RestClientV2/getMarginTierConfiguration.js +++ b/examples/apidoc/RestClientV2/getMarginTierConfiguration.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getMarginTransactionRecords.js b/examples/apidoc/RestClientV2/getMarginTransactionRecords.js index c2e29e7..feb4cf1 100644 --- a/examples/apidoc/RestClientV2/getMarginTransactionRecords.js +++ b/examples/apidoc/RestClientV2/getMarginTransactionRecords.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getOngoingLoanOrders.js b/examples/apidoc/RestClientV2/getOngoingLoanOrders.js index 0e6f317..d0b627e 100644 --- a/examples/apidoc/RestClientV2/getOngoingLoanOrders.js +++ b/examples/apidoc/RestClientV2/getOngoingLoanOrders.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getP2PMerchantAdvertisementList.js b/examples/apidoc/RestClientV2/getP2PMerchantAdvertisementList.js index 719b1c2..f935666 100644 --- a/examples/apidoc/RestClientV2/getP2PMerchantAdvertisementList.js +++ b/examples/apidoc/RestClientV2/getP2PMerchantAdvertisementList.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getP2PMerchantInfo.js b/examples/apidoc/RestClientV2/getP2PMerchantInfo.js index 59e4ed0..7ad0459 100644 --- a/examples/apidoc/RestClientV2/getP2PMerchantInfo.js +++ b/examples/apidoc/RestClientV2/getP2PMerchantInfo.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getP2PMerchantList.js b/examples/apidoc/RestClientV2/getP2PMerchantList.js index 4351e49..a5a9243 100644 --- a/examples/apidoc/RestClientV2/getP2PMerchantList.js +++ b/examples/apidoc/RestClientV2/getP2PMerchantList.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getP2PMerchantOrders.js b/examples/apidoc/RestClientV2/getP2PMerchantOrders.js index 9fea932..f533417 100644 --- a/examples/apidoc/RestClientV2/getP2PMerchantOrders.js +++ b/examples/apidoc/RestClientV2/getP2PMerchantOrders.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getP2PTransactionRecords.js b/examples/apidoc/RestClientV2/getP2PTransactionRecords.js index 9730b8a..2e000b0 100644 --- a/examples/apidoc/RestClientV2/getP2PTransactionRecords.js +++ b/examples/apidoc/RestClientV2/getP2PTransactionRecords.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getRepayHistory.js b/examples/apidoc/RestClientV2/getRepayHistory.js index 3942ce6..7a0254d 100644 --- a/examples/apidoc/RestClientV2/getRepayHistory.js +++ b/examples/apidoc/RestClientV2/getRepayHistory.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getServerTime.js b/examples/apidoc/RestClientV2/getServerTime.js index d91a284..9aead24 100644 --- a/examples/apidoc/RestClientV2/getServerTime.js +++ b/examples/apidoc/RestClientV2/getServerTime.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSharkfinAccount.js b/examples/apidoc/RestClientV2/getSharkfinAccount.js index c5cc294..0c05010 100644 --- a/examples/apidoc/RestClientV2/getSharkfinAccount.js +++ b/examples/apidoc/RestClientV2/getSharkfinAccount.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSharkfinAssets.js b/examples/apidoc/RestClientV2/getSharkfinAssets.js index 76e0b3b..77b7c9c 100644 --- a/examples/apidoc/RestClientV2/getSharkfinAssets.js +++ b/examples/apidoc/RestClientV2/getSharkfinAssets.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSharkfinProducts.js b/examples/apidoc/RestClientV2/getSharkfinProducts.js index 7485eb6..3437067 100644 --- a/examples/apidoc/RestClientV2/getSharkfinProducts.js +++ b/examples/apidoc/RestClientV2/getSharkfinProducts.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSharkfinRecords.js b/examples/apidoc/RestClientV2/getSharkfinRecords.js index 54b17af..5a103c6 100644 --- a/examples/apidoc/RestClientV2/getSharkfinRecords.js +++ b/examples/apidoc/RestClientV2/getSharkfinRecords.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSharkfinSubscription.js b/examples/apidoc/RestClientV2/getSharkfinSubscription.js index 0afd6cc..c97d188 100644 --- a/examples/apidoc/RestClientV2/getSharkfinSubscription.js +++ b/examples/apidoc/RestClientV2/getSharkfinSubscription.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSharkfinSubscriptionResult.js b/examples/apidoc/RestClientV2/getSharkfinSubscriptionResult.js index 035e721..2f86430 100644 --- a/examples/apidoc/RestClientV2/getSharkfinSubscriptionResult.js +++ b/examples/apidoc/RestClientV2/getSharkfinSubscriptionResult.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotAccount.js b/examples/apidoc/RestClientV2/getSpotAccount.js index 2f88266..98b8cdb 100644 --- a/examples/apidoc/RestClientV2/getSpotAccount.js +++ b/examples/apidoc/RestClientV2/getSpotAccount.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotAccountAssets.js b/examples/apidoc/RestClientV2/getSpotAccountAssets.js index 99245a9..11b804d 100644 --- a/examples/apidoc/RestClientV2/getSpotAccountAssets.js +++ b/examples/apidoc/RestClientV2/getSpotAccountAssets.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotAccountBills.js b/examples/apidoc/RestClientV2/getSpotAccountBills.js index c5428c8..3f29ac0 100644 --- a/examples/apidoc/RestClientV2/getSpotAccountBills.js +++ b/examples/apidoc/RestClientV2/getSpotAccountBills.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotBGBDeductInfo.js b/examples/apidoc/RestClientV2/getSpotBGBDeductInfo.js index 12f27d5..2e2c8ac 100644 --- a/examples/apidoc/RestClientV2/getSpotBGBDeductInfo.js +++ b/examples/apidoc/RestClientV2/getSpotBGBDeductInfo.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotCandles.js b/examples/apidoc/RestClientV2/getSpotCandles.js index c0a7f93..f7543af 100644 --- a/examples/apidoc/RestClientV2/getSpotCandles.js +++ b/examples/apidoc/RestClientV2/getSpotCandles.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotCoinInfo.js b/examples/apidoc/RestClientV2/getSpotCoinInfo.js index accf0f7..b3fbd87 100644 --- a/examples/apidoc/RestClientV2/getSpotCoinInfo.js +++ b/examples/apidoc/RestClientV2/getSpotCoinInfo.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotCurrentPlanOrders.js b/examples/apidoc/RestClientV2/getSpotCurrentPlanOrders.js index 2bb3c52..a2c497b 100644 --- a/examples/apidoc/RestClientV2/getSpotCurrentPlanOrders.js +++ b/examples/apidoc/RestClientV2/getSpotCurrentPlanOrders.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotDepositAddress.js b/examples/apidoc/RestClientV2/getSpotDepositAddress.js index ef6055e..d74b1aa 100644 --- a/examples/apidoc/RestClientV2/getSpotDepositAddress.js +++ b/examples/apidoc/RestClientV2/getSpotDepositAddress.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotDepositHistory.js b/examples/apidoc/RestClientV2/getSpotDepositHistory.js index f794cca..3e34324 100644 --- a/examples/apidoc/RestClientV2/getSpotDepositHistory.js +++ b/examples/apidoc/RestClientV2/getSpotDepositHistory.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotFills.js b/examples/apidoc/RestClientV2/getSpotFills.js index 1ea3729..14f9d9f 100644 --- a/examples/apidoc/RestClientV2/getSpotFills.js +++ b/examples/apidoc/RestClientV2/getSpotFills.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotFollowerCurrentTraderSymbols.js b/examples/apidoc/RestClientV2/getSpotFollowerCurrentTraderSymbols.js index 9b34a68..cfd059d 100644 --- a/examples/apidoc/RestClientV2/getSpotFollowerCurrentTraderSymbols.js +++ b/examples/apidoc/RestClientV2/getSpotFollowerCurrentTraderSymbols.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotFollowerHistoryOrders.js b/examples/apidoc/RestClientV2/getSpotFollowerHistoryOrders.js index feb5c07..768ba89 100644 --- a/examples/apidoc/RestClientV2/getSpotFollowerHistoryOrders.js +++ b/examples/apidoc/RestClientV2/getSpotFollowerHistoryOrders.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotFollowerOpenOrders.js b/examples/apidoc/RestClientV2/getSpotFollowerOpenOrders.js index 52a473f..6b735e0 100644 --- a/examples/apidoc/RestClientV2/getSpotFollowerOpenOrders.js +++ b/examples/apidoc/RestClientV2/getSpotFollowerOpenOrders.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotFollowerSettings.js b/examples/apidoc/RestClientV2/getSpotFollowerSettings.js index 563f2f9..38d9d7e 100644 --- a/examples/apidoc/RestClientV2/getSpotFollowerSettings.js +++ b/examples/apidoc/RestClientV2/getSpotFollowerSettings.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotFollowerTraders.js b/examples/apidoc/RestClientV2/getSpotFollowerTraders.js index a5254bf..f9f9dd5 100644 --- a/examples/apidoc/RestClientV2/getSpotFollowerTraders.js +++ b/examples/apidoc/RestClientV2/getSpotFollowerTraders.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotFundFlow.js b/examples/apidoc/RestClientV2/getSpotFundFlow.js index 746998c..cca7c34 100644 --- a/examples/apidoc/RestClientV2/getSpotFundFlow.js +++ b/examples/apidoc/RestClientV2/getSpotFundFlow.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotFundNetFlowData.js b/examples/apidoc/RestClientV2/getSpotFundNetFlowData.js index bf8af8a..1579c4a 100644 --- a/examples/apidoc/RestClientV2/getSpotFundNetFlowData.js +++ b/examples/apidoc/RestClientV2/getSpotFundNetFlowData.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotHistoricCandles.js b/examples/apidoc/RestClientV2/getSpotHistoricCandles.js index 6db5ce6..a5dc0ad 100644 --- a/examples/apidoc/RestClientV2/getSpotHistoricCandles.js +++ b/examples/apidoc/RestClientV2/getSpotHistoricCandles.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotHistoricOrders.js b/examples/apidoc/RestClientV2/getSpotHistoricOrders.js index cd41456..7ae748b 100644 --- a/examples/apidoc/RestClientV2/getSpotHistoricOrders.js +++ b/examples/apidoc/RestClientV2/getSpotHistoricOrders.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotHistoricPlanOrders.js b/examples/apidoc/RestClientV2/getSpotHistoricPlanOrders.js index b910ca6..ff8dfa0 100644 --- a/examples/apidoc/RestClientV2/getSpotHistoricPlanOrders.js +++ b/examples/apidoc/RestClientV2/getSpotHistoricPlanOrders.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotHistoricTrades.js b/examples/apidoc/RestClientV2/getSpotHistoricTrades.js index 4399da5..36069c4 100644 --- a/examples/apidoc/RestClientV2/getSpotHistoricTrades.js +++ b/examples/apidoc/RestClientV2/getSpotHistoricTrades.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotMainSubTransferRecord.js b/examples/apidoc/RestClientV2/getSpotMainSubTransferRecord.js index 026d30e..0af6ab4 100644 --- a/examples/apidoc/RestClientV2/getSpotMainSubTransferRecord.js +++ b/examples/apidoc/RestClientV2/getSpotMainSubTransferRecord.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotMergeDepth.js b/examples/apidoc/RestClientV2/getSpotMergeDepth.js index b011731..c13f589 100644 --- a/examples/apidoc/RestClientV2/getSpotMergeDepth.js +++ b/examples/apidoc/RestClientV2/getSpotMergeDepth.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotOpenOrders.js b/examples/apidoc/RestClientV2/getSpotOpenOrders.js index 36cb83c..1b1e0b0 100644 --- a/examples/apidoc/RestClientV2/getSpotOpenOrders.js +++ b/examples/apidoc/RestClientV2/getSpotOpenOrders.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotOrder.js b/examples/apidoc/RestClientV2/getSpotOrder.js index 1fd27b6..a33112a 100644 --- a/examples/apidoc/RestClientV2/getSpotOrder.js +++ b/examples/apidoc/RestClientV2/getSpotOrder.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotOrderBookDepth.js b/examples/apidoc/RestClientV2/getSpotOrderBookDepth.js index 33635dc..7dd307a 100644 --- a/examples/apidoc/RestClientV2/getSpotOrderBookDepth.js +++ b/examples/apidoc/RestClientV2/getSpotOrderBookDepth.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotPlanSubOrder.js b/examples/apidoc/RestClientV2/getSpotPlanSubOrder.js index 884b955..632ff6d 100644 --- a/examples/apidoc/RestClientV2/getSpotPlanSubOrder.js +++ b/examples/apidoc/RestClientV2/getSpotPlanSubOrder.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotRecentTrades.js b/examples/apidoc/RestClientV2/getSpotRecentTrades.js index 8c7b64f..461eb00 100644 --- a/examples/apidoc/RestClientV2/getSpotRecentTrades.js +++ b/examples/apidoc/RestClientV2/getSpotRecentTrades.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotSubAccountAssets.js b/examples/apidoc/RestClientV2/getSpotSubAccountAssets.js index a33b5a5..19e4b48 100644 --- a/examples/apidoc/RestClientV2/getSpotSubAccountAssets.js +++ b/examples/apidoc/RestClientV2/getSpotSubAccountAssets.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotSubDepositAddress.js b/examples/apidoc/RestClientV2/getSpotSubDepositAddress.js index 466d617..d028ba1 100644 --- a/examples/apidoc/RestClientV2/getSpotSubDepositAddress.js +++ b/examples/apidoc/RestClientV2/getSpotSubDepositAddress.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotSymbolInfo.js b/examples/apidoc/RestClientV2/getSpotSymbolInfo.js index 55db7bf..1cb5b96 100644 --- a/examples/apidoc/RestClientV2/getSpotSymbolInfo.js +++ b/examples/apidoc/RestClientV2/getSpotSymbolInfo.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotTicker.js b/examples/apidoc/RestClientV2/getSpotTicker.js index 3359504..6bdcb19 100644 --- a/examples/apidoc/RestClientV2/getSpotTicker.js +++ b/examples/apidoc/RestClientV2/getSpotTicker.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotTraderConfiguration.js b/examples/apidoc/RestClientV2/getSpotTraderConfiguration.js index 13bcc23..130318d 100644 --- a/examples/apidoc/RestClientV2/getSpotTraderConfiguration.js +++ b/examples/apidoc/RestClientV2/getSpotTraderConfiguration.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotTraderCurrentOrders.js b/examples/apidoc/RestClientV2/getSpotTraderCurrentOrders.js index 9050f9e..03a19d1 100644 --- a/examples/apidoc/RestClientV2/getSpotTraderCurrentOrders.js +++ b/examples/apidoc/RestClientV2/getSpotTraderCurrentOrders.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotTraderFollowers.js b/examples/apidoc/RestClientV2/getSpotTraderFollowers.js index 0f67c09..2e545f3 100644 --- a/examples/apidoc/RestClientV2/getSpotTraderFollowers.js +++ b/examples/apidoc/RestClientV2/getSpotTraderFollowers.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotTraderHistoryOrders.js b/examples/apidoc/RestClientV2/getSpotTraderHistoryOrders.js index d489537..92902b8 100644 --- a/examples/apidoc/RestClientV2/getSpotTraderHistoryOrders.js +++ b/examples/apidoc/RestClientV2/getSpotTraderHistoryOrders.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotTraderHistoryProfit.js b/examples/apidoc/RestClientV2/getSpotTraderHistoryProfit.js index b4c7d02..35cb978 100644 --- a/examples/apidoc/RestClientV2/getSpotTraderHistoryProfit.js +++ b/examples/apidoc/RestClientV2/getSpotTraderHistoryProfit.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotTraderOrder.js b/examples/apidoc/RestClientV2/getSpotTraderOrder.js index 61e71e8..905babe 100644 --- a/examples/apidoc/RestClientV2/getSpotTraderOrder.js +++ b/examples/apidoc/RestClientV2/getSpotTraderOrder.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotTraderProfit.js b/examples/apidoc/RestClientV2/getSpotTraderProfit.js index 57805ba..03c381c 100644 --- a/examples/apidoc/RestClientV2/getSpotTraderProfit.js +++ b/examples/apidoc/RestClientV2/getSpotTraderProfit.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotTraderSymbolSettings.js b/examples/apidoc/RestClientV2/getSpotTraderSymbolSettings.js index 39b0642..72ec941 100644 --- a/examples/apidoc/RestClientV2/getSpotTraderSymbolSettings.js +++ b/examples/apidoc/RestClientV2/getSpotTraderSymbolSettings.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotTraderUnrealizedProfit.js b/examples/apidoc/RestClientV2/getSpotTraderUnrealizedProfit.js index 7aaac28..b4cc58a 100644 --- a/examples/apidoc/RestClientV2/getSpotTraderUnrealizedProfit.js +++ b/examples/apidoc/RestClientV2/getSpotTraderUnrealizedProfit.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotTransactionRecords.js b/examples/apidoc/RestClientV2/getSpotTransactionRecords.js index 0f2f07e..e91ff5c 100644 --- a/examples/apidoc/RestClientV2/getSpotTransactionRecords.js +++ b/examples/apidoc/RestClientV2/getSpotTransactionRecords.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotTransferHistory.js b/examples/apidoc/RestClientV2/getSpotTransferHistory.js index 6d1e56c..2575230 100644 --- a/examples/apidoc/RestClientV2/getSpotTransferHistory.js +++ b/examples/apidoc/RestClientV2/getSpotTransferHistory.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotTransferableCoins.js b/examples/apidoc/RestClientV2/getSpotTransferableCoins.js index 5bf1e26..6b0d1b4 100644 --- a/examples/apidoc/RestClientV2/getSpotTransferableCoins.js +++ b/examples/apidoc/RestClientV2/getSpotTransferableCoins.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotVIPFeeRate.js b/examples/apidoc/RestClientV2/getSpotVIPFeeRate.js index d7174b3..27b58e1 100644 --- a/examples/apidoc/RestClientV2/getSpotVIPFeeRate.js +++ b/examples/apidoc/RestClientV2/getSpotVIPFeeRate.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotWhaleNetFlowData.js b/examples/apidoc/RestClientV2/getSpotWhaleNetFlowData.js index d1c608d..2cc4b24 100644 --- a/examples/apidoc/RestClientV2/getSpotWhaleNetFlowData.js +++ b/examples/apidoc/RestClientV2/getSpotWhaleNetFlowData.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSpotWithdrawalHistory.js b/examples/apidoc/RestClientV2/getSpotWithdrawalHistory.js index 45202bb..2687710 100644 --- a/examples/apidoc/RestClientV2/getSpotWithdrawalHistory.js +++ b/examples/apidoc/RestClientV2/getSpotWithdrawalHistory.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSubAccountDepositRecords.js b/examples/apidoc/RestClientV2/getSubAccountDepositRecords.js index 3bc456e..4a16208 100644 --- a/examples/apidoc/RestClientV2/getSubAccountDepositRecords.js +++ b/examples/apidoc/RestClientV2/getSubAccountDepositRecords.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSubaccountApiKey.js b/examples/apidoc/RestClientV2/getSubaccountApiKey.js index 473e06b..b612265 100644 --- a/examples/apidoc/RestClientV2/getSubaccountApiKey.js +++ b/examples/apidoc/RestClientV2/getSubaccountApiKey.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSubaccountEmail.js b/examples/apidoc/RestClientV2/getSubaccountEmail.js index b8918c0..78d7181 100644 --- a/examples/apidoc/RestClientV2/getSubaccountEmail.js +++ b/examples/apidoc/RestClientV2/getSubaccountEmail.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSubaccountFuturesAssets.js b/examples/apidoc/RestClientV2/getSubaccountFuturesAssets.js index e013dfb..624fbe3 100644 --- a/examples/apidoc/RestClientV2/getSubaccountFuturesAssets.js +++ b/examples/apidoc/RestClientV2/getSubaccountFuturesAssets.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSubaccountSpotAssets.js b/examples/apidoc/RestClientV2/getSubaccountSpotAssets.js index f274da8..8797ca1 100644 --- a/examples/apidoc/RestClientV2/getSubaccountSpotAssets.js +++ b/examples/apidoc/RestClientV2/getSubaccountSpotAssets.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getSubaccounts.js b/examples/apidoc/RestClientV2/getSubaccounts.js index ba28809..e2d3fe8 100644 --- a/examples/apidoc/RestClientV2/getSubaccounts.js +++ b/examples/apidoc/RestClientV2/getSubaccounts.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getTradeDataSupportSymbols.js b/examples/apidoc/RestClientV2/getTradeDataSupportSymbols.js index 629cab4..5492f2d 100644 --- a/examples/apidoc/RestClientV2/getTradeDataSupportSymbols.js +++ b/examples/apidoc/RestClientV2/getTradeDataSupportSymbols.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getTradeRate.js b/examples/apidoc/RestClientV2/getTradeRate.js index 1b6dbae..0398dd8 100644 --- a/examples/apidoc/RestClientV2/getTradeRate.js +++ b/examples/apidoc/RestClientV2/getTradeRate.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getVirtualSubaccountAPIKeys.js b/examples/apidoc/RestClientV2/getVirtualSubaccountAPIKeys.js index f638cd9..40a9984 100644 --- a/examples/apidoc/RestClientV2/getVirtualSubaccountAPIKeys.js +++ b/examples/apidoc/RestClientV2/getVirtualSubaccountAPIKeys.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/getVirtualSubaccounts.js b/examples/apidoc/RestClientV2/getVirtualSubaccounts.js index e794d06..7de4faa 100644 --- a/examples/apidoc/RestClientV2/getVirtualSubaccounts.js +++ b/examples/apidoc/RestClientV2/getVirtualSubaccounts.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/marginBatchCancelOrders.js b/examples/apidoc/RestClientV2/marginBatchCancelOrders.js index ece8889..cfb72c7 100644 --- a/examples/apidoc/RestClientV2/marginBatchCancelOrders.js +++ b/examples/apidoc/RestClientV2/marginBatchCancelOrders.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/marginBatchSubmitOrders.js b/examples/apidoc/RestClientV2/marginBatchSubmitOrders.js index dfb332b..631c5a8 100644 --- a/examples/apidoc/RestClientV2/marginBatchSubmitOrders.js +++ b/examples/apidoc/RestClientV2/marginBatchSubmitOrders.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/marginBorrow.js b/examples/apidoc/RestClientV2/marginBorrow.js index e957a54..a146026 100644 --- a/examples/apidoc/RestClientV2/marginBorrow.js +++ b/examples/apidoc/RestClientV2/marginBorrow.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/marginCancelOrder.js b/examples/apidoc/RestClientV2/marginCancelOrder.js index c6741d0..d0ab865 100644 --- a/examples/apidoc/RestClientV2/marginCancelOrder.js +++ b/examples/apidoc/RestClientV2/marginCancelOrder.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/marginFlashRepay.js b/examples/apidoc/RestClientV2/marginFlashRepay.js index 8de5ebc..263580d 100644 --- a/examples/apidoc/RestClientV2/marginFlashRepay.js +++ b/examples/apidoc/RestClientV2/marginFlashRepay.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/marginRepay.js b/examples/apidoc/RestClientV2/marginRepay.js index 21129f3..979c767 100644 --- a/examples/apidoc/RestClientV2/marginRepay.js +++ b/examples/apidoc/RestClientV2/marginRepay.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/marginSubmitOrder.js b/examples/apidoc/RestClientV2/marginSubmitOrder.js index 8e2bded..9dece15 100644 --- a/examples/apidoc/RestClientV2/marginSubmitOrder.js +++ b/examples/apidoc/RestClientV2/marginSubmitOrder.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/modifyFuturesTraderOrderTPSL.js b/examples/apidoc/RestClientV2/modifyFuturesTraderOrderTPSL.js index 4f67c14..a552ae6 100644 --- a/examples/apidoc/RestClientV2/modifyFuturesTraderOrderTPSL.js +++ b/examples/apidoc/RestClientV2/modifyFuturesTraderOrderTPSL.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/modifySpotTraderOrderTPSL.js b/examples/apidoc/RestClientV2/modifySpotTraderOrderTPSL.js index 57341d1..b8f9793 100644 --- a/examples/apidoc/RestClientV2/modifySpotTraderOrderTPSL.js +++ b/examples/apidoc/RestClientV2/modifySpotTraderOrderTPSL.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/modifySubaccount.js b/examples/apidoc/RestClientV2/modifySubaccount.js index 61079fc..7694257 100644 --- a/examples/apidoc/RestClientV2/modifySubaccount.js +++ b/examples/apidoc/RestClientV2/modifySubaccount.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/modifySubaccountApiKey.js b/examples/apidoc/RestClientV2/modifySubaccountApiKey.js index 893ebe7..7837fff 100644 --- a/examples/apidoc/RestClientV2/modifySubaccountApiKey.js +++ b/examples/apidoc/RestClientV2/modifySubaccountApiKey.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/modifySubaccountEmail.js b/examples/apidoc/RestClientV2/modifySubaccountEmail.js index 9b36cc4..21e2d58 100644 --- a/examples/apidoc/RestClientV2/modifySubaccountEmail.js +++ b/examples/apidoc/RestClientV2/modifySubaccountEmail.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/modifyVirtualSubaccount.js b/examples/apidoc/RestClientV2/modifyVirtualSubaccount.js index a93a36d..7a8ceda 100644 --- a/examples/apidoc/RestClientV2/modifyVirtualSubaccount.js +++ b/examples/apidoc/RestClientV2/modifyVirtualSubaccount.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/modifyVirtualSubaccountAPIKey.js b/examples/apidoc/RestClientV2/modifyVirtualSubaccountAPIKey.js index fb19daa..8219ada 100644 --- a/examples/apidoc/RestClientV2/modifyVirtualSubaccountAPIKey.js +++ b/examples/apidoc/RestClientV2/modifyVirtualSubaccountAPIKey.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/removeFuturesTraderFollower.js b/examples/apidoc/RestClientV2/removeFuturesTraderFollower.js index f528d27..2841368 100644 --- a/examples/apidoc/RestClientV2/removeFuturesTraderFollower.js +++ b/examples/apidoc/RestClientV2/removeFuturesTraderFollower.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/removeSpotTraderFollowers.js b/examples/apidoc/RestClientV2/removeSpotTraderFollowers.js index 93682cd..3c8908e 100644 --- a/examples/apidoc/RestClientV2/removeSpotTraderFollowers.js +++ b/examples/apidoc/RestClientV2/removeSpotTraderFollowers.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/repayLoan.js b/examples/apidoc/RestClientV2/repayLoan.js index 58da34e..da098b5 100644 --- a/examples/apidoc/RestClientV2/repayLoan.js +++ b/examples/apidoc/RestClientV2/repayLoan.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/sellSpotFollower.js b/examples/apidoc/RestClientV2/sellSpotFollower.js index 9d2702c..205a34c 100644 --- a/examples/apidoc/RestClientV2/sellSpotFollower.js +++ b/examples/apidoc/RestClientV2/sellSpotFollower.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/sellSpotTrader.js b/examples/apidoc/RestClientV2/sellSpotTrader.js index 79dbedb..3d90803 100644 --- a/examples/apidoc/RestClientV2/sellSpotTrader.js +++ b/examples/apidoc/RestClientV2/sellSpotTrader.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/setFuturesAssetMode.js b/examples/apidoc/RestClientV2/setFuturesAssetMode.js index 61fc855..e77e80b 100644 --- a/examples/apidoc/RestClientV2/setFuturesAssetMode.js +++ b/examples/apidoc/RestClientV2/setFuturesAssetMode.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/setFuturesLeverage.js b/examples/apidoc/RestClientV2/setFuturesLeverage.js index 3fccb5a..563312a 100644 --- a/examples/apidoc/RestClientV2/setFuturesLeverage.js +++ b/examples/apidoc/RestClientV2/setFuturesLeverage.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/setFuturesMarginMode.js b/examples/apidoc/RestClientV2/setFuturesMarginMode.js index 42e20b0..91e3a65 100644 --- a/examples/apidoc/RestClientV2/setFuturesMarginMode.js +++ b/examples/apidoc/RestClientV2/setFuturesMarginMode.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/setFuturesPositionAutoMargin.js b/examples/apidoc/RestClientV2/setFuturesPositionAutoMargin.js index 938d91f..c4ace54 100644 --- a/examples/apidoc/RestClientV2/setFuturesPositionAutoMargin.js +++ b/examples/apidoc/RestClientV2/setFuturesPositionAutoMargin.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/setFuturesPositionMargin.js b/examples/apidoc/RestClientV2/setFuturesPositionMargin.js index 80809d5..608690a 100644 --- a/examples/apidoc/RestClientV2/setFuturesPositionMargin.js +++ b/examples/apidoc/RestClientV2/setFuturesPositionMargin.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/setFuturesPositionMode.js b/examples/apidoc/RestClientV2/setFuturesPositionMode.js index a0751ec..7626619 100644 --- a/examples/apidoc/RestClientV2/setFuturesPositionMode.js +++ b/examples/apidoc/RestClientV2/setFuturesPositionMode.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/spotBatchCancelOrders.js b/examples/apidoc/RestClientV2/spotBatchCancelOrders.js index 7a5d7cd..57e2192 100644 --- a/examples/apidoc/RestClientV2/spotBatchCancelOrders.js +++ b/examples/apidoc/RestClientV2/spotBatchCancelOrders.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/spotBatchCancelandSubmitOrder.js b/examples/apidoc/RestClientV2/spotBatchCancelandSubmitOrder.js index b127836..0f26eb6 100644 --- a/examples/apidoc/RestClientV2/spotBatchCancelandSubmitOrder.js +++ b/examples/apidoc/RestClientV2/spotBatchCancelandSubmitOrder.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/spotBatchSubmitOrders.js b/examples/apidoc/RestClientV2/spotBatchSubmitOrders.js index 34bb04e..7f7fb93 100644 --- a/examples/apidoc/RestClientV2/spotBatchSubmitOrders.js +++ b/examples/apidoc/RestClientV2/spotBatchSubmitOrders.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/spotCancelOrder.js b/examples/apidoc/RestClientV2/spotCancelOrder.js index fd3c130..e03f4e4 100644 --- a/examples/apidoc/RestClientV2/spotCancelOrder.js +++ b/examples/apidoc/RestClientV2/spotCancelOrder.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/spotCancelPlanOrder.js b/examples/apidoc/RestClientV2/spotCancelPlanOrder.js index 6786b1c..e140a18 100644 --- a/examples/apidoc/RestClientV2/spotCancelPlanOrder.js +++ b/examples/apidoc/RestClientV2/spotCancelPlanOrder.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/spotCancelPlanOrders.js b/examples/apidoc/RestClientV2/spotCancelPlanOrders.js index f62fd59..540d305 100644 --- a/examples/apidoc/RestClientV2/spotCancelPlanOrders.js +++ b/examples/apidoc/RestClientV2/spotCancelPlanOrders.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/spotCancelSymbolOrder.js b/examples/apidoc/RestClientV2/spotCancelSymbolOrder.js index 1ee5b39..2f66c34 100644 --- a/examples/apidoc/RestClientV2/spotCancelSymbolOrder.js +++ b/examples/apidoc/RestClientV2/spotCancelSymbolOrder.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/spotCancelWithdrawal.js b/examples/apidoc/RestClientV2/spotCancelWithdrawal.js index 991d72e..c829959 100644 --- a/examples/apidoc/RestClientV2/spotCancelWithdrawal.js +++ b/examples/apidoc/RestClientV2/spotCancelWithdrawal.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/spotCancelandSubmitOrder.js b/examples/apidoc/RestClientV2/spotCancelandSubmitOrder.js index 96b881a..424e905 100644 --- a/examples/apidoc/RestClientV2/spotCancelandSubmitOrder.js +++ b/examples/apidoc/RestClientV2/spotCancelandSubmitOrder.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/spotModifyDepositAccount.js b/examples/apidoc/RestClientV2/spotModifyDepositAccount.js index cd683e2..7cf2791 100644 --- a/examples/apidoc/RestClientV2/spotModifyDepositAccount.js +++ b/examples/apidoc/RestClientV2/spotModifyDepositAccount.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/spotModifyPlanOrder.js b/examples/apidoc/RestClientV2/spotModifyPlanOrder.js index bab61b3..bf8190a 100644 --- a/examples/apidoc/RestClientV2/spotModifyPlanOrder.js +++ b/examples/apidoc/RestClientV2/spotModifyPlanOrder.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/spotSubTransfer.js b/examples/apidoc/RestClientV2/spotSubTransfer.js index 956fff6..bc5d2a3 100644 --- a/examples/apidoc/RestClientV2/spotSubTransfer.js +++ b/examples/apidoc/RestClientV2/spotSubTransfer.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/spotSubmitOrder.js b/examples/apidoc/RestClientV2/spotSubmitOrder.js index d9a3042..b9993ee 100644 --- a/examples/apidoc/RestClientV2/spotSubmitOrder.js +++ b/examples/apidoc/RestClientV2/spotSubmitOrder.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/spotSubmitPlanOrder.js b/examples/apidoc/RestClientV2/spotSubmitPlanOrder.js index d62cdd2..dd8f583 100644 --- a/examples/apidoc/RestClientV2/spotSubmitPlanOrder.js +++ b/examples/apidoc/RestClientV2/spotSubmitPlanOrder.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/spotSwitchBGBDeduct.js b/examples/apidoc/RestClientV2/spotSwitchBGBDeduct.js index b4f6cf1..3dd2e2f 100644 --- a/examples/apidoc/RestClientV2/spotSwitchBGBDeduct.js +++ b/examples/apidoc/RestClientV2/spotSwitchBGBDeduct.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/spotTransfer.js b/examples/apidoc/RestClientV2/spotTransfer.js index c4499a3..ea1dfdb 100644 --- a/examples/apidoc/RestClientV2/spotTransfer.js +++ b/examples/apidoc/RestClientV2/spotTransfer.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/spotWithdraw.js b/examples/apidoc/RestClientV2/spotWithdraw.js index 02f36c8..500cfba 100644 --- a/examples/apidoc/RestClientV2/spotWithdraw.js +++ b/examples/apidoc/RestClientV2/spotWithdraw.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/subaccountDepositRecords.js b/examples/apidoc/RestClientV2/subaccountDepositRecords.js index 306ffbe..33ff86c 100644 --- a/examples/apidoc/RestClientV2/subaccountDepositRecords.js +++ b/examples/apidoc/RestClientV2/subaccountDepositRecords.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/subaccountSetAutoTransfer.js b/examples/apidoc/RestClientV2/subaccountSetAutoTransfer.js index 96949ae..c20c28a 100644 --- a/examples/apidoc/RestClientV2/subaccountSetAutoTransfer.js +++ b/examples/apidoc/RestClientV2/subaccountSetAutoTransfer.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/subaccountWithdrawal.js b/examples/apidoc/RestClientV2/subaccountWithdrawal.js index 5a1ef58..5755844 100644 --- a/examples/apidoc/RestClientV2/subaccountWithdrawal.js +++ b/examples/apidoc/RestClientV2/subaccountWithdrawal.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/subaccountWithdrawalRecords.js b/examples/apidoc/RestClientV2/subaccountWithdrawalRecords.js index a9a16c0..45674e8 100644 --- a/examples/apidoc/RestClientV2/subaccountWithdrawalRecords.js +++ b/examples/apidoc/RestClientV2/subaccountWithdrawalRecords.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/subscribeSharkfin.js b/examples/apidoc/RestClientV2/subscribeSharkfin.js index bdbc328..6bad633 100644 --- a/examples/apidoc/RestClientV2/subscribeSharkfin.js +++ b/examples/apidoc/RestClientV2/subscribeSharkfin.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/unfollowFuturesTrader.js b/examples/apidoc/RestClientV2/unfollowFuturesTrader.js index 696a28e..b9a8a8b 100644 --- a/examples/apidoc/RestClientV2/unfollowFuturesTrader.js +++ b/examples/apidoc/RestClientV2/unfollowFuturesTrader.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/unfollowSpotTrader.js b/examples/apidoc/RestClientV2/unfollowSpotTrader.js index d3d6677..aa4107e 100644 --- a/examples/apidoc/RestClientV2/unfollowSpotTrader.js +++ b/examples/apidoc/RestClientV2/unfollowSpotTrader.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/updateFuturesFollowerSettings.js b/examples/apidoc/RestClientV2/updateFuturesFollowerSettings.js index fa5944e..946e828 100644 --- a/examples/apidoc/RestClientV2/updateFuturesFollowerSettings.js +++ b/examples/apidoc/RestClientV2/updateFuturesFollowerSettings.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/updateFuturesFollowerTPSL.js b/examples/apidoc/RestClientV2/updateFuturesFollowerTPSL.js index dcf987c..7b15169 100644 --- a/examples/apidoc/RestClientV2/updateFuturesFollowerTPSL.js +++ b/examples/apidoc/RestClientV2/updateFuturesFollowerTPSL.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/updateFuturesTraderGlobalSettings.js b/examples/apidoc/RestClientV2/updateFuturesTraderGlobalSettings.js index 78b40aa..a2e05df 100644 --- a/examples/apidoc/RestClientV2/updateFuturesTraderGlobalSettings.js +++ b/examples/apidoc/RestClientV2/updateFuturesTraderGlobalSettings.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/updateFuturesTraderSymbolSettings.js b/examples/apidoc/RestClientV2/updateFuturesTraderSymbolSettings.js index 207569a..004a9bd 100644 --- a/examples/apidoc/RestClientV2/updateFuturesTraderSymbolSettings.js +++ b/examples/apidoc/RestClientV2/updateFuturesTraderSymbolSettings.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/updateLoanPledgeRate.js b/examples/apidoc/RestClientV2/updateLoanPledgeRate.js index ab8b426..c0aaf64 100644 --- a/examples/apidoc/RestClientV2/updateLoanPledgeRate.js +++ b/examples/apidoc/RestClientV2/updateLoanPledgeRate.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/updateSpotFollowerSettings.js b/examples/apidoc/RestClientV2/updateSpotFollowerSettings.js index 9770e9c..8103027 100644 --- a/examples/apidoc/RestClientV2/updateSpotFollowerSettings.js +++ b/examples/apidoc/RestClientV2/updateSpotFollowerSettings.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV2/updateSpotFollowerTPSL.js b/examples/apidoc/RestClientV2/updateSpotFollowerTPSL.js index 0700689..ea5e011 100644 --- a/examples/apidoc/RestClientV2/updateSpotFollowerTPSL.js +++ b/examples/apidoc/RestClientV2/updateSpotFollowerTPSL.js @@ -1,6 +1,6 @@ import { RestClientV2 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV2 } = require('bitget-api'); +// const { RestClientV2 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/batchModifyOrders.js b/examples/apidoc/RestClientV3/batchModifyOrders.js index 8f1c3c3..fbf3169 100644 --- a/examples/apidoc/RestClientV3/batchModifyOrders.js +++ b/examples/apidoc/RestClientV3/batchModifyOrders.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/bindLoanUid.js b/examples/apidoc/RestClientV3/bindLoanUid.js index 83b3b0b..5741df4 100644 --- a/examples/apidoc/RestClientV3/bindLoanUid.js +++ b/examples/apidoc/RestClientV3/bindLoanUid.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/cancelAllOrders.js b/examples/apidoc/RestClientV3/cancelAllOrders.js index 1842208..7d777ca 100644 --- a/examples/apidoc/RestClientV3/cancelAllOrders.js +++ b/examples/apidoc/RestClientV3/cancelAllOrders.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/cancelBatchOrders.js b/examples/apidoc/RestClientV3/cancelBatchOrders.js index 65b05c9..3afce24 100644 --- a/examples/apidoc/RestClientV3/cancelBatchOrders.js +++ b/examples/apidoc/RestClientV3/cancelBatchOrders.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/cancelOrder.js b/examples/apidoc/RestClientV3/cancelOrder.js index 1f0e8f9..4e0f246 100644 --- a/examples/apidoc/RestClientV3/cancelOrder.js +++ b/examples/apidoc/RestClientV3/cancelOrder.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/cancelStrategyOrder.js b/examples/apidoc/RestClientV3/cancelStrategyOrder.js index bc4ac9c..fa23cda 100644 --- a/examples/apidoc/RestClientV3/cancelStrategyOrder.js +++ b/examples/apidoc/RestClientV3/cancelStrategyOrder.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/closeAllPositions.js b/examples/apidoc/RestClientV3/closeAllPositions.js index d2feb52..eec79ba 100644 --- a/examples/apidoc/RestClientV3/closeAllPositions.js +++ b/examples/apidoc/RestClientV3/closeAllPositions.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/countdownCancelAll.js b/examples/apidoc/RestClientV3/countdownCancelAll.js index 13f22cd..246ad4a 100644 --- a/examples/apidoc/RestClientV3/countdownCancelAll.js +++ b/examples/apidoc/RestClientV3/countdownCancelAll.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/createSubAccount.js b/examples/apidoc/RestClientV3/createSubAccount.js index a302012..d3bc636 100644 --- a/examples/apidoc/RestClientV3/createSubAccount.js +++ b/examples/apidoc/RestClientV3/createSubAccount.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/createSubAccountApiKey.js b/examples/apidoc/RestClientV3/createSubAccountApiKey.js index b4ef1ad..73e09e1 100644 --- a/examples/apidoc/RestClientV3/createSubAccountApiKey.js +++ b/examples/apidoc/RestClientV3/createSubAccountApiKey.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/deleteSubAccountApiKey.js b/examples/apidoc/RestClientV3/deleteSubAccountApiKey.js index eb1d30c..f178e9a 100644 --- a/examples/apidoc/RestClientV3/deleteSubAccountApiKey.js +++ b/examples/apidoc/RestClientV3/deleteSubAccountApiKey.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/freezeSubAccount.js b/examples/apidoc/RestClientV3/freezeSubAccount.js index 31b9be1..70f4927 100644 --- a/examples/apidoc/RestClientV3/freezeSubAccount.js +++ b/examples/apidoc/RestClientV3/freezeSubAccount.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getAccountSettings.js b/examples/apidoc/RestClientV3/getAccountSettings.js index 4972b20..8cb3f1c 100644 --- a/examples/apidoc/RestClientV3/getAccountSettings.js +++ b/examples/apidoc/RestClientV3/getAccountSettings.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getBalances.js b/examples/apidoc/RestClientV3/getBalances.js index 5ae13bf..2097285 100644 --- a/examples/apidoc/RestClientV3/getBalances.js +++ b/examples/apidoc/RestClientV3/getBalances.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getCandles.js b/examples/apidoc/RestClientV3/getCandles.js index 82072bb..ebf81b7 100644 --- a/examples/apidoc/RestClientV3/getCandles.js +++ b/examples/apidoc/RestClientV3/getCandles.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getContractsOi.js b/examples/apidoc/RestClientV3/getContractsOi.js index bfc6629..90b8012 100644 --- a/examples/apidoc/RestClientV3/getContractsOi.js +++ b/examples/apidoc/RestClientV3/getContractsOi.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getConvertRecords.js b/examples/apidoc/RestClientV3/getConvertRecords.js index 8782b18..e0b6887 100644 --- a/examples/apidoc/RestClientV3/getConvertRecords.js +++ b/examples/apidoc/RestClientV3/getConvertRecords.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getCurrentFundingRate.js b/examples/apidoc/RestClientV3/getCurrentFundingRate.js index a62bb57..a8d57b4 100644 --- a/examples/apidoc/RestClientV3/getCurrentFundingRate.js +++ b/examples/apidoc/RestClientV3/getCurrentFundingRate.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getCurrentPosition.js b/examples/apidoc/RestClientV3/getCurrentPosition.js index 4af5845..42df27f 100644 --- a/examples/apidoc/RestClientV3/getCurrentPosition.js +++ b/examples/apidoc/RestClientV3/getCurrentPosition.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getDeductInfo.js b/examples/apidoc/RestClientV3/getDeductInfo.js index b7888fe..9938b62 100644 --- a/examples/apidoc/RestClientV3/getDeductInfo.js +++ b/examples/apidoc/RestClientV3/getDeductInfo.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getDepositAddress.js b/examples/apidoc/RestClientV3/getDepositAddress.js index fe1680e..58cef37 100644 --- a/examples/apidoc/RestClientV3/getDepositAddress.js +++ b/examples/apidoc/RestClientV3/getDepositAddress.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getDepositRecords.js b/examples/apidoc/RestClientV3/getDepositRecords.js index 384aeb8..d7b8181 100644 --- a/examples/apidoc/RestClientV3/getDepositRecords.js +++ b/examples/apidoc/RestClientV3/getDepositRecords.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getDiscountRate.js b/examples/apidoc/RestClientV3/getDiscountRate.js index fec9ec8..54c711a 100644 --- a/examples/apidoc/RestClientV3/getDiscountRate.js +++ b/examples/apidoc/RestClientV3/getDiscountRate.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getFeeRate.js b/examples/apidoc/RestClientV3/getFeeRate.js index 3e8fe1a..2b0424d 100644 --- a/examples/apidoc/RestClientV3/getFeeRate.js +++ b/examples/apidoc/RestClientV3/getFeeRate.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getFills.js b/examples/apidoc/RestClientV3/getFills.js index e1a2de1..92bdb84 100644 --- a/examples/apidoc/RestClientV3/getFills.js +++ b/examples/apidoc/RestClientV3/getFills.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getFinancialRecords.js b/examples/apidoc/RestClientV3/getFinancialRecords.js index 6395f3c..6fef79a 100644 --- a/examples/apidoc/RestClientV3/getFinancialRecords.js +++ b/examples/apidoc/RestClientV3/getFinancialRecords.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getFundingAssets.js b/examples/apidoc/RestClientV3/getFundingAssets.js index 2160b79..9529eeb 100644 --- a/examples/apidoc/RestClientV3/getFundingAssets.js +++ b/examples/apidoc/RestClientV3/getFundingAssets.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getHistoryCandles.js b/examples/apidoc/RestClientV3/getHistoryCandles.js index f172c75..8790b0a 100644 --- a/examples/apidoc/RestClientV3/getHistoryCandles.js +++ b/examples/apidoc/RestClientV3/getHistoryCandles.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getHistoryFundingRate.js b/examples/apidoc/RestClientV3/getHistoryFundingRate.js index 2b3a36a..8d87ef3 100644 --- a/examples/apidoc/RestClientV3/getHistoryFundingRate.js +++ b/examples/apidoc/RestClientV3/getHistoryFundingRate.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getHistoryOrders.js b/examples/apidoc/RestClientV3/getHistoryOrders.js index 1d38089..808c5c3 100644 --- a/examples/apidoc/RestClientV3/getHistoryOrders.js +++ b/examples/apidoc/RestClientV3/getHistoryOrders.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getHistoryStrategyOrders.js b/examples/apidoc/RestClientV3/getHistoryStrategyOrders.js index cc60a89..4e50b46 100644 --- a/examples/apidoc/RestClientV3/getHistoryStrategyOrders.js +++ b/examples/apidoc/RestClientV3/getHistoryStrategyOrders.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getInstruments.js b/examples/apidoc/RestClientV3/getInstruments.js index c0d7fa9..a154213 100644 --- a/examples/apidoc/RestClientV3/getInstruments.js +++ b/examples/apidoc/RestClientV3/getInstruments.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getLoanLTVConvert.js b/examples/apidoc/RestClientV3/getLoanLTVConvert.js index 3e2a590..fa01b04 100644 --- a/examples/apidoc/RestClientV3/getLoanLTVConvert.js +++ b/examples/apidoc/RestClientV3/getLoanLTVConvert.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getLoanMarginCoinInfo.js b/examples/apidoc/RestClientV3/getLoanMarginCoinInfo.js index f35d00f..92cae20 100644 --- a/examples/apidoc/RestClientV3/getLoanMarginCoinInfo.js +++ b/examples/apidoc/RestClientV3/getLoanMarginCoinInfo.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getLoanOrder.js b/examples/apidoc/RestClientV3/getLoanOrder.js index 94869f1..c83f1a3 100644 --- a/examples/apidoc/RestClientV3/getLoanOrder.js +++ b/examples/apidoc/RestClientV3/getLoanOrder.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getLoanProductInfo.js b/examples/apidoc/RestClientV3/getLoanProductInfo.js index 9231355..9b914cc 100644 --- a/examples/apidoc/RestClientV3/getLoanProductInfo.js +++ b/examples/apidoc/RestClientV3/getLoanProductInfo.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getLoanRepaidHistory.js b/examples/apidoc/RestClientV3/getLoanRepaidHistory.js index 1c7f97a..67ceda3 100644 --- a/examples/apidoc/RestClientV3/getLoanRepaidHistory.js +++ b/examples/apidoc/RestClientV3/getLoanRepaidHistory.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getLoanRiskUnit.js b/examples/apidoc/RestClientV3/getLoanRiskUnit.js index 8a79303..e0b7d1e 100644 --- a/examples/apidoc/RestClientV3/getLoanRiskUnit.js +++ b/examples/apidoc/RestClientV3/getLoanRiskUnit.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getLoanSymbols.js b/examples/apidoc/RestClientV3/getLoanSymbols.js index e3caca3..c586a3b 100644 --- a/examples/apidoc/RestClientV3/getLoanSymbols.js +++ b/examples/apidoc/RestClientV3/getLoanSymbols.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getLoanTransfered.js b/examples/apidoc/RestClientV3/getLoanTransfered.js index 6abdca4..05e38cf 100644 --- a/examples/apidoc/RestClientV3/getLoanTransfered.js +++ b/examples/apidoc/RestClientV3/getLoanTransfered.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getMarginLoans.js b/examples/apidoc/RestClientV3/getMarginLoans.js index 8888f52..ee74543 100644 --- a/examples/apidoc/RestClientV3/getMarginLoans.js +++ b/examples/apidoc/RestClientV3/getMarginLoans.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getMaxOpenAvailable.js b/examples/apidoc/RestClientV3/getMaxOpenAvailable.js index f95e19e..7d00312 100644 --- a/examples/apidoc/RestClientV3/getMaxOpenAvailable.js +++ b/examples/apidoc/RestClientV3/getMaxOpenAvailable.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getOpenInterest.js b/examples/apidoc/RestClientV3/getOpenInterest.js index 92031f7..0577e63 100644 --- a/examples/apidoc/RestClientV3/getOpenInterest.js +++ b/examples/apidoc/RestClientV3/getOpenInterest.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getOrderBook.js b/examples/apidoc/RestClientV3/getOrderBook.js index be5a3c0..94da988 100644 --- a/examples/apidoc/RestClientV3/getOrderBook.js +++ b/examples/apidoc/RestClientV3/getOrderBook.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getOrderInfo.js b/examples/apidoc/RestClientV3/getOrderInfo.js index 97e9637..cb7be7b 100644 --- a/examples/apidoc/RestClientV3/getOrderInfo.js +++ b/examples/apidoc/RestClientV3/getOrderInfo.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getPaymentCoins.js b/examples/apidoc/RestClientV3/getPaymentCoins.js index 5ecf9b8..34afb9a 100644 --- a/examples/apidoc/RestClientV3/getPaymentCoins.js +++ b/examples/apidoc/RestClientV3/getPaymentCoins.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getPositionHistory.js b/examples/apidoc/RestClientV3/getPositionHistory.js index b25cea4..53d0f85 100644 --- a/examples/apidoc/RestClientV3/getPositionHistory.js +++ b/examples/apidoc/RestClientV3/getPositionHistory.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getPositionTier.js b/examples/apidoc/RestClientV3/getPositionTier.js index e9825f9..afcef6c 100644 --- a/examples/apidoc/RestClientV3/getPositionTier.js +++ b/examples/apidoc/RestClientV3/getPositionTier.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getRepayableCoins.js b/examples/apidoc/RestClientV3/getRepayableCoins.js index a8c8f13..a42b32e 100644 --- a/examples/apidoc/RestClientV3/getRepayableCoins.js +++ b/examples/apidoc/RestClientV3/getRepayableCoins.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getRiskReserve.js b/examples/apidoc/RestClientV3/getRiskReserve.js index caf209a..df2ab17 100644 --- a/examples/apidoc/RestClientV3/getRiskReserve.js +++ b/examples/apidoc/RestClientV3/getRiskReserve.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getServerTime.js b/examples/apidoc/RestClientV3/getServerTime.js index d01fe48..d64a982 100644 --- a/examples/apidoc/RestClientV3/getServerTime.js +++ b/examples/apidoc/RestClientV3/getServerTime.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getSubAccountApiKeys.js b/examples/apidoc/RestClientV3/getSubAccountApiKeys.js index 42fbbb2..27e89d8 100644 --- a/examples/apidoc/RestClientV3/getSubAccountApiKeys.js +++ b/examples/apidoc/RestClientV3/getSubAccountApiKeys.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getSubAccountList.js b/examples/apidoc/RestClientV3/getSubAccountList.js index e200761..e4f1792 100644 --- a/examples/apidoc/RestClientV3/getSubAccountList.js +++ b/examples/apidoc/RestClientV3/getSubAccountList.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getSubDepositAddress.js b/examples/apidoc/RestClientV3/getSubDepositAddress.js index 85116d3..ccbfd59 100644 --- a/examples/apidoc/RestClientV3/getSubDepositAddress.js +++ b/examples/apidoc/RestClientV3/getSubDepositAddress.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getSubDepositRecords.js b/examples/apidoc/RestClientV3/getSubDepositRecords.js index aa6508d..4523a21 100644 --- a/examples/apidoc/RestClientV3/getSubDepositRecords.js +++ b/examples/apidoc/RestClientV3/getSubDepositRecords.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getSubTransferRecords.js b/examples/apidoc/RestClientV3/getSubTransferRecords.js index f0f86b7..452bc7f 100644 --- a/examples/apidoc/RestClientV3/getSubTransferRecords.js +++ b/examples/apidoc/RestClientV3/getSubTransferRecords.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getSubUnifiedAssets.js b/examples/apidoc/RestClientV3/getSubUnifiedAssets.js index 228d79b..d6376fd 100644 --- a/examples/apidoc/RestClientV3/getSubUnifiedAssets.js +++ b/examples/apidoc/RestClientV3/getSubUnifiedAssets.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getTickers.js b/examples/apidoc/RestClientV3/getTickers.js index 7deb6a6..0971a8e 100644 --- a/examples/apidoc/RestClientV3/getTickers.js +++ b/examples/apidoc/RestClientV3/getTickers.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getTradeFills.js b/examples/apidoc/RestClientV3/getTradeFills.js index 7ea3e46..67502d3 100644 --- a/examples/apidoc/RestClientV3/getTradeFills.js +++ b/examples/apidoc/RestClientV3/getTradeFills.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getTransferableCoins.js b/examples/apidoc/RestClientV3/getTransferableCoins.js index 3ed4313..1363f75 100644 --- a/examples/apidoc/RestClientV3/getTransferableCoins.js +++ b/examples/apidoc/RestClientV3/getTransferableCoins.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getUnfilledOrders.js b/examples/apidoc/RestClientV3/getUnfilledOrders.js index fe547d3..aa40f33 100644 --- a/examples/apidoc/RestClientV3/getUnfilledOrders.js +++ b/examples/apidoc/RestClientV3/getUnfilledOrders.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getUnfilledStrategyOrders.js b/examples/apidoc/RestClientV3/getUnfilledStrategyOrders.js index 28f0103..d699e23 100644 --- a/examples/apidoc/RestClientV3/getUnfilledStrategyOrders.js +++ b/examples/apidoc/RestClientV3/getUnfilledStrategyOrders.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/getWithdrawRecords.js b/examples/apidoc/RestClientV3/getWithdrawRecords.js index e1bd2a5..c14aeb2 100644 --- a/examples/apidoc/RestClientV3/getWithdrawRecords.js +++ b/examples/apidoc/RestClientV3/getWithdrawRecords.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/modifyOrder.js b/examples/apidoc/RestClientV3/modifyOrder.js index ad8f1e1..dfe1338 100644 --- a/examples/apidoc/RestClientV3/modifyOrder.js +++ b/examples/apidoc/RestClientV3/modifyOrder.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/modifyStrategyOrder.js b/examples/apidoc/RestClientV3/modifyStrategyOrder.js index 3cc9c42..bacdf69 100644 --- a/examples/apidoc/RestClientV3/modifyStrategyOrder.js +++ b/examples/apidoc/RestClientV3/modifyStrategyOrder.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/placeBatchOrders.js b/examples/apidoc/RestClientV3/placeBatchOrders.js index 8906050..78bcc42 100644 --- a/examples/apidoc/RestClientV3/placeBatchOrders.js +++ b/examples/apidoc/RestClientV3/placeBatchOrders.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/setHoldMode.js b/examples/apidoc/RestClientV3/setHoldMode.js index a43bb73..b600fa2 100644 --- a/examples/apidoc/RestClientV3/setHoldMode.js +++ b/examples/apidoc/RestClientV3/setHoldMode.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/setLeverage.js b/examples/apidoc/RestClientV3/setLeverage.js index 72f9b0f..c2d7c3b 100644 --- a/examples/apidoc/RestClientV3/setLeverage.js +++ b/examples/apidoc/RestClientV3/setLeverage.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/subAccountTransfer.js b/examples/apidoc/RestClientV3/subAccountTransfer.js index 3a28fae..1b07201 100644 --- a/examples/apidoc/RestClientV3/subAccountTransfer.js +++ b/examples/apidoc/RestClientV3/subAccountTransfer.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/submitNewOrder.js b/examples/apidoc/RestClientV3/submitNewOrder.js index 833cc59..1ace706 100644 --- a/examples/apidoc/RestClientV3/submitNewOrder.js +++ b/examples/apidoc/RestClientV3/submitNewOrder.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/submitRepay.js b/examples/apidoc/RestClientV3/submitRepay.js index 695f02d..925be54 100644 --- a/examples/apidoc/RestClientV3/submitRepay.js +++ b/examples/apidoc/RestClientV3/submitRepay.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/submitStrategyOrder.js b/examples/apidoc/RestClientV3/submitStrategyOrder.js index 90e1cb9..bb55656 100644 --- a/examples/apidoc/RestClientV3/submitStrategyOrder.js +++ b/examples/apidoc/RestClientV3/submitStrategyOrder.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/submitTransfer.js b/examples/apidoc/RestClientV3/submitTransfer.js index 881c46f..3747e6a 100644 --- a/examples/apidoc/RestClientV3/submitTransfer.js +++ b/examples/apidoc/RestClientV3/submitTransfer.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/submitWithdraw.js b/examples/apidoc/RestClientV3/submitWithdraw.js index 0c819f9..f1dbeca 100644 --- a/examples/apidoc/RestClientV3/submitWithdraw.js +++ b/examples/apidoc/RestClientV3/submitWithdraw.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/switchDeduct.js b/examples/apidoc/RestClientV3/switchDeduct.js index 5cddf2c..5378574 100644 --- a/examples/apidoc/RestClientV3/switchDeduct.js +++ b/examples/apidoc/RestClientV3/switchDeduct.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/RestClientV3/updateSubAccountApiKey.js b/examples/apidoc/RestClientV3/updateSubAccountApiKey.js index fa5fc74..b3ae2ab 100644 --- a/examples/apidoc/RestClientV3/updateSubAccountApiKey.js +++ b/examples/apidoc/RestClientV3/updateSubAccountApiKey.js @@ -1,6 +1,6 @@ import { RestClientV3 } from 'bitget-api'; // or if you want to use the require syntax -//const { RestClientV3 } = require('bitget-api'); +// const { RestClientV3 } = require('bitget-api'); // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange diff --git a/examples/apidoc/WebsocketAPIClient/cancelBatchOrders.js b/examples/apidoc/WebsocketAPIClient/cancelBatchOrders.js index 922d0aa..c6eb28c 100644 --- a/examples/apidoc/WebsocketAPIClient/cancelBatchOrders.js +++ b/examples/apidoc/WebsocketAPIClient/cancelBatchOrders.js @@ -1,6 +1,6 @@ import { WebsocketAPIClient } from 'bitget-api'; // or if you want to use the require syntax -//const { WebsocketAPIClient } = require('bitget-api'); +// const { WebsocketAPIClient } = require('bitget-api'); // This example shows how to call this Bitget WebSocket API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange // This Bitget API SDK is available on npm via "npm install bitget-api" diff --git a/examples/apidoc/WebsocketAPIClient/cancelOrder.js b/examples/apidoc/WebsocketAPIClient/cancelOrder.js index 1844844..a28d9a3 100644 --- a/examples/apidoc/WebsocketAPIClient/cancelOrder.js +++ b/examples/apidoc/WebsocketAPIClient/cancelOrder.js @@ -1,6 +1,6 @@ import { WebsocketAPIClient } from 'bitget-api'; // or if you want to use the require syntax -//const { WebsocketAPIClient } = require('bitget-api'); +// const { WebsocketAPIClient } = require('bitget-api'); // This example shows how to call this Bitget WebSocket API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange // This Bitget API SDK is available on npm via "npm install bitget-api" diff --git a/examples/apidoc/WebsocketAPIClient/placeBatchOrders.js b/examples/apidoc/WebsocketAPIClient/placeBatchOrders.js index e4c1776..41483d6 100644 --- a/examples/apidoc/WebsocketAPIClient/placeBatchOrders.js +++ b/examples/apidoc/WebsocketAPIClient/placeBatchOrders.js @@ -1,6 +1,6 @@ import { WebsocketAPIClient } from 'bitget-api'; // or if you want to use the require syntax -//const { WebsocketAPIClient } = require('bitget-api'); +// const { WebsocketAPIClient } = require('bitget-api'); // This example shows how to call this Bitget WebSocket API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange // This Bitget API SDK is available on npm via "npm install bitget-api" diff --git a/examples/apidoc/WebsocketAPIClient/submitNewOrder.js b/examples/apidoc/WebsocketAPIClient/submitNewOrder.js index 99e87d9..3dcc200 100644 --- a/examples/apidoc/WebsocketAPIClient/submitNewOrder.js +++ b/examples/apidoc/WebsocketAPIClient/submitNewOrder.js @@ -1,6 +1,6 @@ import { WebsocketAPIClient } from 'bitget-api'; // or if you want to use the require syntax -//const { WebsocketAPIClient } = require('bitget-api'); +// const { WebsocketAPIClient } = require('bitget-api'); // This example shows how to call this Bitget WebSocket API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange // This Bitget API SDK is available on npm via "npm install bitget-api" From 5b001574eef35e81657baf5e03141f58e59bb186 Mon Sep 17 00:00:00 2001 From: JJ-Cro Date: Mon, 21 Jul 2025 17:46:01 +0200 Subject: [PATCH 41/57] chore(): update typo --- examples/apidoc/WebsocketAPIClient/cancelBatchOrders.js | 2 +- examples/apidoc/WebsocketAPIClient/cancelOrder.js | 2 +- examples/apidoc/WebsocketAPIClient/placeBatchOrders.js | 2 +- examples/apidoc/WebsocketAPIClient/submitNewOrder.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/apidoc/WebsocketAPIClient/cancelBatchOrders.js b/examples/apidoc/WebsocketAPIClient/cancelBatchOrders.js index c6eb28c..ac73ac8 100644 --- a/examples/apidoc/WebsocketAPIClient/cancelBatchOrders.js +++ b/examples/apidoc/WebsocketAPIClient/cancelBatchOrders.js @@ -6,7 +6,7 @@ import { WebsocketAPIClient } from 'bitget-api'; // This Bitget API SDK is available on npm via "npm install bitget-api" // WS API ENDPOINT: batch-cancel // METHOD: WebSocket API -// PUBLIC: YES +// PUBLIC: NO // Create a WebSocket API client instance const client = new WebsocketAPIClient({ diff --git a/examples/apidoc/WebsocketAPIClient/cancelOrder.js b/examples/apidoc/WebsocketAPIClient/cancelOrder.js index a28d9a3..70131a8 100644 --- a/examples/apidoc/WebsocketAPIClient/cancelOrder.js +++ b/examples/apidoc/WebsocketAPIClient/cancelOrder.js @@ -6,7 +6,7 @@ import { WebsocketAPIClient } from 'bitget-api'; // This Bitget API SDK is available on npm via "npm install bitget-api" // WS API ENDPOINT: cancel-order // METHOD: WebSocket API -// PUBLIC: YES +// PUBLIC: NO // Create a WebSocket API client instance const client = new WebsocketAPIClient({ diff --git a/examples/apidoc/WebsocketAPIClient/placeBatchOrders.js b/examples/apidoc/WebsocketAPIClient/placeBatchOrders.js index 41483d6..c67f4c2 100644 --- a/examples/apidoc/WebsocketAPIClient/placeBatchOrders.js +++ b/examples/apidoc/WebsocketAPIClient/placeBatchOrders.js @@ -6,7 +6,7 @@ import { WebsocketAPIClient } from 'bitget-api'; // This Bitget API SDK is available on npm via "npm install bitget-api" // WS API ENDPOINT: batch-place // METHOD: WebSocket API -// PUBLIC: YES +// PUBLIC: NO // Create a WebSocket API client instance const client = new WebsocketAPIClient({ diff --git a/examples/apidoc/WebsocketAPIClient/submitNewOrder.js b/examples/apidoc/WebsocketAPIClient/submitNewOrder.js index 3dcc200..bae0ec7 100644 --- a/examples/apidoc/WebsocketAPIClient/submitNewOrder.js +++ b/examples/apidoc/WebsocketAPIClient/submitNewOrder.js @@ -6,7 +6,7 @@ import { WebsocketAPIClient } from 'bitget-api'; // This Bitget API SDK is available on npm via "npm install bitget-api" // WS API ENDPOINT: place-order // METHOD: WebSocket API -// PUBLIC: YES +// PUBLIC: NO // Create a WebSocket API client instance const client = new WebsocketAPIClient({ From 31afb0bf130989f876405bed0a3dd85e536d2c4e Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Mon, 21 Jul 2025 16:50:27 +0100 Subject: [PATCH 42/57] chore(): bump node to LTS --- .nvmrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.nvmrc b/.nvmrc index bb8c76c..9fe0738 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v22.11.0 +v22.17.1 From 2630c1b394f060fbf333ef3d2d1093f477d56485 Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Tue, 22 Jul 2025 12:15:57 +0100 Subject: [PATCH 43/57] chore(): minor tsconfig & eslint updates --- .eslintrc.cjs | 11 +++++------ tsconfig.json | 9 ++------- tsconfig.linting.json | 1 - 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index ea4fdeb..97c9d4b 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -27,16 +27,17 @@ module.exports = { '@typescript-eslint/explicit-module-boundary-types': 'off', '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-non-null-assertion': 'off', + 'no-param-reassign': ['error'], '@typescript-eslint/ban-types': 'off', - '@typescript-eslint/no-empty-object-type': [ - 'error', - { allowObjectTypes: 'always' }, - ], 'simple-import-sort/imports': 'error', 'simple-import-sort/exports': 'error', 'array-bracket-spacing': ['error', 'never'], 'linebreak-style': ['error', 'unix'], 'lines-between-class-members': ['warn', 'always'], + '@typescript-eslint/no-empty-object-type': [ + 'error', + { allowObjectTypes: 'always' }, + ], semi: ['error', 'always'], 'new-cap': 'off', 'no-console': 'off', @@ -53,7 +54,5 @@ module.exports = { 'computed-property-spacing': [2, 'never'], 'keyword-spacing': 2, 'space-unary-ops': 2, - // https://eslint.org/docs/latest/rules/no-param-reassign - 'no-param-reassign': ['error'], }, }; diff --git a/tsconfig.json b/tsconfig.json index 4af98e5..7ac09ca 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -13,14 +13,9 @@ "skipLibCheck": true, "sourceMap": true, "esModuleInterop": true, - "lib": ["es2017","dom"], + "lib": ["es2017", "dom"], "outDir": "lib" }, "include": ["src/**/*"], - "exclude": [ - "node_modules", - "**/node_modules/*", - "coverage", - "doc" - ] + "exclude": ["node_modules", "**/node_modules/*", "coverage", "doc"] } diff --git a/tsconfig.linting.json b/tsconfig.linting.json index ee6bda0..d614e95 100644 --- a/tsconfig.linting.json +++ b/tsconfig.linting.json @@ -2,7 +2,6 @@ "extends": "./tsconfig.json", "compilerOptions": { "module": "commonjs", - "outDir": "dist/cjs", "target": "esnext", "rootDir": "../", "allowJs": true From 384caf7a7f825c8da0121ed90097001a7d106bff Mon Sep 17 00:00:00 2001 From: JJ-Cro Date: Tue, 22 Jul 2025 15:08:34 +0200 Subject: [PATCH 44/57] feat(): added v3 tests --- src/constants/enum.ts | 3 + src/rest-client-v3.ts | 2 +- test/v3/private.read.test.ts | 171 +++++++++++++++++++++++++++++++ test/v3/private.write.test.ts | 183 ++++++++++++++++++++++++++++++++++ test/v3/public.test.ts | 82 +++++++++++++++ 5 files changed, 440 insertions(+), 1 deletion(-) create mode 100644 test/v3/private.read.test.ts create mode 100644 test/v3/private.write.test.ts create mode 100644 test/v3/public.test.ts diff --git a/src/constants/enum.ts b/src/constants/enum.ts index a8c78f8..6b74fa5 100644 --- a/src/constants/enum.ts +++ b/src/constants/enum.ts @@ -1,6 +1,9 @@ export const API_ERROR_CODE = { SUCCESS: '00000', NO_ORDER_TO_CANCEL: '22001', + INSUFFICIENT_BALANCE_V3: '25202', + ORDER_DOES_NOT_EXIST_V3: '25204', + NO_POSITION_TO_CLOSE: '25227', INCORRECT_PERMISSIONS: '40014', ACCOUNT_NOT_COPY_TRADER: '40017', FUTURES_POSITION_DIRECTION_EMPTY: '40017', diff --git a/src/rest-client-v3.ts b/src/rest-client-v3.ts index 5468b9c..8740a26 100644 --- a/src/rest-client-v3.ts +++ b/src/rest-client-v3.ts @@ -675,7 +675,7 @@ export class RestClientV3 extends BaseRestClient { getWithdrawRecords( params: GetWithdrawRecordsRequestV3, ): Promise> { - return this.getPrivate('/api/v3/account/withdrawl-records', params); + return this.getPrivate('/api/v3/account/withdrawal-records', params); } /** diff --git a/test/v3/private.read.test.ts b/test/v3/private.read.test.ts new file mode 100644 index 0000000..c5ae40e --- /dev/null +++ b/test/v3/private.read.test.ts @@ -0,0 +1,171 @@ +import { API_ERROR_CODE } from '../../src'; +import { RestClientV3 } from '../../src/rest-client-v3'; +import { + errorResponseObjectV3, + sucessEmptyResponseObject, +} from '../response.util'; + +describe('Bitget Private REST API V3 Read Endpoints', () => { + const API_KEY = process.env.API_KEY_COM; + const API_SECRET = process.env.API_SECRET_COM; + const API_PASSPHRASE = process.env.API_PASS_COM; + + const api = new RestClientV3({ + apiKey: API_KEY!, + apiSecret: API_SECRET!, + apiPass: API_PASSPHRASE!, + }); + + it('should have api credentials to use', () => { + expect(API_KEY).toStrictEqual(expect.any(String)); + expect(API_SECRET).toStrictEqual(expect.any(String)); + expect(API_PASSPHRASE).toStrictEqual(expect.any(String)); + }); + + describe('Account Endpoints', () => { + it('getBalances()', async () => { + try { + const res = await api.getBalances(); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toBeUndefined(); + } + }); + + it('getFundingAssets()', async () => { + try { + const res = await api.getFundingAssets(); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toBeUndefined(); + } + }); + + it('getAccountSettings()', async () => { + try { + const res = await api.getAccountSettings(); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toBeUndefined(); + } + }); + }); + + describe('Trade Endpoints', () => { + it('getOrderInfo()', async () => { + try { + const res = await api.getOrderInfo({ + orderId: '123456789', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toMatchObject( + errorResponseObjectV3(API_ERROR_CODE.ORDER_DOES_NOT_EXIST_V3), + ); + } + }); + + it('getUnfilledOrders()', async () => { + try { + const res = await api.getUnfilledOrders(); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toBeUndefined(); + } + }); + + it('getHistoryOrders()', async () => { + try { + const res = await api.getHistoryOrders({ + category: 'SPOT', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toBeUndefined(); + } + }); + + it('getTradeFills()', async () => { + try { + const res = await api.getTradeFills(); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toBeUndefined(); + } + }); + }); + + describe('Funding Endpoints', () => { + it('getDepositRecords()', async () => { + try { + const res = await api.getDepositRecords({ + startTime: '1715808000000', + endTime: '1715894400000', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toBeUndefined(); + } + }); + + it('getWithdrawRecords()', async () => { + try { + const res = await api.getWithdrawRecords({ + startTime: '1715808000000', + endTime: '1715894400000', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toBeUndefined(); + } + }); + + it('getFinancialRecords()', async () => { + try { + const res = await api.getFinancialRecords({ + category: 'SPOT', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toBeUndefined(); + } + }); + }); + + describe('Position Endpoints', () => { + it('getCurrentPosition()', async () => { + try { + const res = await api.getCurrentPosition({ + category: 'USDT-FUTURES', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toBeUndefined(); + } + }); + + it('getPositionHistory()', async () => { + try { + const res = await api.getPositionHistory({ + category: 'USDT-FUTURES', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toBeUndefined(); + } + }); + + it('getOrderInfo() with invalid order', async () => { + try { + const res = await api.getOrderInfo({ + orderId: '123456789', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toMatchObject( + errorResponseObjectV3(API_ERROR_CODE.ORDER_DOES_NOT_EXIST_V3), + ); // The order does not exist + } + }); + }); +}); diff --git a/test/v3/private.write.test.ts b/test/v3/private.write.test.ts new file mode 100644 index 0000000..065b792 --- /dev/null +++ b/test/v3/private.write.test.ts @@ -0,0 +1,183 @@ +import { API_ERROR_CODE } from '../../src'; +import { RestClientV3 } from '../../src/rest-client-v3'; +// prettier-ignore +import { + errorResponseObjectV3, + sucessEmptyResponseObject, +} from '../response.util'; + +describe('Bitget Private REST API V3 Write Endpoints', () => { + const API_KEY = process.env.API_KEY_COM; + const API_SECRET = process.env.API_SECRET_COM; + const API_PASSPHRASE = process.env.API_PASS_COM; + + const api = new RestClientV3({ + apiKey: API_KEY!, + apiSecret: API_SECRET!, + apiPass: API_PASSPHRASE!, + }); + + it('should have api credentials to use', () => { + expect(API_KEY).toStrictEqual(expect.any(String)); + expect(API_SECRET).toStrictEqual(expect.any(String)); + expect(API_PASSPHRASE).toStrictEqual(expect.any(String)); + }); + + describe('Trade Endpoints', () => { + it('submitNewOrder()', async () => { + try { + const res = await api.submitNewOrder({ + category: 'SPOT', + symbol: 'BTCUSDT', + side: 'buy', + orderType: 'limit', + price: '20000', + qty: '0.001', + timeInForce: 'gtc', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toMatchObject( + errorResponseObjectV3(API_ERROR_CODE.INSUFFICIENT_BALANCE_V3), + ); // not enough balance + } + }); + + it('cancelOrder()', async () => { + try { + const res = await api.cancelOrder({ + orderId: '123456789', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toMatchObject( + errorResponseObjectV3(API_ERROR_CODE.ORDER_DOES_NOT_EXIST_V3), + ); //The order does not exist + } + }); + + it('placeBatchOrders()', async () => { + try { + const res = await api.placeBatchOrders([ + { + category: 'SPOT', + symbol: 'BTCUSDT', + side: 'buy', + orderType: 'limit', + price: '20000', + qty: '0.001', + timeInForce: 'gtc', + }, + ]); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toMatchObject( + errorResponseObjectV3(API_ERROR_CODE.INSUFFICIENT_BALANCE), + ); // not enough balance + } + }); + + it('cancelBatchOrders()', async () => { + try { + const res = await api.cancelBatchOrders([ + { + category: 'SPOT', + symbol: 'BTCUSDT', + orderId: '123456789', + }, + ]); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toMatchObject( + errorResponseObjectV3(API_ERROR_CODE.ORDER_DOES_NOT_EXIST_V3), + ); //The order does not exist + } + }); + + it('modifyOrder()', async () => { + try { + const res = await api.modifyOrder({ + orderId: '123456789', + qty: '0.002', + price: '21000', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toMatchObject( + errorResponseObjectV3(API_ERROR_CODE.ORDER_DOES_NOT_EXIST_V3), + ); //The order does not exist + } + }); + }); + + describe('Futures Endpoints', () => { + it('submitNewOrder() futures', async () => { + try { + const res = await api.submitNewOrder({ + category: 'USDT-FUTURES', + symbol: 'BTCUSDT', + side: 'buy', + orderType: 'limit', + price: '20000', + qty: '0.001', + timeInForce: 'gtc', + posSide: 'long', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toMatchObject( + errorResponseObjectV3(API_ERROR_CODE.INSUFFICIENT_BALANCE_V3), + ); // not enough balance + } + }); + + it('cancelOrder() futures', async () => { + try { + const res = await api.cancelOrder({ + orderId: '123456789', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toMatchObject( + errorResponseObjectV3(API_ERROR_CODE.ORDER_DOES_NOT_EXIST_V3), + ); // The order does not exist + } + }); + + it('placeBatchOrders() futures', async () => { + try { + const res = await api.placeBatchOrders([ + { + category: 'USDT-FUTURES', + symbol: 'BTCUSDT', + side: 'buy', + orderType: 'limit', + price: '20000', + qty: '0.001', + timeInForce: 'gtc', + posSide: 'long', + }, + ]); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toMatchObject( + errorResponseObjectV3(API_ERROR_CODE.INSUFFICIENT_BALANCE), + ); + } + }); + + it('closeAllPositions()', async () => { + try { + const res = await api.closeAllPositions({ + category: 'USDT-FUTURES', + symbol: 'BTCUSDT', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toMatchObject( + errorResponseObjectV3(API_ERROR_CODE.NO_POSITION_TO_CLOSE), + ); + } + }); + }); +}); diff --git a/test/v3/public.test.ts b/test/v3/public.test.ts new file mode 100644 index 0000000..06a131a --- /dev/null +++ b/test/v3/public.test.ts @@ -0,0 +1,82 @@ +import { RestClientV3 } from '../../src/rest-client-v3'; +import { sucessEmptyResponseObject } from '../response.util'; + +describe('Bitget Public REST API V3 Endpoints', () => { + const api = new RestClientV3(); + + describe('public endpoints', () => { + it('should succeed making a GET request without params', async () => { + const res = await api.getDiscountRate(); + expect(res).toMatchObject(sucessEmptyResponseObject()); + }); + + it('should succeed making a GET request with params', async () => { + const res = await api.getTickers({ + category: 'SPOT', + symbol: 'BTCUSDT', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + }); + + it('should return orderbook data', async () => { + const res = await api.getOrderBook({ + category: 'SPOT', + symbol: 'BTCUSDT', + limit: '20', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + }); + + it('should return candles data', async () => { + const res = await api.getCandles({ + category: 'SPOT', + symbol: 'BTCUSDT', + interval: '1m', + limit: '100', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + }); + + it('should return recent fills', async () => { + const res = await api.getFills({ + category: 'SPOT', + symbol: 'BTCUSDT', + limit: '20', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + }); + + it('should return historic candles', async () => { + const res = await api.getHistoryCandles({ + category: 'SPOT', + symbol: 'BTCUSDT', + interval: '1m', + limit: '20', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + }); + + it('should return funding rate data', async () => { + const res = await api.getCurrentFundingRate({ + symbol: 'BTCUSDT', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + }); + + it('should return open interest data', async () => { + const res = await api.getOpenInterest({ + category: 'USDT-FUTURES', + symbol: 'BTCUSDT', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + }); + + it('should return instruments config', async () => { + const res = await api.getInstruments({ + category: 'SPOT', + symbol: 'BTCUSDT', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + }); + }); +}); From ae7fc8c7c71e4d84c07c650a4a339d9b13261184 Mon Sep 17 00:00:00 2001 From: JJ-Cro Date: Tue, 22 Jul 2025 15:12:07 +0200 Subject: [PATCH 45/57] chore(): renamed env vars --- test/v3/private.read.test.ts | 6 +++--- test/v3/private.write.test.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/v3/private.read.test.ts b/test/v3/private.read.test.ts index c5ae40e..34c821b 100644 --- a/test/v3/private.read.test.ts +++ b/test/v3/private.read.test.ts @@ -6,9 +6,9 @@ import { } from '../response.util'; describe('Bitget Private REST API V3 Read Endpoints', () => { - const API_KEY = process.env.API_KEY_COM; - const API_SECRET = process.env.API_SECRET_COM; - const API_PASSPHRASE = process.env.API_PASS_COM; + const API_KEY = process.env.API_KEY_COM_V3; + const API_SECRET = process.env.API_SECRET_COM_V3; + const API_PASSPHRASE = process.env.API_PASS_COM_V3; const api = new RestClientV3({ apiKey: API_KEY!, diff --git a/test/v3/private.write.test.ts b/test/v3/private.write.test.ts index 065b792..ba9b77a 100644 --- a/test/v3/private.write.test.ts +++ b/test/v3/private.write.test.ts @@ -7,9 +7,9 @@ import { } from '../response.util'; describe('Bitget Private REST API V3 Write Endpoints', () => { - const API_KEY = process.env.API_KEY_COM; - const API_SECRET = process.env.API_SECRET_COM; - const API_PASSPHRASE = process.env.API_PASS_COM; + const API_KEY = process.env.API_KEY_COM_V3; + const API_SECRET = process.env.API_SECRET_COM_V3; + const API_PASSPHRASE = process.env.API_PASS_COM_V3; const api = new RestClientV3({ apiKey: API_KEY!, From 65487976bce1935c9daa4b8d50e85f5b86941acd Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Tue, 22 Jul 2025 14:38:41 +0100 Subject: [PATCH 46/57] feat(): migration to hybrid esm/cjs module --- .eslintrc.cjs | 4 +- package-lock.json | 1030 ++++++++++++++------------ package.json | 39 +- postBuild.sh | 19 + src/broker-client.ts | 8 +- src/futures-client.ts | 21 +- src/index.ts | 58 +- src/rest-client-v2.ts | 370 ++++----- src/rest-client-v3.ts | 210 +++--- src/spot-client.ts | 16 +- src/types/index.ts | 4 - src/types/request/index.ts | 16 - src/types/response/index.ts | 15 - src/types/response/v1/futures.ts | 2 +- src/types/shared.ts | 2 +- src/types/websockets/index.ts | 5 - src/types/websockets/ws-api.ts | 12 +- src/types/websockets/ws-general.ts | 5 +- src/util/BaseRestClient.ts | 12 +- src/util/BaseWSClient.ts | 27 +- src/util/WsStore.ts | 6 +- src/util/index.ts | 7 - src/util/requestUtils.ts | 4 +- src/util/type-guards.ts | 19 +- src/util/webCryptoAPI.ts | 7 +- src/util/websocket-util.ts | 16 +- src/websocket-api-client.ts | 17 +- src/websocket-client-legacy-v1.ts | 27 +- src/websocket-client-v2.ts | 36 +- src/websocket-client-v3.ts | 35 +- test/v1/broker/private.read.test.ts | 18 +- test/v1/broker/private.write.test.ts | 18 +- test/v1/futures/private.read.test.ts | 4 +- tsconfig.cjs.json | 9 + tsconfig.esm.json | 9 + tsconfig.json | 39 +- 36 files changed, 1170 insertions(+), 976 deletions(-) create mode 100755 postBuild.sh delete mode 100644 src/types/index.ts delete mode 100644 src/types/request/index.ts delete mode 100644 src/types/response/index.ts delete mode 100644 src/types/websockets/index.ts delete mode 100644 src/util/index.ts create mode 100644 tsconfig.cjs.json create mode 100644 tsconfig.esm.json diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 97c9d4b..7bd067c 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -8,12 +8,12 @@ module.exports = { plugins: [ '@typescript-eslint/eslint-plugin', 'simple-import-sort', - // 'require-extensions', // only once moved to ESM + 'require-extensions', // only once moved to ESM ], extends: [ 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended', - // 'plugin:require-extensions/recommended', // only once moved to ESM + 'plugin:require-extensions/recommended', // only once moved to ESM ], root: true, env: { diff --git a/package-lock.json b/package-lock.json index d2d78df..0109cb5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,13 +9,14 @@ "version": "3.0.0", "license": "MIT", "dependencies": { - "axios": "^1.6.1", + "axios": "^1.10.0", "isomorphic-ws": "^5.0.0", "ws": "^8.9.0" }, "devDependencies": { "@types/jest": "^29.0.3", "@types/node": "^22.10.2", + "@types/ws": "^8.18.1", "@typescript-eslint/eslint-plugin": "^8.18.0", "@typescript-eslint/parser": "^8.18.0", "eslint": "^8.24.0", @@ -27,14 +28,15 @@ "source-map-loader": "^4.0.0", "ts-jest": "^29.0.2", "ts-loader": "^9.4.1", - "typescript": "^5.7.3", - "webpack": "^5.74.0", - "webpack-bundle-analyzer": "^4.6.1", - "webpack-cli": "^4.10.0" + "typescript": "^5.7.3" }, "funding": { "type": "individual", "url": "https://github.com/sponsors/tiagosiebler" + }, + "optionalDependencies": { + "webpack": "^5.74.0", + "webpack-cli": "^4.10.0" } }, "node_modules/@ampproject/remapping": { @@ -554,7 +556,7 @@ "version": "0.5.7", "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", - "dev": true, + "optional": true, "engines": { "node": ">=10.0.0" } @@ -1057,7 +1059,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true, + "devOptional": true, "engines": { "node": ">=6.0.0" } @@ -1066,7 +1068,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true, + "devOptional": true, "engines": { "node": ">=6.0.0" } @@ -1075,7 +1077,7 @@ "version": "0.3.6", "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", - "dev": true, + "devOptional": true, "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25" @@ -1085,7 +1087,7 @@ "version": "0.3.5", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", - "dev": true, + "devOptional": true, "dependencies": { "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -1099,13 +1101,13 @@ "version": "1.4.14", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true + "devOptional": true }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, + "devOptional": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" @@ -1158,12 +1160,6 @@ "url": "https://opencollective.com/unts" } }, - "node_modules/@polka/url": { - "version": "1.0.0-next.21", - "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.21.tgz", - "integrity": "sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==", - "dev": true - }, "node_modules/@sinclair/typebox": { "version": "0.24.43", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.43.tgz", @@ -1233,7 +1229,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "dev": true + "devOptional": true }, "node_modules/@types/graceful-fs": { "version": "4.1.5", @@ -1282,13 +1278,13 @@ "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true + "devOptional": true }, "node_modules/@types/node": { "version": "22.16.4", "resolved": "https://registry.npmjs.org/@types/node/-/node-22.16.4.tgz", "integrity": "sha512-PYRhNtZdm2wH/NT2k/oAJ6/f2VD2N2Dag0lGlx2vWgMSJXGNmlce5MiTQzoWAiIJtso30mjnfQCOKVH+kAQC/g==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "undici-types": "~6.21.0" @@ -1306,6 +1302,16 @@ "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", "dev": true }, + "node_modules/@types/ws": { + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz", + "integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/yargs": { "version": "17.0.13", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.13.tgz", @@ -1557,7 +1563,7 @@ "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", - "dev": true, + "devOptional": true, "dependencies": { "@webassemblyjs/helper-numbers": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6" @@ -1567,25 +1573,25 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", - "dev": true + "devOptional": true }, "node_modules/@webassemblyjs/helper-api-error": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", - "dev": true + "devOptional": true }, "node_modules/@webassemblyjs/helper-buffer": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", - "dev": true + "devOptional": true }, "node_modules/@webassemblyjs/helper-numbers": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", - "dev": true, + "devOptional": true, "dependencies": { "@webassemblyjs/floating-point-hex-parser": "1.11.6", "@webassemblyjs/helper-api-error": "1.11.6", @@ -1596,13 +1602,13 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", - "dev": true + "devOptional": true }, "node_modules/@webassemblyjs/helper-wasm-section": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", - "dev": true, + "devOptional": true, "dependencies": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-buffer": "1.12.1", @@ -1614,7 +1620,7 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", - "dev": true, + "devOptional": true, "dependencies": { "@xtuc/ieee754": "^1.2.0" } @@ -1623,7 +1629,7 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", - "dev": true, + "devOptional": true, "dependencies": { "@xtuc/long": "4.2.2" } @@ -1632,13 +1638,13 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", - "dev": true + "devOptional": true }, "node_modules/@webassemblyjs/wasm-edit": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", - "dev": true, + "devOptional": true, "dependencies": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-buffer": "1.12.1", @@ -1654,7 +1660,7 @@ "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", - "dev": true, + "devOptional": true, "dependencies": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", @@ -1667,7 +1673,7 @@ "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", - "dev": true, + "devOptional": true, "dependencies": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-buffer": "1.12.1", @@ -1679,7 +1685,7 @@ "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", - "dev": true, + "devOptional": true, "dependencies": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-api-error": "1.11.6", @@ -1693,7 +1699,7 @@ "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", - "dev": true, + "devOptional": true, "dependencies": { "@webassemblyjs/ast": "1.12.1", "@xtuc/long": "4.2.2" @@ -1703,7 +1709,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz", "integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==", - "dev": true, + "optional": true, "peerDependencies": { "webpack": "4.x.x || 5.x.x", "webpack-cli": "4.x.x" @@ -1713,7 +1719,7 @@ "version": "1.5.0", "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.5.0.tgz", "integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==", - "dev": true, + "optional": true, "dependencies": { "envinfo": "^7.7.3" }, @@ -1725,7 +1731,7 @@ "version": "1.7.0", "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz", "integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==", - "dev": true, + "optional": true, "peerDependencies": { "webpack-cli": "4.x.x" }, @@ -1739,13 +1745,13 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true + "devOptional": true }, "node_modules/@xtuc/long": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true + "devOptional": true }, "node_modules/abab": { "version": "2.0.6", @@ -1757,7 +1763,7 @@ "version": "8.11.2", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", - "dev": true, + "devOptional": true, "bin": { "acorn": "bin/acorn" }, @@ -1769,7 +1775,7 @@ "version": "1.9.5", "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", - "dev": true, + "devOptional": true, "peerDependencies": { "acorn": "^8" } @@ -1783,20 +1789,11 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, + "devOptional": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -1812,7 +1809,7 @@ "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, + "devOptional": true, "peerDependencies": { "ajv": "^6.9.1" } @@ -1893,9 +1890,9 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/axios": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.2.tgz", - "integrity": "sha512-ls4GYBm5aig9vWx8AWDSGLpnpDQRtWAfrjU+EuytuODrFBkqesN2RkOQCBzrA1RQNHw1SmRMSDDDSwzNAYQ6Rg==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.10.0.tgz", + "integrity": "sha512-/1xYAC4MP/HEG+3duIhFr4ZQXR4sQXOIe+o6sdqzeykGLx6Upp/1p8MHqhINOvGeP7xyNHe7tsiJByc4SSVUxw==", "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", @@ -2027,7 +2024,7 @@ "version": "4.24.0", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz", "integrity": "sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==", - "dev": true, + "devOptional": true, "funding": [ { "type": "opencollective", @@ -2080,7 +2077,20 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true + "devOptional": true + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } }, "node_modules/callsites": { "version": "3.1.0", @@ -2104,7 +2114,7 @@ "version": "1.0.30001664", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001664.tgz", "integrity": "sha512-AmE7k4dXiNKQipgn7a2xg558IRqPN3jMQY/rOsbxDhrd0tyChwbITBfiwtnqz8bi2M5mIWbxAYBvk7W7QBUS2g==", - "dev": true, + "devOptional": true, "funding": [ { "type": "opencollective", @@ -2149,7 +2159,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", - "dev": true, + "devOptional": true, "engines": { "node": ">=6.0" } @@ -2181,7 +2191,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", - "dev": true, + "optional": true, "dependencies": { "is-plain-object": "^2.0.4", "kind-of": "^6.0.2", @@ -2229,7 +2239,7 @@ "version": "2.0.19", "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", - "dev": true + "optional": true }, "node_modules/combined-stream": { "version": "1.0.8", @@ -2246,7 +2256,7 @@ "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true + "devOptional": true }, "node_modules/concat-map": { "version": "0.0.1", @@ -2267,7 +2277,7 @@ "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, + "devOptional": true, "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -2353,17 +2363,25 @@ "node": ">=6.0.0" } }, - "node_modules/duplexer": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", - "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", - "dev": true + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } }, "node_modules/electron-to-chromium": { "version": "1.5.29", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.29.tgz", "integrity": "sha512-PF8n2AlIhCKXQ+gTpiJi0VhcHDb69kYX4MtCiivctc2QD3XuNZ/XIOlbGzt7WAjjEev0TtaH6Cu3arZExm5DOw==", - "dev": true + "devOptional": true }, "node_modules/emittery": { "version": "0.10.2", @@ -2387,7 +2405,7 @@ "version": "5.17.1", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", - "dev": true, + "devOptional": true, "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -2400,7 +2418,7 @@ "version": "7.8.1", "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", - "dev": true, + "optional": true, "bin": { "envinfo": "dist/cli.js" }, @@ -2417,17 +2435,62 @@ "is-arrayish": "^0.2.1" } }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-module-lexer": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.4.1.tgz", "integrity": "sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==", - "dev": true + "devOptional": true + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } }, "node_modules/escalade": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true, + "devOptional": true, "engines": { "node": ">=6" } @@ -2637,7 +2700,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, + "devOptional": true, "dependencies": { "estraverse": "^5.2.0" }, @@ -2649,7 +2712,7 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, + "devOptional": true, "engines": { "node": ">=4.0" } @@ -2667,7 +2730,7 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true, + "devOptional": true, "engines": { "node": ">=0.8.x" } @@ -2724,7 +2787,7 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "devOptional": true }, "node_modules/fast-diff": { "version": "1.3.0", @@ -2766,7 +2829,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "devOptional": true }, "node_modules/fast-levenshtein": { "version": "2.0.6", @@ -2778,7 +2841,7 @@ "version": "1.0.16", "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", - "dev": true, + "optional": true, "engines": { "node": ">= 4.9.1" } @@ -2880,12 +2943,15 @@ } }, "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", + "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", + "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", "mime-types": "^2.1.12" }, "engines": { @@ -2913,10 +2979,13 @@ } }, "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/gensync": { "version": "1.0.0-beta.2", @@ -2936,6 +3005,30 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/get-package-type": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", @@ -2945,6 +3038,19 @@ "node": ">=8.0.0" } }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", @@ -2993,7 +3099,7 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true + "devOptional": true }, "node_modules/globals": { "version": "13.24.0", @@ -3010,11 +3116,23 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true + "devOptional": true }, "node_modules/graphemer": { "version": "1.4.0", @@ -3022,26 +3140,11 @@ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, - "node_modules/gzip-size": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz", - "integrity": "sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==", - "dev": true, - "dependencies": { - "duplexer": "^0.1.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, + "devOptional": true, "dependencies": { "function-bind": "^1.1.1" }, @@ -3053,11 +3156,50 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, + "devOptional": true, "engines": { "node": ">=8" } }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -3114,7 +3256,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", - "dev": true, + "devOptional": true, "dependencies": { "pkg-dir": "^4.2.0", "resolve-cwd": "^3.0.0" @@ -3158,7 +3300,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", - "dev": true, + "optional": true, "engines": { "node": ">= 0.10" } @@ -3173,7 +3315,7 @@ "version": "2.10.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", - "dev": true, + "devOptional": true, "dependencies": { "has": "^1.0.3" }, @@ -3242,7 +3384,7 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, + "optional": true, "dependencies": { "isobject": "^3.0.1" }, @@ -3266,13 +3408,13 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true + "devOptional": true }, "node_modules/isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", - "dev": true, + "optional": true, "engines": { "node": ">=0.10.0" } @@ -3958,13 +4100,13 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true + "devOptional": true }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "devOptional": true }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -3988,7 +4130,7 @@ "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, + "optional": true, "engines": { "node": ">=0.10.0" } @@ -4034,7 +4176,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", - "dev": true, + "devOptional": true, "engines": { "node": ">=6.11.5" } @@ -4054,12 +4196,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, "node_modules/lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -4114,11 +4250,20 @@ "tmpl": "1.0.5" } }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true + "devOptional": true }, "node_modules/merge2": { "version": "1.4.1", @@ -4183,15 +4328,6 @@ "node": "*" } }, - "node_modules/mrmime": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-1.0.1.tgz", - "integrity": "sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -4208,7 +4344,7 @@ "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true + "devOptional": true }, "node_modules/node-int64": { "version": "0.4.0", @@ -4220,7 +4356,7 @@ "version": "2.0.18", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", - "dev": true + "devOptional": true }, "node_modules/normalize-path": { "version": "3.0.0", @@ -4267,15 +4403,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/opener": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", - "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", - "dev": true, - "bin": { - "opener": "bin/opener-bin.js" - } - }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -4327,7 +4454,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, + "devOptional": true, "engines": { "node": ">=6" } @@ -4366,7 +4493,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, + "devOptional": true, "engines": { "node": ">=8" } @@ -4384,7 +4511,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, + "devOptional": true, "engines": { "node": ">=8" } @@ -4393,13 +4520,13 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true + "devOptional": true }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true, + "devOptional": true, "license": "ISC" }, "node_modules/picomatch": { @@ -4427,7 +4554,7 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, + "devOptional": true, "dependencies": { "find-up": "^4.0.0" }, @@ -4439,7 +4566,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, + "devOptional": true, "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -4452,7 +4579,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, + "devOptional": true, "dependencies": { "p-locate": "^4.1.0" }, @@ -4464,7 +4591,7 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, + "devOptional": true, "dependencies": { "p-try": "^2.0.0" }, @@ -4479,7 +4606,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, + "devOptional": true, "dependencies": { "p-limit": "^2.2.0" }, @@ -4572,7 +4699,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true, + "devOptional": true, "engines": { "node": ">=6" } @@ -4601,7 +4728,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, + "devOptional": true, "dependencies": { "safe-buffer": "^5.1.0" } @@ -4616,7 +4743,7 @@ "version": "0.7.1", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", - "dev": true, + "optional": true, "dependencies": { "resolve": "^1.9.0" }, @@ -4637,7 +4764,7 @@ "version": "1.22.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", - "dev": true, + "devOptional": true, "dependencies": { "is-core-module": "^2.9.0", "path-parse": "^1.0.7", @@ -4654,7 +4781,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, + "devOptional": true, "dependencies": { "resolve-from": "^5.0.0" }, @@ -4666,7 +4793,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, + "devOptional": true, "engines": { "node": ">=8" } @@ -4741,7 +4868,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "devOptional": true }, "node_modules/safer-buffer": { "version": "2.1.2", @@ -4753,7 +4880,7 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "dev": true, + "devOptional": true, "dependencies": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", @@ -4780,7 +4907,7 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", - "dev": true, + "devOptional": true, "dependencies": { "randombytes": "^2.1.0" } @@ -4789,7 +4916,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", - "dev": true, + "optional": true, "dependencies": { "kind-of": "^6.0.2" }, @@ -4801,7 +4928,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, + "devOptional": true, "dependencies": { "shebang-regex": "^3.0.0" }, @@ -4813,7 +4940,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, + "devOptional": true, "engines": { "node": ">=8" } @@ -4824,20 +4951,6 @@ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, - "node_modules/sirv": { - "version": "1.0.19", - "resolved": "https://registry.npmjs.org/sirv/-/sirv-1.0.19.tgz", - "integrity": "sha512-JuLThK3TnZG1TAKDwNIqNq6QA2afLOCcm+iE8D1Kj3GA40pSPsxQjjJl0J8X3tsR7T+CP1GavpzLwYkgVLWrZQ==", - "dev": true, - "dependencies": { - "@polka/url": "^1.0.0-next.20", - "mrmime": "^1.0.0", - "totalist": "^1.0.0" - }, - "engines": { - "node": ">= 10" - } - }, "node_modules/sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", @@ -4857,7 +4970,7 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, + "devOptional": true, "engines": { "node": ">=0.10.0" } @@ -5027,7 +5140,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, + "devOptional": true, "engines": { "node": ">= 0.4" }, @@ -5055,7 +5168,7 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true, + "devOptional": true, "engines": { "node": ">=6" } @@ -5080,7 +5193,7 @@ "version": "5.34.1", "resolved": "https://registry.npmjs.org/terser/-/terser-5.34.1.tgz", "integrity": "sha512-FsJZ7iZLd/BXkz+4xrRTGJ26o/6VTjQytUk8b8OxkwcD2I+79VPJlz7qss1+zE7h8GNIScFqXcDyJ/KqBYZFVA==", - "dev": true, + "devOptional": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.8.2", @@ -5098,7 +5211,7 @@ "version": "5.3.10", "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", - "dev": true, + "devOptional": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.20", "jest-worker": "^27.4.5", @@ -5132,7 +5245,7 @@ "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", - "dev": true, + "devOptional": true, "dependencies": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -5146,7 +5259,7 @@ "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, + "devOptional": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -5161,7 +5274,7 @@ "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, + "devOptional": true, "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -5205,15 +5318,6 @@ "node": ">=8.0" } }, - "node_modules/totalist": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/totalist/-/totalist-1.1.0.tgz", - "integrity": "sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/ts-api-utils": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", @@ -5375,14 +5479,14 @@ "version": "6.21.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/update-browserslist-db": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", - "dev": true, + "devOptional": true, "funding": [ { "type": "opencollective", @@ -5412,7 +5516,7 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, + "devOptional": true, "dependencies": { "punycode": "^2.1.0" } @@ -5444,7 +5548,7 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz", "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==", - "dev": true, + "devOptional": true, "dependencies": { "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.1.2" @@ -5457,7 +5561,7 @@ "version": "5.95.0", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.95.0.tgz", "integrity": "sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q==", - "dev": true, + "devOptional": true, "dependencies": { "@types/estree": "^1.0.5", "@webassemblyjs/ast": "^1.12.1", @@ -5499,64 +5603,11 @@ } } }, - "node_modules/webpack-bundle-analyzer": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.6.1.tgz", - "integrity": "sha512-oKz9Oz9j3rUciLNfpGFjOb49/jEpXNmWdVH8Ls//zNcnLlQdTGXQQMsBbb/gR7Zl8WNLxVCq+0Hqbx3zv6twBw==", - "dev": true, - "dependencies": { - "acorn": "^8.0.4", - "acorn-walk": "^8.0.0", - "chalk": "^4.1.0", - "commander": "^7.2.0", - "gzip-size": "^6.0.0", - "lodash": "^4.17.20", - "opener": "^1.5.2", - "sirv": "^1.0.7", - "ws": "^7.3.1" - }, - "bin": { - "webpack-bundle-analyzer": "lib/bin/analyzer.js" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "dev": true, - "engines": { - "node": ">= 10" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/ws": { - "version": "7.5.10", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", - "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", - "dev": true, - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/webpack-cli": { "version": "4.10.0", "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz", "integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==", - "dev": true, + "optional": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -5603,7 +5654,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "dev": true, + "optional": true, "engines": { "node": ">= 10" } @@ -5612,7 +5663,7 @@ "version": "5.8.0", "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", - "dev": true, + "optional": true, "dependencies": { "clone-deep": "^4.0.1", "wildcard": "^2.0.0" @@ -5625,7 +5676,7 @@ "version": "3.2.3", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "dev": true, + "devOptional": true, "engines": { "node": ">=10.13.0" } @@ -5634,7 +5685,7 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, + "devOptional": true, "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" @@ -5647,7 +5698,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, + "devOptional": true, "engines": { "node": ">=4.0" } @@ -5656,7 +5707,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, + "devOptional": true, "dependencies": { "isexe": "^2.0.0" }, @@ -5671,7 +5722,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==", - "dev": true + "optional": true }, "node_modules/word-wrap": { "version": "1.2.5", @@ -6175,7 +6226,7 @@ "version": "0.5.7", "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", - "dev": true + "optional": true }, "@eslint-community/eslint-utils": { "version": "4.4.1", @@ -6556,19 +6607,19 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true + "devOptional": true }, "@jridgewell/set-array": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true + "devOptional": true }, "@jridgewell/source-map": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", - "dev": true, + "devOptional": true, "requires": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25" @@ -6578,7 +6629,7 @@ "version": "0.3.5", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", - "dev": true, + "devOptional": true, "requires": { "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -6591,13 +6642,13 @@ "version": "1.4.14", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true + "devOptional": true }, "@jridgewell/trace-mapping": { "version": "0.3.25", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, + "devOptional": true, "requires": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" @@ -6635,12 +6686,6 @@ "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", "dev": true }, - "@polka/url": { - "version": "1.0.0-next.21", - "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.21.tgz", - "integrity": "sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==", - "dev": true - }, "@sinclair/typebox": { "version": "0.24.43", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.43.tgz", @@ -6710,7 +6755,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "dev": true + "devOptional": true }, "@types/graceful-fs": { "version": "4.1.5", @@ -6759,13 +6804,13 @@ "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true + "devOptional": true }, "@types/node": { "version": "22.16.4", "resolved": "https://registry.npmjs.org/@types/node/-/node-22.16.4.tgz", "integrity": "sha512-PYRhNtZdm2wH/NT2k/oAJ6/f2VD2N2Dag0lGlx2vWgMSJXGNmlce5MiTQzoWAiIJtso30mjnfQCOKVH+kAQC/g==", - "dev": true, + "devOptional": true, "requires": { "undici-types": "~6.21.0" } @@ -6782,6 +6827,15 @@ "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", "dev": true }, + "@types/ws": { + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz", + "integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "@types/yargs": { "version": "17.0.13", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.13.tgz", @@ -6937,7 +6991,7 @@ "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", - "dev": true, + "devOptional": true, "requires": { "@webassemblyjs/helper-numbers": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6" @@ -6947,25 +7001,25 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", - "dev": true + "devOptional": true }, "@webassemblyjs/helper-api-error": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", - "dev": true + "devOptional": true }, "@webassemblyjs/helper-buffer": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", - "dev": true + "devOptional": true }, "@webassemblyjs/helper-numbers": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", - "dev": true, + "devOptional": true, "requires": { "@webassemblyjs/floating-point-hex-parser": "1.11.6", "@webassemblyjs/helper-api-error": "1.11.6", @@ -6976,13 +7030,13 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", - "dev": true + "devOptional": true }, "@webassemblyjs/helper-wasm-section": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", - "dev": true, + "devOptional": true, "requires": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-buffer": "1.12.1", @@ -6994,7 +7048,7 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", - "dev": true, + "devOptional": true, "requires": { "@xtuc/ieee754": "^1.2.0" } @@ -7003,7 +7057,7 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", - "dev": true, + "devOptional": true, "requires": { "@xtuc/long": "4.2.2" } @@ -7012,13 +7066,13 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", - "dev": true + "devOptional": true }, "@webassemblyjs/wasm-edit": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", - "dev": true, + "devOptional": true, "requires": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-buffer": "1.12.1", @@ -7034,7 +7088,7 @@ "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", - "dev": true, + "devOptional": true, "requires": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", @@ -7047,7 +7101,7 @@ "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", - "dev": true, + "devOptional": true, "requires": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-buffer": "1.12.1", @@ -7059,7 +7113,7 @@ "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", - "dev": true, + "devOptional": true, "requires": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-api-error": "1.11.6", @@ -7073,7 +7127,7 @@ "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", - "dev": true, + "devOptional": true, "requires": { "@webassemblyjs/ast": "1.12.1", "@xtuc/long": "4.2.2" @@ -7083,14 +7137,14 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz", "integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==", - "dev": true, + "optional": true, "requires": {} }, "@webpack-cli/info": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.5.0.tgz", "integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==", - "dev": true, + "optional": true, "requires": { "envinfo": "^7.7.3" } @@ -7099,20 +7153,20 @@ "version": "1.7.0", "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz", "integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==", - "dev": true, + "optional": true, "requires": {} }, "@xtuc/ieee754": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true + "devOptional": true }, "@xtuc/long": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true + "devOptional": true }, "abab": { "version": "2.0.6", @@ -7124,13 +7178,13 @@ "version": "8.11.2", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", - "dev": true + "devOptional": true }, "acorn-import-attributes": { "version": "1.9.5", "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", - "dev": true, + "devOptional": true, "requires": {} }, "acorn-jsx": { @@ -7140,17 +7194,11 @@ "dev": true, "requires": {} }, - "acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", - "dev": true - }, "ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, + "devOptional": true, "requires": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -7162,7 +7210,7 @@ "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, + "devOptional": true, "requires": {} }, "ansi-escapes": { @@ -7219,9 +7267,9 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "axios": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.2.tgz", - "integrity": "sha512-ls4GYBm5aig9vWx8AWDSGLpnpDQRtWAfrjU+EuytuODrFBkqesN2RkOQCBzrA1RQNHw1SmRMSDDDSwzNAYQ6Rg==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.10.0.tgz", + "integrity": "sha512-/1xYAC4MP/HEG+3duIhFr4ZQXR4sQXOIe+o6sdqzeykGLx6Upp/1p8MHqhINOvGeP7xyNHe7tsiJByc4SSVUxw==", "requires": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", @@ -7327,7 +7375,7 @@ "version": "4.24.0", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz", "integrity": "sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==", - "dev": true, + "devOptional": true, "requires": { "caniuse-lite": "^1.0.30001663", "electron-to-chromium": "^1.5.28", @@ -7357,7 +7405,16 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true + "devOptional": true + }, + "call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "requires": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + } }, "callsites": { "version": "3.1.0", @@ -7375,7 +7432,7 @@ "version": "1.0.30001664", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001664.tgz", "integrity": "sha512-AmE7k4dXiNKQipgn7a2xg558IRqPN3jMQY/rOsbxDhrd0tyChwbITBfiwtnqz8bi2M5mIWbxAYBvk7W7QBUS2g==", - "dev": true + "devOptional": true }, "chalk": { "version": "4.1.2", @@ -7397,7 +7454,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", - "dev": true + "devOptional": true }, "ci-info": { "version": "3.4.0", @@ -7426,7 +7483,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", - "dev": true, + "optional": true, "requires": { "is-plain-object": "^2.0.4", "kind-of": "^6.0.2", @@ -7464,7 +7521,7 @@ "version": "2.0.19", "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", - "dev": true + "optional": true }, "combined-stream": { "version": "1.0.8", @@ -7478,7 +7535,7 @@ "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true + "devOptional": true }, "concat-map": { "version": "0.0.1", @@ -7499,7 +7556,7 @@ "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, + "devOptional": true, "requires": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -7559,17 +7616,21 @@ "esutils": "^2.0.2" } }, - "duplexer": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", - "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", - "dev": true + "dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "requires": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + } }, "electron-to-chromium": { "version": "1.5.29", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.29.tgz", "integrity": "sha512-PF8n2AlIhCKXQ+gTpiJi0VhcHDb69kYX4MtCiivctc2QD3XuNZ/XIOlbGzt7WAjjEev0TtaH6Cu3arZExm5DOw==", - "dev": true + "devOptional": true }, "emittery": { "version": "0.10.2", @@ -7587,7 +7648,7 @@ "version": "5.17.1", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", - "dev": true, + "devOptional": true, "requires": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -7597,7 +7658,7 @@ "version": "7.8.1", "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", - "dev": true + "optional": true }, "error-ex": { "version": "1.3.2", @@ -7608,17 +7669,46 @@ "is-arrayish": "^0.2.1" } }, + "es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==" + }, + "es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==" + }, "es-module-lexer": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.4.1.tgz", "integrity": "sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==", - "dev": true + "devOptional": true + }, + "es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "requires": { + "es-errors": "^1.3.0" + } + }, + "es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "requires": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + } }, "escalade": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true + "devOptional": true }, "escape-string-regexp": { "version": "4.0.0", @@ -7749,7 +7839,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, + "devOptional": true, "requires": { "estraverse": "^5.2.0" } @@ -7758,7 +7848,7 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true + "devOptional": true }, "esutils": { "version": "2.0.3", @@ -7770,7 +7860,7 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true + "devOptional": true }, "execa": { "version": "5.1.1", @@ -7812,7 +7902,7 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "devOptional": true }, "fast-diff": { "version": "1.3.0", @@ -7848,7 +7938,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "devOptional": true }, "fast-levenshtein": { "version": "2.0.6", @@ -7860,7 +7950,7 @@ "version": "1.0.16", "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", - "dev": true + "optional": true }, "fastq": { "version": "1.17.1", @@ -7930,12 +8020,14 @@ "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==" }, "form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", + "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", "requires": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", "mime-types": "^2.1.12" } }, @@ -7953,10 +8045,9 @@ "optional": true }, "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" }, "gensync": { "version": "1.0.0-beta.2", @@ -7970,12 +8061,38 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, + "get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "requires": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + } + }, "get-package-type": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", "dev": true }, + "get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "requires": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + } + }, "get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", @@ -8009,7 +8126,7 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true + "devOptional": true }, "globals": { "version": "13.24.0", @@ -8020,11 +8137,16 @@ "type-fest": "^0.20.2" } }, + "gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==" + }, "graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true + "devOptional": true }, "graphemer": { "version": "1.4.0", @@ -8032,20 +8154,11 @@ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, - "gzip-size": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz", - "integrity": "sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==", - "dev": true, - "requires": { - "duplexer": "^0.1.2" - } - }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, + "devOptional": true, "requires": { "function-bind": "^1.1.1" } @@ -8054,7 +8167,28 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true + "devOptional": true + }, + "has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==" + }, + "has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "requires": { + "has-symbols": "^1.0.3" + } + }, + "hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "requires": { + "function-bind": "^1.1.2" + } }, "html-escaper": { "version": "2.0.2", @@ -8097,7 +8231,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", - "dev": true, + "devOptional": true, "requires": { "pkg-dir": "^4.2.0", "resolve-cwd": "^3.0.0" @@ -8129,7 +8263,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", - "dev": true + "optional": true }, "is-arrayish": { "version": "0.2.1", @@ -8141,7 +8275,7 @@ "version": "2.10.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", - "dev": true, + "devOptional": true, "requires": { "has": "^1.0.3" } @@ -8189,7 +8323,7 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, + "optional": true, "requires": { "isobject": "^3.0.1" } @@ -8204,13 +8338,13 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true + "devOptional": true }, "isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", - "dev": true + "optional": true }, "isomorphic-ws": { "version": "5.0.0", @@ -8733,13 +8867,13 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true + "devOptional": true }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "devOptional": true }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -8757,7 +8891,7 @@ "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true + "optional": true }, "kleur": { "version": "3.0.3", @@ -8791,7 +8925,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", - "dev": true + "devOptional": true }, "locate-path": { "version": "6.0.0", @@ -8802,12 +8936,6 @@ "p-locate": "^5.0.0" } }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, "lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -8853,11 +8981,16 @@ "tmpl": "1.0.5" } }, + "math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==" + }, "merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true + "devOptional": true }, "merge2": { "version": "1.4.1", @@ -8903,12 +9036,6 @@ "brace-expansion": "^1.1.7" } }, - "mrmime": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-1.0.1.tgz", - "integrity": "sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==", - "dev": true - }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -8925,7 +9052,7 @@ "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true + "devOptional": true }, "node-int64": { "version": "0.4.0", @@ -8937,7 +9064,7 @@ "version": "2.0.18", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", - "dev": true + "devOptional": true }, "normalize-path": { "version": "3.0.0", @@ -8972,12 +9099,6 @@ "mimic-fn": "^2.1.0" } }, - "opener": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", - "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", - "dev": true - }, "optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -9014,7 +9135,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true + "devOptional": true }, "parent-module": { "version": "1.0.1", @@ -9041,7 +9162,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true + "devOptional": true }, "path-is-absolute": { "version": "1.0.1", @@ -9053,19 +9174,19 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true + "devOptional": true }, "path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true + "devOptional": true }, "picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true + "devOptional": true }, "picomatch": { "version": "2.3.1", @@ -9083,7 +9204,7 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, + "devOptional": true, "requires": { "find-up": "^4.0.0" }, @@ -9092,7 +9213,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, + "devOptional": true, "requires": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -9102,7 +9223,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, + "devOptional": true, "requires": { "p-locate": "^4.1.0" } @@ -9111,7 +9232,7 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, + "devOptional": true, "requires": { "p-try": "^2.0.0" } @@ -9120,7 +9241,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, + "devOptional": true, "requires": { "p-limit": "^2.2.0" } @@ -9187,7 +9308,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true + "devOptional": true }, "queue-microtask": { "version": "1.2.3", @@ -9199,7 +9320,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, + "devOptional": true, "requires": { "safe-buffer": "^5.1.0" } @@ -9214,7 +9335,7 @@ "version": "0.7.1", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", - "dev": true, + "optional": true, "requires": { "resolve": "^1.9.0" } @@ -9229,7 +9350,7 @@ "version": "1.22.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", - "dev": true, + "devOptional": true, "requires": { "is-core-module": "^2.9.0", "path-parse": "^1.0.7", @@ -9240,7 +9361,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, + "devOptional": true, "requires": { "resolve-from": "^5.0.0" }, @@ -9249,7 +9370,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true + "devOptional": true } } }, @@ -9293,7 +9414,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "devOptional": true }, "safer-buffer": { "version": "2.1.2", @@ -9305,7 +9426,7 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "dev": true, + "devOptional": true, "requires": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", @@ -9322,7 +9443,7 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", - "dev": true, + "devOptional": true, "requires": { "randombytes": "^2.1.0" } @@ -9331,7 +9452,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", - "dev": true, + "optional": true, "requires": { "kind-of": "^6.0.2" } @@ -9340,7 +9461,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, + "devOptional": true, "requires": { "shebang-regex": "^3.0.0" } @@ -9349,7 +9470,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true + "devOptional": true }, "signal-exit": { "version": "3.0.7", @@ -9357,17 +9478,6 @@ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, - "sirv": { - "version": "1.0.19", - "resolved": "https://registry.npmjs.org/sirv/-/sirv-1.0.19.tgz", - "integrity": "sha512-JuLThK3TnZG1TAKDwNIqNq6QA2afLOCcm+iE8D1Kj3GA40pSPsxQjjJl0J8X3tsR7T+CP1GavpzLwYkgVLWrZQ==", - "dev": true, - "requires": { - "@polka/url": "^1.0.0-next.20", - "mrmime": "^1.0.0", - "totalist": "^1.0.0" - } - }, "sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", @@ -9384,7 +9494,7 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true + "devOptional": true }, "source-map-js": { "version": "1.0.2", @@ -9507,7 +9617,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true + "devOptional": true }, "synckit": { "version": "0.9.2", @@ -9523,7 +9633,7 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true + "devOptional": true }, "terminal-link": { "version": "2.1.1", @@ -9539,7 +9649,7 @@ "version": "5.34.1", "resolved": "https://registry.npmjs.org/terser/-/terser-5.34.1.tgz", "integrity": "sha512-FsJZ7iZLd/BXkz+4xrRTGJ26o/6VTjQytUk8b8OxkwcD2I+79VPJlz7qss1+zE7h8GNIScFqXcDyJ/KqBYZFVA==", - "dev": true, + "devOptional": true, "requires": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.8.2", @@ -9551,7 +9661,7 @@ "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, + "devOptional": true, "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -9563,7 +9673,7 @@ "version": "5.3.10", "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", - "dev": true, + "devOptional": true, "requires": { "@jridgewell/trace-mapping": "^0.3.20", "jest-worker": "^27.4.5", @@ -9576,7 +9686,7 @@ "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", - "dev": true, + "devOptional": true, "requires": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -9587,7 +9697,7 @@ "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, + "devOptional": true, "requires": { "has-flag": "^4.0.0" } @@ -9626,12 +9736,6 @@ "is-number": "^7.0.0" } }, - "totalist": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/totalist/-/totalist-1.1.0.tgz", - "integrity": "sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g==", - "dev": true - }, "ts-api-utils": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", @@ -9726,13 +9830,13 @@ "version": "6.21.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", - "dev": true + "devOptional": true }, "update-browserslist-db": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", - "dev": true, + "devOptional": true, "requires": { "escalade": "^3.2.0", "picocolors": "^1.1.0" @@ -9742,7 +9846,7 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, + "devOptional": true, "requires": { "punycode": "^2.1.0" } @@ -9771,7 +9875,7 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz", "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==", - "dev": true, + "devOptional": true, "requires": { "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.1.2" @@ -9781,7 +9885,7 @@ "version": "5.95.0", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.95.0.tgz", "integrity": "sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q==", - "dev": true, + "devOptional": true, "requires": { "@types/estree": "^1.0.5", "@webassemblyjs/ast": "^1.12.1", @@ -9812,7 +9916,7 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, + "devOptional": true, "requires": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" @@ -9822,39 +9926,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - } - } - }, - "webpack-bundle-analyzer": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.6.1.tgz", - "integrity": "sha512-oKz9Oz9j3rUciLNfpGFjOb49/jEpXNmWdVH8Ls//zNcnLlQdTGXQQMsBbb/gR7Zl8WNLxVCq+0Hqbx3zv6twBw==", - "dev": true, - "requires": { - "acorn": "^8.0.4", - "acorn-walk": "^8.0.0", - "chalk": "^4.1.0", - "commander": "^7.2.0", - "gzip-size": "^6.0.0", - "lodash": "^4.17.20", - "opener": "^1.5.2", - "sirv": "^1.0.7", - "ws": "^7.3.1" - }, - "dependencies": { - "commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "dev": true - }, - "ws": { - "version": "7.5.10", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", - "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", - "dev": true, - "requires": {} + "devOptional": true } } }, @@ -9862,7 +9934,7 @@ "version": "4.10.0", "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz", "integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==", - "dev": true, + "optional": true, "requires": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -9882,7 +9954,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "dev": true + "optional": true } } }, @@ -9890,7 +9962,7 @@ "version": "5.8.0", "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", - "dev": true, + "optional": true, "requires": { "clone-deep": "^4.0.1", "wildcard": "^2.0.0" @@ -9900,13 +9972,13 @@ "version": "3.2.3", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "dev": true + "devOptional": true }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, + "devOptional": true, "requires": { "isexe": "^2.0.0" } @@ -9915,7 +9987,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==", - "dev": true + "optional": true }, "word-wrap": { "version": "1.2.5", diff --git a/package.json b/package.json index 333edfd..8dd089a 100644 --- a/package.json +++ b/package.json @@ -1,20 +1,15 @@ { "name": "bitget-api", "version": "3.0.0", - "description": "Node.js & JavaScript SDK for Bitget REST APIs & WebSockets, with TypeScript & end-to-end tests.", - "main": "lib/index.js", - "types": "lib/index.d.ts", - "files": [ - "lib/*", - "index.js" - ], + "description": "Complete Node.js & JavaScript SDK for Bitget V1-V3 REST APIs & WebSockets, with TypeScript & end-to-end tests.", "scripts": { "test": "jest", "test:watch": "jest --watch", "test:public": "jest --testPathIgnorePatterns='.*private.*'", "test:private": "jest --testPathPattern='.*private.*'", "clean": "rm -rf lib dist", - "build": "tsc", + "build": "npm run clean && tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && bash ./postBuild.sh", + "build:old": "tsc", "build:clean": "npm run clean && npm run build", "build:watch": "npm run clean && tsc --watch", "pack": "webpack --config webpack/webpack.config.js", @@ -22,16 +17,31 @@ "prepublish": "npm run build:clean", "betapublish": "npm publish --tag beta" }, + "main": "dist/cjs/index.js", + "module": "dist/mjs/index.js", + "types": "dist/mjs/index.d.ts", + "exports": { + ".": { + "import": "./dist/mjs/index.js", + "require": "./dist/cjs/index.js", + "types": "./dist/mjs/index.d.ts" + } + }, + "files": [ + "dist/*" + ], + "type": "module", "author": "Tiago Siebler (https://github.com/tiagosiebler)", "contributors": [], "dependencies": { - "axios": "^1.6.1", + "axios": "^1.10.0", "isomorphic-ws": "^5.0.0", "ws": "^8.9.0" }, "devDependencies": { "@types/jest": "^29.0.3", "@types/node": "^22.10.2", + "@types/ws": "^8.18.1", "@typescript-eslint/eslint-plugin": "^8.18.0", "@typescript-eslint/parser": "^8.18.0", "eslint": "^8.24.0", @@ -43,14 +53,21 @@ "source-map-loader": "^4.0.0", "ts-jest": "^29.0.2", "ts-loader": "^9.4.1", - "typescript": "^5.7.3", + "typescript": "^5.7.3" + }, + "optionalDependencies": { "webpack": "^5.74.0", - "webpack-bundle-analyzer": "^4.6.1", "webpack-cli": "^4.10.0" }, "keywords": [ "bitget", "bitget api", + "bitget nodejs", + "bitget javascript", + "bitget typescript", + "bitget sdk", + "bitget v3 api", + "bitget UTA api", "api", "websocket", "rest", diff --git a/postBuild.sh b/postBuild.sh new file mode 100755 index 0000000..56e9572 --- /dev/null +++ b/postBuild.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# +# Add package.json files to cjs/mjs subtrees +# + +cat >dist/cjs/package.json <dist/mjs/package.json < { originalParams: T; diff --git a/src/util/BaseWSClient.ts b/src/util/BaseWSClient.ts index 2946273..bf65f08 100644 --- a/src/util/BaseWSClient.ts +++ b/src/util/BaseWSClient.ts @@ -2,23 +2,25 @@ import EventEmitter from 'events'; import WebSocket from 'isomorphic-ws'; +import { WSOperation } from '../types/websockets/ws-api.js'; import { isMessageEvent, MessageEventLike, +} from '../types/websockets/ws-events.js'; +import { WebsocketClientOptions, WSClientConfigurableOptions, - WSOperation, -} from '../types'; -import { DefaultLogger } from './logger'; +} from '../types/websockets/ws-general.js'; +import { DefaultLogger } from './logger.js'; import { getNormalisedTopicRequests, safeTerminateWs, WS_LOGGER_CATEGORY, WsTopicRequest, WsTopicRequestOrStringTopic, -} from './websocket-util'; -import WsStore from './WsStore'; -import { WSConnectedResult, WsConnectionStateEnum } from './WsStore.types'; +} from './websocket-util.js'; +import WsStore from './WsStore.js'; +import { WSConnectedResult, WsConnectionStateEnum } from './WsStore.types.js'; interface WSClientEventMap { /** Connection opened. If this connection was previously opened and reconnected, expect the reconnected event instead */ @@ -437,7 +439,7 @@ export abstract class BaseWebsocketClient< 'Refused to connect to ws with existing active connection', { ...WS_LOGGER_CATEGORY, wsKey }, ); - return { wsKey, ws: this.wsStore.getWs(wsKey) }; + return { wsKey, ws: this.wsStore.getWs(wsKey)! }; } if ( @@ -501,7 +503,7 @@ export abstract class BaseWebsocketClient< // ws.onping = (event) => this.onWsPing(event, wsKey, ws, 'function'); // ws.onpong = (event) => this.onWsPong(event, wsKey, 'function'); - ws.wsKey = wsKey; + (ws as any).wsKey = wsKey; return ws; } @@ -830,7 +832,12 @@ export abstract class BaseWebsocketClient< } } - private async onWsOpen(event, wsKey: TWSKey, url: string, ws: WebSocket) { + private async onWsOpen( + event: WebSocket.Event, + wsKey: TWSKey, + url: string, + ws: WebSocket, + ) { const isFreshConnectionAttempt = this.wsStore.isConnectionState( wsKey, WsConnectionStateEnum.CONNECTING, @@ -925,7 +932,7 @@ export abstract class BaseWebsocketClient< inProgressPromise.resolve({ wsKey, event, - ws: wsState.ws, + ws: wsState.ws!, }); } } catch (e) { diff --git a/src/util/WsStore.ts b/src/util/WsStore.ts index df3b616..d8a8378 100644 --- a/src/util/WsStore.ts +++ b/src/util/WsStore.ts @@ -1,12 +1,12 @@ import WebSocket from 'isomorphic-ws'; -import { DefaultLogger } from './logger'; +import { DefaultLogger } from './logger.js'; import { DeferredPromise, WSConnectedResult, WsConnectionStateEnum, WsStoredState, -} from './WsStore.types'; +} from './WsStore.types.js'; /** * Simple comparison of two objects. Checks every key for match. Recursive if child properties contain objects. @@ -396,7 +396,7 @@ export default class WsStore< } getTopicsByKey(): Record> { - const result = {}; + const result: Record> = {}; for (const refKey in this.wsState) { result[refKey] = this.getTopics(refKey as WsKey); diff --git a/src/util/index.ts b/src/util/index.ts deleted file mode 100644 index 87f4da5..0000000 --- a/src/util/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -export * from './BaseRestClient'; -export * from './BaseWSClient'; -export * from './logger'; -export * from './requestUtils'; -export * from './type-guards'; -export * from './websocket-util'; -export * from './WsStore'; diff --git a/src/util/requestUtils.ts b/src/util/requestUtils.ts index ec03a5a..11e0b7e 100644 --- a/src/util/requestUtils.ts +++ b/src/util/requestUtils.ts @@ -60,7 +60,9 @@ export interface RestClientOptions { customSignMessageFn?: (message: string, secret: string) => Promise; } -export function serializeParams( +export function serializeParams< + T extends Record | undefined = object, +>( params: T, strict_validation = false, encodeValues: boolean = true, diff --git a/src/util/type-guards.ts b/src/util/type-guards.ts index 87ce235..0627172 100644 --- a/src/util/type-guards.ts +++ b/src/util/type-guards.ts @@ -1,21 +1,21 @@ +import { MarginType } from '../types/request/shared.js'; +import { WSAPIResponse } from '../types/websockets/ws-api.js'; import { - MarginType, WsAccountSnapshotUMCBL, - WSAPIResponse, WsBaseEvent, WSPositionSnapshotUMCBL, WsSnapshotAccountEvent, WsSnapshotChannelEvent, WsSnapshotPositionsEvent, -} from '../types'; +} from '../types/websockets/ws-events.js'; /** TypeGuard: event has a string "action" property */ function isWsEvent(event: unknown): event is WsBaseEvent { return ( typeof event === 'object' && event && - typeof event['action'] === 'string' && - event['data'] + (typeof event as any)['action'] === 'string' && + (typeof event as any)['data'] ); } @@ -28,8 +28,8 @@ function isWsSnapshotEvent(event: unknown): event is WsBaseEvent<'snapshot'> { function isWsChannelEvent(event: WsBaseEvent): event is WsSnapshotChannelEvent { if ( typeof event['arg'] === 'object' && - event.arg && - typeof event?.arg['channel'] === 'string' + event['arg'] && + typeof (typeof event['arg'] as any)['channel'] === 'string' ) { return true; } @@ -91,7 +91,10 @@ export function isWSAPIResponse( return false; } - if (typeof msg['event'] !== 'string' || typeof msg['id'] !== 'string') { + if ( + typeof (msg as any)['event'] !== 'string' || + typeof (msg as any)['id'] !== 'string' + ) { return false; } diff --git a/src/util/webCryptoAPI.ts b/src/util/webCryptoAPI.ts index 659b2c5..206027d 100644 --- a/src/util/webCryptoAPI.ts +++ b/src/util/webCryptoAPI.ts @@ -1,5 +1,6 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { neverGuard } from './websocket-util'; + +import { neverGuard } from './websocket-util.js'; function bufferToB64(buffer: ArrayBuffer): string { let binary = ''; @@ -94,7 +95,7 @@ async function importKey( c.charCodeAt(0), ); - return crypto.subtle.importKey( + return globalThis.crypto.subtle.importKey( 'pkcs8', binaryKey.buffer, { name: type, hash: { name: algorithm } }, @@ -127,7 +128,7 @@ export async function signMessage( secret: string, method: SignEncodeMethod, algorithm: SignAlgorithm, - pemEncodeMethod: SignEncodeMethod = method, + _pemEncodeMethod: SignEncodeMethod = method, ): Promise { const encoder = new TextEncoder(); diff --git a/src/util/websocket-util.ts b/src/util/websocket-util.ts index 1f51874..c4df222 100644 --- a/src/util/websocket-util.ts +++ b/src/util/websocket-util.ts @@ -1,14 +1,14 @@ +import { WSAPIRequestBitgetV3 } from '../types/websockets/ws-api.js'; import { BitgetInstType, WebsocketClientOptions, - WSAPIRequestBitgetV3, WsKey, WsPrivateTopicV2, WsPrivateTopicV3, WsTopicSubscribeEventArgs, WsTopicSubscribePublicArgsV2, -} from '../types'; -import { DefaultLogger } from './logger'; +} from '../types/websockets/ws-general.js'; +import { DefaultLogger } from './logger.js'; export const WS_LOGGER_CATEGORY = { category: 'bitget-ws' }; @@ -189,10 +189,10 @@ export function isPrivateChannel( ); } -export function getWsKeyForTopic( +export function getWsKeyForTopicV1( subscribeEvent: WsTopicSubscribeEventArgs, // eslint-disable-next-line @typescript-eslint/no-unused-vars - isPrivate?: boolean, + _isPrivate?: boolean, ): WsKey { const instType = subscribeEvent.instType.toUpperCase() as BitgetInstType; switch (instType) { @@ -208,7 +208,7 @@ export function getWsKeyForTopic( default: { throw neverGuard( instType, - `getWsKeyForTopic(): Unhandled market ${'instrumentId'}`, + `getWsKeyForTopicV1(): Unhandled market ${'instrumentId'}`, ); } } @@ -302,7 +302,7 @@ export function getNormalisedTopicRequests( * disable heartbeats in browers, for exchanges that use native WebSocket ping/pong frames. */ export function isWSPingFrameAvailable(): boolean { - return typeof WebSocket.prototype['ping'] === 'function'; + return typeof (WebSocket.prototype as any)['ping'] === 'function'; } /** @@ -310,7 +310,7 @@ export function isWSPingFrameAvailable(): boolean { * disable heartbeats in browers, for exchanges that use native WebSocket ping/pong frames. */ export function isWSPongFrameAvailable(): boolean { - return typeof WebSocket.prototype['pong'] === 'function'; + return typeof (WebSocket.prototype as any)['pong'] === 'function'; } /** diff --git a/src/websocket-api-client.ts b/src/websocket-api-client.ts index 2987ffc..24e1c06 100644 --- a/src/websocket-api-client.ts +++ b/src/websocket-api-client.ts @@ -1,14 +1,15 @@ +import { CancelOrderRequestV3 } from './types/request/v3/trade.js'; +import { CancelOrderResponseV3 } from './types/response/v3/trade.js'; +import { WSAPIResponse } from './types/websockets/ws-api.js'; +import { WSAPIPlaceOrderRequestV3 } from './types/websockets/ws-api-request.js'; +import { WSAPIPlaceOrderResponseV3 } from './types/websockets/ws-api-response.js'; import { BitgetInstTypeV3, - CancelOrderRequestV3, - CancelOrderResponseV3, - WSAPIPlaceOrderRequestV3, - WSAPIPlaceOrderResponseV3, - WSAPIResponse, WSClientConfigurableOptions, -} from './types'; -import { DefaultLogger, WS_KEY_MAP } from './util'; -import { WebsocketClientV3 } from './websocket-client-v3'; +} from './types/websockets/ws-general.js'; +import { DefaultLogger } from './util/logger.js'; +import { WS_KEY_MAP } from './util/websocket-util.js'; +import { WebsocketClientV3 } from './websocket-client-v3.js'; /** * Configurable options specific to only the REST-like WebsocketAPIClient diff --git a/src/websocket-client-legacy-v1.ts b/src/websocket-client-legacy-v1.ts index cc4c673..e793113 100644 --- a/src/websocket-client-legacy-v1.ts +++ b/src/websocket-client-legacy-v1.ts @@ -9,22 +9,22 @@ import { WsKey, WsTopic, WsTopicSubscribeEventArgs, -} from './types'; +} from './types/websockets/ws-general.js'; +import { DefaultLogger } from './util/logger.js'; +import { isWsPong } from './util/requestUtils.js'; +import { signMessage } from './util/webCryptoAPI.js'; import { - DefaultLogger, getMaxTopicsPerSubscribeEvent, - getWsKeyForTopic, + getWsKeyForTopicV1, isPrivateChannel, - isWsPong, neverGuard, safeTerminateWs, WS_AUTH_ON_CONNECT_KEYS, WS_BASE_URL_MAP, WS_KEY_MAP, -} from './util'; -import { signMessage } from './util/webCryptoAPI'; -import WsStore from './util/WsStore'; -import { WsConnectionStateEnum } from './util/WsStore.types'; +} from './util/websocket-util.js'; +import WsStore from './util/WsStore.js'; +import { WsConnectionStateEnum } from './util/WsStore.types.js'; const LOGGER_CATEGORY = { category: 'bitget-ws' }; @@ -111,7 +111,7 @@ export class WebsocketClientLegacyV1 extends EventEmitter { const topics = Array.isArray(wsTopics) ? wsTopics : [wsTopics]; topics.forEach((topic) => { - const wsKey = getWsKeyForTopic(topic, isPrivateTopic); + const wsKey = getWsKeyForTopicV1(topic, isPrivateTopic); // Persist this topic to the expected topics list this.wsStore.addTopic(wsKey, topic); @@ -159,7 +159,10 @@ export class WebsocketClientLegacyV1 extends EventEmitter { ) { const topics = Array.isArray(wsTopics) ? wsTopics : [wsTopics]; topics.forEach((topic) => - this.wsStore.deleteTopic(getWsKeyForTopic(topic, isPrivateTopic), topic), + this.wsStore.deleteTopic( + getWsKeyForTopicV1(topic, isPrivateTopic), + topic, + ), ); this.wsStore.getKeys().forEach((wsKey: WsKey) => { @@ -518,7 +521,7 @@ export class WebsocketClientLegacyV1 extends EventEmitter { return ws; } - private async onWsOpen(event, wsKey: WsKey) { + private async onWsOpen(event: WebSocket.Event, wsKey: WsKey) { if ( this.wsStore.isConnectionState(wsKey, WsConnectionStateEnum.CONNECTING) ) { @@ -580,7 +583,7 @@ export class WebsocketClientLegacyV1 extends EventEmitter { return; } - const msg = JSON.parse((event && event['data']) || event); + const msg = JSON.parse((event && (event as any)['data']) || event); const emittableEvent = { ...msg, wsKey }; if (typeof msg === 'object') { diff --git a/src/websocket-client-v2.ts b/src/websocket-client-v2.ts index 274497b..66220ff 100644 --- a/src/websocket-client-v2.ts +++ b/src/websocket-client-v2.ts @@ -1,32 +1,35 @@ -import WebSocket from 'isomorphic-ws'; - import { - BitgetInstTypeV2, - MessageEventLike, - WsKey, WSOperation, WSOperationLoginParams, WsRequestOperationBitget, +} from './types/websockets/ws-api.js'; +import { MessageEventLike } from './types/websockets/ws-events.js'; +import { + BitgetInstTypeV2, + WsKey, WsTopicV2, -} from './types'; +} from './types/websockets/ws-general.js'; import { BaseWebsocketClient, EmittableEvent, + MidflightWsRequestEvent, +} from './util/BaseWSClient.js'; +import { isWsPong } from './util/requestUtils.js'; +import { + SignAlgorithm, + SignEncodeMethod, + signMessage, +} from './util/webCryptoAPI.js'; +import { getMaxTopicsPerSubscribeEvent, getNormalisedTopicRequests, getWsUrl, isPrivateChannel, - isWsPong, - MidflightWsRequestEvent, WS_AUTH_ON_CONNECT_KEYS, WS_KEY_MAP, WsTopicRequest, -} from './util'; -import { - SignAlgorithm, - SignEncodeMethod, - signMessage, -} from './util/webCryptoAPI'; +} from './util/websocket-util.js'; +import { WSConnectedResult } from './util/WsStore.types.js'; const WS_LOGGER_CATEGORY = { category: 'bitget-ws' }; @@ -43,7 +46,7 @@ export class WebsocketClientV2 extends BaseWebsocketClient< /** * Request connection of all dependent (public & private) websockets, instead of waiting for automatic connection by library */ - public connectAll(): Promise[] { + public connectAll(): Promise[] { return [ this.connect(WS_KEY_MAP.v2Private), this.connect(WS_KEY_MAP.v2Public), @@ -195,7 +198,7 @@ export class WebsocketClientV2 extends BaseWebsocketClient< } protected isPrivateTopicRequest( - request: WsTopicRequest, + _request: WsTopicRequest, wsKey: WsKey, ): boolean { return WS_AUTH_ON_CONNECT_KEYS.includes(wsKey); @@ -395,7 +398,6 @@ export class WebsocketClientV2 extends BaseWebsocketClient< const msg = JSON.parse(event.data); const emittableEvent = { ...msg, wsKey }; - // TODO: are v3 events different from V2? if yes? migrate to resolveEmittableEvents // v2 event processing if (typeof msg === 'object') { if (typeof msg['code'] === 'number') { diff --git a/src/websocket-client-v3.ts b/src/websocket-client-v3.ts index c6e1c1a..52620f0 100644 --- a/src/websocket-client-v3.ts +++ b/src/websocket-client-v3.ts @@ -1,37 +1,38 @@ -import WebSocket from 'isomorphic-ws'; - import { - BitgetInstTypeV3, - MessageEventLike, WsAPIOperationResponseMap, WSAPIRequestBitgetV3, WSAPIRequestFlags, WsAPITopicRequestParamMap, WsAPIWsKeyTopicMap, - WsKey, WSOperation, WSOperationLoginParams, WsRequestOperationBitget, +} from './types/websockets/ws-api.js'; +import { MessageEventLike } from './types/websockets/ws-events.js'; +import { + BitgetInstTypeV3, + WsKey, WsTopicV3, -} from './types'; +} from './types/websockets/ws-general.js'; +import { + BaseWebsocketClient, + EmittableEvent, + MidflightWsRequestEvent, +} from './util/BaseWSClient.js'; +import { isWsPong } from './util/requestUtils.js'; +import { isWSAPIResponse } from './util/type-guards.js'; +import { SignAlgorithm, signMessage } from './util/webCryptoAPI.js'; import { getMaxTopicsPerSubscribeEvent, getNormalisedTopicRequests, getPromiseRefForWSAPIRequest, getWsUrl, - isWSAPIResponse, - isWsPong, WS_AUTH_ON_CONNECT_KEYS, WS_KEY_MAP, WS_LOGGER_CATEGORY, WsTopicRequest, -} from './util'; -import { - BaseWebsocketClient, - EmittableEvent, - MidflightWsRequestEvent, -} from './util/BaseWSClient'; -import { SignAlgorithm, signMessage } from './util/webCryptoAPI'; +} from './util/websocket-util.js'; +import { WSConnectedResult } from './util/WsStore.types.js'; /** * WebSocket client dedicated to the unified account (V3) WebSockets. @@ -45,7 +46,7 @@ export class WebsocketClientV3 extends BaseWebsocketClient< /** * Request connection of all dependent (public & private) websockets, instead of waiting for automatic connection by library */ - public connectAll(): Promise[] { + public connectAll(): Promise[] { return [ this.connect(WS_KEY_MAP.v3Private), this.connect(WS_KEY_MAP.v3Public), @@ -132,7 +133,7 @@ export class WebsocketClientV3 extends BaseWebsocketClient< } protected isPrivateTopicRequest( - request: WsTopicRequest, + _request: WsTopicRequest, wsKey: WsKey, ): boolean { return WS_AUTH_ON_CONNECT_KEYS.includes(wsKey); diff --git a/test/v1/broker/private.read.test.ts b/test/v1/broker/private.read.test.ts index 6a42368..824eafb 100644 --- a/test/v1/broker/private.read.test.ts +++ b/test/v1/broker/private.read.test.ts @@ -1,5 +1,5 @@ -import { API_ERROR_CODE, BrokerClient } from '../../../src'; -import { sucessEmptyResponseObject } from '../../response.util'; +import { API_ERROR_CODE, BrokerClient } from '../../../src/index.js'; +import { sucessEmptyResponseObject } from '../../response.util.js'; describe('Private Broker REST API GET Endpoints', () => { const API_KEY = process.env.API_KEY_COM; @@ -29,7 +29,7 @@ describe('Private Broker REST API GET Endpoints', () => { expect(await api.getBrokerInfo()).toMatchObject( sucessEmptyResponseObject(), ); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_BROKER, }); @@ -41,7 +41,7 @@ describe('Private Broker REST API GET Endpoints', () => { expect(await api.getSubAccounts()).toMatchObject( sucessEmptyResponseObject(), ); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_BROKER, }); @@ -53,7 +53,7 @@ describe('Private Broker REST API GET Endpoints', () => { expect(await api.getSubEmail(subUid)).toMatchObject( sucessEmptyResponseObject(), ); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_BROKER, }); @@ -65,7 +65,7 @@ describe('Private Broker REST API GET Endpoints', () => { expect(await api.getSubSpotAssets(subUid)).toMatchObject( sucessEmptyResponseObject(), ); - } catch (e) { + } catch (e: any) { // expect(e.body).toBeNull(); expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_BROKER, @@ -78,7 +78,7 @@ describe('Private Broker REST API GET Endpoints', () => { expect(await api.getSubFutureAssets(subUid, 'usdt')).toMatchObject( sucessEmptyResponseObject(), ); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_BROKER, }); @@ -90,7 +90,7 @@ describe('Private Broker REST API GET Endpoints', () => { expect(await api.getSubDepositAddress(subUid, coin)).toMatchObject( sucessEmptyResponseObject(), ); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_BROKER, }); @@ -102,7 +102,7 @@ describe('Private Broker REST API GET Endpoints', () => { expect(await api.getSubAPIKeys(subUid)).toMatchObject( sucessEmptyResponseObject(), ); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_BROKER, }); diff --git a/test/v1/broker/private.write.test.ts b/test/v1/broker/private.write.test.ts index d3ae0eb..4466e27 100644 --- a/test/v1/broker/private.write.test.ts +++ b/test/v1/broker/private.write.test.ts @@ -1,5 +1,5 @@ -import { API_ERROR_CODE, BrokerClient } from '../../../src'; -import { sucessEmptyResponseObject } from '../../response.util'; +import { API_ERROR_CODE, BrokerClient } from '../../../src/index.js'; +import { sucessEmptyResponseObject } from '../../response.util.js'; describe('Private Broker REST API POST Endpoints', () => { const API_KEY = process.env.API_KEY_COM; @@ -29,7 +29,7 @@ describe('Private Broker REST API POST Endpoints', () => { expect(await api.createSubAccount('test1')).toMatchObject( sucessEmptyResponseObject(), ); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_BROKER, }); @@ -41,7 +41,7 @@ describe('Private Broker REST API POST Endpoints', () => { expect( await api.modifySubAccount('test1', 'spot_trade,transfer', 'normal'), ).toMatchObject(sucessEmptyResponseObject()); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_BROKER, }); @@ -53,7 +53,7 @@ describe('Private Broker REST API POST Endpoints', () => { expect( await api.modifySubEmail('test1', 'ASDFASDF@LKMASDF.COM'), ).toMatchObject(sucessEmptyResponseObject()); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_BROKER, }); @@ -71,7 +71,7 @@ describe('Private Broker REST API POST Endpoints', () => { subUid, }), ).toMatchObject(sucessEmptyResponseObject()); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_BROKER, }); @@ -83,7 +83,7 @@ describe('Private Broker REST API POST Endpoints', () => { expect( await api.setSubDepositAutoTransfer(subUid, 'USDT', 'spot'), ).toMatchObject(sucessEmptyResponseObject()); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_BROKER, }); @@ -100,7 +100,7 @@ describe('Private Broker REST API POST Endpoints', () => { '10.0.0.1', ), ).toMatchObject(sucessEmptyResponseObject()); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_BROKER, }); @@ -116,7 +116,7 @@ describe('Private Broker REST API POST Endpoints', () => { remark: 'test', }), ).toMatchObject(sucessEmptyResponseObject()); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.PASSPHRASE_CANNOT_BE_EMPTY, }); diff --git a/test/v1/futures/private.read.test.ts b/test/v1/futures/private.read.test.ts index 57941cc..efc4bba 100644 --- a/test/v1/futures/private.read.test.ts +++ b/test/v1/futures/private.read.test.ts @@ -1,5 +1,5 @@ -import { API_ERROR_CODE, FuturesClient } from '../../../src'; -import { sucessEmptyResponseObject } from '../../response.util'; +import { API_ERROR_CODE, FuturesClient } from '../../../src/index.js'; +import { sucessEmptyResponseObject } from '../../response.util.js'; describe('Private Futures REST API GET Endpoints', () => { const API_KEY = process.env.API_KEY_COM; diff --git a/tsconfig.cjs.json b/tsconfig.cjs.json new file mode 100644 index 0000000..680201a --- /dev/null +++ b/tsconfig.cjs.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "commonjs", + "outDir": "dist/cjs", + "target": "esnext" + }, + "include": ["src/**/*.*"] +} diff --git a/tsconfig.esm.json b/tsconfig.esm.json new file mode 100644 index 0000000..4faa4f0 --- /dev/null +++ b/tsconfig.esm.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "esnext", + "outDir": "dist/mjs", + "target": "esnext" + }, + "include": ["src/**/*.*"] +} diff --git a/tsconfig.json b/tsconfig.json index 7ac09ca..7d2ba18 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,21 +1,32 @@ { - "compileOnSave": true, "compilerOptions": { - "allowJs": true, - "target": "es6", - "module": "commonjs", - "moduleResolution": "node", + "allowSyntheticDefaultImports": true, + "baseUrl": "src", + "noEmitOnError": true, "declaration": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": false, + "inlineSourceMap": false, + "lib": ["esnext", "DOM"], + "listEmittedFiles": false, + "listFiles": false, + "moduleResolution": "node", + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noUnusedParameters": true, + "pretty": true, "removeComments": false, - "noEmitOnError": true, - "noImplicitAny": false, - "strictNullChecks": true, - "skipLibCheck": true, + "resolveJsonModule": true, + "skipLibCheck": false, "sourceMap": true, - "esModuleInterop": true, - "lib": ["es2017", "dom"], - "outDir": "lib" + "strict": true, + "strictNullChecks": true, + "types": ["node", "jest"], + "module": "commonjs", + "outDir": "dist/cjs", + "target": "esnext" }, - "include": ["src/**/*"], - "exclude": ["node_modules", "**/node_modules/*", "coverage", "doc"] + "compileOnSave": true, + "exclude": ["node_modules", "dist"], + "include": ["src/**/*.*", "test/**/*.*", ".eslintrc.cjs"] } From 4e10320fae9d9a0a68506f1110e58be8e20f03ac Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Thu, 24 Jul 2025 11:48:33 +0100 Subject: [PATCH 47/57] chore(): fix linter complaints, update exports, bump audit dependency --- package-lock.json | 16 ++++----- src/index.ts | 4 +++ src/util/logger.ts | 2 +- test/v1/futures/private.read.test.ts | 50 +++++++++++++-------------- test/v1/futures/private.write.test.ts | 40 ++++++++++----------- test/v1/spot/private.read.test.ts | 30 ++++++++-------- test/v1/spot/private.write.test.ts | 32 ++++++++--------- test/websockets/wsStore.test.ts | 2 +- test/ws.util.ts | 8 ++--- 9 files changed, 94 insertions(+), 90 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0109cb5..aa086bd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1890,13 +1890,13 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/axios": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.10.0.tgz", - "integrity": "sha512-/1xYAC4MP/HEG+3duIhFr4ZQXR4sQXOIe+o6sdqzeykGLx6Upp/1p8MHqhINOvGeP7xyNHe7tsiJByc4SSVUxw==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.11.0.tgz", + "integrity": "sha512-1Lx3WLFQWm3ooKDYZD1eXmoGO9fxYQjrycfHFC8P0sCfQVXyROp0p9PFWBehewBOdCwHc+f/b8I0fMto5eSfwA==", "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", - "form-data": "^4.0.0", + "form-data": "^4.0.4", "proxy-from-env": "^1.1.0" } }, @@ -7267,12 +7267,12 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "axios": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.10.0.tgz", - "integrity": "sha512-/1xYAC4MP/HEG+3duIhFr4ZQXR4sQXOIe+o6sdqzeykGLx6Upp/1p8MHqhINOvGeP7xyNHe7tsiJByc4SSVUxw==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.11.0.tgz", + "integrity": "sha512-1Lx3WLFQWm3ooKDYZD1eXmoGO9fxYQjrycfHFC8P0sCfQVXyROp0p9PFWBehewBOdCwHc+f/b8I0fMto5eSfwA==", "requires": { "follow-redirects": "^1.15.6", - "form-data": "^4.0.0", + "form-data": "^4.0.4", "proxy-from-env": "^1.1.0" } }, diff --git a/src/index.ts b/src/index.ts index 1a59060..5750cb7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -41,6 +41,10 @@ export * from './types/websockets/ws-api-response.js'; export * from './types/websockets/ws-events.js'; export * from './types/websockets/ws-general.js'; export * from './util/logger.js'; +export * from './util/requestUtils.js'; +export * from './util/type-guards.js'; +export * from './util/websocket-util.js'; +export * from './websocket-api-client.js'; export * from './websocket-client-legacy-v1.js'; export * from './websocket-client-v2.js'; export * from './websocket-client-v3.js'; diff --git a/src/util/logger.ts b/src/util/logger.ts index 0f5f6bd..7187173 100644 --- a/src/util/logger.ts +++ b/src/util/logger.ts @@ -5,7 +5,7 @@ export type DefaultLogger = typeof DefaultLogger; export const DefaultLogger = { /** Ping/pong events and other raw messages that might be noisy. Enable this while troubleshooting. */ // eslint-disable-next-line @typescript-eslint/no-unused-vars - trace: (...params: LogParams): void => { + trace: (..._params: LogParams): void => { // console.log(params); }, info: (...params: LogParams): void => { diff --git a/test/v1/futures/private.read.test.ts b/test/v1/futures/private.read.test.ts index efc4bba..2e1c496 100644 --- a/test/v1/futures/private.read.test.ts +++ b/test/v1/futures/private.read.test.ts @@ -36,7 +36,7 @@ describe('Private Futures REST API GET Endpoints', () => { marginMode: expect.any(String), }, }); - } catch (e) { + } catch (e: any) { console.error('getAccount: ', e); expect(e).toBeNull(); } @@ -48,7 +48,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.error('getAccounts: ', e); expect(e).toBeNull(); } @@ -64,7 +64,7 @@ describe('Private Futures REST API GET Endpoints', () => { openCount: expect.any(Number), }, }); - } catch (e) { + } catch (e: any) { console.error('getOpenCount: ', e); expect(e).toBeNull(); } @@ -76,7 +76,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.error('getPosition: ', e); expect(e).toBeNull(); } @@ -88,7 +88,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.error('getPosition: ', e); expect(e).toBeNull(); } @@ -112,7 +112,7 @@ describe('Private Futures REST API GET Endpoints', () => { result: expect.any(Array), }, }); - } catch (e) { + } catch (e: any) { console.error('getAccountBill: ', e); expect(e).toBeNull(); } @@ -135,7 +135,7 @@ describe('Private Futures REST API GET Endpoints', () => { result: expect.any(Array), }, }); - } catch (e) { + } catch (e: any) { console.error('getBusinessBill: ', e); expect(e).toBeNull(); } @@ -147,7 +147,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.error('getOpenSymbolOrders: ', e); expect(e).toBeNull(); } @@ -159,7 +159,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.error('getOpenOrders: ', e); expect(e).toBeNull(); } @@ -171,7 +171,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Object), }); - } catch (e) { + } catch (e: any) { console.error('getOrderHistory: ', e); expect(e).toBeNull(); } @@ -185,7 +185,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Object), }); - } catch (e) { + } catch (e: any) { console.error('getProductTypeOrderHistory: ', e); expect(e).toBeNull(); } @@ -197,7 +197,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Object), }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.FUTURES_ORDER_GET_NOT_FOUND, }); @@ -210,7 +210,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Object), }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.FUTURES_ORDER_GET_NOT_FOUND, }); @@ -228,7 +228,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Object), }); - } catch (e) { + } catch (e: any) { console.error('getProductTypeOrderFills: ', e); expect(e).toBeNull(); } @@ -240,7 +240,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Object), }); - } catch (e) { + } catch (e: any) { console.error('getPlanOrderTPSLs: ', e); expect(e).toBeNull(); } @@ -258,7 +258,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Object), }); - } catch (e) { + } catch (e: any) { console.error('getHistoricPlanOrdersTPSL: ', e); expect(e).toBeNull(); } @@ -272,7 +272,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Object), }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_COPY_TRADER, }); @@ -287,7 +287,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Object), }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_COPY_TRADER, }); @@ -302,7 +302,7 @@ describe('Private Futures REST API GET Endpoints', () => { data: expect.any(Object), }, ); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_COPY_TRADER, }); @@ -315,7 +315,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Object), }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_COPY_TRADER, }); @@ -328,7 +328,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Object), }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_COPY_TRADER, }); @@ -348,7 +348,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Object), }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_COPY_TRADER, }); @@ -363,7 +363,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Object), }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_COPY_TRADER, }); @@ -376,7 +376,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Object), }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_COPY_TRADER, }); @@ -389,7 +389,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Object), }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_COPY_TRADER, }); diff --git a/test/v1/futures/private.write.test.ts b/test/v1/futures/private.write.test.ts index fd65312..ffcdd88 100644 --- a/test/v1/futures/private.write.test.ts +++ b/test/v1/futures/private.write.test.ts @@ -1,5 +1,5 @@ -import { API_ERROR_CODE, FuturesClient } from '../../../src'; -import { sucessEmptyResponseObject } from '../../response.util'; +import { API_ERROR_CODE, FuturesClient } from '../../../src/index.js'; +import { sucessEmptyResponseObject } from '../../response.util.js'; jest.setTimeout(10000); @@ -32,7 +32,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { console.error('setLeverage: ', e); expect(e).toBeNull(); } @@ -44,7 +44,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { // expect(e).toBeNull(); expect(e.body).toMatchObject({ code: API_ERROR_CODE.PARAMETER_EXCEPTION, @@ -60,7 +60,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { console.error('setMarginMode: ', e); expect(e).toBeNull(); } @@ -84,7 +84,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { console.log(e.body); expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_KYC_REQUIRED, @@ -106,7 +106,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_KYC_REQUIRED, }); @@ -121,7 +121,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.FUTURES_ORDER_CANCEL_NOT_FOUND, }); @@ -136,7 +136,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { console.error('batchCancelOrder: ', e); expect(e).toBeNull(); } @@ -148,7 +148,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.NO_ORDER_TO_CANCEL, }); @@ -171,7 +171,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { // {"code": "40889", "data": null, "msg": "The plan order of this contract has reached the upper limit" // if the above error is seen, you need to cancel trigger orders on the test account (in futures) console.error('submitPlanOrder: ', e); @@ -194,7 +194,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.PLAN_ORDER_NOT_FOUND, }); @@ -214,7 +214,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { // expect(e).toBeNull(); expect(e.body).toMatchObject({ code: API_ERROR_CODE.PLAN_ORDER_NOT_FOUND, @@ -236,7 +236,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { // console.log(e.body); expect(e.body).toMatchObject({ code: API_ERROR_CODE.FUTURES_INSUFFICIENT_POSITION_NO_TPSL, @@ -259,7 +259,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.FUTURES_INSUFFICIENT_POSITION_NO_TPSL, }); @@ -279,7 +279,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { // expect(e).toBeNull(); expect(e.body).toMatchObject({ code: API_ERROR_CODE.FUTURES_ORDER_TPSL_NOT_FOUND, @@ -300,7 +300,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.FUTURES_ORDER_TPSL_NOT_FOUND, }); @@ -315,7 +315,7 @@ describe('Private Futures REST API POST Endpoints', () => { data: {}, }, ); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_COPY_TRADER, }); @@ -332,7 +332,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_COPY_TRADER, }); @@ -345,7 +345,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_COPY_TRADER, }); diff --git a/test/v1/spot/private.read.test.ts b/test/v1/spot/private.read.test.ts index 0382abc..e690c95 100644 --- a/test/v1/spot/private.read.test.ts +++ b/test/v1/spot/private.read.test.ts @@ -1,5 +1,5 @@ -import { SpotClient } from '../../../src'; -import { sucessEmptyResponseObject } from '../../response.util'; +import { SpotClient } from '../../../src/index.js'; +import { sucessEmptyResponseObject } from '../../response.util.js'; describe('Private Spot REST API GET Endpoints', () => { const API_KEY = process.env.API_KEY_COM; @@ -28,7 +28,7 @@ describe('Private Spot REST API GET Endpoints', () => { it.skip('getDepositAddress()', async () => { try { expect(await api.getDepositAddress(coin)).toStrictEqual(''); - } catch (e) { + } catch (e: any) { console.error('exception: ', e); expect(e).toBeNull(); } @@ -40,7 +40,7 @@ describe('Private Spot REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.error('getWithdrawals: ', e); expect(e).toBeNull(); } @@ -52,7 +52,7 @@ describe('Private Spot REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.error('getDeposits: ', e); expect(e).toBeNull(); } @@ -68,7 +68,7 @@ describe('Private Spot REST API GET Endpoints', () => { authorities: expect.any(Array), }, }); - } catch (e) { + } catch (e: any) { console.error('getApiKeyInfo: ', e); expect(e).toBeNull(); } @@ -81,7 +81,7 @@ describe('Private Spot REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.error('getBalance: ', e); expect(e).toBeNull(); } @@ -93,7 +93,7 @@ describe('Private Spot REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.error('getTransactionHistory: ', e); expect(e).toBeNull(); } @@ -106,7 +106,7 @@ describe('Private Spot REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.error('getTransferHistory: ', e); expect(e).toBeNull(); } @@ -118,7 +118,7 @@ describe('Private Spot REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.error('getOrder: ', e); expect(e).toBeNull(); } @@ -130,7 +130,7 @@ describe('Private Spot REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.error('getOpenOrders: ', e); expect(e).toBeNull(); } @@ -142,7 +142,7 @@ describe('Private Spot REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.error('getOrderHistory: ', e); expect(e).toBeNull(); } @@ -154,7 +154,7 @@ describe('Private Spot REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.error('getOrderFills: ', e); expect(e).toBeNull(); } @@ -171,7 +171,7 @@ describe('Private Spot REST API GET Endpoints', () => { orderList: expect.any(Array), }, }); - } catch (e) { + } catch (e: any) { console.error('getCurrentPlanOrders: ', e); expect(e).toBeNull(); } @@ -194,7 +194,7 @@ describe('Private Spot REST API GET Endpoints', () => { orderList: expect.any(Array), }, }); - } catch (e) { + } catch (e: any) { console.error('getHistoricPlanOrders: ', e); expect(e).toBeNull(); } diff --git a/test/v1/spot/private.write.test.ts b/test/v1/spot/private.write.test.ts index 7e6993b..7d1f7a0 100644 --- a/test/v1/spot/private.write.test.ts +++ b/test/v1/spot/private.write.test.ts @@ -1,5 +1,5 @@ -import { API_ERROR_CODE, SpotClient } from '../../../src'; -import { sucessEmptyResponseObject } from '../../response.util'; +import { API_ERROR_CODE, SpotClient } from '../../../src/index.js'; +import { sucessEmptyResponseObject } from '../../response.util.js'; describe('Private Spot REST API POST Endpoints', () => { const API_KEY = process.env.API_KEY_COM; @@ -32,7 +32,7 @@ describe('Private Spot REST API POST Endpoints', () => { toType: 'mix_usdt', }), ).toStrictEqual(''); - } catch (e) { + } catch (e: any) { // console.error('transfer: ', e); expect(e.body).toMatchObject({ // not sure what this error means, probably no kyc. Seems to change? @@ -51,7 +51,7 @@ describe('Private Spot REST API POST Endpoints', () => { toType: 'mix_usdt', }), ).toStrictEqual(''); - } catch (e) { + } catch (e: any) { // console.error('transferV2: ', e); expect(e.body).toMatchObject({ // not sure what this error means, probably no kyc. Seems to change? @@ -73,7 +73,7 @@ describe('Private Spot REST API POST Endpoints', () => { toType: 'mix_usdt', }), ).toStrictEqual(''); - } catch (e) { + } catch (e: any) { // console.error('transferV2: ', e); expect(e.body).toMatchObject({ // not sure what this error means, probably no balance. Seems to change? @@ -95,7 +95,7 @@ describe('Private Spot REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.INCORRECT_PERMISSIONS, }); @@ -115,7 +115,7 @@ describe('Private Spot REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.log( `"${expect.getState().currentTestName}"`, JSON.stringify(e.body), @@ -133,7 +133,7 @@ describe('Private Spot REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.INCORRECT_PERMISSIONS, }); @@ -146,7 +146,7 @@ describe('Private Spot REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.log( `"${expect.getState().currentTestName}"`, JSON.stringify(e.body), @@ -173,7 +173,7 @@ describe('Private Spot REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.error(e.body); expect(e.body).toMatchObject({ code: API_ERROR_CODE.INSUFFICIENT_BALANCE, @@ -199,7 +199,7 @@ describe('Private Spot REST API POST Endpoints', () => { failure: [{ errorCode: API_ERROR_CODE }], }, }); - } catch (e) { + } catch (e: any) { // console.log(`fn() exception: `, e.body); expect(e?.body).toMatchObject({ @@ -214,7 +214,7 @@ describe('Private Spot REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: '123456', //expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.log('cancelorder err', e); expect(e.body).toMatchObject({ code: API_ERROR_CODE.ORDER_NOT_FOUND, @@ -228,7 +228,7 @@ describe('Private Spot REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ORDER_NOT_FOUND, }); @@ -254,7 +254,7 @@ describe('Private Spot REST API POST Endpoints', () => { expect(result).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_KYC_REQUIRED, }); - } catch (e) { + } catch (e: any) { // console.error('submitPlanOrder(): ', e); expect(e?.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_KYC_REQUIRED, @@ -274,7 +274,7 @@ describe('Private Spot REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.PLAN_ORDER_NOT_FOUND, }); @@ -291,7 +291,7 @@ describe('Private Spot REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(String), }); - } catch (e) { + } catch (e: any) { // console.error('cancelPlanOrder(): ', e); // expect(e).toBeNull(); expect(e.body).toMatchObject({ diff --git a/test/websockets/wsStore.test.ts b/test/websockets/wsStore.test.ts index 26c70f8..263ecaf 100644 --- a/test/websockets/wsStore.test.ts +++ b/test/websockets/wsStore.test.ts @@ -1,4 +1,4 @@ -import { isDeepObjectMatch } from '../../src'; +import { isDeepObjectMatch } from '../../src/util/WsStore.js'; describe('WsStore', () => { describe('isDeepObjectMatch()', () => { diff --git a/test/ws.util.ts b/test/ws.util.ts index e038d89..985b141 100644 --- a/test/ws.util.ts +++ b/test/ws.util.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { DefaultLogger, WebsocketClientLegacyV1 } from '../src'; +import { DefaultLogger, WebsocketClientLegacyV1 } from '../src/index.js'; // eslint-disable-next-line @typescript-eslint/no-unused-vars export function getSilentLogger(logHint?: string): DefaultLogger { @@ -47,19 +47,19 @@ export function waitForSocketEvent( wsClient.removeListener('error', (e) => rejector(e)); } - function resolver(event) { + function resolver(event: unknown) { resolve(event); cleanup(); } - function rejector(event) { + function rejector(event: any) { if (!resolvedOnce) { reject(event); } cleanup(); } - wsClient.on(event, (e) => resolver(e)); + wsClient.on(event, (e: any) => resolver(e)); wsClient.on('exception', (e) => rejector(e)); // if (event !== 'close') { From 3cf28354ff0746909a59e58f3211155febfb6200 Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Thu, 24 Jul 2025 11:51:57 +0100 Subject: [PATCH 48/57] chore(): fix imports --- src/types/request/v1/futuresV1.ts | 2 +- src/types/request/v1/spotV1.ts | 2 +- src/types/request/v2/common.ts | 2 +- src/types/request/v2/futures.ts | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/types/request/v1/futuresV1.ts b/src/types/request/v1/futuresV1.ts index 77e3f9b..0551d70 100644 --- a/src/types/request/v1/futuresV1.ts +++ b/src/types/request/v1/futuresV1.ts @@ -1,4 +1,4 @@ -import { OrderTimeInForce } from '../shared'; +import { OrderTimeInForce } from '../shared.js'; export type FuturesProductType = | 'umcbl' diff --git a/src/types/request/v1/spotV1.ts b/src/types/request/v1/spotV1.ts index 550f0fd..f361521 100644 --- a/src/types/request/v1/spotV1.ts +++ b/src/types/request/v1/spotV1.ts @@ -1,4 +1,4 @@ -import { OrderTimeInForce } from '../shared'; +import { OrderTimeInForce } from '../shared.js'; export type WalletType = 'spot' | 'mix_usdt' | 'mix_usd'; diff --git a/src/types/request/v2/common.ts b/src/types/request/v2/common.ts index a8f60ec..e0b8746 100644 --- a/src/types/request/v2/common.ts +++ b/src/types/request/v2/common.ts @@ -1,4 +1,4 @@ -import { FuturesProductTypeV2, MarginType } from '../shared'; +import { FuturesProductTypeV2, MarginType } from '../shared.js'; /** * diff --git a/src/types/request/v2/futures.ts b/src/types/request/v2/futures.ts index 695ecdb..52c6d60 100644 --- a/src/types/request/v2/futures.ts +++ b/src/types/request/v2/futures.ts @@ -1,5 +1,5 @@ -import { FuturesPlanTypeV2, FuturesProductTypeV2 } from '../shared'; -import { FuturesKlineInterval } from '../v1/futuresV1'; +import { FuturesPlanTypeV2, FuturesProductTypeV2 } from '../shared.js'; +import { FuturesKlineInterval } from '../v1/futuresV1.js'; export type FuturesKlineTypeV2 = 'MARKET' | 'MARK' | 'INDEX'; From 1a82a9a4542a404ca33ef6465b802b564b0fd565 Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Thu, 24 Jul 2025 11:53:39 +0100 Subject: [PATCH 49/57] chore(): rm global index --- index.js | 1 - 1 file changed, 1 deletion(-) delete mode 100644 index.js diff --git a/index.js b/index.js deleted file mode 100644 index ce417b3..0000000 --- a/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('lib/index'); \ No newline at end of file From 062eaaef179f7f1ba92eb59e12f59100b53f7649 Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Thu, 24 Jul 2025 11:55:20 +0100 Subject: [PATCH 50/57] chore(): upgrade jest for esm --- jest.config.js | 29 ------ jest.config.ts | 224 ++++++++++++++++++++++++++++++++++++++++ test/tsconfig.test.json | 11 ++ 3 files changed, 235 insertions(+), 29 deletions(-) delete mode 100644 jest.config.js create mode 100644 jest.config.ts create mode 100644 test/tsconfig.test.json diff --git a/jest.config.js b/jest.config.js deleted file mode 100644 index 95f997f..0000000 --- a/jest.config.js +++ /dev/null @@ -1,29 +0,0 @@ -// jest.config.js -module.exports = { - rootDir: './', - globals: { - __DEV__: true, - __PROD__: false - }, - testEnvironment: 'node', - preset: 'ts-jest', - verbose: true, // report individual test - bail: false, // enable to stop test when an error occur, - detectOpenHandles: false, - moduleDirectories: ['node_modules', 'src', 'test'], - testMatch: ['**/test/**/*.test.ts?(x)'], - testPathIgnorePatterns: ['node_modules/', 'dist/', '.json'], - collectCoverageFrom: [ - 'src/**/*.ts' - ], - testTimeout: 10000, - coverageThreshold: { - // coverage strategy - global: { - branches: 80, - functions: 80, - lines: 50, - statements: -10 - } - } -}; diff --git a/jest.config.ts b/jest.config.ts new file mode 100644 index 0000000..eb2e820 --- /dev/null +++ b/jest.config.ts @@ -0,0 +1,224 @@ +/** + * For a detailed explanation regarding each configuration property, visit: + * https://jestjs.io/docs/configuration + */ + +import type { Config } from 'jest'; + +const config: Config = { + // All imported modules in your tests should be mocked automatically + // automock: false, + + // Stop running tests after `n` failures + // bail: 0, + bail: false, // enable to stop test when an error occur, + + // The directory where Jest should store its cached dependency information + // cacheDirectory: "/private/var/folders/kf/2k3sz4px6c9cbyzj1h_b192h0000gn/T/jest_dx", + + // Automatically clear mock calls, instances, contexts and results before every test + clearMocks: true, + + // Indicates whether the coverage information should be collected while executing the test + collectCoverage: true, + + // An array of glob patterns indicating a set of files for which coverage information should be collected + collectCoverageFrom: ['src/**/*.ts'], + + // The directory where Jest should output its coverage files + coverageDirectory: 'coverage', + + // An array of regexp pattern strings used to skip coverage collection + // coveragePathIgnorePatterns: [ + // "/node_modules/" + // ], + + // Indicates which provider should be used to instrument code for coverage + coverageProvider: 'v8', + + // A list of reporter names that Jest uses when writing coverage reports + // coverageReporters: [ + // "json", + // "text", + // "lcov", + // "clover" + // ], + + // An object that configures minimum threshold enforcement for coverage results + // coverageThreshold: undefined, + + // A path to a custom dependency extractor + // dependencyExtractor: undefined, + + // Make calling deprecated APIs throw helpful error messages + // errorOnDeprecated: false, + + extensionsToTreatAsEsm: ['.ts'], + + // The default configuration for fake timers + // fakeTimers: { + // "enableGlobally": false + // }, + + // Force coverage collection from ignored files using an array of glob patterns + // forceCoverageMatch: [], + + // A path to a module which exports an async function that is triggered once before all test suites + // globalSetup: undefined, + + // A path to a module which exports an async function that is triggered once after all test suites + // globalTeardown: undefined, + + // A set of global variables that need to be available in all test environments + // globals: {}, + + // The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers. + // maxWorkers: "50%", + + // An array of directory names to be searched recursively up from the requiring module's location + // moduleDirectories: [ + // "node_modules" + // ], + moduleDirectories: ['node_modules', 'src', 'test'], + + // An array of file extensions your modules use + moduleFileExtensions: [ + 'js', + 'mjs', + 'cjs', + 'jsx', + 'ts', + 'tsx', + 'json', + 'node', + ], + + // modulePaths: ['src'], + + // A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module + // moduleNameMapper: {}, + moduleNameMapper: { + '^(\\.{1,2}/.*)\\.js$': '$1', + }, + + // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader + // modulePathIgnorePatterns: [], + + // Activates notifications for test results + // notify: false, + + // An enum that specifies notification mode. Requires { notify: true } + // notifyMode: "failure-change", + + // A preset that is used as a base for Jest's configuration + // preset: undefined, + + // Run tests from one or more projects + // projects: undefined, + + // Use this configuration option to add custom reporters to Jest + // reporters: undefined, + + // Automatically reset mock state before every test + // resetMocks: false, + + // Reset the module registry before running each individual test + // resetModules: false, + + // A path to a custom resolver + // resolver: undefined, + + // Automatically restore mock state and implementation before every test + // restoreMocks: false, + + // The root directory that Jest should scan for tests and modules within + // rootDir: undefined, + + // A list of paths to directories that Jest should use to search for files in + // roots: [ + // "" + // ], + + // Allows you to use a custom runner instead of Jest's default test runner + // runner: "jest-runner", + + // The paths to modules that run some code to configure or set up the testing environment before each test + // setupFiles: [], + + // A list of paths to modules that run some code to configure or set up the testing framework before each test + // setupFilesAfterEnv: [], + + // The number of seconds after which a test is considered as slow and reported as such in the results. + // slowTestThreshold: 5, + + // A list of paths to snapshot serializer modules Jest should use for snapshot testing + // snapshotSerializers: [], + + // The test environment that will be used for testing + // testEnvironment: "jest-environment-node", + + // Options that will be passed to the testEnvironment + // testEnvironmentOptions: {}, + + // Adds a location field to test results + // testLocationInResults: false, + + // The glob patterns Jest uses to detect test files + testMatch: [ + // "**/__tests__/**/*.[jt]s?(x)", + '**/?(*.)+(spec|test).[tj]s?(x)', + ], + + testTimeout: 15000, + + // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped + // testPathIgnorePatterns: [ + // "/node_modules/" + // ], + + // The regexp pattern or array of patterns that Jest uses to detect test files + // testRegex: [], + + // This option allows the use of a custom results processor + // testResultsProcessor: undefined, + + // This option allows use of a custom test runner + // testRunner: "jest-circus/runner", + + // A map from regular expressions to paths to transformers + // transform: undefined, + + transform: { + '^.+\\.m?[tj]sx?$': [ + 'ts-jest', + { + tsconfig: 'test/tsconfig.test.json', + useESM: true, + }, + ], + }, + + // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation + // transformIgnorePatterns: [ + // "/node_modules/", + // "\\.pnp\\.[^\\/]+$" + // ], + + // Prevents import esm module error from v1 axios release, issue #5026 + transformIgnorePatterns: ['node_modules/(?!axios)'], + + // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them + // unmockedModulePathPatterns: undefined, + + // Indicates whether each individual test should be reported during the run + // verbose: undefined, + verbose: true, // report individual test + + // An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode + // watchPathIgnorePatterns: [], + + // Whether to use watchman for file crawling + // watchman: true, +}; + +export default config; diff --git a/test/tsconfig.test.json b/test/tsconfig.test.json new file mode 100644 index 0000000..625f1d9 --- /dev/null +++ b/test/tsconfig.test.json @@ -0,0 +1,11 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "module": "CommonJS", + "baseUrl": "", + "outDir": "dist", + "target": "esnext", + "rootDir": "../" + }, + "include": ["../src/**/*.*", "../test/**/*.*"] +} From 5a40d6047db832aabd2ee5c204631a9e10fe006d Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Thu, 24 Jul 2025 11:56:01 +0100 Subject: [PATCH 51/57] chore(): remove redundant jsconfig --- jsconfig.json | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 jsconfig.json diff --git a/jsconfig.json b/jsconfig.json deleted file mode 100644 index 5816065..0000000 --- a/jsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "compilerOptions": { - "target": "ES6", - "module": "commonjs" - }, - "exclude": [ - "node_modules", - "**/node_modules/*", - "coverage", - "doc" - ] -} \ No newline at end of file From 84bb2a2571fa3a7e74b92d967562ecd1be2bdacc Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Thu, 24 Jul 2025 11:58:56 +0100 Subject: [PATCH 52/57] chore(): move webpack dependencies to optional --- package-lock.json | 3537 ++++++++++++++++++++++++++------------------- package.json | 9 +- 2 files changed, 2081 insertions(+), 1465 deletions(-) diff --git a/package-lock.json b/package-lock.json index aa086bd..e80a504 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,10 +24,9 @@ "eslint-plugin-prettier": "^5.2.1", "eslint-plugin-require-extensions": "^0.1.3", "eslint-plugin-simple-import-sort": "^12.1.1", - "jest": "^29.1.1", - "source-map-loader": "^4.0.0", - "ts-jest": "^29.0.2", - "ts-loader": "^9.4.1", + "jest": "^29.7.0", + "ts-jest": "^29.4.0", + "ts-node": "^10.9.2", "typescript": "^5.7.3" }, "funding": { @@ -35,6 +34,8 @@ "url": "https://github.com/sponsors/tiagosiebler" }, "optionalDependencies": { + "source-map-loader": "^4.0.0", + "ts-loader": "^9.4.1", "webpack": "^5.74.0", "webpack-cli": "^4.10.0" } @@ -68,35 +69,37 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.3.tgz", - "integrity": "sha512-prBHMK4JYYK+wDjJF1q99KK4JLL+egWS4nmNqdlMUgCExMZ+iZW0hGhyC3VEbsPjvaN0TBhW//VIFwBrk8sEiw==", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.0.tgz", + "integrity": "sha512-60X7qkglvrap8mn1lh2ebxXdZYtUcpd7gsmy9kLaBJ4i/WdY8PqTSdxyA8qraikqKQK5C1KRBKXqznrVapyNaw==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.3.tgz", - "integrity": "sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ==", - "dev": true, - "dependencies": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.3", - "@babel/helper-compilation-targets": "^7.19.3", - "@babel/helper-module-transforms": "^7.19.0", - "@babel/helpers": "^7.19.0", - "@babel/parser": "^7.19.3", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.3", - "@babel/types": "^7.19.3", - "convert-source-map": "^1.7.0", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.0.tgz", + "integrity": "sha512-UlLAnTPrFdNGoFtbSXwcGFQBtQZJCNjaN6hQNP3UPvuNXT1i82N26KL3dZeIpNalWywr9IuQuncaAfUaS1g6sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.0", + "@babel/helper-compilation-targets": "^7.27.2", + "@babel/helper-module-transforms": "^7.27.3", + "@babel/helpers": "^7.27.6", + "@babel/parser": "^7.28.0", + "@babel/template": "^7.27.2", + "@babel/traverse": "^7.28.0", + "@babel/types": "^7.28.0", + "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.2.1", - "semver": "^6.3.0" + "json5": "^2.2.3", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" @@ -107,146 +110,115 @@ } }, "node_modules/@babel/generator": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.3.tgz", - "integrity": "sha512-keeZWAV4LU3tW0qRi19HRpabC/ilM0HRBBzf9/k8FFiG4KVpiv0FIy4hHfLfFQZNhziCTPTmd59zoyv6DNISzg==", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.0.tgz", + "integrity": "sha512-lJjzvrbEeWrhB4P3QBsH7tey117PjLZnDbLiQEKjQ/fNJTjuq4HSqgFA+UNSwZT8D7dxxbnuSBMsa1lrWzKlQg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.23.3", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" + "@babel/parser": "^7.28.0", + "@babel/types": "^7.28.0", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "version": "0.3.12", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.12.tgz", + "integrity": "sha512-OuLGC46TjB5BbN1dH8JULVVZY4WTdkF7tV9Ys6wLL1rubZnCMstOhNHueU5bLCrnRuDhKPDM4g6sw4Bel5Gzqg==", "dev": true, + "license": "MIT", "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.3.tgz", - "integrity": "sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", + "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.19.3", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", - "semver": "^6.3.0" + "@babel/compat-data": "^7.27.2", + "@babel/helper-validator-option": "^7.27.1", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" } }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", - "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", + "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, - "engines": { - "node": ">=6.9.0" + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" } }, - "node_modules/@babel/helper-function-name": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", - "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", + "node_modules/@babel/helper-compilation-targets/node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true, - "dependencies": { - "@babel/template": "^7.22.15", - "@babel/types": "^7.23.0" - }, - "engines": { - "node": ">=6.9.0" - } + "license": "ISC" }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "node_modules/@babel/helper-globals": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", - "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", + "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.18.6" + "@babel/traverse": "^7.27.1", + "@babel/types": "^7.27.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz", - "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.27.3.tgz", + "integrity": "sha512-dSOvYwvyLsWBeIRyOeHXp5vPj5l1I011r52FM1+r1jCERv+aFXYk4whgQccYEGYxK2H3ZAIA8nuPkQ0HaUo3qg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.18.6", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.0", - "@babel/types": "^7.19.0" + "@babel/helper-module-imports": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1", + "@babel/traverse": "^7.27.3" }, "engines": { "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz", - "integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz", - "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==", - "dev": true, - "dependencies": { - "@babel/types": "^7.18.6" }, - "engines": { - "node": ">=6.9.0" + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "node_modules/@babel/helper-plugin-utils": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz", + "integrity": "sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==", "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, + "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -272,10 +244,11 @@ } }, "node_modules/@babel/helper-validator-option": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", - "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", + "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -346,6 +319,38 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.27.1.tgz", + "integrity": "sha512-oFT0FrKHgF53f4vOsZGi2Hh3I35PfSmVs4IBFLFj4dnafP+hIWDLg3VyKmUHfLoLHlyxY4C7DGtmHuJgn+IGww==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-import-meta": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", @@ -371,12 +376,13 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz", - "integrity": "sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.27.1.tgz", + "integrity": "sha512-y8YTNIeKoyhGd9O0Jiyzyyqk8gdjnumGTQPsz0xOZOQ2RmkVJeZ1vmmfIvFEKqucBG6axJGBZDE/7iI5suUI/w==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -457,6 +463,22 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-top-level-await": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", @@ -473,12 +495,13 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz", - "integrity": "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.27.1.tgz", + "integrity": "sha512-xfYCBMxveHrRMnAWl1ZlPXOZjzkN82THFvLhQhFXFt81Z5HnN+EtUkZhv/zcKpmT3fzmWZB0ywiBrbC3vogbwQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -503,35 +526,24 @@ } }, "node_modules/@babel/traverse": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.3.tgz", - "integrity": "sha512-+K0yF1/9yR0oHdE0StHuEj3uTPzwwbrLGfNOndVJVV2TqA5+j3oljJUb4nmB954FLGjNem976+B+eDuLIjesiQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.3", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.3", - "@babel/types": "^7.23.3", - "debug": "^4.1.0", - "globals": "^11.1.0" + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.0.tgz", + "integrity": "sha512-mGe7UK5wWyh0bKRfupsUchrQGqvDbZDbKJw+kcRGSmdHVYrv+ltd0pnpDTVpiTqnaBru9iEvA8pz8W46v0Amwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.0", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.28.0", + "@babel/template": "^7.27.2", + "@babel/types": "^7.28.0", + "debug": "^4.3.1" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/traverse/node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/types": { "version": "7.28.1", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.1.tgz", @@ -550,7 +562,32 @@ "version": "0.2.3", "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true + "dev": true, + "license": "MIT" + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } }, "node_modules/@discoveryjs/json-ext": { "version": "0.5.7", @@ -764,16 +801,17 @@ } }, "node_modules/@jest/console": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.1.0.tgz", - "integrity": "sha512-yNoFMuAsXTP8OyweaMaIoa6Px6rJkbbG7HtgYKGP3CY7lE7ADRA0Fn5ad9O+KefKcaf6W9rywKpCWOw21WMsAw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/types": "^29.1.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^29.1.0", - "jest-util": "^29.1.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", "slash": "^3.0.0" }, "engines": { @@ -781,37 +819,38 @@ } }, "node_modules/@jest/core": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.1.1.tgz", - "integrity": "sha512-ppym+PLiuSmvU9ufXVb/8OtHUPcjW+bBlb8CLh6oMATgJtCE3fjDYrzJi5u1uX8q9jbmtQ7VADKJKIlp68zi3A==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/console": "^29.1.0", - "@jest/reporters": "^29.1.0", - "@jest/test-result": "^29.1.0", - "@jest/transform": "^29.1.0", - "@jest/types": "^29.1.0", + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "ci-info": "^3.2.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.0.0", - "jest-config": "^29.1.1", - "jest-haste-map": "^29.1.0", - "jest-message-util": "^29.1.0", - "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.1.0", - "jest-resolve-dependencies": "^29.1.1", - "jest-runner": "^29.1.1", - "jest-runtime": "^29.1.1", - "jest-snapshot": "^29.1.0", - "jest-util": "^29.1.0", - "jest-validate": "^29.1.0", - "jest-watcher": "^29.1.0", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", "micromatch": "^4.0.4", - "pretty-format": "^29.1.0", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "strip-ansi": "^6.0.0" }, @@ -828,89 +867,95 @@ } }, "node_modules/@jest/environment": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.1.1.tgz", - "integrity": "sha512-69WULhTD38UcjvLGRAnnwC5hDt35ZC91ZwnvWipNOAOSaQNT32uKYL/TVCT3tncB9L1D++LOmBbYhTYP4TLuuQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/fake-timers": "^29.1.1", - "@jest/types": "^29.1.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-mock": "^29.1.1" + "jest-mock": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/expect": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.1.0.tgz", - "integrity": "sha512-qWQttxE5rEwzvDW9G3f0o8chu1EKvIfsMQDeRlXMLCtsDS94ckcqEMNgbKKz0NYlZ45xrIoy+/pngt3ZFr/2zw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", "dev": true, + "license": "MIT", "dependencies": { - "expect": "^29.1.0", - "jest-snapshot": "^29.1.0" + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/expect-utils": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.1.0.tgz", - "integrity": "sha512-YcD5CF2beqfoB07WqejPzWq1/l+zT3SgGwcqqIaPPG1DHFn/ea8MWWXeqV3KKMhTaOM1rZjlYplj1GQxR0XxKA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", "dev": true, + "license": "MIT", "dependencies": { - "jest-get-type": "^29.0.0" + "jest-get-type": "^29.6.3" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/fake-timers": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.1.1.tgz", - "integrity": "sha512-5wTGObRfL/OjzEz0v2ShXlzeJFJw8mO6ByMBwmPLd6+vkdPcmIpCvASG/PR/g8DpchSIEeDXCxQADojHxuhX8g==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/types": "^29.1.0", - "@sinonjs/fake-timers": "^9.1.2", + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", "@types/node": "*", - "jest-message-util": "^29.1.0", - "jest-mock": "^29.1.1", - "jest-util": "^29.1.0" + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/globals": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.1.1.tgz", - "integrity": "sha512-yTiusxeEHjXwmo3guWlN31a1harU8zekLBMlZpOZ+84rfO3HDrkNZLTfd/YaHF8CrwlNCFpDGNSQCH8WkklH/Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/environment": "^29.1.1", - "@jest/expect": "^29.1.0", - "@jest/types": "^29.1.0", - "jest-mock": "^29.1.1" + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/reporters": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.1.0.tgz", - "integrity": "sha512-szSjHjVuBQ7aZUdBzTicCoQAAQsQFLk+/PtMfO0RQxL5mQ1iw+PSKOpyvMZcA5T6bH9pIapue5U9UCrxfOtL3w==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", "dev": true, + "license": "MIT", "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.1.0", - "@jest/test-result": "^29.1.0", - "@jest/transform": "^29.1.0", - "@jest/types": "^29.1.0", - "@jridgewell/trace-mapping": "^0.3.15", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", "@types/node": "*", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", @@ -918,17 +963,16 @@ "glob": "^7.1.3", "graceful-fs": "^4.2.9", "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-instrument": "^6.0.0", "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.1.0", - "jest-util": "^29.1.0", - "jest-worker": "^29.1.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", "slash": "^3.0.0", "string-length": "^4.0.1", "strip-ansi": "^6.0.0", - "terminal-link": "^2.0.0", "v8-to-istanbul": "^9.0.1" }, "engines": { @@ -943,25 +987,57 @@ } } }, + "node_modules/@jest/reporters/node_modules/istanbul-lib-instrument": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", + "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@jest/reporters/node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", "dev": true, + "license": "MIT", "dependencies": { - "@sinclair/typebox": "^0.24.1" + "@sinclair/typebox": "^0.27.8" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/source-map": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.0.0.tgz", - "integrity": "sha512-nOr+0EM8GiHf34mq2GcJyz/gYFyLQ2INDhAylrZJ9mMWoW21mLBfZa0BUVPPMxVYrLjeiRe2Z7kWXOGnS0TFhQ==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", "dev": true, + "license": "MIT", "dependencies": { - "@jridgewell/trace-mapping": "^0.3.15", + "@jridgewell/trace-mapping": "^0.3.18", "callsites": "^3.0.0", "graceful-fs": "^4.2.9" }, @@ -970,13 +1046,14 @@ } }, "node_modules/@jest/test-result": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.1.0.tgz", - "integrity": "sha512-RMBhPlw1Qfc2bKSf3RFPCyFSN7cfWVSTxRD8JrnvqdqgaDgrq4aGJT1A/V2+5Vq9bqBd187FpaxGTQ4zLrt08g==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/console": "^29.1.0", - "@jest/types": "^29.1.0", + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" }, @@ -985,14 +1062,15 @@ } }, "node_modules/@jest/test-sequencer": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.1.0.tgz", - "integrity": "sha512-1diQfwNhBAte+x3TmyfWloxT1C8GcPEPEZ4BZjmELBK2j3cdqi0DofoJUxBDDUBBnakbv8ce0B7CIzprsupPSA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/test-result": "^29.1.0", + "@jest/test-result": "^29.7.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.1.0", + "jest-haste-map": "^29.7.0", "slash": "^3.0.0" }, "engines": { @@ -1000,38 +1078,40 @@ } }, "node_modules/@jest/transform": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.1.0.tgz", - "integrity": "sha512-NI1zd62KgM0lW6rWMIZDx52dfTIDd+cnLQNahH0YhH7TVmQVigumJ6jszuhAzvKHGm55P2Fozcglb5sGMfFp3Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", "dev": true, + "license": "MIT", "dependencies": { "@babel/core": "^7.11.6", - "@jest/types": "^29.1.0", - "@jridgewell/trace-mapping": "^0.3.15", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", + "convert-source-map": "^2.0.0", "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.1.0", - "jest-regex-util": "^29.0.0", - "jest-util": "^29.1.0", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", - "write-file-atomic": "^4.0.1" + "write-file-atomic": "^4.0.2" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/types": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.1.0.tgz", - "integrity": "sha512-lE30u3z4lbTOqf5D7fDdoco3Qd8H6F/t73nLOswU4x+7VhgDQMX5y007IMqrKjFHdnpslaYymVFhWX+ttXNARQ==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", "@types/node": "*", @@ -1077,7 +1157,7 @@ "version": "0.3.6", "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", - "devOptional": true, + "optional": true, "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25" @@ -1087,7 +1167,7 @@ "version": "0.3.5", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", - "devOptional": true, + "optional": true, "dependencies": { "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -1098,16 +1178,18 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "devOptional": true + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.4.tgz", + "integrity": "sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw==", + "devOptional": true, + "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "version": "0.3.29", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.29.tgz", + "integrity": "sha512-uw6guiW/gcAGPDhLmd77/6lW8QLeiV5RUTsAX46Db6oLhGaVj4lhnPwb184s1bkc8kdVg/+h988dro8GRDpmYQ==", "devOptional": true, + "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" @@ -1161,90 +1243,127 @@ } }, "node_modules/@sinclair/typebox": { - "version": "0.24.43", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.43.tgz", - "integrity": "sha512-1orQTvtazZmsPeBroJjysvsOQCYV2yjWlebkSY38pl5vr2tdLjEJ+LoxITlGNZaH2RE19WlAwQMkH/7C14wLfw==", - "dev": true + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true, + "license": "MIT" }, "node_modules/@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "type-detect": "4.0.8" } }, "node_modules/@sinonjs/fake-timers": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", - "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { - "@sinonjs/commons": "^1.7.0" + "@sinonjs/commons": "^3.0.0" } }, + "node_modules/@tsconfig/node10": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", + "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/babel__core": { - "version": "7.1.19", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", - "integrity": "sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0", + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", "@types/babel__generator": "*", "@types/babel__template": "*", "@types/babel__traverse": "*" } }, "node_modules/@types/babel__generator": { - "version": "7.6.4", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", - "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/types": "^7.0.0" } }, "node_modules/@types/babel__template": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", - "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", "dev": true, + "license": "MIT", "dependencies": { "@babel/parser": "^7.1.0", "@babel/types": "^7.0.0" } }, "node_modules/@types/babel__traverse": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.18.2.tgz", - "integrity": "sha512-FcFaxOr2V5KZCviw1TnutEMVUVsGt4D2hP1TAfXZAMKuHYW3xQhe3jTxNPWutgCJ3/X1c5yX8ZoGVEItxKbwBg==", + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.7.tgz", + "integrity": "sha512-dkO5fhS7+/oos4ciWxyEyjWe48zmG6wbCheo/G2ZnHx4fs3EU6YC6UM8rk56gAjNJ9P3MTH2jo5jb92/K6wbng==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.3.0" + "@babel/types": "^7.20.7" } }, "node_modules/@types/estree": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "devOptional": true + "optional": true }, "node_modules/@types/graceful-fs": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", - "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*" } }, "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", - "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", - "dev": true + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true, + "license": "MIT" }, "node_modules/@types/istanbul-lib-report": { "version": "3.0.0", @@ -1256,10 +1375,11 @@ } }, "node_modules/@types/istanbul-reports": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", - "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", "dev": true, + "license": "MIT", "dependencies": { "@types/istanbul-lib-report": "*" } @@ -1278,7 +1398,7 @@ "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "devOptional": true + "optional": true }, "node_modules/@types/node": { "version": "22.16.4", @@ -1290,17 +1410,12 @@ "undici-types": "~6.21.0" } }, - "node_modules/@types/prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow==", - "dev": true - }, "node_modules/@types/stack-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", - "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", - "dev": true + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", + "dev": true, + "license": "MIT" }, "node_modules/@types/ws": { "version": "8.18.1", @@ -1313,10 +1428,11 @@ } }, "node_modules/@types/yargs": { - "version": "17.0.13", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.13.tgz", - "integrity": "sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg==", + "version": "17.0.33", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", + "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", "dev": true, + "license": "MIT", "dependencies": { "@types/yargs-parser": "*" } @@ -1554,16 +1670,17 @@ } }, "node_modules/@ungap/structured-clone": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.1.tgz", - "integrity": "sha512-fEzPV3hSkSMltkw152tJKNARhOupqbH96MZWyRjNaYZOMIzbrTeQDG+MTc6Mr2pgzFQzFxAfmhGDNP5QK++2ZA==", - "dev": true + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", + "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", + "dev": true, + "license": "ISC" }, "node_modules/@webassemblyjs/ast": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", - "devOptional": true, + "optional": true, "dependencies": { "@webassemblyjs/helper-numbers": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6" @@ -1573,25 +1690,25 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", - "devOptional": true + "optional": true }, "node_modules/@webassemblyjs/helper-api-error": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", - "devOptional": true + "optional": true }, "node_modules/@webassemblyjs/helper-buffer": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", - "devOptional": true + "optional": true }, "node_modules/@webassemblyjs/helper-numbers": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", - "devOptional": true, + "optional": true, "dependencies": { "@webassemblyjs/floating-point-hex-parser": "1.11.6", "@webassemblyjs/helper-api-error": "1.11.6", @@ -1602,13 +1719,13 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", - "devOptional": true + "optional": true }, "node_modules/@webassemblyjs/helper-wasm-section": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", - "devOptional": true, + "optional": true, "dependencies": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-buffer": "1.12.1", @@ -1620,7 +1737,7 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", - "devOptional": true, + "optional": true, "dependencies": { "@xtuc/ieee754": "^1.2.0" } @@ -1629,7 +1746,7 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", - "devOptional": true, + "optional": true, "dependencies": { "@xtuc/long": "4.2.2" } @@ -1638,13 +1755,13 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", - "devOptional": true + "optional": true }, "node_modules/@webassemblyjs/wasm-edit": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", - "devOptional": true, + "optional": true, "dependencies": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-buffer": "1.12.1", @@ -1660,7 +1777,7 @@ "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", - "devOptional": true, + "optional": true, "dependencies": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", @@ -1673,7 +1790,7 @@ "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", - "devOptional": true, + "optional": true, "dependencies": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-buffer": "1.12.1", @@ -1685,7 +1802,7 @@ "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", - "devOptional": true, + "optional": true, "dependencies": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-api-error": "1.11.6", @@ -1699,7 +1816,7 @@ "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", - "devOptional": true, + "optional": true, "dependencies": { "@webassemblyjs/ast": "1.12.1", "@xtuc/long": "4.2.2" @@ -1745,19 +1862,19 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "devOptional": true + "optional": true }, "node_modules/@xtuc/long": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "devOptional": true + "optional": true }, "node_modules/abab": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", - "dev": true + "optional": true }, "node_modules/acorn": { "version": "8.11.2", @@ -1775,7 +1892,7 @@ "version": "1.9.5", "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", - "devOptional": true, + "optional": true, "peerDependencies": { "acorn": "^8" } @@ -1789,6 +1906,19 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/acorn-walk": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -1809,7 +1939,7 @@ "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "devOptional": true, + "optional": true, "peerDependencies": { "ajv": "^6.9.1" } @@ -1819,6 +1949,7 @@ "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", "dev": true, + "license": "MIT", "dependencies": { "type-fest": "^0.21.3" }, @@ -1834,6 +1965,7 @@ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "dev": true, + "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -1854,7 +1986,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, + "devOptional": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -1866,10 +1998,11 @@ } }, "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, + "license": "ISC", "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -1878,12 +2011,26 @@ "node": ">= 8" } }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true, + "license": "MIT" + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "dev": true, + "license": "MIT" + }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -1901,15 +2048,16 @@ } }, "node_modules/babel-jest": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.1.0.tgz", - "integrity": "sha512-0XiBgPRhMSng+ThuXz0M/WpOeml/q5S4BFIaDS5uQb+lCjOzd0OfYEN4hWte5fDy7SZ6rNmEi16UpWGurSg2nQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/transform": "^29.1.0", + "@jest/transform": "^29.7.0", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.0.2", + "babel-preset-jest": "^29.6.3", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "slash": "^3.0.0" @@ -1938,10 +2086,11 @@ } }, "node_modules/babel-plugin-jest-hoist": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.0.2.tgz", - "integrity": "sha512-eBr2ynAEFjcebVvu8Ktx580BD1QKCrBG1XwEUTXJe285p9HA/4hOhfWCFRQhTKSyBV0VzjhG7H91Eifz9s29hg==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/template": "^7.3.3", "@babel/types": "^7.3.3", @@ -1953,35 +2102,40 @@ } }, "node_modules/babel-preset-current-node-syntax": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", - "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz", + "integrity": "sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==", "dev": true, + "license": "MIT", "dependencies": { "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-meta": "^7.10.4", "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, "node_modules/babel-preset-jest": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.0.2.tgz", - "integrity": "sha512-BeVXp7rH5TK96ofyEnHjznjLMQ2nAeDJ+QzxKnHAAMs0RgrQsCywjAN8m4mOm5Di0pxU//3AoEeJJrerMH5UeA==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", "dev": true, + "license": "MIT", "dependencies": { - "babel-plugin-jest-hoist": "^29.0.2", + "babel-plugin-jest-hoist": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0" }, "engines": { @@ -2012,7 +2166,7 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, + "devOptional": true, "dependencies": { "fill-range": "^7.1.1" }, @@ -2069,6 +2223,7 @@ "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", "dev": true, + "license": "Apache-2.0", "dependencies": { "node-int64": "^0.4.0" } @@ -2134,7 +2289,7 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, + "devOptional": true, "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -2151,6 +2306,7 @@ "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" } @@ -2159,7 +2315,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", - "devOptional": true, + "optional": true, "engines": { "node": ">=6.0" } @@ -2171,20 +2327,25 @@ "dev": true }, "node_modules/cjs-module-lexer": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", - "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", - "dev": true + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz", + "integrity": "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==", + "dev": true, + "license": "MIT" }, "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, + "license": "ISC", "dependencies": { "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", + "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" } }, "node_modules/clone-deep": { @@ -2206,22 +2367,24 @@ "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", "dev": true, + "license": "MIT", "engines": { "iojs": ">= 1.0.0", "node": ">= 0.12.0" } }, "node_modules/collect-v8-coverage": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", - "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", - "dev": true + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", + "dev": true, + "license": "MIT" }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, + "devOptional": true, "dependencies": { "color-name": "~1.1.4" }, @@ -2233,7 +2396,7 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "devOptional": true }, "node_modules/colorette": { "version": "2.0.19", @@ -2256,7 +2419,7 @@ "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "devOptional": true + "optional": true }, "node_modules/concat-map": { "version": "0.0.1", @@ -2265,14 +2428,41 @@ "dev": true }, "node_modules/convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", "dev": true, + "license": "MIT", "dependencies": { - "safe-buffer": "~5.1.1" + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + }, + "bin": { + "create-jest": "bin/create-jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true, + "license": "MIT" + }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -2305,10 +2495,19 @@ } }, "node_modules/dedent": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", - "dev": true + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.6.0.tgz", + "integrity": "sha512-F1Z+5UCFpmQUzJa11agbyPVMbpgT/qA3/SKyJ1jyBgm7dUcUEa8v9JwDkerSQXfakBwFljIxhOJqGkjUwZ9FSA==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } }, "node_modules/deep-is": { "version": "0.1.4", @@ -2317,10 +2516,11 @@ "dev": true }, "node_modules/deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -2338,15 +2538,27 @@ "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/diff-sequences": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.0.0.tgz", - "integrity": "sha512-7Qe/zd1wxSDL4D/X/FPjOMB+ZMDt71W94KYaq05I2l0oQqgXgs7s4ftYYmV38gBSrPz2vcygxfs1xn0FT+rKNA==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", "dev": true, + "license": "MIT", "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } @@ -2377,6 +2589,22 @@ "node": ">= 0.4" } }, + "node_modules/ejs": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/electron-to-chromium": { "version": "1.5.29", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.29.tgz", @@ -2384,10 +2612,11 @@ "devOptional": true }, "node_modules/emittery": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", - "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -2399,13 +2628,14 @@ "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/enhanced-resolve": { "version": "5.17.1", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", - "devOptional": true, + "optional": true, "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -2431,6 +2661,7 @@ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, + "license": "MIT", "dependencies": { "is-arrayish": "^0.2.1" } @@ -2457,7 +2688,7 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.4.1.tgz", "integrity": "sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==", - "devOptional": true + "optional": true }, "node_modules/es-object-atoms": { "version": "1.1.1", @@ -2730,7 +2961,7 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "devOptional": true, + "optional": true, "engines": { "node": ">=0.8.x" } @@ -2740,6 +2971,7 @@ "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, + "license": "MIT", "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", @@ -2768,16 +3000,17 @@ } }, "node_modules/expect": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.1.0.tgz", - "integrity": "sha512-1NCfR0FEArn9Vq1KEjhPd1rggRLiWgo87gfMK4iKn6DcVzJBRMyDNX22hyND5KiSRPIPQ5KtsY6HLxsQ0MU86w==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/expect-utils": "^29.1.0", - "jest-get-type": "^29.0.0", - "jest-matcher-utils": "^29.1.0", - "jest-message-util": "^29.1.0", - "jest-util": "^29.1.0" + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -2860,6 +3093,7 @@ "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", "dev": true, + "license": "Apache-2.0", "dependencies": { "bser": "2.1.1" } @@ -2876,11 +3110,44 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/filelist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "minimatch": "^5.0.1" + } + }, + "node_modules/filelist/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/filelist/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, + "devOptional": true, "dependencies": { "to-regex-range": "^5.0.1" }, @@ -2965,11 +3232,12 @@ "dev": true }, "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -3001,6 +3269,7 @@ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true, + "license": "ISC", "engines": { "node": "6.* || 8.* || >= 10.*" } @@ -3056,6 +3325,7 @@ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -3099,7 +3369,7 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "devOptional": true + "optional": true }, "node_modules/globals": { "version": "13.24.0", @@ -3204,13 +3474,15 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=10.17.0" } @@ -3219,7 +3491,7 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, + "optional": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -3253,10 +3525,11 @@ } }, "node_modules/import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", "devOptional": true, + "license": "MIT", "dependencies": { "pkg-dir": "^4.2.0", "resolve-cwd": "^3.0.0" @@ -3309,7 +3582,8 @@ "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/is-core-module": { "version": "2.10.0", @@ -3337,6 +3611,7 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -3346,6 +3621,7 @@ "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -3366,7 +3642,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, + "devOptional": true, "engines": { "node": ">=0.12.0" } @@ -3397,6 +3673,7 @@ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -3453,17 +3730,18 @@ } }, "node_modules/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", + "make-dir": "^4.0.0", "supports-color": "^7.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" } }, "node_modules/istanbul-lib-source-maps": { @@ -3471,6 +3749,7 @@ "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "debug": "^4.1.1", "istanbul-lib-coverage": "^3.0.0", @@ -3481,10 +3760,11 @@ } }, "node_modules/istanbul-reports": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", - "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" @@ -3493,16 +3773,36 @@ "node": ">=8" } }, + "node_modules/jake": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz", + "integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/jest": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.1.1.tgz", - "integrity": "sha512-Doe41PZ8MvGLtOZIW2RIVu94wa7jm/N775BBloVXk/G/vV6VYnDCOxBwrqekEgrd3Pn/bv8b5UdB2x0pAoQpwQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/core": "^29.1.1", - "@jest/types": "^29.1.0", + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", "import-local": "^3.0.2", - "jest-cli": "^29.1.1" + "jest-cli": "^29.7.0" }, "bin": { "jest": "bin/jest.js" @@ -3520,12 +3820,14 @@ } }, "node_modules/jest-changed-files": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.0.0.tgz", - "integrity": "sha512-28/iDMDrUpGoCitTURuDqUzWQoWmOmOKOFST1mi2lwh62X4BFf6khgH3uSuo1e49X/UDjuApAj3w0wLOex4VPQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", "dev": true, + "license": "MIT", "dependencies": { "execa": "^5.0.0", + "jest-util": "^29.7.0", "p-limit": "^3.1.0" }, "engines": { @@ -3533,28 +3835,30 @@ } }, "node_modules/jest-circus": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.1.1.tgz", - "integrity": "sha512-Ii+3JIeLF3z8j2E7fPSjPjXJLBdbAcZyfEiALRQ1Fk+FWTIfuEfZrZcjSaBdz/k/waoq+bPf9x/vBCXIAyLLEQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/environment": "^29.1.1", - "@jest/expect": "^29.1.0", - "@jest/test-result": "^29.1.0", - "@jest/types": "^29.1.0", + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", - "dedent": "^0.7.0", + "dedent": "^1.0.0", "is-generator-fn": "^2.0.0", - "jest-each": "^29.1.0", - "jest-matcher-utils": "^29.1.0", - "jest-message-util": "^29.1.0", - "jest-runtime": "^29.1.1", - "jest-snapshot": "^29.1.0", - "jest-util": "^29.1.0", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", "p-limit": "^3.1.0", - "pretty-format": "^29.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -3563,22 +3867,22 @@ } }, "node_modules/jest-cli": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.1.1.tgz", - "integrity": "sha512-nz/JNtqDFf49R2KgeZ9+6Zl1uxSuRsg/tICC+DHMh+bQ0co6QqBPWKg3FtW4534bs8/J2YqFC2Lct9DZR24z0Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/core": "^29.1.1", - "@jest/test-result": "^29.1.0", - "@jest/types": "^29.1.0", + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "chalk": "^4.0.0", + "create-jest": "^29.7.0", "exit": "^0.1.2", - "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^29.1.1", - "jest-util": "^29.1.0", - "jest-validate": "^29.1.0", - "prompts": "^2.0.1", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "yargs": "^17.3.1" }, "bin": { @@ -3597,31 +3901,32 @@ } }, "node_modules/jest-config": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.1.1.tgz", - "integrity": "sha512-o2iZrQMOiF54zOw1kOcJGmfKzAW+V2ajZVWxbt+Ex+g0fVaTkk215BD/GFhrviuic+Xk7DpzUmdTT9c1QfsPqg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", "dev": true, + "license": "MIT", "dependencies": { "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.1.0", - "@jest/types": "^29.1.0", - "babel-jest": "^29.1.0", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-circus": "^29.1.1", - "jest-environment-node": "^29.1.1", - "jest-get-type": "^29.0.0", - "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.1.0", - "jest-runner": "^29.1.1", - "jest-util": "^29.1.0", - "jest-validate": "^29.1.0", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "micromatch": "^4.0.4", "parse-json": "^5.2.0", - "pretty-format": "^29.1.0", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" }, @@ -3642,25 +3947,27 @@ } }, "node_modules/jest-diff": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.1.0.tgz", - "integrity": "sha512-ZJyWG30jpVHwxLs8xxR1so4tz6lFARNztnFlxssFpQdakaW0isSx9rAKs/6aQUKQDZ/DgSpY6HjUGLO9xkNdRw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^4.0.0", - "diff-sequences": "^29.0.0", - "jest-get-type": "^29.0.0", - "pretty-format": "^29.1.0" + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-docblock": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.0.0.tgz", - "integrity": "sha512-s5Kpra/kLzbqu9dEjov30kj1n4tfu3e7Pl8v+f8jOkeWNqM6Ds8jRaJfZow3ducoQUrf2Z4rs2N5S3zXnb83gw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", "dev": true, + "license": "MIT", "dependencies": { "detect-newline": "^3.0.0" }, @@ -3669,62 +3976,66 @@ } }, "node_modules/jest-each": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.1.0.tgz", - "integrity": "sha512-ELSZV/L4yjqKU2O0bnDTNHlizD4IRS9DX94iAB6QpiPIJsR453dJW7Ka7TXSmxQdc66HNNOhUcQ5utIeVCKGyA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/types": "^29.1.0", + "@jest/types": "^29.6.3", "chalk": "^4.0.0", - "jest-get-type": "^29.0.0", - "jest-util": "^29.1.0", - "pretty-format": "^29.1.0" + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-environment-node": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.1.1.tgz", - "integrity": "sha512-0nwTca4L2N8iM33A+JMfBdygR6B3N/bcPoLe1hEd9o87KLxDZwKGvpTGSfXpjtyqNQXiaL/3G+YOcSoeq/syPw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/environment": "^29.1.1", - "@jest/fake-timers": "^29.1.1", - "@jest/types": "^29.1.0", + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-mock": "^29.1.1", - "jest-util": "^29.1.0" + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-get-type": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.0.0.tgz", - "integrity": "sha512-83X19z/HuLKYXYHskZlBAShO7UfLFXu/vWajw9ZNJASN32li8yHMaVGAQqxFW1RCFOkB7cubaL6FaJVQqqJLSw==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", "dev": true, + "license": "MIT", "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-haste-map": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.1.0.tgz", - "integrity": "sha512-qn+QVZ6JHzzx6g8XrMrNNvvIWrgVT6FzOoxTP5hQ1vEu6r9use2gOb0sSeC3Xle7eaDLN4DdAazSKnWskK3B/g==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/types": "^29.1.0", + "@jest/types": "^29.6.3", "@types/graceful-fs": "^4.1.3", "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.0.0", - "jest-util": "^29.1.0", - "jest-worker": "^29.1.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", "micromatch": "^4.0.4", "walker": "^1.0.8" }, @@ -3736,46 +4047,49 @@ } }, "node_modules/jest-leak-detector": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.1.0.tgz", - "integrity": "sha512-7ZdlIA2UXBIzXBNadta7pohrrvbD/Jp5T55Ux2DE1BSGul4RglIPHt7cZ0V3ll+ppBC1pGaBiWPBfLcQ2dDc3Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", "dev": true, + "license": "MIT", "dependencies": { - "jest-get-type": "^29.0.0", - "pretty-format": "^29.1.0" + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-matcher-utils": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.1.0.tgz", - "integrity": "sha512-pfthsLu27kZg+T1XTUGvox0r3gP3KtqdMPliVd/bs6iDrZ9Z6yJgLbw6zNc4DHtCcyzq9UW0jmszCX8DdFU/wA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^4.0.0", - "jest-diff": "^29.1.0", - "jest-get-type": "^29.0.0", - "pretty-format": "^29.1.0" + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-message-util": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.1.0.tgz", - "integrity": "sha512-NzGXD9wgCxUy20sIvyOsSA/KzQmkmagOVGE5LnT2juWn+hB88gCQr8N/jpu34CXRIXmV7INwrQVVwhnh72pY5A==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", "dev": true, + "license": "MIT", "dependencies": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.1.0", + "@jest/types": "^29.6.3", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^29.1.0", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -3784,24 +4098,26 @@ } }, "node_modules/jest-mock": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.1.1.tgz", - "integrity": "sha512-vDe56JmImqt3j8pHcEIkahQbSCnBS49wda0spIl0bkrIM7VDZXjKaes6W28vKZye0atNAcFaj3dxXh0XWjBW4Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/types": "^29.1.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-util": "^29.1.0" + "jest-util": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-pnp-resolver": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", - "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" }, @@ -3815,28 +4131,30 @@ } }, "node_modules/jest-regex-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.0.0.tgz", - "integrity": "sha512-BV7VW7Sy0fInHWN93MMPtlClweYv2qrSCwfeFWmpribGZtQPWNvRSq9XOVgOEjU1iBGRKXUZil0o2AH7Iy9Lug==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", "dev": true, + "license": "MIT", "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-resolve": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.1.0.tgz", - "integrity": "sha512-0IETuMI58nbAWwCrtX1QQmenstlWOEdwNS5FXxpEMAs6S5tttFiEoXUwGTAiI152nqoWRUckAgt21FP4wqeZWA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^4.0.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.1.0", + "jest-haste-map": "^29.7.0", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.1.0", - "jest-validate": "^29.1.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", + "resolve.exports": "^2.0.0", "slash": "^3.0.0" }, "engines": { @@ -3844,43 +4162,45 @@ } }, "node_modules/jest-resolve-dependencies": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.1.1.tgz", - "integrity": "sha512-AMRTJyiK8caRXq3pa9i4oXX6yH+am5v0HwCUq1yk9lxI3ARihyT2OfEySJJo3ER7xpxf3b6isfp1sO6PQY3N0Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", "dev": true, + "license": "MIT", "dependencies": { - "jest-regex-util": "^29.0.0", - "jest-snapshot": "^29.1.0" + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-runner": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.1.1.tgz", - "integrity": "sha512-HqazsMPXB62Zi2oJEl+Ta9aUWAaR4WdT7ow25pcS99PkOsWQoYH+yyaKbAHBUf8NOqPbZ8T4Q8gt8ZBFEJJdVQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/console": "^29.1.0", - "@jest/environment": "^29.1.1", - "@jest/test-result": "^29.1.0", - "@jest/transform": "^29.1.0", - "@jest/types": "^29.1.0", + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", - "emittery": "^0.10.2", + "emittery": "^0.13.1", "graceful-fs": "^4.2.9", - "jest-docblock": "^29.0.0", - "jest-environment-node": "^29.1.1", - "jest-haste-map": "^29.1.0", - "jest-leak-detector": "^29.1.0", - "jest-message-util": "^29.1.0", - "jest-resolve": "^29.1.0", - "jest-runtime": "^29.1.1", - "jest-util": "^29.1.0", - "jest-watcher": "^29.1.0", - "jest-worker": "^29.1.0", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", "p-limit": "^3.1.0", "source-map-support": "0.5.13" }, @@ -3889,31 +4209,32 @@ } }, "node_modules/jest-runtime": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.1.1.tgz", - "integrity": "sha512-DA2nW5GUAEFUOFztVqX6BOHbb1tUO1iDzlx+bOVdw870UIkv09u3P5nTfK3N+xtqy/fGlLsg7UCzhpEJnwKilg==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.1.1", - "@jest/fake-timers": "^29.1.1", - "@jest/globals": "^29.1.1", - "@jest/source-map": "^29.0.0", - "@jest/test-result": "^29.1.0", - "@jest/transform": "^29.1.0", - "@jest/types": "^29.1.0", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.1.0", - "jest-message-util": "^29.1.0", - "jest-mock": "^29.1.1", - "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.1.0", - "jest-snapshot": "^29.1.0", - "jest-util": "^29.1.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", "slash": "^3.0.0", "strip-bom": "^4.0.0" }, @@ -3922,48 +4243,43 @@ } }, "node_modules/jest-snapshot": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.1.0.tgz", - "integrity": "sha512-nHZoA+hpbFlkyV8uLoLJQ/80DLi3c6a5zeELgfSZ5bZj+eljqULr79KBQakp5xyH3onezf4k+K+2/Blk5/1O+g==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", "dev": true, + "license": "MIT", "dependencies": { "@babel/core": "^7.11.6", "@babel/generator": "^7.7.2", "@babel/plugin-syntax-jsx": "^7.7.2", "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.1.0", - "@jest/transform": "^29.1.0", - "@jest/types": "^29.1.0", - "@types/babel__traverse": "^7.0.6", - "@types/prettier": "^2.1.5", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^29.1.0", + "expect": "^29.7.0", "graceful-fs": "^4.2.9", - "jest-diff": "^29.1.0", - "jest-get-type": "^29.0.0", - "jest-haste-map": "^29.1.0", - "jest-matcher-utils": "^29.1.0", - "jest-message-util": "^29.1.0", - "jest-util": "^29.1.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", "natural-compare": "^1.4.0", - "pretty-format": "^29.1.0", - "semver": "^7.3.5" + "pretty-format": "^29.7.0", + "semver": "^7.5.3" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -3972,12 +4288,13 @@ } }, "node_modules/jest-util": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.1.0.tgz", - "integrity": "sha512-5haD8egMAEAq/e8ritN2Gr1WjLYtXi4udAIZB22GnKlv/2MHkbCjcyjgDBmyezAMMeQKGfoaaDsWCmVlnHZ1WQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/types": "^29.1.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", @@ -3989,17 +4306,18 @@ } }, "node_modules/jest-validate": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.1.0.tgz", - "integrity": "sha512-EQKRweSxmIJelCdirpuVkeCS1rSNXJFtSGEeSRFwH39QGioy7qKRSY8XBB4qFiappbsvgHnH0V6Iq5ASs11knA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/types": "^29.1.0", + "@jest/types": "^29.6.3", "camelcase": "^6.2.0", "chalk": "^4.0.0", - "jest-get-type": "^29.0.0", + "jest-get-type": "^29.6.3", "leven": "^3.1.0", - "pretty-format": "^29.1.0" + "pretty-format": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -4010,6 +4328,7 @@ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -4018,18 +4337,19 @@ } }, "node_modules/jest-watcher": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.1.0.tgz", - "integrity": "sha512-JXw7+VpLSf+2yfXlux1/xR65fMn//0pmiXd6EtQWySS9233aA+eGS+8Y5o2imiJ25JBKdG8T45+s78CNQ71Fbg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/test-result": "^29.1.0", - "@jest/types": "^29.1.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "emittery": "^0.10.2", - "jest-util": "^29.1.0", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", "string-length": "^4.0.1" }, "engines": { @@ -4037,12 +4357,14 @@ } }, "node_modules/jest-worker": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.1.0.tgz", - "integrity": "sha512-yr7RFRAxI+vhL/cGB9B0FhD+QfaWh1qSxurx7gLP16dfmqhG8w75D/CQFU8ZetvhiQqLZh8X0C4rxwsZy6HITQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*", + "jest-util": "^29.7.0", "merge-stream": "^2.0.0", "supports-color": "^8.0.0" }, @@ -4055,6 +4377,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -4085,15 +4408,16 @@ } }, "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", "dev": true, + "license": "MIT", "bin": { "jsesc": "bin/jsesc" }, "engines": { - "node": ">=4" + "node": ">=6" } }, "node_modules/json-parse-even-better-errors": { @@ -4140,6 +4464,7 @@ "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -4149,6 +4474,7 @@ "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -4170,13 +4496,14 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/loader-runner": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", - "devOptional": true, + "optional": true, "engines": { "node": ">=6.11.5" } @@ -4212,7 +4539,7 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, + "optional": true, "dependencies": { "yallist": "^4.0.0" }, @@ -4221,20 +4548,34 @@ } }, "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", "dev": true, + "license": "MIT", "dependencies": { - "semver": "^6.0.0" + "semver": "^7.5.3" }, "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/make-dir/node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", @@ -4246,6 +4587,7 @@ "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "tmpl": "1.0.5" } @@ -4279,7 +4621,7 @@ "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, + "devOptional": true, "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" @@ -4312,6 +4654,7 @@ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -4344,13 +4687,14 @@ "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "devOptional": true + "optional": true }, "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/node-releases": { "version": "2.0.18", @@ -4363,6 +4707,7 @@ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -4372,6 +4717,7 @@ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.0.0" }, @@ -4393,6 +4739,7 @@ "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, + "license": "MIT", "dependencies": { "mimic-fn": "^2.1.0" }, @@ -4476,6 +4823,7 @@ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", @@ -4533,7 +4881,7 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, + "devOptional": true, "engines": { "node": ">=8.6" }, @@ -4542,10 +4890,11 @@ } }, "node_modules/pirates": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", - "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", + "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", "dev": true, + "license": "MIT", "engines": { "node": ">= 6" } @@ -4652,12 +5001,13 @@ } }, "node_modules/pretty-format": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.1.0.tgz", - "integrity": "sha512-dZ21z0UjKVSiEkrPAt2nJnGfrtYMFBlNW4wTkJsIp9oB5A8SUQ8DuJ9EUgAvYyNfMeoGmKiDnpJvM489jkzdSQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" }, @@ -4682,6 +5032,7 @@ "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", "dev": true, + "license": "MIT", "dependencies": { "kleur": "^3.0.3", "sisteransi": "^1.0.5" @@ -4704,6 +5055,23 @@ "node": ">=6" } }, + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT" + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -4728,16 +5096,17 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "devOptional": true, + "optional": true, "dependencies": { "safe-buffer": "^5.1.0" } }, "node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true, + "license": "MIT" }, "node_modules/rechoir": { "version": "0.7.1", @@ -4756,6 +5125,7 @@ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -4808,10 +5178,11 @@ } }, "node_modules/resolve.exports": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz", - "integrity": "sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.3.tgz", + "integrity": "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" } @@ -4868,19 +5239,19 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "devOptional": true + "optional": true }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true + "optional": true }, "node_modules/schema-utils": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "devOptional": true, + "optional": true, "dependencies": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", @@ -4907,7 +5278,7 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", - "devOptional": true, + "optional": true, "dependencies": { "randombytes": "^2.1.0" } @@ -4955,7 +5326,8 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/slash": { "version": "3.0.0", @@ -4979,7 +5351,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", - "dev": true, + "optional": true, "engines": { "node": ">=0.10.0" } @@ -4988,7 +5360,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-4.0.0.tgz", "integrity": "sha512-i3KVgM3+QPAHNbGavK+VBq03YoJl24m9JWNbLgsjTj8aJzXG9M61bantBTNBt7CNwY2FYf+RJRYJ3pzalKjIrw==", - "dev": true, + "optional": true, "dependencies": { "abab": "^2.0.6", "iconv-lite": "^0.6.3", @@ -5010,6 +5382,7 @@ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", "dev": true, + "license": "MIT", "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -5022,10 +5395,11 @@ "dev": true }, "node_modules/stack-utils": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", - "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", "dev": true, + "license": "MIT", "dependencies": { "escape-string-regexp": "^2.0.0" }, @@ -5047,6 +5421,7 @@ "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", "dev": true, + "license": "MIT", "dependencies": { "char-regex": "^1.0.2", "strip-ansi": "^6.0.0" @@ -5060,6 +5435,7 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, + "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -5086,6 +5462,7 @@ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -5095,6 +5472,7 @@ "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -5115,7 +5493,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, + "devOptional": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -5123,19 +5501,6 @@ "node": ">=8" } }, - "node_modules/supports-hyperlinks": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", - "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -5168,32 +5533,16 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "devOptional": true, + "optional": true, "engines": { "node": ">=6" } }, - "node_modules/terminal-link": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", - "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", - "dev": true, - "dependencies": { - "ansi-escapes": "^4.2.1", - "supports-hyperlinks": "^2.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/terser": { "version": "5.34.1", "resolved": "https://registry.npmjs.org/terser/-/terser-5.34.1.tgz", "integrity": "sha512-FsJZ7iZLd/BXkz+4xrRTGJ26o/6VTjQytUk8b8OxkwcD2I+79VPJlz7qss1+zE7h8GNIScFqXcDyJ/KqBYZFVA==", - "devOptional": true, + "optional": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.8.2", @@ -5211,7 +5560,7 @@ "version": "5.3.10", "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", - "devOptional": true, + "optional": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.20", "jest-worker": "^27.4.5", @@ -5245,7 +5594,7 @@ "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", - "devOptional": true, + "optional": true, "dependencies": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -5259,7 +5608,7 @@ "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "devOptional": true, + "optional": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -5274,7 +5623,7 @@ "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "devOptional": true, + "optional": true, "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -5304,13 +5653,14 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", - "dev": true + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, + "devOptional": true, "dependencies": { "is-number": "^7.0.0" }, @@ -5331,37 +5681,44 @@ } }, "node_modules/ts-jest": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.0.2.tgz", - "integrity": "sha512-P03IUItnAjG6RkJXtjjD5pu0TryQFOwcb1YKmW63rO19V0UFqL3wiXZrmR5D7qYjI98btzIOAcYafLZ0GHAcQg==", + "version": "29.4.0", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.0.tgz", + "integrity": "sha512-d423TJMnJGu80/eSgfQ5w/R+0zFJvdtTxwtF9KzFFunOpSeD+79lHJQIiAhluJoyGRbvj9NZJsl9WjCUo0ND7Q==", "dev": true, + "license": "MIT", "dependencies": { - "bs-logger": "0.x", - "fast-json-stable-stringify": "2.x", - "jest-util": "^29.0.0", - "json5": "^2.2.1", - "lodash.memoize": "4.x", - "make-error": "1.x", - "semver": "7.x", - "yargs-parser": "^21.0.1" + "bs-logger": "^0.2.6", + "ejs": "^3.1.10", + "fast-json-stable-stringify": "^2.1.0", + "json5": "^2.2.3", + "lodash.memoize": "^4.1.2", + "make-error": "^1.3.6", + "semver": "^7.7.2", + "type-fest": "^4.41.0", + "yargs-parser": "^21.1.1" }, "bin": { "ts-jest": "cli.js" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" }, "peerDependencies": { "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/types": "^29.0.0", - "babel-jest": "^29.0.0", - "jest": "^29.0.0", - "typescript": ">=4.3" + "@jest/transform": "^29.0.0 || ^30.0.0", + "@jest/types": "^29.0.0 || ^30.0.0", + "babel-jest": "^29.0.0 || ^30.0.0", + "jest": "^29.0.0 || ^30.0.0", + "jest-util": "^29.0.0 || ^30.0.0", + "typescript": ">=4.3 <6" }, "peerDependenciesMeta": { "@babel/core": { "optional": true }, + "@jest/transform": { + "optional": true + }, "@jest/types": { "optional": true }, @@ -5370,17 +5727,18 @@ }, "esbuild": { "optional": true + }, + "jest-util": { + "optional": true } } }, "node_modules/ts-jest/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -5388,11 +5746,24 @@ "node": ">=10" } }, + "node_modules/ts-jest/node_modules/type-fest": { + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/ts-loader": { "version": "9.4.1", "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.4.1.tgz", "integrity": "sha512-384TYAqGs70rn9F0VBnh6BPTfhga7yFNdC5gXbQpDrBj9/KsT4iRkGqKXhziofHOlE2j6YEaiTYVGKKvPhGWvw==", - "dev": true, + "optional": true, "dependencies": { "chalk": "^4.1.0", "enhanced-resolve": "^5.0.0", @@ -5411,7 +5782,7 @@ "version": "7.5.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, + "optional": true, "dependencies": { "lru-cache": "^6.0.0" }, @@ -5422,6 +5793,50 @@ "node": ">=10" } }, + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -5445,6 +5860,7 @@ "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -5465,7 +5881,7 @@ "version": "5.7.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", - "dev": true, + "devOptional": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -5521,15 +5937,23 @@ "punycode": "^2.1.0" } }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true, + "license": "MIT" + }, "node_modules/v8-to-istanbul": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", - "integrity": "sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==", + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", "dev": true, + "license": "ISC", "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0" + "convert-source-map": "^2.0.0" }, "engines": { "node": ">=10.12.0" @@ -5540,6 +5964,7 @@ "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", "dev": true, + "license": "Apache-2.0", "dependencies": { "makeerror": "1.0.12" } @@ -5548,7 +5973,7 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz", "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==", - "devOptional": true, + "optional": true, "dependencies": { "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.1.2" @@ -5561,7 +5986,7 @@ "version": "5.95.0", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.95.0.tgz", "integrity": "sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q==", - "devOptional": true, + "optional": true, "dependencies": { "@types/estree": "^1.0.5", "@webassemblyjs/ast": "^1.12.1", @@ -5676,7 +6101,7 @@ "version": "3.2.3", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "devOptional": true, + "optional": true, "engines": { "node": ">=10.13.0" } @@ -5685,7 +6110,7 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "devOptional": true, + "optional": true, "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" @@ -5698,7 +6123,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "devOptional": true, + "optional": true, "engines": { "node": ">=4.0" } @@ -5738,6 +6163,7 @@ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -5794,6 +6220,7 @@ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, + "license": "ISC", "engines": { "node": ">=10" } @@ -5802,21 +6229,22 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "optional": true }, "node_modules/yargs": { - "version": "17.5.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", - "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==", + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, + "license": "MIT", "dependencies": { - "cliui": "^7.0.2", + "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" + "yargs-parser": "^21.1.1" }, "engines": { "node": ">=12" @@ -5831,6 +6259,16 @@ "node": ">=12" } }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", @@ -5867,145 +6305,122 @@ } }, "@babel/compat-data": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.3.tgz", - "integrity": "sha512-prBHMK4JYYK+wDjJF1q99KK4JLL+egWS4nmNqdlMUgCExMZ+iZW0hGhyC3VEbsPjvaN0TBhW//VIFwBrk8sEiw==", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.0.tgz", + "integrity": "sha512-60X7qkglvrap8mn1lh2ebxXdZYtUcpd7gsmy9kLaBJ4i/WdY8PqTSdxyA8qraikqKQK5C1KRBKXqznrVapyNaw==", "dev": true }, "@babel/core": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.3.tgz", - "integrity": "sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ==", - "dev": true, - "requires": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.3", - "@babel/helper-compilation-targets": "^7.19.3", - "@babel/helper-module-transforms": "^7.19.0", - "@babel/helpers": "^7.19.0", - "@babel/parser": "^7.19.3", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.3", - "@babel/types": "^7.19.3", - "convert-source-map": "^1.7.0", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.0.tgz", + "integrity": "sha512-UlLAnTPrFdNGoFtbSXwcGFQBtQZJCNjaN6hQNP3UPvuNXT1i82N26KL3dZeIpNalWywr9IuQuncaAfUaS1g6sQ==", + "dev": true, + "requires": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.0", + "@babel/helper-compilation-targets": "^7.27.2", + "@babel/helper-module-transforms": "^7.27.3", + "@babel/helpers": "^7.27.6", + "@babel/parser": "^7.28.0", + "@babel/template": "^7.27.2", + "@babel/traverse": "^7.28.0", + "@babel/types": "^7.28.0", + "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.2.1", - "semver": "^6.3.0" + "json5": "^2.2.3", + "semver": "^6.3.1" } }, "@babel/generator": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.3.tgz", - "integrity": "sha512-keeZWAV4LU3tW0qRi19HRpabC/ilM0HRBBzf9/k8FFiG4KVpiv0FIy4hHfLfFQZNhziCTPTmd59zoyv6DNISzg==", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.0.tgz", + "integrity": "sha512-lJjzvrbEeWrhB4P3QBsH7tey117PjLZnDbLiQEKjQ/fNJTjuq4HSqgFA+UNSwZT8D7dxxbnuSBMsa1lrWzKlQg==", "dev": true, "requires": { - "@babel/types": "^7.23.3", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" + "@babel/parser": "^7.28.0", + "@babel/types": "^7.28.0", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" }, "dependencies": { "@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "version": "0.3.12", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.12.tgz", + "integrity": "sha512-OuLGC46TjB5BbN1dH8JULVVZY4WTdkF7tV9Ys6wLL1rubZnCMstOhNHueU5bLCrnRuDhKPDM4g6sw4Bel5Gzqg==", "dev": true, "requires": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" } } } }, "@babel/helper-compilation-targets": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.3.tgz", - "integrity": "sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", + "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", "dev": true, "requires": { - "@babel/compat-data": "^7.19.3", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", - "semver": "^6.3.0" + "@babel/compat-data": "^7.27.2", + "@babel/helper-validator-option": "^7.27.1", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "dependencies": { + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "requires": { + "yallist": "^3.0.2" + } + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + } } }, - "@babel/helper-environment-visitor": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", - "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", + "@babel/helper-globals": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", "dev": true }, - "@babel/helper-function-name": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", - "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", - "dev": true, - "requires": { - "@babel/template": "^7.22.15", - "@babel/types": "^7.23.0" - } - }, - "@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", - "dev": true, - "requires": { - "@babel/types": "^7.22.5" - } - }, "@babel/helper-module-imports": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", - "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", + "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==", "dev": true, "requires": { - "@babel/types": "^7.18.6" + "@babel/traverse": "^7.27.1", + "@babel/types": "^7.27.1" } }, "@babel/helper-module-transforms": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz", - "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.27.3.tgz", + "integrity": "sha512-dSOvYwvyLsWBeIRyOeHXp5vPj5l1I011r52FM1+r1jCERv+aFXYk4whgQccYEGYxK2H3ZAIA8nuPkQ0HaUo3qg==", "dev": true, "requires": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.18.6", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.0", - "@babel/types": "^7.19.0" + "@babel/helper-module-imports": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1", + "@babel/traverse": "^7.27.3" } }, "@babel/helper-plugin-utils": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz", - "integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz", + "integrity": "sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==", "dev": true }, - "@babel/helper-simple-access": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz", - "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==", - "dev": true, - "requires": { - "@babel/types": "^7.18.6" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", - "dev": true, - "requires": { - "@babel/types": "^7.22.5" - } - }, "@babel/helper-string-parser": { "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", @@ -6019,9 +6434,9 @@ "dev": true }, "@babel/helper-validator-option": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", - "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", + "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", "dev": true }, "@babel/helpers": { @@ -6070,6 +6485,24 @@ "@babel/helper-plugin-utils": "^7.12.13" } }, + "@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-import-attributes": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.27.1.tgz", + "integrity": "sha512-oFT0FrKHgF53f4vOsZGi2Hh3I35PfSmVs4IBFLFj4dnafP+hIWDLg3VyKmUHfLoLHlyxY4C7DGtmHuJgn+IGww==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.27.1" + } + }, "@babel/plugin-syntax-import-meta": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", @@ -6089,12 +6522,12 @@ } }, "@babel/plugin-syntax-jsx": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz", - "integrity": "sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.27.1.tgz", + "integrity": "sha512-y8YTNIeKoyhGd9O0Jiyzyyqk8gdjnumGTQPsz0xOZOQ2RmkVJeZ1vmmfIvFEKqucBG6axJGBZDE/7iI5suUI/w==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.27.1" } }, "@babel/plugin-syntax-logical-assignment-operators": { @@ -6151,6 +6584,15 @@ "@babel/helper-plugin-utils": "^7.8.0" } }, + "@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, "@babel/plugin-syntax-top-level-await": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", @@ -6161,12 +6603,12 @@ } }, "@babel/plugin-syntax-typescript": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz", - "integrity": "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.27.1.tgz", + "integrity": "sha512-xfYCBMxveHrRMnAWl1ZlPXOZjzkN82THFvLhQhFXFt81Z5HnN+EtUkZhv/zcKpmT3fzmWZB0ywiBrbC3vogbwQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.27.1" } }, "@babel/template": { @@ -6181,29 +6623,18 @@ } }, "@babel/traverse": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.3.tgz", - "integrity": "sha512-+K0yF1/9yR0oHdE0StHuEj3uTPzwwbrLGfNOndVJVV2TqA5+j3oljJUb4nmB954FLGjNem976+B+eDuLIjesiQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.3", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.3", - "@babel/types": "^7.23.3", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "dependencies": { - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true - } + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.0.tgz", + "integrity": "sha512-mGe7UK5wWyh0bKRfupsUchrQGqvDbZDbKJw+kcRGSmdHVYrv+ltd0pnpDTVpiTqnaBru9iEvA8pz8W46v0Amwg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.0", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.28.0", + "@babel/template": "^7.27.2", + "@babel/types": "^7.28.0", + "debug": "^4.3.1" } }, "@babel/types": { @@ -6222,6 +6653,27 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "dependencies": { + "@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + } + } + }, "@discoveryjs/json-ext": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", @@ -6373,124 +6825,124 @@ "dev": true }, "@jest/console": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.1.0.tgz", - "integrity": "sha512-yNoFMuAsXTP8OyweaMaIoa6Px6rJkbbG7HtgYKGP3CY7lE7ADRA0Fn5ad9O+KefKcaf6W9rywKpCWOw21WMsAw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", "dev": true, "requires": { - "@jest/types": "^29.1.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^29.1.0", - "jest-util": "^29.1.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", "slash": "^3.0.0" } }, "@jest/core": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.1.1.tgz", - "integrity": "sha512-ppym+PLiuSmvU9ufXVb/8OtHUPcjW+bBlb8CLh6oMATgJtCE3fjDYrzJi5u1uX8q9jbmtQ7VADKJKIlp68zi3A==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", "dev": true, "requires": { - "@jest/console": "^29.1.0", - "@jest/reporters": "^29.1.0", - "@jest/test-result": "^29.1.0", - "@jest/transform": "^29.1.0", - "@jest/types": "^29.1.0", + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "ci-info": "^3.2.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.0.0", - "jest-config": "^29.1.1", - "jest-haste-map": "^29.1.0", - "jest-message-util": "^29.1.0", - "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.1.0", - "jest-resolve-dependencies": "^29.1.1", - "jest-runner": "^29.1.1", - "jest-runtime": "^29.1.1", - "jest-snapshot": "^29.1.0", - "jest-util": "^29.1.0", - "jest-validate": "^29.1.0", - "jest-watcher": "^29.1.0", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", "micromatch": "^4.0.4", - "pretty-format": "^29.1.0", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "strip-ansi": "^6.0.0" } }, "@jest/environment": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.1.1.tgz", - "integrity": "sha512-69WULhTD38UcjvLGRAnnwC5hDt35ZC91ZwnvWipNOAOSaQNT32uKYL/TVCT3tncB9L1D++LOmBbYhTYP4TLuuQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", "dev": true, "requires": { - "@jest/fake-timers": "^29.1.1", - "@jest/types": "^29.1.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-mock": "^29.1.1" + "jest-mock": "^29.7.0" } }, "@jest/expect": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.1.0.tgz", - "integrity": "sha512-qWQttxE5rEwzvDW9G3f0o8chu1EKvIfsMQDeRlXMLCtsDS94ckcqEMNgbKKz0NYlZ45xrIoy+/pngt3ZFr/2zw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", "dev": true, "requires": { - "expect": "^29.1.0", - "jest-snapshot": "^29.1.0" + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" } }, "@jest/expect-utils": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.1.0.tgz", - "integrity": "sha512-YcD5CF2beqfoB07WqejPzWq1/l+zT3SgGwcqqIaPPG1DHFn/ea8MWWXeqV3KKMhTaOM1rZjlYplj1GQxR0XxKA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", "dev": true, "requires": { - "jest-get-type": "^29.0.0" + "jest-get-type": "^29.6.3" } }, "@jest/fake-timers": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.1.1.tgz", - "integrity": "sha512-5wTGObRfL/OjzEz0v2ShXlzeJFJw8mO6ByMBwmPLd6+vkdPcmIpCvASG/PR/g8DpchSIEeDXCxQADojHxuhX8g==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", "dev": true, "requires": { - "@jest/types": "^29.1.0", - "@sinonjs/fake-timers": "^9.1.2", + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", "@types/node": "*", - "jest-message-util": "^29.1.0", - "jest-mock": "^29.1.1", - "jest-util": "^29.1.0" + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" } }, "@jest/globals": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.1.1.tgz", - "integrity": "sha512-yTiusxeEHjXwmo3guWlN31a1harU8zekLBMlZpOZ+84rfO3HDrkNZLTfd/YaHF8CrwlNCFpDGNSQCH8WkklH/Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", "dev": true, "requires": { - "@jest/environment": "^29.1.1", - "@jest/expect": "^29.1.0", - "@jest/types": "^29.1.0", - "jest-mock": "^29.1.1" + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" } }, "@jest/reporters": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.1.0.tgz", - "integrity": "sha512-szSjHjVuBQ7aZUdBzTicCoQAAQsQFLk+/PtMfO0RQxL5mQ1iw+PSKOpyvMZcA5T6bH9pIapue5U9UCrxfOtL3w==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", "dev": true, "requires": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.1.0", - "@jest/test-result": "^29.1.0", - "@jest/transform": "^29.1.0", - "@jest/types": "^29.1.0", - "@jridgewell/trace-mapping": "^0.3.15", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", "@types/node": "*", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", @@ -6498,94 +6950,114 @@ "glob": "^7.1.3", "graceful-fs": "^4.2.9", "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-instrument": "^6.0.0", "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.1.0", - "jest-util": "^29.1.0", - "jest-worker": "^29.1.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", "slash": "^3.0.0", "string-length": "^4.0.1", "strip-ansi": "^6.0.0", - "terminal-link": "^2.0.0", "v8-to-istanbul": "^9.0.1" + }, + "dependencies": { + "istanbul-lib-instrument": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", + "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", + "dev": true, + "requires": { + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + } + }, + "semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true + } } }, "@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", "dev": true, "requires": { - "@sinclair/typebox": "^0.24.1" + "@sinclair/typebox": "^0.27.8" } }, "@jest/source-map": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.0.0.tgz", - "integrity": "sha512-nOr+0EM8GiHf34mq2GcJyz/gYFyLQ2INDhAylrZJ9mMWoW21mLBfZa0BUVPPMxVYrLjeiRe2Z7kWXOGnS0TFhQ==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", "dev": true, "requires": { - "@jridgewell/trace-mapping": "^0.3.15", + "@jridgewell/trace-mapping": "^0.3.18", "callsites": "^3.0.0", "graceful-fs": "^4.2.9" } }, "@jest/test-result": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.1.0.tgz", - "integrity": "sha512-RMBhPlw1Qfc2bKSf3RFPCyFSN7cfWVSTxRD8JrnvqdqgaDgrq4aGJT1A/V2+5Vq9bqBd187FpaxGTQ4zLrt08g==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", "dev": true, "requires": { - "@jest/console": "^29.1.0", - "@jest/types": "^29.1.0", + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" } }, "@jest/test-sequencer": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.1.0.tgz", - "integrity": "sha512-1diQfwNhBAte+x3TmyfWloxT1C8GcPEPEZ4BZjmELBK2j3cdqi0DofoJUxBDDUBBnakbv8ce0B7CIzprsupPSA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", "dev": true, "requires": { - "@jest/test-result": "^29.1.0", + "@jest/test-result": "^29.7.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.1.0", + "jest-haste-map": "^29.7.0", "slash": "^3.0.0" } }, "@jest/transform": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.1.0.tgz", - "integrity": "sha512-NI1zd62KgM0lW6rWMIZDx52dfTIDd+cnLQNahH0YhH7TVmQVigumJ6jszuhAzvKHGm55P2Fozcglb5sGMfFp3Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", "dev": true, "requires": { "@babel/core": "^7.11.6", - "@jest/types": "^29.1.0", - "@jridgewell/trace-mapping": "^0.3.15", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", + "convert-source-map": "^2.0.0", "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.1.0", - "jest-regex-util": "^29.0.0", - "jest-util": "^29.1.0", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", - "write-file-atomic": "^4.0.1" + "write-file-atomic": "^4.0.2" } }, "@jest/types": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.1.0.tgz", - "integrity": "sha512-lE30u3z4lbTOqf5D7fDdoco3Qd8H6F/t73nLOswU4x+7VhgDQMX5y007IMqrKjFHdnpslaYymVFhWX+ttXNARQ==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", "dev": true, "requires": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", "@types/node": "*", @@ -6619,7 +7091,7 @@ "version": "0.3.6", "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", - "devOptional": true, + "optional": true, "requires": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25" @@ -6629,7 +7101,7 @@ "version": "0.3.5", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", - "devOptional": true, + "optional": true, "requires": { "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -6639,15 +7111,15 @@ } }, "@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.4.tgz", + "integrity": "sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw==", "devOptional": true }, "@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "version": "0.3.29", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.29.tgz", + "integrity": "sha512-uw6guiW/gcAGPDhLmd77/6lW8QLeiV5RUTsAX46Db6oLhGaVj4lhnPwb184s1bkc8kdVg/+h988dro8GRDpmYQ==", "devOptional": true, "requires": { "@jridgewell/resolve-uri": "^3.1.0", @@ -6687,55 +7159,79 @@ "dev": true }, "@sinclair/typebox": { - "version": "0.24.43", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.43.tgz", - "integrity": "sha512-1orQTvtazZmsPeBroJjysvsOQCYV2yjWlebkSY38pl5vr2tdLjEJ+LoxITlGNZaH2RE19WlAwQMkH/7C14wLfw==", + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", "dev": true }, "@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", "dev": true, "requires": { "type-detect": "4.0.8" } }, "@sinonjs/fake-timers": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", - "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", "dev": true, "requires": { - "@sinonjs/commons": "^1.7.0" + "@sinonjs/commons": "^3.0.0" } }, + "@tsconfig/node10": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", + "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", + "dev": true + }, + "@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true + }, + "@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true + }, + "@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true + }, "@types/babel__core": { - "version": "7.1.19", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", - "integrity": "sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", "dev": true, "requires": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0", + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", "@types/babel__generator": "*", "@types/babel__template": "*", "@types/babel__traverse": "*" } }, "@types/babel__generator": { - "version": "7.6.4", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", - "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", "dev": true, "requires": { "@babel/types": "^7.0.0" } }, "@types/babel__template": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", - "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", "dev": true, "requires": { "@babel/parser": "^7.1.0", @@ -6743,33 +7239,33 @@ } }, "@types/babel__traverse": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.18.2.tgz", - "integrity": "sha512-FcFaxOr2V5KZCviw1TnutEMVUVsGt4D2hP1TAfXZAMKuHYW3xQhe3jTxNPWutgCJ3/X1c5yX8ZoGVEItxKbwBg==", + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.7.tgz", + "integrity": "sha512-dkO5fhS7+/oos4ciWxyEyjWe48zmG6wbCheo/G2ZnHx4fs3EU6YC6UM8rk56gAjNJ9P3MTH2jo5jb92/K6wbng==", "dev": true, "requires": { - "@babel/types": "^7.3.0" + "@babel/types": "^7.20.7" } }, "@types/estree": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "devOptional": true + "optional": true }, "@types/graceful-fs": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", - "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", "dev": true, "requires": { "@types/node": "*" } }, "@types/istanbul-lib-coverage": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", - "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", "dev": true }, "@types/istanbul-lib-report": { @@ -6782,9 +7278,9 @@ } }, "@types/istanbul-reports": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", - "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", "dev": true, "requires": { "@types/istanbul-lib-report": "*" @@ -6804,7 +7300,7 @@ "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "devOptional": true + "optional": true }, "@types/node": { "version": "22.16.4", @@ -6815,16 +7311,10 @@ "undici-types": "~6.21.0" } }, - "@types/prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow==", - "dev": true - }, "@types/stack-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", - "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", "dev": true }, "@types/ws": { @@ -6837,9 +7327,9 @@ } }, "@types/yargs": { - "version": "17.0.13", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.13.tgz", - "integrity": "sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg==", + "version": "17.0.33", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", + "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", "dev": true, "requires": { "@types/yargs-parser": "*" @@ -6982,16 +7472,16 @@ } }, "@ungap/structured-clone": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.1.tgz", - "integrity": "sha512-fEzPV3hSkSMltkw152tJKNARhOupqbH96MZWyRjNaYZOMIzbrTeQDG+MTc6Mr2pgzFQzFxAfmhGDNP5QK++2ZA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", + "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", "dev": true }, "@webassemblyjs/ast": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", - "devOptional": true, + "optional": true, "requires": { "@webassemblyjs/helper-numbers": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6" @@ -7001,25 +7491,25 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", - "devOptional": true + "optional": true }, "@webassemblyjs/helper-api-error": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", - "devOptional": true + "optional": true }, "@webassemblyjs/helper-buffer": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", - "devOptional": true + "optional": true }, "@webassemblyjs/helper-numbers": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", - "devOptional": true, + "optional": true, "requires": { "@webassemblyjs/floating-point-hex-parser": "1.11.6", "@webassemblyjs/helper-api-error": "1.11.6", @@ -7030,13 +7520,13 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", - "devOptional": true + "optional": true }, "@webassemblyjs/helper-wasm-section": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", - "devOptional": true, + "optional": true, "requires": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-buffer": "1.12.1", @@ -7048,7 +7538,7 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", - "devOptional": true, + "optional": true, "requires": { "@xtuc/ieee754": "^1.2.0" } @@ -7057,7 +7547,7 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", - "devOptional": true, + "optional": true, "requires": { "@xtuc/long": "4.2.2" } @@ -7066,13 +7556,13 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", - "devOptional": true + "optional": true }, "@webassemblyjs/wasm-edit": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", - "devOptional": true, + "optional": true, "requires": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-buffer": "1.12.1", @@ -7088,7 +7578,7 @@ "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", - "devOptional": true, + "optional": true, "requires": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", @@ -7101,7 +7591,7 @@ "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", - "devOptional": true, + "optional": true, "requires": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-buffer": "1.12.1", @@ -7113,7 +7603,7 @@ "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", - "devOptional": true, + "optional": true, "requires": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-api-error": "1.11.6", @@ -7127,7 +7617,7 @@ "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", - "devOptional": true, + "optional": true, "requires": { "@webassemblyjs/ast": "1.12.1", "@xtuc/long": "4.2.2" @@ -7160,19 +7650,19 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "devOptional": true + "optional": true }, "@xtuc/long": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "devOptional": true + "optional": true }, "abab": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", - "dev": true + "optional": true }, "acorn": { "version": "8.11.2", @@ -7184,7 +7674,7 @@ "version": "1.9.5", "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", - "devOptional": true, + "optional": true, "requires": {} }, "acorn-jsx": { @@ -7194,6 +7684,15 @@ "dev": true, "requires": {} }, + "acorn-walk": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "dev": true, + "requires": { + "acorn": "^8.11.0" + } + }, "ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -7210,7 +7709,7 @@ "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "devOptional": true, + "optional": true, "requires": {} }, "ansi-escapes": { @@ -7240,27 +7739,39 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, + "devOptional": true, "requires": { "color-convert": "^2.0.1" } }, "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "requires": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" } }, + "arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, "argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "dev": true + }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -7277,15 +7788,15 @@ } }, "babel-jest": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.1.0.tgz", - "integrity": "sha512-0XiBgPRhMSng+ThuXz0M/WpOeml/q5S4BFIaDS5uQb+lCjOzd0OfYEN4hWte5fDy7SZ6rNmEi16UpWGurSg2nQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", "dev": true, "requires": { - "@jest/transform": "^29.1.0", + "@jest/transform": "^29.7.0", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.0.2", + "babel-preset-jest": "^29.6.3", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "slash": "^3.0.0" @@ -7305,9 +7816,9 @@ } }, "babel-plugin-jest-hoist": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.0.2.tgz", - "integrity": "sha512-eBr2ynAEFjcebVvu8Ktx580BD1QKCrBG1XwEUTXJe285p9HA/4hOhfWCFRQhTKSyBV0VzjhG7H91Eifz9s29hg==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", "dev": true, "requires": { "@babel/template": "^7.3.3", @@ -7317,32 +7828,35 @@ } }, "babel-preset-current-node-syntax": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", - "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz", + "integrity": "sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==", "dev": true, "requires": { "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-meta": "^7.10.4", "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5" } }, "babel-preset-jest": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.0.2.tgz", - "integrity": "sha512-BeVXp7rH5TK96ofyEnHjznjLMQ2nAeDJ+QzxKnHAAMs0RgrQsCywjAN8m4mOm5Di0pxU//3AoEeJJrerMH5UeA==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", "dev": true, "requires": { - "babel-plugin-jest-hoist": "^29.0.2", + "babel-plugin-jest-hoist": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0" } }, @@ -7366,7 +7880,7 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, + "devOptional": true, "requires": { "fill-range": "^7.1.1" } @@ -7438,7 +7952,7 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, + "devOptional": true, "requires": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -7454,7 +7968,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", - "devOptional": true + "optional": true }, "ci-info": { "version": "3.4.0", @@ -7463,19 +7977,19 @@ "dev": true }, "cjs-module-lexer": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", - "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz", + "integrity": "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==", "dev": true }, "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, "requires": { "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", + "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" } }, @@ -7497,16 +8011,16 @@ "dev": true }, "collect-v8-coverage": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", - "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", "dev": true }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, + "devOptional": true, "requires": { "color-name": "~1.1.4" } @@ -7515,7 +8029,7 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "devOptional": true }, "colorette": { "version": "2.0.19", @@ -7535,7 +8049,7 @@ "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "devOptional": true + "optional": true }, "concat-map": { "version": "0.0.1", @@ -7544,14 +8058,32 @@ "dev": true }, "convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", "dev": true, "requires": { - "safe-buffer": "~5.1.1" + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" } }, + "create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true + }, "cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -7573,10 +8105,11 @@ } }, "dedent": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", - "dev": true + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.6.0.tgz", + "integrity": "sha512-F1Z+5UCFpmQUzJa11agbyPVMbpgT/qA3/SKyJ1jyBgm7dUcUEa8v9JwDkerSQXfakBwFljIxhOJqGkjUwZ9FSA==", + "dev": true, + "requires": {} }, "deep-is": { "version": "0.1.4", @@ -7585,9 +8118,9 @@ "dev": true }, "deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "dev": true }, "delayed-stream": { @@ -7601,10 +8134,16 @@ "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", "dev": true }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, "diff-sequences": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.0.0.tgz", - "integrity": "sha512-7Qe/zd1wxSDL4D/X/FPjOMB+ZMDt71W94KYaq05I2l0oQqgXgs7s4ftYYmV38gBSrPz2vcygxfs1xn0FT+rKNA==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", "dev": true }, "doctrine": { @@ -7626,6 +8165,15 @@ "gopd": "^1.2.0" } }, + "ejs": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", + "dev": true, + "requires": { + "jake": "^10.8.5" + } + }, "electron-to-chromium": { "version": "1.5.29", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.29.tgz", @@ -7633,9 +8181,9 @@ "devOptional": true }, "emittery": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", - "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", "dev": true }, "emoji-regex": { @@ -7648,7 +8196,7 @@ "version": "5.17.1", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", - "devOptional": true, + "optional": true, "requires": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -7683,7 +8231,7 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.4.1.tgz", "integrity": "sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==", - "devOptional": true + "optional": true }, "es-object-atoms": { "version": "1.1.1", @@ -7860,7 +8408,7 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "devOptional": true + "optional": true }, "execa": { "version": "5.1.1", @@ -7886,16 +8434,16 @@ "dev": true }, "expect": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.1.0.tgz", - "integrity": "sha512-1NCfR0FEArn9Vq1KEjhPd1rggRLiWgo87gfMK4iKn6DcVzJBRMyDNX22hyND5KiSRPIPQ5KtsY6HLxsQ0MU86w==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", "dev": true, "requires": { - "@jest/expect-utils": "^29.1.0", - "jest-get-type": "^29.0.0", - "jest-matcher-utils": "^29.1.0", - "jest-message-util": "^29.1.0", - "jest-util": "^29.1.0" + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" } }, "fast-deep-equal": { @@ -7979,11 +8527,40 @@ "flat-cache": "^3.0.4" } }, + "filelist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", + "dev": true, + "requires": { + "minimatch": "^5.0.1" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + } + } + }, "fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, + "devOptional": true, "requires": { "to-regex-range": "^5.0.1" } @@ -8038,9 +8615,9 @@ "dev": true }, "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "optional": true }, @@ -8126,7 +8703,7 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "devOptional": true + "optional": true }, "globals": { "version": "13.24.0", @@ -8206,7 +8783,7 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, + "optional": true, "requires": { "safer-buffer": ">= 2.1.2 < 3.0.0" } @@ -8228,9 +8805,9 @@ } }, "import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", "devOptional": true, "requires": { "pkg-dir": "^4.2.0", @@ -8311,7 +8888,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true + "devOptional": true }, "is-path-inside": { "version": "3.0.3", @@ -8372,13 +8949,13 @@ } }, "istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, "requires": { "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", + "make-dir": "^4.0.0", "supports-color": "^7.1.0" } }, @@ -8394,387 +8971,393 @@ } }, "istanbul-reports": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", - "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, "requires": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" } }, + "jake": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz", + "integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==", + "dev": true, + "requires": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" + } + }, "jest": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.1.1.tgz", - "integrity": "sha512-Doe41PZ8MvGLtOZIW2RIVu94wa7jm/N775BBloVXk/G/vV6VYnDCOxBwrqekEgrd3Pn/bv8b5UdB2x0pAoQpwQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", "dev": true, "requires": { - "@jest/core": "^29.1.1", - "@jest/types": "^29.1.0", + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", "import-local": "^3.0.2", - "jest-cli": "^29.1.1" + "jest-cli": "^29.7.0" } }, "jest-changed-files": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.0.0.tgz", - "integrity": "sha512-28/iDMDrUpGoCitTURuDqUzWQoWmOmOKOFST1mi2lwh62X4BFf6khgH3uSuo1e49X/UDjuApAj3w0wLOex4VPQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", "dev": true, "requires": { "execa": "^5.0.0", + "jest-util": "^29.7.0", "p-limit": "^3.1.0" } }, "jest-circus": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.1.1.tgz", - "integrity": "sha512-Ii+3JIeLF3z8j2E7fPSjPjXJLBdbAcZyfEiALRQ1Fk+FWTIfuEfZrZcjSaBdz/k/waoq+bPf9x/vBCXIAyLLEQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", "dev": true, "requires": { - "@jest/environment": "^29.1.1", - "@jest/expect": "^29.1.0", - "@jest/test-result": "^29.1.0", - "@jest/types": "^29.1.0", + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", - "dedent": "^0.7.0", + "dedent": "^1.0.0", "is-generator-fn": "^2.0.0", - "jest-each": "^29.1.0", - "jest-matcher-utils": "^29.1.0", - "jest-message-util": "^29.1.0", - "jest-runtime": "^29.1.1", - "jest-snapshot": "^29.1.0", - "jest-util": "^29.1.0", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", "p-limit": "^3.1.0", - "pretty-format": "^29.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" } }, "jest-cli": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.1.1.tgz", - "integrity": "sha512-nz/JNtqDFf49R2KgeZ9+6Zl1uxSuRsg/tICC+DHMh+bQ0co6QqBPWKg3FtW4534bs8/J2YqFC2Lct9DZR24z0Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", "dev": true, "requires": { - "@jest/core": "^29.1.1", - "@jest/test-result": "^29.1.0", - "@jest/types": "^29.1.0", + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "chalk": "^4.0.0", + "create-jest": "^29.7.0", "exit": "^0.1.2", - "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^29.1.1", - "jest-util": "^29.1.0", - "jest-validate": "^29.1.0", - "prompts": "^2.0.1", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "yargs": "^17.3.1" } }, "jest-config": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.1.1.tgz", - "integrity": "sha512-o2iZrQMOiF54zOw1kOcJGmfKzAW+V2ajZVWxbt+Ex+g0fVaTkk215BD/GFhrviuic+Xk7DpzUmdTT9c1QfsPqg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", "dev": true, "requires": { "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.1.0", - "@jest/types": "^29.1.0", - "babel-jest": "^29.1.0", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-circus": "^29.1.1", - "jest-environment-node": "^29.1.1", - "jest-get-type": "^29.0.0", - "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.1.0", - "jest-runner": "^29.1.1", - "jest-util": "^29.1.0", - "jest-validate": "^29.1.0", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "micromatch": "^4.0.4", "parse-json": "^5.2.0", - "pretty-format": "^29.1.0", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" } }, "jest-diff": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.1.0.tgz", - "integrity": "sha512-ZJyWG30jpVHwxLs8xxR1so4tz6lFARNztnFlxssFpQdakaW0isSx9rAKs/6aQUKQDZ/DgSpY6HjUGLO9xkNdRw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", "dev": true, "requires": { "chalk": "^4.0.0", - "diff-sequences": "^29.0.0", - "jest-get-type": "^29.0.0", - "pretty-format": "^29.1.0" + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" } }, "jest-docblock": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.0.0.tgz", - "integrity": "sha512-s5Kpra/kLzbqu9dEjov30kj1n4tfu3e7Pl8v+f8jOkeWNqM6Ds8jRaJfZow3ducoQUrf2Z4rs2N5S3zXnb83gw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", "dev": true, "requires": { "detect-newline": "^3.0.0" } }, "jest-each": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.1.0.tgz", - "integrity": "sha512-ELSZV/L4yjqKU2O0bnDTNHlizD4IRS9DX94iAB6QpiPIJsR453dJW7Ka7TXSmxQdc66HNNOhUcQ5utIeVCKGyA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", "dev": true, "requires": { - "@jest/types": "^29.1.0", + "@jest/types": "^29.6.3", "chalk": "^4.0.0", - "jest-get-type": "^29.0.0", - "jest-util": "^29.1.0", - "pretty-format": "^29.1.0" + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" } }, "jest-environment-node": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.1.1.tgz", - "integrity": "sha512-0nwTca4L2N8iM33A+JMfBdygR6B3N/bcPoLe1hEd9o87KLxDZwKGvpTGSfXpjtyqNQXiaL/3G+YOcSoeq/syPw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", "dev": true, "requires": { - "@jest/environment": "^29.1.1", - "@jest/fake-timers": "^29.1.1", - "@jest/types": "^29.1.0", + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-mock": "^29.1.1", - "jest-util": "^29.1.0" + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" } }, "jest-get-type": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.0.0.tgz", - "integrity": "sha512-83X19z/HuLKYXYHskZlBAShO7UfLFXu/vWajw9ZNJASN32li8yHMaVGAQqxFW1RCFOkB7cubaL6FaJVQqqJLSw==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", "dev": true }, "jest-haste-map": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.1.0.tgz", - "integrity": "sha512-qn+QVZ6JHzzx6g8XrMrNNvvIWrgVT6FzOoxTP5hQ1vEu6r9use2gOb0sSeC3Xle7eaDLN4DdAazSKnWskK3B/g==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", "dev": true, "requires": { - "@jest/types": "^29.1.0", + "@jest/types": "^29.6.3", "@types/graceful-fs": "^4.1.3", "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "fsevents": "^2.3.2", "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.0.0", - "jest-util": "^29.1.0", - "jest-worker": "^29.1.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", "micromatch": "^4.0.4", "walker": "^1.0.8" } }, "jest-leak-detector": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.1.0.tgz", - "integrity": "sha512-7ZdlIA2UXBIzXBNadta7pohrrvbD/Jp5T55Ux2DE1BSGul4RglIPHt7cZ0V3ll+ppBC1pGaBiWPBfLcQ2dDc3Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", "dev": true, "requires": { - "jest-get-type": "^29.0.0", - "pretty-format": "^29.1.0" + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" } }, "jest-matcher-utils": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.1.0.tgz", - "integrity": "sha512-pfthsLu27kZg+T1XTUGvox0r3gP3KtqdMPliVd/bs6iDrZ9Z6yJgLbw6zNc4DHtCcyzq9UW0jmszCX8DdFU/wA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", "dev": true, "requires": { "chalk": "^4.0.0", - "jest-diff": "^29.1.0", - "jest-get-type": "^29.0.0", - "pretty-format": "^29.1.0" + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" } }, "jest-message-util": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.1.0.tgz", - "integrity": "sha512-NzGXD9wgCxUy20sIvyOsSA/KzQmkmagOVGE5LnT2juWn+hB88gCQr8N/jpu34CXRIXmV7INwrQVVwhnh72pY5A==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", "dev": true, "requires": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.1.0", + "@jest/types": "^29.6.3", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^29.1.0", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" } }, "jest-mock": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.1.1.tgz", - "integrity": "sha512-vDe56JmImqt3j8pHcEIkahQbSCnBS49wda0spIl0bkrIM7VDZXjKaes6W28vKZye0atNAcFaj3dxXh0XWjBW4Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", "dev": true, "requires": { - "@jest/types": "^29.1.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-util": "^29.1.0" + "jest-util": "^29.7.0" } }, "jest-pnp-resolver": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", - "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", "dev": true, "requires": {} }, "jest-regex-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.0.0.tgz", - "integrity": "sha512-BV7VW7Sy0fInHWN93MMPtlClweYv2qrSCwfeFWmpribGZtQPWNvRSq9XOVgOEjU1iBGRKXUZil0o2AH7Iy9Lug==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", "dev": true }, "jest-resolve": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.1.0.tgz", - "integrity": "sha512-0IETuMI58nbAWwCrtX1QQmenstlWOEdwNS5FXxpEMAs6S5tttFiEoXUwGTAiI152nqoWRUckAgt21FP4wqeZWA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", "dev": true, "requires": { "chalk": "^4.0.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.1.0", + "jest-haste-map": "^29.7.0", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.1.0", - "jest-validate": "^29.1.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", + "resolve.exports": "^2.0.0", "slash": "^3.0.0" } }, "jest-resolve-dependencies": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.1.1.tgz", - "integrity": "sha512-AMRTJyiK8caRXq3pa9i4oXX6yH+am5v0HwCUq1yk9lxI3ARihyT2OfEySJJo3ER7xpxf3b6isfp1sO6PQY3N0Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", "dev": true, "requires": { - "jest-regex-util": "^29.0.0", - "jest-snapshot": "^29.1.0" + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" } }, "jest-runner": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.1.1.tgz", - "integrity": "sha512-HqazsMPXB62Zi2oJEl+Ta9aUWAaR4WdT7ow25pcS99PkOsWQoYH+yyaKbAHBUf8NOqPbZ8T4Q8gt8ZBFEJJdVQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", "dev": true, "requires": { - "@jest/console": "^29.1.0", - "@jest/environment": "^29.1.1", - "@jest/test-result": "^29.1.0", - "@jest/transform": "^29.1.0", - "@jest/types": "^29.1.0", + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", - "emittery": "^0.10.2", + "emittery": "^0.13.1", "graceful-fs": "^4.2.9", - "jest-docblock": "^29.0.0", - "jest-environment-node": "^29.1.1", - "jest-haste-map": "^29.1.0", - "jest-leak-detector": "^29.1.0", - "jest-message-util": "^29.1.0", - "jest-resolve": "^29.1.0", - "jest-runtime": "^29.1.1", - "jest-util": "^29.1.0", - "jest-watcher": "^29.1.0", - "jest-worker": "^29.1.0", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", "p-limit": "^3.1.0", "source-map-support": "0.5.13" } }, "jest-runtime": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.1.1.tgz", - "integrity": "sha512-DA2nW5GUAEFUOFztVqX6BOHbb1tUO1iDzlx+bOVdw870UIkv09u3P5nTfK3N+xtqy/fGlLsg7UCzhpEJnwKilg==", - "dev": true, - "requires": { - "@jest/environment": "^29.1.1", - "@jest/fake-timers": "^29.1.1", - "@jest/globals": "^29.1.1", - "@jest/source-map": "^29.0.0", - "@jest/test-result": "^29.1.0", - "@jest/transform": "^29.1.0", - "@jest/types": "^29.1.0", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "requires": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.1.0", - "jest-message-util": "^29.1.0", - "jest-mock": "^29.1.1", - "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.1.0", - "jest-snapshot": "^29.1.0", - "jest-util": "^29.1.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", "slash": "^3.0.0", "strip-bom": "^4.0.0" } }, "jest-snapshot": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.1.0.tgz", - "integrity": "sha512-nHZoA+hpbFlkyV8uLoLJQ/80DLi3c6a5zeELgfSZ5bZj+eljqULr79KBQakp5xyH3onezf4k+K+2/Blk5/1O+g==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", "dev": true, "requires": { "@babel/core": "^7.11.6", "@babel/generator": "^7.7.2", "@babel/plugin-syntax-jsx": "^7.7.2", "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.1.0", - "@jest/transform": "^29.1.0", - "@jest/types": "^29.1.0", - "@types/babel__traverse": "^7.0.6", - "@types/prettier": "^2.1.5", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^29.1.0", + "expect": "^29.7.0", "graceful-fs": "^4.2.9", - "jest-diff": "^29.1.0", - "jest-get-type": "^29.0.0", - "jest-haste-map": "^29.1.0", - "jest-matcher-utils": "^29.1.0", - "jest-message-util": "^29.1.0", - "jest-util": "^29.1.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", "natural-compare": "^1.4.0", - "pretty-format": "^29.1.0", - "semver": "^7.3.5" + "pretty-format": "^29.7.0", + "semver": "^7.5.3" }, "dependencies": { "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true } } }, "jest-util": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.1.0.tgz", - "integrity": "sha512-5haD8egMAEAq/e8ritN2Gr1WjLYtXi4udAIZB22GnKlv/2MHkbCjcyjgDBmyezAMMeQKGfoaaDsWCmVlnHZ1WQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", "dev": true, "requires": { - "@jest/types": "^29.1.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", @@ -8783,17 +9366,17 @@ } }, "jest-validate": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.1.0.tgz", - "integrity": "sha512-EQKRweSxmIJelCdirpuVkeCS1rSNXJFtSGEeSRFwH39QGioy7qKRSY8XBB4qFiappbsvgHnH0V6Iq5ASs11knA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", "dev": true, "requires": { - "@jest/types": "^29.1.0", + "@jest/types": "^29.6.3", "camelcase": "^6.2.0", "chalk": "^4.0.0", - "jest-get-type": "^29.0.0", + "jest-get-type": "^29.6.3", "leven": "^3.1.0", - "pretty-format": "^29.1.0" + "pretty-format": "^29.7.0" }, "dependencies": { "camelcase": { @@ -8805,28 +9388,29 @@ } }, "jest-watcher": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.1.0.tgz", - "integrity": "sha512-JXw7+VpLSf+2yfXlux1/xR65fMn//0pmiXd6EtQWySS9233aA+eGS+8Y5o2imiJ25JBKdG8T45+s78CNQ71Fbg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", "dev": true, "requires": { - "@jest/test-result": "^29.1.0", - "@jest/types": "^29.1.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "emittery": "^0.10.2", - "jest-util": "^29.1.0", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", "string-length": "^4.0.1" } }, "jest-worker": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.1.0.tgz", - "integrity": "sha512-yr7RFRAxI+vhL/cGB9B0FhD+QfaWh1qSxurx7gLP16dfmqhG8w75D/CQFU8ZetvhiQqLZh8X0C4rxwsZy6HITQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", "dev": true, "requires": { "@types/node": "*", + "jest-util": "^29.7.0", "merge-stream": "^2.0.0", "supports-color": "^8.0.0" }, @@ -8858,9 +9442,9 @@ } }, "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", "dev": true }, "json-parse-even-better-errors": { @@ -8925,7 +9509,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", - "devOptional": true + "optional": true }, "locate-path": { "version": "6.0.0", @@ -8952,18 +9536,26 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, + "optional": true, "requires": { "yallist": "^4.0.0" } }, "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", "dev": true, "requires": { - "semver": "^6.0.0" + "semver": "^7.5.3" + }, + "dependencies": { + "semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true + } } }, "make-error": { @@ -9002,7 +9594,7 @@ "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, + "devOptional": true, "requires": { "braces": "^3.0.3", "picomatch": "^2.3.1" @@ -9052,7 +9644,7 @@ "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "devOptional": true + "optional": true }, "node-int64": { "version": "0.4.0", @@ -9192,12 +9784,12 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true + "devOptional": true }, "pirates": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", - "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", + "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", "dev": true }, "pkg-dir": { @@ -9271,12 +9863,12 @@ } }, "pretty-format": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.1.0.tgz", - "integrity": "sha512-dZ21z0UjKVSiEkrPAt2nJnGfrtYMFBlNW4wTkJsIp9oB5A8SUQ8DuJ9EUgAvYyNfMeoGmKiDnpJvM489jkzdSQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "requires": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" }, @@ -9310,6 +9902,12 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "devOptional": true }, + "pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "dev": true + }, "queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -9320,15 +9918,15 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "devOptional": true, + "optional": true, "requires": { "safe-buffer": "^5.1.0" } }, "react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true }, "rechoir": { @@ -9381,9 +9979,9 @@ "dev": true }, "resolve.exports": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz", - "integrity": "sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.3.tgz", + "integrity": "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==", "dev": true }, "reusify": { @@ -9414,19 +10012,19 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "devOptional": true + "optional": true }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true + "optional": true }, "schema-utils": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "devOptional": true, + "optional": true, "requires": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", @@ -9443,7 +10041,7 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", - "devOptional": true, + "optional": true, "requires": { "randombytes": "^2.1.0" } @@ -9500,13 +10098,13 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", - "dev": true + "optional": true }, "source-map-loader": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-4.0.0.tgz", "integrity": "sha512-i3KVgM3+QPAHNbGavK+VBq03YoJl24m9JWNbLgsjTj8aJzXG9M61bantBTNBt7CNwY2FYf+RJRYJ3pzalKjIrw==", - "dev": true, + "optional": true, "requires": { "abab": "^2.0.6", "iconv-lite": "^0.6.3", @@ -9530,9 +10128,9 @@ "dev": true }, "stack-utils": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", - "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", "dev": true, "requires": { "escape-string-regexp": "^2.0.0" @@ -9598,21 +10196,11 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, + "devOptional": true, "requires": { "has-flag": "^4.0.0" } }, - "supports-hyperlinks": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", - "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", - "dev": true, - "requires": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - } - }, "supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -9633,23 +10221,13 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "devOptional": true - }, - "terminal-link": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", - "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", - "dev": true, - "requires": { - "ansi-escapes": "^4.2.1", - "supports-hyperlinks": "^2.0.0" - } + "optional": true }, "terser": { "version": "5.34.1", "resolved": "https://registry.npmjs.org/terser/-/terser-5.34.1.tgz", "integrity": "sha512-FsJZ7iZLd/BXkz+4xrRTGJ26o/6VTjQytUk8b8OxkwcD2I+79VPJlz7qss1+zE7h8GNIScFqXcDyJ/KqBYZFVA==", - "devOptional": true, + "optional": true, "requires": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.8.2", @@ -9661,7 +10239,7 @@ "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "devOptional": true, + "optional": true, "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -9673,7 +10251,7 @@ "version": "5.3.10", "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", - "devOptional": true, + "optional": true, "requires": { "@jridgewell/trace-mapping": "^0.3.20", "jest-worker": "^27.4.5", @@ -9686,7 +10264,7 @@ "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", - "devOptional": true, + "optional": true, "requires": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -9697,7 +10275,7 @@ "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "devOptional": true, + "optional": true, "requires": { "has-flag": "^4.0.0" } @@ -9731,7 +10309,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, + "devOptional": true, "requires": { "is-number": "^7.0.0" } @@ -9744,29 +10322,33 @@ "requires": {} }, "ts-jest": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.0.2.tgz", - "integrity": "sha512-P03IUItnAjG6RkJXtjjD5pu0TryQFOwcb1YKmW63rO19V0UFqL3wiXZrmR5D7qYjI98btzIOAcYafLZ0GHAcQg==", + "version": "29.4.0", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.0.tgz", + "integrity": "sha512-d423TJMnJGu80/eSgfQ5w/R+0zFJvdtTxwtF9KzFFunOpSeD+79lHJQIiAhluJoyGRbvj9NZJsl9WjCUo0ND7Q==", "dev": true, "requires": { - "bs-logger": "0.x", - "fast-json-stable-stringify": "2.x", - "jest-util": "^29.0.0", - "json5": "^2.2.1", - "lodash.memoize": "4.x", - "make-error": "1.x", - "semver": "7.x", - "yargs-parser": "^21.0.1" + "bs-logger": "^0.2.6", + "ejs": "^3.1.10", + "fast-json-stable-stringify": "^2.1.0", + "json5": "^2.2.3", + "lodash.memoize": "^4.1.2", + "make-error": "^1.3.6", + "semver": "^7.7.2", + "type-fest": "^4.41.0", + "yargs-parser": "^21.1.1" }, "dependencies": { "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true + }, + "type-fest": { + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", + "dev": true } } }, @@ -9774,7 +10356,7 @@ "version": "9.4.1", "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.4.1.tgz", "integrity": "sha512-384TYAqGs70rn9F0VBnh6BPTfhga7yFNdC5gXbQpDrBj9/KsT4iRkGqKXhziofHOlE2j6YEaiTYVGKKvPhGWvw==", - "dev": true, + "optional": true, "requires": { "chalk": "^4.1.0", "enhanced-resolve": "^5.0.0", @@ -9786,13 +10368,34 @@ "version": "7.5.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, + "optional": true, "requires": { "lru-cache": "^6.0.0" } } } }, + "ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dev": true, + "requires": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + } + }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -9824,7 +10427,7 @@ "version": "5.7.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", - "dev": true + "devOptional": true }, "undici-types": { "version": "6.21.0", @@ -9851,15 +10454,21 @@ "punycode": "^2.1.0" } }, + "v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true + }, "v8-to-istanbul": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", - "integrity": "sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==", + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", "dev": true, "requires": { "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0" + "convert-source-map": "^2.0.0" } }, "walker": { @@ -9875,7 +10484,7 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz", "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==", - "devOptional": true, + "optional": true, "requires": { "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.1.2" @@ -9885,7 +10494,7 @@ "version": "5.95.0", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.95.0.tgz", "integrity": "sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q==", - "devOptional": true, + "optional": true, "requires": { "@types/estree": "^1.0.5", "@webassemblyjs/ast": "^1.12.1", @@ -9916,7 +10525,7 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "devOptional": true, + "optional": true, "requires": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" @@ -9926,7 +10535,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "devOptional": true + "optional": true } } }, @@ -9972,7 +10581,7 @@ "version": "3.2.3", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "devOptional": true + "optional": true }, "which": { "version": "2.0.2", @@ -10038,21 +10647,21 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "optional": true }, "yargs": { - "version": "17.5.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", - "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==", + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, "requires": { - "cliui": "^7.0.2", + "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" + "yargs-parser": "^21.1.1" } }, "yargs-parser": { @@ -10061,6 +10670,12 @@ "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true }, + "yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true + }, "yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index 8dd089a..df74392 100644 --- a/package.json +++ b/package.json @@ -49,13 +49,14 @@ "eslint-plugin-prettier": "^5.2.1", "eslint-plugin-require-extensions": "^0.1.3", "eslint-plugin-simple-import-sort": "^12.1.1", - "jest": "^29.1.1", - "source-map-loader": "^4.0.0", - "ts-jest": "^29.0.2", - "ts-loader": "^9.4.1", + "jest": "^29.7.0", + "ts-jest": "^29.4.0", + "ts-node": "^10.9.2", "typescript": "^5.7.3" }, "optionalDependencies": { + "source-map-loader": "^4.0.0", + "ts-loader": "^9.4.1", "webpack": "^5.74.0", "webpack-cli": "^4.10.0" }, From 88a0f39e686db37364978f985f9631f141fc85a8 Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Thu, 24 Jul 2025 12:01:45 +0100 Subject: [PATCH 53/57] chore(): update imports in tests --- test/response.util.ts | 2 +- test/v1/futures/public.test.ts | 4 ++-- test/v1/ws.private.test.ts | 8 ++++++-- test/v1/ws.public.test.ts | 8 ++++++-- test/v2/private.read.test.ts | 6 +++--- test/v2/private.write.test.ts | 6 +++--- test/v2/public.test.ts | 4 ++-- test/ws.util.ts | 8 ++++---- 8 files changed, 27 insertions(+), 19 deletions(-) diff --git a/test/response.util.ts b/test/response.util.ts index 9e80c44..76307d6 100644 --- a/test/response.util.ts +++ b/test/response.util.ts @@ -1,4 +1,4 @@ -import { API_ERROR_CODE } from '../src'; +import { API_ERROR_CODE } from '../src/index.js'; const SUCCESS_MSG_REGEX = /success/gim; diff --git a/test/v1/futures/public.test.ts b/test/v1/futures/public.test.ts index f3259d8..4e8d075 100644 --- a/test/v1/futures/public.test.ts +++ b/test/v1/futures/public.test.ts @@ -1,5 +1,5 @@ -import { FuturesClient } from '../../../src'; -import { sucessEmptyResponseObject } from '../../response.util'; +import { FuturesClient } from '../../../src/index.js'; +import { sucessEmptyResponseObject } from '../../response.util.js'; describe('Public Spot REST API Endpoints', () => { const api = new FuturesClient(); diff --git a/test/v1/ws.private.test.ts b/test/v1/ws.private.test.ts index ad5f036..52206ef 100644 --- a/test/v1/ws.private.test.ts +++ b/test/v1/ws.private.test.ts @@ -3,8 +3,12 @@ import { WS_ERROR_ENUM, WS_KEY_MAP, WSClientConfigurableOptions, -} from '../../src'; -import { getSilentLogger, logAllEvents, waitForSocketEvent } from '../ws.util'; +} from '../../src/index.js'; +import { + getSilentLogger, + logAllEvents, + waitForSocketEvent, +} from '../ws.util.js'; describe.skip('Private Spot Websocket Client', () => { const API_KEY = process.env.API_KEY_COM; diff --git a/test/v1/ws.public.test.ts b/test/v1/ws.public.test.ts index 5f5f660..528333e 100644 --- a/test/v1/ws.public.test.ts +++ b/test/v1/ws.public.test.ts @@ -2,8 +2,12 @@ import { WebsocketClientLegacyV1, WS_KEY_MAP, WSClientConfigurableOptions, -} from '../../src'; -import { getSilentLogger, logAllEvents, waitForSocketEvent } from '../ws.util'; +} from '../../src/index.js'; +import { + getSilentLogger, + logAllEvents, + waitForSocketEvent, +} from '../ws.util.js'; describe('Public Spot Websocket Client', () => { let wsClient: WebsocketClientLegacyV1; diff --git a/test/v2/private.read.test.ts b/test/v2/private.read.test.ts index b36076e..1eb7a05 100644 --- a/test/v2/private.read.test.ts +++ b/test/v2/private.read.test.ts @@ -1,9 +1,9 @@ -import { API_ERROR_CODE } from '../../src'; -import { RestClientV2 } from '../../src/rest-client-v2'; +import { API_ERROR_CODE } from '../../src/index.js'; +import { RestClientV2 } from '../../src/rest-client-v2.js'; import { errorResponseObjectV3, sucessEmptyResponseObject, -} from '../response.util'; +} from '../response.util.js'; describe('Bitget Private REST API Read Endpoints', () => { const API_KEY = process.env.API_KEY_COM; diff --git a/test/v2/private.write.test.ts b/test/v2/private.write.test.ts index ccd51a9..8da16ff 100644 --- a/test/v2/private.write.test.ts +++ b/test/v2/private.write.test.ts @@ -1,9 +1,9 @@ -import { API_ERROR_CODE } from '../../src'; -import { RestClientV2 } from '../../src/rest-client-v2'; +import { API_ERROR_CODE } from '../../src/index.js'; +import { RestClientV2 } from '../../src/rest-client-v2.js'; import { errorResponseObjectV3, sucessEmptyResponseObject, -} from '../response.util'; +} from '../response.util.js'; describe('Bitget Private REST API Write Endpoints', () => { const API_KEY = process.env.API_KEY_COM; diff --git a/test/v2/public.test.ts b/test/v2/public.test.ts index e33e5d3..68be21b 100644 --- a/test/v2/public.test.ts +++ b/test/v2/public.test.ts @@ -1,5 +1,5 @@ -import { RestClientV2 } from '../../src/rest-client-v2'; -import { sucessEmptyResponseObject } from '../response.util'; +import { RestClientV2 } from '../../src/rest-client-v2.js'; +import { sucessEmptyResponseObject } from '../response.util.js'; describe('Bitget Public REST API Endpoints', () => { const api = new RestClientV2(); diff --git a/test/ws.util.ts b/test/ws.util.ts index 985b141..4f69ea6 100644 --- a/test/ws.util.ts +++ b/test/ws.util.ts @@ -2,7 +2,7 @@ import { DefaultLogger, WebsocketClientLegacyV1 } from '../src/index.js'; // eslint-disable-next-line @typescript-eslint/no-unused-vars -export function getSilentLogger(logHint?: string): DefaultLogger { +export function getSilentLogger(_logHint?: string): DefaultLogger { return { trace: () => {}, info: () => {}, @@ -105,7 +105,7 @@ export function listenToSocketEvents(wsClient: WebsocketClientLegacyV1) { } export function logAllEvents(wsClient: WebsocketClientLegacyV1) { - wsClient.on('update', (data) => { + wsClient.on('update', (_data) => { // console.log('wsUpdate: ', JSON.stringify(data, null, 2)); }); @@ -121,13 +121,13 @@ export function logAllEvents(wsClient: WebsocketClientLegacyV1) { wsClient.on('reconnected', (data) => { console.log('wsReconnected ', data?.wsKey); }); - wsClient.on('close', (data) => { + wsClient.on('close', (_data) => { // console.log('wsClose: ', data); }); } export function promiseSleep(ms: number) { - return new Promise((resolve, reject) => { + return new Promise((resolve, _reject) => { setTimeout(resolve, ms); }); } From a82a8fde652ea93ea90932fa7964d8738706b1be Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Thu, 24 Jul 2025 12:03:46 +0100 Subject: [PATCH 54/57] chore(): eslint comment --- .eslintrc.cjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 7bd067c..422737f 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -8,12 +8,12 @@ module.exports = { plugins: [ '@typescript-eslint/eslint-plugin', 'simple-import-sort', - 'require-extensions', // only once moved to ESM + 'require-extensions', ], extends: [ 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended', - 'plugin:require-extensions/recommended', // only once moved to ESM + 'plugin:require-extensions/recommended', ], root: true, env: { From e1ac734de3f9a5926f9e53815db31817653bd796 Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Thu, 24 Jul 2025 12:24:00 +0100 Subject: [PATCH 55/57] chore(): remove old build command --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index df74392..7bc4b49 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,6 @@ "test:private": "jest --testPathPattern='.*private.*'", "clean": "rm -rf lib dist", "build": "npm run clean && tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && bash ./postBuild.sh", - "build:old": "tsc", "build:clean": "npm run clean && npm run build", "build:watch": "npm run clean && tsc --watch", "pack": "webpack --config webpack/webpack.config.js", From 72c41239b7197081ccc39ad727eec68b1244ba19 Mon Sep 17 00:00:00 2001 From: JJ-Cro Date: Thu, 24 Jul 2025 13:58:04 +0200 Subject: [PATCH 56/57] feat(): added env vars to git action --- .github/workflows/e2etests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/e2etests.yml b/.github/workflows/e2etests.yml index 90a8c89..0544eae 100644 --- a/.github/workflows/e2etests.yml +++ b/.github/workflows/e2etests.yml @@ -41,3 +41,6 @@ jobs: API_KEY_COM: ${{ secrets.API_KEY_COM }} API_SECRET_COM: ${{ secrets.API_SECRET_COM }} API_PASS_COM: ${{ secrets.API_PASS_COM }} + API_KEY_COM_V3: ${{ secrets.API_KEY_COM_V3 }} + API_SECRET_COM_V3: ${{ secrets.API_SECRET_COM_V3 }} + API_PASS_COM_V3: ${{ secrets.API_PASS_COM_V3 }} From ee8e4194eae718135180a29de493af7cf27df7d9 Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Thu, 24 Jul 2025 13:12:45 +0100 Subject: [PATCH 57/57] chore(): fix tsconfig baseUrl --- tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index 7d2ba18..efaa5ec 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "allowSyntheticDefaultImports": true, - "baseUrl": "src", + "baseUrl": ".", "noEmitOnError": true, "declaration": true, "esModuleInterop": true,