import * as functions from './functions.js'; import WsClient from './ws/WsClient.js'; import type Client from './ws/Client.js'; import { type FutureInterface } from './ws/Future.js'; import { WsOrderBook, IndexedOrderBook, CountedOrderBook } from './ws/OrderBook.js'; import type { Market, Trade, Ticker, OHLCV, OHLCVC, Order, OrderBook, Balance, Balances, Dictionary, Transaction, Currency, MinMax, IndexType, NullableIndexType, Int, OrderType, OrderSide, Position, FundingRate, DepositWithdrawFee, DepositWithdrawFees, LedgerEntry, BorrowInterest, OpenInterest, LeverageTier, TransferEntry, FundingRateHistory, Liquidation, FundingHistory, OrderRequest, MarginMode, Tickers, Greeks, Option, OptionChain, Str, Num, MarketInterface, CurrencyInterface, BalanceAccount, MarginModes, MarketType, Leverage, Leverages, LastPrice, LastPrices, Account, Strings, MarginModification, TradingFeeInterface, Currencies, TradingFees, Conversion, CancellationRequest, IsolatedBorrowRate, IsolatedBorrowRates, CrossBorrowRates, CrossBorrowRate, Dict, FundingRates, LeverageTiers, Bool, int, DepositAddress, LongShortRatio, OrderBooks, OpenInterests, ConstructorArgs, ADL, NullableDict, SubType, NestedDictionary, List, NullableList, Status, PositionModeInfo, MarginLoan, AllGreeks, DepositAddresses } from './types.js'; import { ArrayCache, ArrayCacheByTimestamp } from './ws/Cache.js'; export type { Market, Trade, Fee, Ticker, OHLCV, OHLCVC, Order, OrderBook, Balance, Balances, Dictionary, Transaction, Currency, MinMax, IndexType, NullableIndexType, Int, Bool, OrderType, OrderSide, Position, LedgerEntry, BorrowInterest, OpenInterest, LeverageTier, TransferEntry, CrossBorrowRate, FundingRateHistory, Liquidation, FundingHistory, OrderRequest, MarginMode, Tickers, Greeks, Option, OptionChain, Str, Num, MarketInterface, CurrencyInterface, BalanceAccount, MarginModes, MarketType, Leverage, Leverages, LastPrice, LastPrices, Account, Strings, Conversion, DepositAddress, LongShortRatio, ADL } from './types.js'; /** * @class Exchange */ export declare class BaseExchange { [key: string]: any; static ccxtVersion: string; options: Dict; isSandboxModeEnabled: boolean; api: Dictionary; certified: boolean; pro: boolean; countries: Strings; proxy: any; proxyUrl: Str; proxy_url: Str; proxyUrlCallback: any; proxy_url_callback: any; httpProxy: Str; http_proxy: Str; httpProxyCallback: any; http_proxy_callback: any; httpsProxy: Str; https_proxy: Str; httpsProxyCallback: any; https_proxy_callback: any; socksProxy: Str; socks_proxy: Str; socksProxyCallback: any; socks_proxy_callback: any; userAgent: { 'User-Agent': string; } | false | undefined; user_agent: { 'User-Agent': string; } | false | undefined; wsProxy: Str; ws_proxy: Str; wssProxy: Str; wss_proxy: Str; wsSocksProxy: Str; ws_socks_proxy: Str; userAgents: Dictionary; headers: Dictionary; returnResponseHeaders: boolean; origin: string; MAX_VALUE: number; agent: any; httpAgent: any; httpsAgent: any; minFundingAddressLength: number; substituteCommonCurrencyCodes: boolean; quoteJsonNumbers: boolean; number: (numberString: string) => number; handleContentTypeApplicationZip: boolean; reduceFees: boolean; fetchImplementation: any; AbortError: any; FetchError: any; fetchImplementationLoading?: Promise; fetchIsNative: boolean; undiciModule: any; zlibModule: any; httpStatusTexts: Dict; fetchDispatcher: any; validateServerSsl: boolean; validateClientSsl: boolean; timeout: number; verbose: boolean; apiKey: string; secret: string; uid: string; login: string; password: string; privateKey: string; walletAddress: string; token: string; twofa: string; accountId: string; balance: Dict; liquidations: any; orderbooks: Dictionary; tickers: Dictionary; fundingRates: Dictionary; bidsasks: Dictionary; orders: ArrayCache | undefined; triggerOrders: ArrayCache; trades: Dictionary; transactions: Dictionary; ohlcvs: Dictionary>; myLiquidations: any; myTrades: ArrayCache | undefined; positions: any; urls: { logo?: string; api: NestedDictionary; test: NestedDictionary; www?: string; doc?: string[]; api_management?: string; fees?: string; referral?: string; [key: string]: any; }; requiresWeb3: boolean; precision: { amount: Num; price: Num; cost?: Num; base?: Num; quote?: Num; }; enableLastJsonResponse: boolean; enableLastHttpResponse: boolean; enableLastResponseHeaders: boolean; last_http_response: string | undefined; last_json_response: any; last_response_headers: Dictionary | undefined; last_request_headers: Dictionary | undefined; last_request_body: any; last_request_url: Str; last_request_path: Str; fetchHistoryCache: Dictionary[]; fetchHistoryCacheSize: number; id: string; markets: Dictionary | undefined; has: Dictionary; features: Dictionary | undefined>; status: { status: Str; updated: Num; eta: Num; url: Str; info: any; }; requiredCredentials: { apiKey: Bool; secret: Bool; uid: Bool; login: Bool; password: Bool; twofa: Bool; privateKey: Bool; walletAddress: Bool; token: Bool; [key: string]: Bool; }; rateLimit: Num; tokenBucket: Dictionary; throttler: any; enableRateLimit: boolean; rollingWindowSize: number; rateLimiterAlgorithm: string; httpExceptions: Dictionary; limits: { amount?: MinMax; cost?: MinMax; leverage?: MinMax; price?: MinMax; }; fees: { trading: { tierBased: Bool; percentage: Bool; taker: Num; maker: Num; }; funding: { tierBased: Bool; percentage: Bool; withdraw: {}; deposit: {}; }; }; markets_by_id: Dictionary | undefined; symbols: string[]; ids: Strings; currencies: Currencies; baseCurrencies: Dictionary | undefined; quoteCurrencies: Dictionary | undefined; currencies_by_id: Dictionary | undefined; codes: Strings; reloadingMarkets: Bool; marketsLoading: Promise>; accounts: Account[]; accountsById: Dictionary; commonCurrencies: Dictionary; hostname: Str; precisionMode: Int; paddingMode: Int; exceptions: Dict; timeframes: Dictionary; version: Str; name: Str; lastRestRequestTimestamp: int; targetAccount: string; httpProxyAgentModule: any; httpsProxyAgentModule: any; socksProxyAgentModule: any; socksProxyAgentModuleChecked: boolean; proxyDictionaries: Dictionary; proxyDictionariesMaxSize: number; proxiesModulesLoading?: Promise; alias: boolean; clients: Dictionary; newUpdates: boolean; streaming: Dictionary; sleep: typeof functions.sleep; deepExtend: typeof functions.deepExtend; deepExtendSafe: typeof functions.deepExtend; isNode: boolean; extend: typeof functions.extend; clone: typeof functions.clone; unique: typeof functions.unique; indexBy: typeof functions.indexBy; indexBySafe: typeof functions.indexBy; roundTimeframe: typeof functions.roundTimeframe; sortBy: typeof functions.sortBy; sortBy2: typeof functions.sortBy2; groupBy: typeof functions.groupBy; aggregate: typeof functions.aggregate; uuid: typeof functions.uuid; unCamelCase: typeof functions.unCamelCase; precisionFromString: typeof functions.precisionFromString; capitalize: typeof functions.capitalize; now: () => number; decimalToPrecision: typeof functions.decimalToPrecision; safeValue: typeof functions.safeValue; safeValue2: typeof functions.safeValue2; safeString: typeof functions.safeString; safeString2: typeof functions.safeString2; safeFloat: typeof functions.safeFloat; safeFloat2: typeof functions.safeFloat2; seconds: typeof functions.seconds; milliseconds: () => number; binaryToBase16: (data: Uint8Array) => string; numberToBE: typeof functions.numberToBE; base16ToBinary: (str: string) => Uint8Array; iso8601: typeof functions.iso8601; omit: typeof functions.omit; isJsonEncodedObject: typeof functions.isJsonEncodedObject; safeInteger: typeof functions.safeInteger; sum: typeof functions.sum; omitZero: typeof functions.omitZero; implodeParams: typeof functions.implodeParams; extractParams: typeof functions.extractParams; json: typeof functions.json; binaryConcat: (...arrays: import("@noble/curves/utils.js").TArg) => import("@noble/curves/utils.js").TRet; hash: typeof functions.hash; arrayConcat: typeof functions.arrayConcat; encode: (str: string) => Uint8Array; urlencode: typeof functions.urlencode; hmac: typeof functions.hmac; numberToString: typeof functions.numberToString; parseTimeframe: typeof functions.parseTimeframe; safeInteger2: typeof functions.safeInteger2; safeStringLower: typeof functions.safeStringLower; parse8601: typeof functions.parse8601; yyyymmdd: typeof functions.yyyymmdd; safeStringUpper: typeof functions.safeStringUpper; safeTimestamp: typeof functions.safeTimestamp; binaryConcatArray: typeof functions.binaryConcatArray; ymdhms: typeof functions.ymdhms; yymmdd: typeof functions.yymmdd; stringToBase64: typeof functions.stringToBase64; decode: (data: Uint8Array) => string; uuid22: typeof functions.uuid22; safeIntegerProduct2: typeof functions.safeIntegerProduct2; safeIntegerProduct: typeof functions.safeIntegerProduct; binaryToBase58: (data: Uint8Array) => string; base58ToBinary: (str: string) => Uint8Array; base64ToBinary: (str: string) => Uint8Array; safeTimestamp2: typeof functions.safeTimestamp2; rawencode: typeof functions.rawencode; keysort: typeof functions.keysort; sort: typeof functions.sort; inArray: typeof functions.inArray; safeStringLower2: typeof functions.safeStringLower2; safeStringUpper2: typeof functions.safeStringUpper2; isEmpty: typeof functions.isEmpty; filterBy: typeof functions.filterBy; uuid16: typeof functions.uuid16; urlencodeWithArrayRepeat: typeof functions.urlencodeWithArrayRepeat; microseconds: typeof functions.microseconds; binaryToBase64: (data: Uint8Array) => string; strip: typeof functions.strip; toArray: typeof functions.toArray; safeFloatN: typeof functions.safeFloatN; safeIntegerN: typeof functions.safeIntegerN; safeIntegerProductN: typeof functions.safeIntegerProductN; safeTimestampN: typeof functions.safeTimestampN; safeValueN: typeof functions.safeValueN; safeStringN: typeof functions.safeStringN; safeStringLowerN: typeof functions.safeStringLowerN; safeStringUpperN: typeof functions.safeStringUpperN; urlencodeNested: typeof functions.urlencodeNested; parseDate: typeof functions.parseDate; ymd: typeof functions.ymd; base64ToString: typeof functions.base64ToString; crc32: typeof functions.crc32; packb: typeof functions.packb; urlencodeBase64: typeof functions.urlencodeBase64; readFile: typeof functions.readFile; writeFile: typeof functions.writeFile; existsFile: typeof functions.existsFile; getTempDir: typeof functions.getTempDir; constructor(userConfig?: ConstructorArgs); loadExchangeSpecificFiles(): Promise; uuid5(namespace: string, name: string): string; encodeURIComponent(...args: any[]): string; /** * @method * @name Exchange#getCcxtVersion * @description returns the version of the ccxt library, e.g. "4.5.54", or "unknown" when the version constant is not initialized (e.g. when an exchange module is imported directly, bypassing the ccxt entry point) * @returns {string} the semver version of the ccxt library, or "unknown" when unavailable */ getCcxtVersion(): string; throttle(cost?: Num): any; initThrottler(): void; log(...args: any[]): void; loadProxyModules(): Promise; setProxyAgents(httpProxy: any, httpsProxy: any, socksProxy: any): any; loadHttpProxyAgent(): Promise; getHttpAgentIfNeeded(url: any): any; addFetchCache(data: any): void; getFetchCache(): Dict[]; isBinaryMessage(msg: any): boolean; stringToBinary(content: any): Uint8Array; binaryToString(binary: any): string; decodeProtoMsg(data: any): any; /** * @ignore * @method * @name Exchange#loadFetchImplementation * @description resolves the fetch implementation once per instance - the platform-native fetch is used everywhere (undici in node, native fetch in bun / browsers / deno), a user-supplied this.fetchImplementation always takes precedence * @returns {Promise} a promise that resolves when the fetch client is ready */ loadFetchImplementation(): Promise; /** * @ignore * @method * @name Exchange#getDispatcherOptions * @description builds keep-alive-tuned undici dispatcher options - every in-flight request gets its own socket (no pipelining, no h2 multiplexing), idle sockets are kept alive for reuse because exchanges are polled on the same origins repeatedly - dual-stack is explicit: autoSelectFamily enables the happy eyeballs (rfc 8305) address-family racing so ipv6 and ipv4 are both attempted (off by default on node 18), without forcing either family * @param {boolean} [isPlainAgent] true for undici.Agent options ('connect' tls shape), false for undici.ProxyAgent options ('requestTls' shape) * @returns {object} undici dispatcher options */ getDispatcherOptions(isPlainAgent?: boolean): Dict; /** * @ignore * @method * @name Exchange#shouldValidateServerSsl * @description whether server certificates should be validated, honoring both this.validateServerSsl and legacy agents constructed with rejectUnauthorized false * @returns {boolean} true when server ssl certificates must be validated */ shouldValidateServerSsl(): boolean; /** * @ignore * @method * @name Exchange#extractProxyFromAgent * @description backwards compatibility helper - http-proxy-agent, https-proxy-agent and socks-proxy-agent instances all carry their target on a `proxy` property (URL object or string), extract it so it can be passed to the native fetch * @param {object} [agent] a legacy proxy-carrying agent object * @returns {string|undefined} the proxy url, or undefined when the agent does not carry one */ extractProxyFromAgent(agent: any): any; /** * @ignore * @method * @name Exchange#cacheProxyDictionary * @description stores a per-proxy-url transport handle (undici dispatcher or legacy node-style agent) in this.proxyDictionaries, evicting the oldest entry beyond proxyDictionariesMaxSize so rotating-proxy setups cannot grow the cache without bound - evicted or replaced undici dispatchers are closed gracefully (in-flight requests finish first), legacy agents are just dropped because live ws connections may still hold them * @param {string} proxyUrl the proxy url the handle serves * @param {any} value an undici dispatcher or a node-style agent * @returns {any} the cached value */ cacheProxyDictionary(proxyUrl: any, value: any): any; /** * @ignore * @method * @name Exchange#releaseProxyDictionaryEntry * @description closes an undici dispatcher that left this.proxyDictionaries - close () drains in-flight requests before releasing sockets, and any close failure is irrelevant because the dispatcher is already unreferenced; legacy node-style agents are left untouched (never destroyed, matching the long-standing behavior, because live ws connections may still use them) * @param {any} entry the evicted or replaced proxyDictionaries value */ releaseProxyDictionaryEntry(entry: any): void; /** * @ignore * @method * @name Exchange#getFetchProxyDispatcher * @description returns a cached undici ProxyAgent dispatcher for the given proxy url - undici handles http, https, socks5 and socks schemes natively; dispatchers share this.proxyDictionaries with the legacy node-style agents (entries are distinguished by the 'dispatch' method) and the cache is FIFO-capped at proxyDictionariesMaxSize entries so rotating-proxy setups cannot grow it without bound * @param {string} proxyUrl the proxy url, e.g. http://user:pass@host:port or socks5://host:port * @returns {any} an undici dispatcher */ getFetchProxyDispatcher(proxyUrl: any): any; /** * @ignore * @method * @name Exchange#undiciRequest * @description dispatches through the low-level undici.request api and adapts the result to the minimal fetch-Response surface that handleRestResponse consumes - profiled ~2x faster end-to-end than undici.fetch (node streams instead of the WHATWG Response/Headers/web-streams machinery) * @param {string} url the request url * @param {object} params fetch-style request params ('method', 'headers', 'body', 'signal', 'dispatcher') * @returns {Promise} an object with 'status', 'statusText', 'headers' (plain object), 'text' and 'arrayBuffer' methods */ undiciRequest(url: any, params: any): Promise<{ status: any; statusText: any; headers: any; text: () => Promise; arrayBuffer: () => Promise; }>; /** * @ignore * @method * @name Exchange#undiciBody * @description reads an undici.request response body, transparently decompressing gzip/br/deflate content-encodings via node:zlib (undici.request performs no decompression, unlike fetch) * @param {object} res an undici.request response * @param {boolean} [binary] true to return a Buffer, false to return a utf8 string * @returns {Promise} the response body */ undiciBody(res: any, binary?: boolean): Promise; /** * @ignore * @method * @name Exchange#setFetchProxyOptions * @description attaches per-platform proxy transport options to the native fetch request params - undici dispatcher on node, the built-in `proxy` option on bun; the shared keep-alive dispatcher is attached when no proxy applies * @param {object} params the fetch RequestInit params, mutated in place * @param {string} [httpProxy] unified httpProxy setting * @param {string} [httpsProxy] unified httpsProxy setting * @param {string} [socksProxy] unified socksProxy setting */ setFetchProxyOptions(params: any, httpProxy: any, httpsProxy: any, socksProxy: any): void; fetch(url: any, method?: string, headers?: any, body?: any): Promise; jsonStringifyWithNull(obj: any): string; hasUnsafeInteger(value: any): boolean; parseJson(jsonString: any): any; getResponseHeaders(response: any): Dict; handleRestResponse(response: any, url: any, method?: string, requestHeaders?: any, requestBody?: any): any; onRestResponse(statusCode: any, statusText: any, url: any, method: any, responseHeaders: any, responseBody: any, requestHeaders: any, requestBody: any): any; onJsonResponse(responseBody: any): any; loadMarketsHelper(reload?: boolean, params?: Dict): Promise>; /** * @method * @name Exchange#loadMarkets * @description Loads and prepares the markets for trading. * @param {boolean} reload - If true, the markets will be reloaded from the exchange. * @param {object} params - Additional exchange-specific parameters for the request. * @returns A promise that resolves to a dictionary of markets. * @throws An error if the markets cannot be loaded or prepared. * @remarks This method is asynchronous and returns a promise. * It ensures that the markets are only loaded once, even if the method is called multiple times. * If the markets are already loaded and not reloading, the method returns the existing markets. * If the markets are being reloaded, the method waits for the reload to complete before returning the markets. * If an error occurs during the loading or preparation of the markets, the promise is rejected with the error. */ loadMarkets(reload?: boolean, params?: object): Promise>; fetchCurrencies(params?: Dict): Promise; fetchCurrenciesWs(params?: Dict): Promise; fetchMarkets(params?: Dict): Promise; fetchMarketsWs(params?: Dict): Promise; checkRequiredDependencies(): void; parseNumber(value: any, d?: Num): number; checkOrderArguments(market: any, type: any, side: any, amount: any, price: any, params: any): void; handleHttpStatusCode(code: any, reason: any, url: any, method: any, body: any): void; remove0xPrefix(hexData: any): string; mapToSafeMap(dict: any): any; safeMapToMap(dict: any): any; spawn(method: any, ...args: any[]): FutureInterface; delay(timeout: any, method: any, ...args: any[]): void; orderBook(snapshot?: {}, depth?: number): WsOrderBook; indexedOrderBook(snapshot?: {}, depth?: number): IndexedOrderBook; countedOrderBook(snapshot?: {}, depth?: number): CountedOrderBook; handleMessage(client: any, message: any): void; ping(client: Client): Dict | Str; client(url: Str): WsClient; calculateWsBackoffDelay(url: string): number; watchMultiple(url: Str, messageHashes: string[], message?: any, subscribeHashes?: Strings, subscription?: any): FutureInterface; watch(url: Str, messageHash: Str, message?: any, subscribeHash?: any, subscription?: any): any; onConnected(client: any, message?: any): void; onError(client: any, error: any): void; onClose(client: any, error: any): void; close(cleanInstanceCache?: boolean): Promise; convertToBigInt(value: string): bigint; stringToCharsArray(value: string): string[]; valueIsDefined(value: T): value is NonNullable; arraySlice(array: any, first: any, second?: Int): any; getProperty(obj: any, property: any, defaultValue?: any): any; setProperty(obj: any, property: any, defaultValue?: any): void; isDictionary(value: any): boolean; exceptionMessage(exc: any, includeStack?: boolean): string; fixStringifiedJsonMembers(content: string): string; ethAbiEncode(types: any, args: any): Uint8Array; ethEncodeStructuredData(domain: any, messageTypes: any, messageData: any): Uint8Array; ethGetAddressFromPrivateKey(privateKey: string): string; retrieveStarkAccount(signature: any, accountClassHash: any, accountProxyClassHash: any): { privateKey: string; publicKey: string; address: string; }; starknetEncodeStructuredData(domain: any, messageTypes: any, messageData: any, address: any): string; starknetSign(msgHash: any, pri: any): string; extendedStarknetSign(msgHash: any, pri: any): string; extendedStarknetGetSelectorFromName(name: any): string; extendedStarknetComputePoseidonHashOnElements(data: any): string; getZKContractSignatureObj(seed: any, params?: Dict): Promise; getZKTransferSignatureObj(seed: any, params?: Dict): Promise; loadDydxProtos(): Promise; toDydxLong(numStr: Str): object; retrieveDydxCredentials(privateKey: Str): object; encodeDydxTxForSimulation(message: any, memo: any, sequence: any, publicKey: any): string; encodeDydxTxForSigning(message: any, memo: any, chainId: any, account: any, authenticators: any, fee?: any): [string, Dict]; encodeDydxTxRaw(signDoc: Dict, signature: string): string; intToBase16(elem: any): string; extendExchangeOptions(newOptions: Dict): void; createSafeDictionary(isWs?: boolean): {}; convertToSafeDictionary(dict: any): any; checkOptionString(methodName: Str, optionName: string, value: any): Str; checkOptionBool(methodName: Str, optionName: string, value: any): Bool; checkOptionInteger(methodName: Str, optionName: string, value: any): Int; randomBytes(length: number): string; randNumber(size: number): number; binaryLength(binary: Uint8Array): number; lockId(): undefined; unlockId(): undefined; lockLastNonce(): undefined; unlockLastNonce(): undefined; loadLighterLibrary(libraryPath: any, chainId: any, privateKey: any, apiKeyIndex: any, accountIndex: any, createClient?: boolean): Promise<{}>; lighterCreateClient(signer: any, chainId: any, privateKey: any, apiKeyIndex: any, accountIndex: any): any; lighterSignCreateGroupedOrders(signer: any, request: any): any[]; lighterSignCreateOrder(signer: any, request: any): any[]; checkLighterSignedError(method: string, result: any, request?: any): void; raiseLighterSignerError(method: string, error: any, request?: any): void; lighterSignCancelOrder(signer: any, request: any): any[]; lighterSignWithdraw(signer: any, request: any): any[]; lighterSignCreateSubAccount(signer: any, request: any): any[]; lighterSignCancelAllOrders(signer: any, request: any): any[]; lighterSignModifyOrder(signer: any, request: any): any[]; lighterSignTransfer(signer: any, request: any): any[]; lighterSignUpdateLeverage(signer: any, request: any): any[]; lighterCreateAuthToken(signer: any, request: any): string; lighterSignUpdateMargin(signer: any, request: any): any[]; lighterSignApproveIntegrator(signer: any, request: any): any[]; lighterGenerateApiKey(signer: any): any[]; lighterSignChangePubkey(signer: any, request: any): any[]; setLastRestRequestTimestamp(): void; setLastRequest(request: any): void; describe(): any; cleanRestData(): void; cleanWsData(): void; safeBoolN(dictionaryOrList: any, keys: NullableIndexType[], defaultValue: boolean): boolean; safeBoolN(dictionaryOrList: any, keys: NullableIndexType[], defaultValue?: Bool): boolean | undefined; safeBool2(dictionaryOrList: any, key1: NullableIndexType, key2: NullableIndexType, defaultValue: boolean): boolean; safeBool2(dictionaryOrList: any, key1: NullableIndexType, key2: NullableIndexType, defaultValue?: Bool): boolean | undefined; safeBool(dictionaryOrList: any, key: NullableIndexType, defaultValue: boolean): boolean; safeBool(dictionaryOrList: any, key: NullableIndexType, defaultValue?: Bool): boolean | undefined; safeDictN(dictionaryOrList: any, keys: NullableIndexType[], defaultValue: Dictionary): Dictionary; safeDictN(dictionaryOrList: any, keys: NullableIndexType[], defaultValue?: Dictionary): Dictionary | undefined; safeDict(dictionaryOrList: any, key: NullableIndexType, defaultValue: Dictionary): Dictionary; safeDict(dictionaryOrList: any, key: NullableIndexType, defaultValue?: Dictionary): Dictionary | undefined; safeDict2(dictionaryOrList: any, key1: NullableIndexType, key2: string, defaultValue: Dictionary): Dictionary; safeDict2(dictionaryOrList: any, key1: NullableIndexType, key2: string, defaultValue?: Dictionary): Dictionary | undefined; safeListN(dictionaryOrList: any, keys: NullableIndexType[], defaultValue: any[]): any[]; safeListN(dictionaryOrList: any, keys: NullableIndexType[], defaultValue?: any[]): any[] | undefined; safeList2(dictionaryOrList: any, key1: NullableIndexType, key2: string, defaultValue: any[]): any[]; safeList2(dictionaryOrList: any, key1: NullableIndexType, key2: string, defaultValue?: any[]): any[] | undefined; safeList(dictionaryOrList: any, key: NullableIndexType, defaultValue: any[]): any[]; safeList(dictionaryOrList: any, key: NullableIndexType, defaultValue?: any[]): any[] | undefined; storeByKey(dict: any, key: NullableIndexType, value: any): void; handleDeltas(bookside: any, deltas: any): void; handleDelta(bookside: any, delta: any): void; handleBookDeltas(orderbook: WsOrderBook, deltas: any): void; handleBookDelta(orderbook: WsOrderBook, delta: any): void; handleDeltasWithKeys(bookSide: any, deltas: any, priceKey?: IndexType, amountKey?: IndexType, countOrIdKey?: IndexType): void; getCacheIndex(orderbook: any, deltas: any): number; arraysConcat(arraysOfArrays: any[]): any[]; findTimeframe(timeframe: any, timeframes?: NullableDict): Str; checkProxyUrlSettings(url?: Str, method?: Str, headers?: any, body?: any): Str; urlEncoderForProxyUrl(targetUrl: string): string; checkProxySettings(url?: Str, method?: Str, headers?: any, body?: any): Str[]; checkWsProxySettings(): Str[]; checkConflictingProxies(proxyAgentSet: any, proxyUrlSet: any): void; checkAddress(address?: Str, code?: Str, tag?: Str): Str; findMessageHashes(client: any, element: string): string[]; filterByLimit(array: any[], limit?: Int, key?: IndexType, fromStart?: boolean): any[]; filterBySinceLimit(array: object[] | undefined, since?: Int, limit?: Int, key?: IndexType, tail?: boolean): any[]; filterByValueSinceLimit(array: object[], field: IndexType, value?: any, since?: Int, limit?: Int, key?: string, tail?: boolean): any[]; /** * @method * @name Exchange#setSandboxMode * @description set the sandbox mode for the exchange * @param {boolean} enabled true to enable sandbox mode, false to disable it */ setSandboxMode(enabled: boolean): void; /** * @method * @name Exchange#enableDemoTrading * @description enables or disables demo trading mode * @param {boolean} [enable] true if demo trading should be enabled, false otherwise */ enableDemoTrading(enable: boolean): void; sign(path: string, api?: any, method?: string, params?: Dict, headers?: NullableDict, body?: Str): Dict; fetchAccounts(params?: Dict): Promise; watchLiquidations(symbol: string, since?: Int, limit?: Int, params?: Dict): Promise; watchLiquidationsForSymbols(symbols: string[], since?: Int, limit?: Int, params?: Dict): Promise; watchMyLiquidations(symbol: string, since?: Int, limit?: Int, params?: Dict): Promise; watchMyLiquidationsForSymbols(symbols: string[], since?: Int, limit?: Int, params?: Dict): Promise; unWatchOrders(symbol?: Str, params?: Dict): Promise; unWatchTrades(symbol: string, params?: Dict): Promise; unWatchTradesForSymbols(symbols: string[], params?: Dict): Promise; watchOHLCVForSymbols(symbolsAndTimeframes: string[][], since?: Int, limit?: Int, params?: Dict): Promise>>; unWatchOHLCVForSymbols(symbolsAndTimeframes: string[][], params?: Dict): Promise; unWatchOrderBookForSymbols(symbols: string[], params?: Dict): Promise; unWatchPositions(symbols?: Strings, params?: Dict): Promise; unWatchTicker(symbol: string, params?: Dict): Promise; unWatchMarkPrice(symbol: string, params?: Dict): Promise; unWatchMarkPrices(symbols?: Strings, params?: Dict): Promise; fetchDepositAddresses(codes?: Strings, params?: Dict): Promise; fetchMarginMode(symbol: string, params?: Dict): Promise; fetchMarginModes(symbols?: Strings, params?: Dict): Promise; unWatchOrderBook(symbol: string, params?: Dict): Promise; fetchTime(params?: Dict): Promise; fetchTradingLimits(symbols?: Strings, params?: Dict): Promise; parseCurrency(rawCurrency: Dict): Currency; parseCurrencies(rawCurrencies: any): Currencies; parseMarket(market: Dict): Market; parseMarkets(markets: any): Market[]; parseTicker(ticker: Dict, market?: Market): Ticker; parseDepositAddress(depositAddress: Dict, currency?: Currency): DepositAddress; parseTrade(trade: Dict, market?: Market): Trade; parseTransaction(transaction: Dict, currency?: Currency): Transaction; parseTransfer(transfer: Dict, currency?: Currency): TransferEntry; parseAccount(account: Dict): Account; parseLedgerEntry(item: Dict, currency?: Currency): LedgerEntry; parseOrder(order: Dict, market?: Market): Order; fetchCrossBorrowRates(params?: Dict): Promise; fetchIsolatedBorrowRates(params?: Dict): Promise; parseMarketLeverageTiers(info: any, market?: Market): LeverageTier[]; fetchLeverageTiers(symbols?: Strings, params?: Dict): Promise; parsePosition(position: Dict, market?: Market): Position; parseFundingRateHistory(info: any, market?: Market): FundingRateHistory; parseBorrowInterest(info: Dict, market?: Market): BorrowInterest; parseIsolatedBorrowRate(info: Dict, market?: Market): IsolatedBorrowRate; parseWsTrade(trade: Dict, market?: Market): Trade; parseWsOrder(order: Dict, market?: Market): Order; parseWsOrderTrade(trade: Dict, market?: Market): Trade; parseWsOHLCV(ohlcv: any, market?: Market): OHLCV; fetchFundingRates(symbols?: Strings, params?: Dict): Promise; fetchFundingIntervals(symbols?: Strings, params?: Dict): Promise; watchFundingRate(symbol: string, params?: Dict): Promise; watchFundingRates(symbols?: Strings, params?: Dict): Promise; unWatchFundingRates(symbols?: Strings, params?: Dict): Promise; watchFundingRatesForSymbols(symbols: string[], params?: Dict): Promise; transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: Dict): Promise; withdraw(code: string, amount: number, address: string, params?: Dict): Promise; createDepositAddress(code: string, params?: Dict): Promise; setLeverage(leverage: int, symbol?: Str, params?: Dict): Promise<{}>; fetchLeverage(symbol: string, params?: Dict): Promise; fetchLeverages(symbols?: Strings, params?: Dict): Promise; setPositionMode(hedged: boolean, symbol?: Str, params?: Dict): Promise<{}>; addMargin(symbol: string, amount: number, params?: Dict): Promise; reduceMargin(symbol: string, amount: number, params?: Dict): Promise; setMargin(symbol: string, amount: number, params?: Dict): Promise; fetchLongShortRatio(symbol: string, timeframe?: Str, params?: Dict): Promise; fetchLongShortRatioHistory(symbol?: Str, timeframe?: Str, since?: Int, limit?: Int, params?: Dict): Promise; fetchMarginAdjustmentHistory(symbol?: Str, type?: Str, since?: Num, limit?: Num, params?: Dict): Promise; setMarginMode(marginMode: string, symbol?: Str, params?: Dict): Promise<{}>; fetchDepositAddressesByNetwork(code: string, params?: Dict): Promise; fetchOpenInterestHistory(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: Dict): Promise; fetchOpenInterests(symbols?: Strings, params?: Dict): Promise; signIn(params?: {}): Promise<{}>; fetchPaymentMethods(params?: Dict): Promise; parseToInt(number: any): number; parseToNumeric(number: any): number; isRoundNumber(value: number): boolean; isEmptyString(value: any): boolean; safeNumberOmitZero(obj: object, key: NullableIndexType, defaultValue?: Num): Num; safeIntegerOmitZero(obj: object, key: NullableIndexType, defaultValue?: Int): Int; afterConstruct(userConfig?: Dict): void; initRestRateLimiter(): void; featuresGenerator(): void; featuresMapper(initialFeatures: Dict, marketType: Str, subType?: Str): any; featureValue(symbol: string, methodName?: Str, paramName?: Str, defaultValue?: any): any; featureValueByType(marketType: string, subType: Str, methodName?: Str, paramName?: Str, defaultValue?: any): any; orderbookChecksumMessage(symbol: Str): string; createNetworksByIdObject(): void; getDefaultOptions(): { defaultNetworkCodeReplacements: { ETH: { primary: string; secondary: string; default: string; }; CRO: { primary: string; secondary: string; default: string; }; TRX: { primary: string; secondary: string; default: string; }; BTC: { primary: string; secondary: string; default: string; }; }; backwardSupportedNetworkCodes: { ARB: string; ARBONE: string; ARBNOVA: string; }; withdrawTagRequiredCurrencies: string[]; }; safeLedgerEntry(entry: object, currency?: Currency): LedgerEntry; safeCurrencyStructure(currency: Dict): CurrencyInterface; safeMarketStructure(market?: NullableDict): Market; setMarkets(markets: any, currencies?: any): Dictionary; setMarketsFromExchange(sourceExchange: any): this; getDescribeForExtendedWsExchange(currentRestInstance: any, parentRestInstance: any, wsBaseDescribe: Dictionary): any; safeBalance(balance: Dict): Balances; safeOrder(order: Dict, market?: Market): Order; parseOrders(orders: Dict | Dict[] | undefined, market?: Market, since?: Int, limit?: Int, params?: Dict): Order[]; calculateFeeWithRate(symbol: string, type: string, side: string, amount: number, price: number, takerOrMaker?: string, feeRate?: Num, params?: Dict): { type: string; currency: any; rate: number; cost: number; }; calculateFee(symbol: string, type: string, side: string, amount: number, price: number, takerOrMaker?: string, params?: Dict): { type: string; currency: any; rate: number; cost: number; }; safeLiquidation(liquidation: Dict, market?: Market): Liquidation; safeTrade(trade: Dict, market?: Market): Trade; createCcxtTradeId(timestamp?: Int, side?: Str, amount?: Str, price?: Str, takerOrMaker?: Str): Str; parsedFeeAndFees(container: any): (any[] | Dictionary)[]; parseFeeNumeric(fee: any): any; findNearestCeiling(arr: number[], providedValue: number): number; addKeyInArrayItems(obj: any, keyName: any): Dict[]; invertFlatStringDictionary(dict: any): Dict; stringToBase16(str: any): string; reduceFeesByCurrency(fees: any): Dict[]; safeTicker(ticker: Dict, market?: Market): Ticker; fetchBorrowRate(code: string, amount: number, params?: Dict): Promise<{}>; repayCrossMargin(code: string, amount: number, params?: Dict): Promise; repayIsolatedMargin(symbol: string, code: string, amount: number, params?: Dict): Promise; borrowCrossMargin(code: string, amount: number, params?: Dict): Promise; borrowIsolatedMargin(symbol: string, code: string, amount: number, params?: Dict): Promise; borrowMargin(code: string, amount: number, symbol?: Str, params?: Dict): Promise; repayMargin(code: string, amount: number, symbol?: Str, params?: Dict): Promise; fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: Dict): Promise; fetchSpotOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: Dict): Promise; fetchContractOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: Dict): Promise; fetchOHLCVWs(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: Dict): Promise; watchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: Dict): Promise; convertTradingViewToOHLCV(ohlcvs: NullableDict, timestamp?: string, open?: string, high?: string, low?: string, close?: string, volume?: string, ms?: boolean): OHLCV[]; convertOHLCVToTradingView(ohlcvs: number[][], timestamp?: string, open?: string, high?: string, low?: string, close?: string, volume?: string, ms?: boolean): Dict; fetchWebEndpoint(method: string, endpointMethod: any, returnAsJson: any, startRegex?: Str, endRegex?: Str): Promise; marketIds(symbols: string[]): string[]; marketIds(symbols?: Strings): Strings; currencyIds(codes: string[]): string[]; currencyIds(codes?: Strings): Strings; marketsForSymbols(symbols?: Strings): Market[] | undefined; marketSymbols(symbols: Strings, type: Str | undefined, allowEmpty: false, sameTypeOnly?: boolean, sameSubTypeOnly?: boolean): string[]; marketSymbols(symbols: string[], type?: Str, allowEmpty?: boolean, sameTypeOnly?: boolean, sameSubTypeOnly?: boolean): string[]; marketSymbols(symbols?: Strings, type?: Str, allowEmpty?: boolean, sameTypeOnly?: boolean, sameSubTypeOnly?: boolean): Strings; marketCodes(codes?: Strings): Strings; parseOrderBookBidsAsks(bidasks: any, priceKey?: IndexType, amountKey?: IndexType, countOrIdKey?: IndexType): Num[][]; filterByKey(objects: any, key: IndexType, value?: Str): any; filterBySymbol(objects: any, symbol?: Str): any; parseOHLCV(ohlcv: any, market?: Market): OHLCV; safeNetwork(network: any): { info: any; id: Str; name: Str; network: Str; active: boolean | undefined; deposit: boolean | undefined; withdraw: boolean | undefined; fee: Num; precision: Num; limits: { withdraw: { min: Num; max: Num; }; deposit: { min: Num; max: Num; }; }; }; prioritizedNetworkAliases(networkCode?: Str, currencyCode?: Str, allowDefault?: boolean): Strings; networkCodeToId(networkCode: Str, currencyCode?: Str): Str; networkIdToCode(networkId?: Str, currencyCode?: Str): Str; handleNetworkCodeAndParams(params: Dict): [Str, Dict]; defaultNetworkCode(currencyCode: string): Str; selectNetworkCodeFromUnifiedNetworks(currencyCode: string, networkCode: any, indexedNetworkEntries: any): Str; selectNetworkIdFromRawNetworks(currencyCode: string, networkCode: any, indexedNetworkEntries: any): Str; selectNetworkKeyFromNetworks(currencyCode: string, networkCode: Str, indexedNetworkEntries: any, isIndexedByUnifiedNetworkCode?: boolean): Str; safeNumber2(dictionary: object | undefined, key1: NullableIndexType, key2: NullableIndexType, d?: Num): number; parseOrderBook(orderbook: object | undefined, symbol: Str, timestamp?: Int, bidsKey?: string, asksKey?: string, priceKey?: IndexType, amountKey?: IndexType, countOrIdKey?: IndexType): OrderBook; parseOHLCVs(ohlcvs: object[] | undefined, market?: any, timeframe?: string, since?: Int, limit?: Int, tail?: Bool): OHLCV[]; parseLeverageTiers(response: any, symbols?: Strings, marketIdKey?: Str): LeverageTiers; loadTradingLimits(symbols?: Strings, reload?: boolean, params?: Dict): Promise; safePosition(position: Dict): Position; parsePositions(positions: List, symbols?: Strings, params?: Dict): Position[]; parseADLRank(info: Dict, market?: Market): ADL; parseADLRanks(ranks: List, symbols?: Strings, params?: Dict): ADL[]; parseAccounts(accounts: NullableList, params?: Dict): Account[]; parseTradesHelper(isWs: boolean, trades: List, market?: Market, since?: Int, limit?: Int, params?: Dict): Trade[]; parseTrades(trades: List, market?: Market, since?: Int, limit?: Int, params?: Dict): Trade[]; parseWsTrades(trades: List, market?: Market, since?: Int, limit?: Int, params?: Dict): Trade[]; parseTransactions(transactions: List, currency?: Currency, since?: Int, limit?: Int, params?: Dict): Transaction[]; parseTransfers(transfers: List, currency?: Currency, since?: Int, limit?: Int, params?: Dict): TransferEntry[]; parseLedger(data: any, currency?: Currency, since?: Int, limit?: Int, params?: Dict): LedgerEntry[]; nonce(): number; /** * @method * @ignore * @name Exchange#incrementingNonce * @description returns a strictly-increasing nonce for venues that reject duplicate nonces per signer; the unit is whatever nonce () returns — the base default is seconds, so a venue that does not override nonce () gets a second-resolution counter that drifts ahead of wall clock under load, while venues needing milliseconds override nonce () as hyperliquid does. The counter is per exchange instance, so it narrows the duplicate-nonce race but does not remove it across instances or processes. * @returns {int} a strictly-increasing nonce in the unit returned by nonce () */ incrementingNonce(): number; setHeaders(headers: any): any; currencyId(code: Str): Str; marketId(symbol: Str): Str; symbol(symbol: Str): string; handleParamString(params: object, paramName: string, defaultValue: string): [string, Dict]; handleParamString(params: object, paramName: string, defaultValue?: string): [Str, Dict]; handleParamString2(params: object, paramName1: string, paramName2: string, defaultValue: string): [string, Dict]; handleParamString2(params: object, paramName1: string, paramName2: string, defaultValue?: string): [Str, Dict]; handleParamInteger(params: object, paramName: string, defaultValue?: Int): [Int, Dict]; handleParamInteger2(params: object, paramName1: string, paramName2: string, defaultValue?: Int): [Int, Dict]; handleParamBool(params: object, paramName: string, defaultValue?: Bool): [Bool, object]; handleParamBool2(params: object, paramName1: string, paramName2: string, defaultValue?: Bool): [Bool, object]; /** * @param {object} params - extra parameters * @param {object} request - existing dictionary of request * @param {string} exchangeSpecificKey - the key for chain id to be set in request * @param {object} currencyCode - (optional) existing dictionary of request * @param {boolean} isRequired - (optional) whether that param is required to be present * @returns {object[]} - returns [request, params] where request is the modified request object and params is the modified params object */ handleRequestNetwork(params: Dict, request: Dict, exchangeSpecificKey: string, currencyCode?: Str, isRequired?: boolean): Dict[]; resolvePath(path: any, params: any): any[]; getListFromObjectValues(objects: any, key: IndexType): string[]; getSymbolsForMarketType(marketType?: Str, subType?: Str, symbolWithActiveStatus?: boolean, symbolWithUnknownStatus?: boolean): string[]; filterByArray(objects: any, key: IndexType, values?: any, indexed?: boolean): any; filterOutByArray(objects: any, key: IndexType, values?: any, indexed?: boolean): any; fetch2(path: string, api?: any, method?: string, params?: Dict, headers?: any, body?: any, config?: Dict): Promise; request(path: string, api?: any, method?: string, params?: Dict, headers?: any, body?: any, config?: Dict): Promise; loadAccounts(reload?: boolean, params?: Dict): Promise; buildOHLCVC(trades: Trade[], timeframe?: string, since?: number, limit?: number): OHLCVC[]; parseTradingViewOHLCV(ohlcvs: any, market?: Market, timeframe?: string, since?: Int, limit?: Int): OHLCV[]; fetchBorrowInterest(code?: Str, symbol?: Str, since?: Int, limit?: Int, params?: Dict): Promise; fetchLedger(code?: Str, since?: Int, limit?: Int, params?: Dict): Promise; fetchLedgerEntry(id: string, code?: Str, params?: Dict): Promise; parseOrderBookBidAsk(bidask: any, priceKey?: IndexType, amountKey?: IndexType, countOrIdKey?: IndexType): Num[]; safeCurrency(currencyId: Str, currency?: Currency): CurrencyInterface; safeMarket(marketId?: Str, market?: Market, delimiter?: Str, marketType?: Str): MarketInterface; marketOrNull(symbol?: Str): Market; checkRequiredCredentials(error?: boolean): boolean; oath(): string; fetchBalance(params?: Dict): Promise; fetchBalanceWs(params?: Dict): Promise; parseBalance(response: any): Balances; watchBalance(params?: Dict): Promise; fetchPartialBalance(part: any, params?: Dict): Promise; fetchFreeBalance(params?: Dict): Promise; fetchUsedBalance(params?: Dict): Promise; fetchTotalBalance(params?: Dict): Promise; fetchStatus(params?: Dict): Promise; fetchTransactionFee(code: string, params?: Dict): Promise<{}>; fetchTransactionFees(codes?: Strings, params?: Dict): Promise<{}>; fetchDepositWithdrawFees(codes?: Strings, params?: Dict): Promise; fetchDepositWithdrawFee(code: string, params?: Dict): Promise; getSupportedMapping(key: Str, mapping?: Dict): any; fetchCrossBorrowRate(code: string, params?: {}): Promise; fetchIsolatedBorrowRate(symbol: string, params?: Dict): Promise; requireValue(value: T | undefined, message?: Str): T; handleOptionAndParams(params: object, methodName: string, optionName: string, defaultValue: T): [T, Dict]; handleOptionAndParams(params: object, methodName: Str, optionName: string, defaultValue?: any): [any, Dict]; handleOptionAndParams2(params: object, methodName1: string, optionName1: string, optionName2: string, defaultValue: T): [T, Dict]; handleOptionAndParams2(params: object, methodName1: string, optionName1: string, optionName2: string, defaultValue?: any): [any, Dict]; handleOptionStringAndParams(params: Dict, methodName: Str, optionName: string, defaultValue: string): [string, Dict]; handleOptionStringAndParams(params: Dict, methodName: Str, optionName: string, defaultValue?: Str): [Str, Dict]; handleOptionStringAndParams2(params: Dict, methodName: string, optionName1: string, optionName2: string, defaultValue: string): [string, Dict]; handleOptionStringAndParams2(params: Dict, methodName: string, optionName1: string, optionName2: string, defaultValue?: Str): [Str, Dict]; handleOptionBoolAndParams(params: Dict, methodName: Str, optionName: string, defaultValue: boolean): [boolean, Dict]; handleOptionBoolAndParams(params: Dict, methodName: Str, optionName: string, defaultValue?: Bool): [Bool, Dict]; handleOptionBoolAndParams2(params: Dict, methodName: string, optionName1: string, optionName2: string, defaultValue: boolean): [boolean, Dict]; handleOptionBoolAndParams2(params: Dict, methodName: string, optionName1: string, optionName2: string, defaultValue?: Bool): [Bool, Dict]; handleOptionIntegerAndParams(params: object, methodName: Str, optionName: string, defaultValue: number): [number, Dict]; handleOptionIntegerAndParams(params: object, methodName: Str, optionName: string, defaultValue?: Int): [Int, Dict]; handleOptionIntegerAndParams2(params: object, methodName: string, optionName1: string, optionName2: string, defaultValue: number): [number, Dict]; handleOptionIntegerAndParams2(params: object, methodName: string, optionName1: string, optionName2: string, defaultValue?: Int): [Int, Dict]; handleOption(methodName: string, optionName: string, defaultValue?: any): any; handleMarketTypeAndParams(methodName: string, market?: Market, params?: Dict, defaultValue?: Str): [string, Dict]; handleSubTypeAndParams(methodName: string, market?: Market, params?: Dict, defaultValue?: any): [SubType, Dict]; handleMarginModeAndParams(methodName: string, params?: Dict, defaultValue?: Str): [Str, Dict]; throwExactlyMatchedException(exact: any, string: any, message: any): void; throwBroadlyMatchedException(broad: any, string: any, message: any): void; findBroadlyMatchedKey(broad: any, string: Str): Str; handleErrors(statusCode: int, statusText: string, url: string, method: string, responseHeaders: Dict, responseBody: string, response: any, requestHeaders: any, requestBody: any): undefined; calculateRateLimiterCost(api: any, method: any, path: any, params: any, config?: Dict): any; fetchSpotTickers(symbols?: Strings, params?: Dict): Promise; fetchContractTickers(symbols?: Strings, params?: Dict): Promise; fetchOrderBooks(symbols?: Strings, limit?: Int, params?: Dict): Promise; unWatchTickers(symbols?: Strings, params?: Dict): Promise; unWatchFundingRate(symbol: string, params?: Dict): Promise; createTwapOrder(symbol: string, side: OrderSide, amount: number, duration: number, params?: Dict): Promise; createConvertTrade(id: string, fromCode: string, toCode: string, amount?: Num, params?: Dict): Promise; fetchConvertTrade(id: string, code?: Str, params?: Dict): Promise; fetchConvertTradeHistory(code?: Str, since?: Int, limit?: Int, params?: Dict): Promise; fetchPositionMode(symbol?: Str, params?: Dict): Promise; fetchADLRank(symbol: string, params?: Dict): Promise; fetchPositionsADLRank(symbols?: Strings, params?: Dict): Promise; fetchPositionADLRank(symbol: string, params?: Dict): Promise; setTakeProfitAndStopLossParams(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, takeProfit?: Num, stopLoss?: Num, params?: Dict): Dict; createSpotOrders(orders: OrderRequest[], params?: Dict): Promise; createContractOrders(orders: OrderRequest[], params?: Dict): Promise; cancelSpotOrder(id: string, symbol?: Str, params?: Dict): Promise; cancelContractOrder(id: string, symbol?: Str, params?: Dict): Promise; cancelAllSpotOrders(symbol?: Str, params?: Dict): Promise; cancelAllContractOrders(symbol?: Str, params?: Dict): Promise; cancelAllOrdersAfter(timeout: Int, params?: Dict): Promise<{}>; cancelOrdersForSymbols(orders: CancellationRequest[], params?: Dict): Promise; fetchMyLiquidations(symbol?: Str, since?: Int, limit?: Int, params?: Dict): Promise; fetchLiquidations(symbol: string, since?: Int, limit?: Int, params?: Dict): Promise; fetchGreeks(symbol: string, params?: Dict): Promise; fetchAllGreeks(symbols?: Strings, params?: Dict): Promise; fetchOptionChain(code: string, params?: Dict): Promise; fetchOption(symbol: string, params?: Dict): Promise