ccxt 4.2.70 → 4.2.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/build.sh +1 -1
- package/dist/ccxt.browser.js +979 -195
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +3 -1
- package/dist/cjs/src/ascendex.js +149 -2
- package/dist/cjs/src/bitget.js +14 -6
- package/dist/cjs/src/coinbase.js +108 -89
- package/dist/cjs/src/digifinex.js +2 -1
- package/dist/cjs/src/hyperliquid.js +1 -1
- package/dist/cjs/src/kraken.js +1 -0
- package/dist/cjs/src/mexc.js +9 -0
- package/dist/cjs/src/pro/bingx.js +29 -6
- package/dist/cjs/src/pro/hitbtc.js +16 -7
- package/dist/cjs/src/pro/hyperliquid.js +556 -0
- package/js/ccxt.d.ts +4 -1
- package/js/ccxt.js +3 -1
- package/js/src/abstract/coinbase.d.ts +2 -0
- package/js/src/ascendex.d.ts +5 -1
- package/js/src/ascendex.js +149 -2
- package/js/src/base/Exchange.d.ts +56 -56
- package/js/src/base/types.d.ts +58 -48
- package/js/src/binance.d.ts +1 -1
- package/js/src/bitfinex2.d.ts +1 -1
- package/js/src/bitget.js +14 -6
- package/js/src/bitrue.d.ts +3 -3
- package/js/src/cex.d.ts +1 -1
- package/js/src/coinbase.d.ts +1 -1
- package/js/src/coinbase.js +108 -89
- package/js/src/digifinex.js +2 -1
- package/js/src/gate.d.ts +1 -1
- package/js/src/htx.d.ts +1 -1
- package/js/src/hyperliquid.js +1 -1
- package/js/src/idex.d.ts +1 -1
- package/js/src/kraken.js +1 -0
- package/js/src/kucoinfutures.d.ts +1 -1
- package/js/src/mexc.js +9 -0
- package/js/src/poloniexfutures.d.ts +2 -2
- package/js/src/pro/bingx.d.ts +1 -0
- package/js/src/pro/bingx.js +29 -6
- package/js/src/pro/bitvavo.d.ts +8 -8
- package/js/src/pro/bybit.d.ts +1 -1
- package/js/src/pro/cex.d.ts +5 -5
- package/js/src/pro/coinbase.d.ts +2 -2
- package/js/src/pro/hitbtc.js +16 -7
- package/js/src/pro/hyperliquid.d.ts +23 -0
- package/js/src/pro/hyperliquid.js +557 -0
- package/js/src/pro/poloniex.d.ts +3 -3
- package/package.json +1 -1
- package/skip-tests.json +33 -58
package/js/ccxt.js
CHANGED
|
@@ -38,7 +38,7 @@ import * as errors from './src/base/errors.js';
|
|
|
38
38
|
import { BaseError, ExchangeError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, NotSupported, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, AuthenticationError, AddressPending, NoChange } from './src/base/errors.js';
|
|
39
39
|
//-----------------------------------------------------------------------------
|
|
40
40
|
// this is updated by vss.js when building
|
|
41
|
-
const version = '4.2.
|
|
41
|
+
const version = '4.2.72';
|
|
42
42
|
Exchange.ccxtVersion = version;
|
|
43
43
|
//-----------------------------------------------------------------------------
|
|
44
44
|
import ace from './src/ace.js';
|
|
@@ -182,6 +182,7 @@ import hollaexPro from './src/pro/hollaex.js';
|
|
|
182
182
|
import htxPro from './src/pro/htx.js';
|
|
183
183
|
import huobiPro from './src/pro/huobi.js';
|
|
184
184
|
import huobijpPro from './src/pro/huobijp.js';
|
|
185
|
+
import hyperliquidPro from './src/pro/hyperliquid.js';
|
|
185
186
|
import idexPro from './src/pro/idex.js';
|
|
186
187
|
import independentreservePro from './src/pro/independentreserve.js';
|
|
187
188
|
import krakenPro from './src/pro/kraken.js';
|
|
@@ -347,6 +348,7 @@ const pro = {
|
|
|
347
348
|
'htx': htxPro,
|
|
348
349
|
'huobi': huobiPro,
|
|
349
350
|
'huobijp': huobijpPro,
|
|
351
|
+
'hyperliquid': hyperliquidPro,
|
|
350
352
|
'idex': idexPro,
|
|
351
353
|
'independentreserve': independentreservePro,
|
|
352
354
|
'kraken': krakenPro,
|
|
@@ -69,6 +69,8 @@ interface Exchange {
|
|
|
69
69
|
v3PrivateGetBrokerageIntxPortfolioPortfolioUuid(params?: {}): Promise<implicitReturnType>;
|
|
70
70
|
v3PrivateGetBrokerageIntxPositionsPortfolioUuid(params?: {}): Promise<implicitReturnType>;
|
|
71
71
|
v3PrivateGetBrokerageIntxPositionsPortfolioUuidSymbol(params?: {}): Promise<implicitReturnType>;
|
|
72
|
+
v3PrivateGetBrokeragePaymentMethods(params?: {}): Promise<implicitReturnType>;
|
|
73
|
+
v3PrivateGetBrokeragePaymentMethodsPaymentMethodId(params?: {}): Promise<implicitReturnType>;
|
|
72
74
|
v3PrivatePostBrokerageOrders(params?: {}): Promise<implicitReturnType>;
|
|
73
75
|
v3PrivatePostBrokerageOrdersBatchCancel(params?: {}): Promise<implicitReturnType>;
|
|
74
76
|
v3PrivatePostBrokerageOrdersEdit(params?: {}): Promise<implicitReturnType>;
|
package/js/src/ascendex.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/ascendex.js';
|
|
2
|
-
import type { TransferEntry, FundingHistory, Int, OHLCV, Order, OrderSide, OrderType, OrderRequest, Str, Trade, Balances, Transaction, Ticker, OrderBook, Tickers, Strings, Currency, Market } from './base/types.js';
|
|
2
|
+
import type { TransferEntry, FundingHistory, Int, OHLCV, Order, OrderSide, OrderType, OrderRequest, Str, Trade, Balances, Transaction, Ticker, OrderBook, Tickers, Strings, Currency, Market, Leverage, Leverages, MarginModes, MarginMode } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class ascendex
|
|
5
5
|
* @augments Exchange
|
|
@@ -126,6 +126,10 @@ export default class ascendex extends Exchange {
|
|
|
126
126
|
id: any;
|
|
127
127
|
amount: number;
|
|
128
128
|
};
|
|
129
|
+
fetchMarginModes(symbols?: string[], params?: {}): Promise<MarginModes>;
|
|
130
|
+
parseMarginMode(marginMode: any, market?: any): MarginMode;
|
|
131
|
+
fetchLeverages(symbols?: string[], params?: {}): Promise<Leverages>;
|
|
132
|
+
parseLeverage(leverage: any, market?: any): Leverage;
|
|
129
133
|
sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
|
|
130
134
|
url: string;
|
|
131
135
|
method: string;
|
package/js/src/ascendex.js
CHANGED
|
@@ -60,9 +60,11 @@ export default class ascendex extends Exchange {
|
|
|
60
60
|
'fetchFundingRateHistory': false,
|
|
61
61
|
'fetchFundingRates': true,
|
|
62
62
|
'fetchIndexOHLCV': false,
|
|
63
|
-
'fetchLeverage':
|
|
63
|
+
'fetchLeverage': 'emulated',
|
|
64
|
+
'fetchLeverages': true,
|
|
64
65
|
'fetchLeverageTiers': true,
|
|
65
|
-
'fetchMarginMode':
|
|
66
|
+
'fetchMarginMode': 'emulated',
|
|
67
|
+
'fetchMarginModes': true,
|
|
66
68
|
'fetchMarketLeverageTiers': 'emulated',
|
|
67
69
|
'fetchMarkets': true,
|
|
68
70
|
'fetchMarkOHLCV': false,
|
|
@@ -3278,6 +3280,151 @@ export default class ascendex extends Exchange {
|
|
|
3278
3280
|
'amount': this.safeNumber(income, 'paymentInUSDT'),
|
|
3279
3281
|
};
|
|
3280
3282
|
}
|
|
3283
|
+
async fetchMarginModes(symbols = undefined, params = {}) {
|
|
3284
|
+
/**
|
|
3285
|
+
* @method
|
|
3286
|
+
* @name ascendex#fetchMarginMode
|
|
3287
|
+
* @description fetches the set margin mode of the user
|
|
3288
|
+
* @see https://ascendex.github.io/ascendex-futures-pro-api-v2/#position
|
|
3289
|
+
* @param {string[]} [symbols] a list of unified market symbols
|
|
3290
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3291
|
+
* @returns {object} a list of [margin mode structures]{@link https://docs.ccxt.com/#/?id=margin-mode-structure}
|
|
3292
|
+
*/
|
|
3293
|
+
await this.loadMarkets();
|
|
3294
|
+
await this.loadAccounts();
|
|
3295
|
+
const account = this.safeValue(this.accounts, 0, {});
|
|
3296
|
+
const accountGroup = this.safeString(account, 'id');
|
|
3297
|
+
const request = {
|
|
3298
|
+
'account-group': accountGroup,
|
|
3299
|
+
};
|
|
3300
|
+
const response = await this.v2PrivateAccountGroupGetFuturesPosition(this.extend(request, params));
|
|
3301
|
+
//
|
|
3302
|
+
// {
|
|
3303
|
+
// "code": 0,
|
|
3304
|
+
// "data": {
|
|
3305
|
+
// "accountId": "fut2ODPhGiY71Pl4vtXnOZ00ssgD7QGn",
|
|
3306
|
+
// "ac": "FUTURES",
|
|
3307
|
+
// "collaterals": [
|
|
3308
|
+
// {
|
|
3309
|
+
// "asset": "USDT",
|
|
3310
|
+
// "balance": "44.570287262",
|
|
3311
|
+
// "referencePrice": "1",
|
|
3312
|
+
// "discountFactor": "1"
|
|
3313
|
+
// }
|
|
3314
|
+
// ],
|
|
3315
|
+
// "contracts": [
|
|
3316
|
+
// {
|
|
3317
|
+
// "symbol": "BTC-PERP",
|
|
3318
|
+
// "side": "LONG",
|
|
3319
|
+
// "position": "0.0001",
|
|
3320
|
+
// "referenceCost": "-3.12277254",
|
|
3321
|
+
// "unrealizedPnl": "-0.001700233",
|
|
3322
|
+
// "realizedPnl": "0",
|
|
3323
|
+
// "avgOpenPrice": "31209",
|
|
3324
|
+
// "marginType": "isolated",
|
|
3325
|
+
// "isolatedMargin": "1.654972977",
|
|
3326
|
+
// "leverage": "2",
|
|
3327
|
+
// "takeProfitPrice": "0",
|
|
3328
|
+
// "takeProfitTrigger": "market",
|
|
3329
|
+
// "stopLossPrice": "0",
|
|
3330
|
+
// "stopLossTrigger": "market",
|
|
3331
|
+
// "buyOpenOrderNotional": "0",
|
|
3332
|
+
// "sellOpenOrderNotional": "0",
|
|
3333
|
+
// "markPrice": "31210.723063672",
|
|
3334
|
+
// "indexPrice": "31223.148857925"
|
|
3335
|
+
// },
|
|
3336
|
+
// ]
|
|
3337
|
+
// }
|
|
3338
|
+
// }
|
|
3339
|
+
//
|
|
3340
|
+
const data = this.safeDict(response, 'data', {});
|
|
3341
|
+
const marginModes = this.safeList(data, 'contracts', []);
|
|
3342
|
+
return this.parseMarginModes(marginModes, symbols, 'symbol');
|
|
3343
|
+
}
|
|
3344
|
+
parseMarginMode(marginMode, market = undefined) {
|
|
3345
|
+
const marketId = this.safeString(marginMode, 'symbol');
|
|
3346
|
+
const marginType = this.safeString(marginMode, 'marginType');
|
|
3347
|
+
const margin = (marginType === 'crossed') ? 'cross' : 'isolated';
|
|
3348
|
+
return {
|
|
3349
|
+
'info': marginMode,
|
|
3350
|
+
'symbol': this.safeSymbol(marketId, market),
|
|
3351
|
+
'marginMode': margin,
|
|
3352
|
+
};
|
|
3353
|
+
}
|
|
3354
|
+
async fetchLeverages(symbols = undefined, params = {}) {
|
|
3355
|
+
/**
|
|
3356
|
+
* @method
|
|
3357
|
+
* @name ascendex#fetchLeverages
|
|
3358
|
+
* @description fetch the set leverage for all contract markets
|
|
3359
|
+
* @see https://ascendex.github.io/ascendex-futures-pro-api-v2/#position
|
|
3360
|
+
* @param {string[]} [symbols] a list of unified market symbols
|
|
3361
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3362
|
+
* @returns {object} a list of [leverage structures]{@link https://docs.ccxt.com/#/?id=leverage-structure}
|
|
3363
|
+
*/
|
|
3364
|
+
await this.loadMarkets();
|
|
3365
|
+
await this.loadAccounts();
|
|
3366
|
+
const account = this.safeValue(this.accounts, 0, {});
|
|
3367
|
+
const accountGroup = this.safeString(account, 'id');
|
|
3368
|
+
const request = {
|
|
3369
|
+
'account-group': accountGroup,
|
|
3370
|
+
};
|
|
3371
|
+
const response = await this.v2PrivateAccountGroupGetFuturesPosition(this.extend(request, params));
|
|
3372
|
+
//
|
|
3373
|
+
// {
|
|
3374
|
+
// "code": 0,
|
|
3375
|
+
// "data": {
|
|
3376
|
+
// "accountId": "fut2ODPhGiY71Pl4vtXnOZ00ssgD7QGn",
|
|
3377
|
+
// "ac": "FUTURES",
|
|
3378
|
+
// "collaterals": [
|
|
3379
|
+
// {
|
|
3380
|
+
// "asset": "USDT",
|
|
3381
|
+
// "balance": "44.570287262",
|
|
3382
|
+
// "referencePrice": "1",
|
|
3383
|
+
// "discountFactor": "1"
|
|
3384
|
+
// }
|
|
3385
|
+
// ],
|
|
3386
|
+
// "contracts": [
|
|
3387
|
+
// {
|
|
3388
|
+
// "symbol": "BTC-PERP",
|
|
3389
|
+
// "side": "LONG",
|
|
3390
|
+
// "position": "0.0001",
|
|
3391
|
+
// "referenceCost": "-3.12277254",
|
|
3392
|
+
// "unrealizedPnl": "-0.001700233",
|
|
3393
|
+
// "realizedPnl": "0",
|
|
3394
|
+
// "avgOpenPrice": "31209",
|
|
3395
|
+
// "marginType": "isolated",
|
|
3396
|
+
// "isolatedMargin": "1.654972977",
|
|
3397
|
+
// "leverage": "2",
|
|
3398
|
+
// "takeProfitPrice": "0",
|
|
3399
|
+
// "takeProfitTrigger": "market",
|
|
3400
|
+
// "stopLossPrice": "0",
|
|
3401
|
+
// "stopLossTrigger": "market",
|
|
3402
|
+
// "buyOpenOrderNotional": "0",
|
|
3403
|
+
// "sellOpenOrderNotional": "0",
|
|
3404
|
+
// "markPrice": "31210.723063672",
|
|
3405
|
+
// "indexPrice": "31223.148857925"
|
|
3406
|
+
// },
|
|
3407
|
+
// ]
|
|
3408
|
+
// }
|
|
3409
|
+
// }
|
|
3410
|
+
//
|
|
3411
|
+
const data = this.safeDict(response, 'data', {});
|
|
3412
|
+
const leverages = this.safeList(data, 'contracts', []);
|
|
3413
|
+
return this.parseLeverages(leverages, symbols, 'symbol');
|
|
3414
|
+
}
|
|
3415
|
+
parseLeverage(leverage, market = undefined) {
|
|
3416
|
+
const marketId = this.safeString(leverage, 'symbol');
|
|
3417
|
+
const leverageValue = this.safeInteger(leverage, 'leverage');
|
|
3418
|
+
const marginType = this.safeString(leverage, 'marginType');
|
|
3419
|
+
const marginMode = (marginType === 'crossed') ? 'cross' : 'isolated';
|
|
3420
|
+
return {
|
|
3421
|
+
'info': leverage,
|
|
3422
|
+
'symbol': this.safeSymbol(marketId, market),
|
|
3423
|
+
'marginMode': marginMode,
|
|
3424
|
+
'longLeverage': leverageValue,
|
|
3425
|
+
'shortLeverage': leverageValue,
|
|
3426
|
+
};
|
|
3427
|
+
}
|
|
3281
3428
|
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
|
|
3282
3429
|
const version = api[0];
|
|
3283
3430
|
const access = api[1];
|
|
@@ -3,7 +3,7 @@ import { // eslint-disable-line object-curly-newline
|
|
|
3
3
|
ExchangeError, AuthenticationError, DDoSProtection, RequestTimeout, ExchangeNotAvailable, RateLimitExceeded } from "./errors.js";
|
|
4
4
|
import WsClient from './ws/WsClient.js';
|
|
5
5
|
import { OrderBook as WsOrderBook, IndexedOrderBook, CountedOrderBook } from './ws/OrderBook.js';
|
|
6
|
-
import type { Market, Trade, Ticker, OHLCV, OHLCVC, Order, OrderBook, Balance, Balances, Dictionary, Transaction, DepositAddressResponse, Currency, MinMax, IndexType, Int, OrderType, OrderSide, Position, FundingRate, DepositWithdrawFeeNetwork, LedgerEntry, BorrowInterest, OpenInterest, LeverageTier, TransferEntry, FundingRateHistory, Liquidation, FundingHistory, OrderRequest, MarginMode, Tickers, Greeks, Str, Num, MarketInterface, CurrencyInterface, Account, MarginModes, MarketType, Leverage, Leverages } from './types.js';
|
|
6
|
+
import type { Market, Trade, Ticker, OHLCV, OHLCVC, Order, OrderBook, Balance, Balances, Dictionary, Transaction, DepositAddressResponse, Currency, MinMax, IndexType, Int, OrderType, OrderSide, Position, FundingRate, DepositWithdrawFeeNetwork, LedgerEntry, BorrowInterest, OpenInterest, LeverageTier, TransferEntry, FundingRateHistory, Liquidation, FundingHistory, OrderRequest, MarginMode, Tickers, Greeks, Str, Num, MarketInterface, CurrencyInterface, Account, MarginModes, MarketType, Leverage, Leverages, LastPrice, LastPrices } from './types.js';
|
|
7
7
|
export type { Market, Trade, Fee, Ticker, OHLCV, OHLCVC, Order, OrderBook, Balance, Balances, Dictionary, Transaction, DepositAddressResponse, Currency, MinMax, IndexType, Int, OrderType, OrderSide, Position, FundingRateHistory, Liquidation, FundingHistory, Greeks, Leverage, Leverages } from './types.js';
|
|
8
8
|
import { ArrayCache, ArrayCacheByTimestamp } from './ws/Cache.js';
|
|
9
9
|
import { OrderBook as Ob } from './ws/OrderBook.js';
|
|
@@ -111,7 +111,7 @@ export default class Exchange {
|
|
|
111
111
|
last_request_body: any;
|
|
112
112
|
last_request_url: any;
|
|
113
113
|
last_request_path: any;
|
|
114
|
-
id:
|
|
114
|
+
id: Str;
|
|
115
115
|
markets: Dictionary<any>;
|
|
116
116
|
has: Dictionary<boolean | 'emulated'>;
|
|
117
117
|
status: any;
|
|
@@ -151,14 +151,14 @@ export default class Exchange {
|
|
|
151
151
|
accounts: any;
|
|
152
152
|
accountsById: any;
|
|
153
153
|
commonCurrencies: any;
|
|
154
|
-
hostname:
|
|
154
|
+
hostname: Str;
|
|
155
155
|
precisionMode: number;
|
|
156
156
|
paddingMode: any;
|
|
157
157
|
exceptions: {};
|
|
158
158
|
timeframes: Dictionary<number | string>;
|
|
159
|
-
version:
|
|
159
|
+
version: Str;
|
|
160
160
|
marketsByAltname: any;
|
|
161
|
-
name:
|
|
161
|
+
name: Str;
|
|
162
162
|
lastRestRequestTimestamp: number;
|
|
163
163
|
targetAccount: any;
|
|
164
164
|
stablePairs: {};
|
|
@@ -634,8 +634,8 @@ export default class Exchange {
|
|
|
634
634
|
handleDelta(bookside: any, delta: any): void;
|
|
635
635
|
getCacheIndex(orderbook: any, deltas: any): number;
|
|
636
636
|
findTimeframe(timeframe: any, timeframes?: any): string;
|
|
637
|
-
checkProxyUrlSettings(url?:
|
|
638
|
-
checkProxySettings(url?:
|
|
637
|
+
checkProxyUrlSettings(url?: Str, method?: Str, headers?: any, body?: any): any;
|
|
638
|
+
checkProxySettings(url?: Str, method?: Str, headers?: any, body?: any): any[];
|
|
639
639
|
checkWsProxySettings(): any[];
|
|
640
640
|
checkConflictingProxies(proxyAgentSet: any, proxyUrlSet: any): void;
|
|
641
641
|
findMessageHashes(client: any, element: string): string[];
|
|
@@ -686,7 +686,7 @@ export default class Exchange {
|
|
|
686
686
|
transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
|
|
687
687
|
withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
|
|
688
688
|
createDepositAddress(code: string, params?: {}): Promise<DepositAddressResponse>;
|
|
689
|
-
setLeverage(leverage: Int, symbol?:
|
|
689
|
+
setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<{}>;
|
|
690
690
|
fetchLeverage(symbol: string, params?: {}): Promise<Leverage>;
|
|
691
691
|
fetchLeverages(symbols?: string[], params?: {}): Promise<Leverages>;
|
|
692
692
|
setPositionMode(hedged: boolean, symbol?: Str, params?: {}): Promise<{}>;
|
|
@@ -766,14 +766,14 @@ export default class Exchange {
|
|
|
766
766
|
convertOHLCVToTradingView(ohlcvs: any, timestamp?: string, open?: string, high?: string, low?: string, close?: string, volume?: string, ms?: boolean): {};
|
|
767
767
|
fetchWebEndpoint(method: any, endpointMethod: any, returnAsJson: any, startRegex?: any, endRegex?: any): Promise<any>;
|
|
768
768
|
marketIds(symbols: any): any;
|
|
769
|
-
marketSymbols(symbols: any, type?:
|
|
769
|
+
marketSymbols(symbols: any, type?: Str, allowEmpty?: boolean, sameTypeOnly?: boolean, sameSubTypeOnly?: boolean): any;
|
|
770
770
|
marketCodes(codes: any): any;
|
|
771
771
|
parseBidsAsks(bidasks: any, priceKey?: IndexType, amountKey?: IndexType, countOrIdKey?: IndexType): any[];
|
|
772
772
|
fetchL2OrderBook(symbol: string, limit?: Int, params?: {}): Promise<any>;
|
|
773
|
-
filterBySymbol(objects: any, symbol?:
|
|
773
|
+
filterBySymbol(objects: any, symbol?: Str): any;
|
|
774
774
|
parseOHLCV(ohlcv: any, market?: Market): OHLCV;
|
|
775
|
-
networkCodeToId(networkCode: string, currencyCode?:
|
|
776
|
-
networkIdToCode(networkId: string, currencyCode?:
|
|
775
|
+
networkCodeToId(networkCode: string, currencyCode?: Str): string;
|
|
776
|
+
networkIdToCode(networkId: string, currencyCode?: Str): string;
|
|
777
777
|
handleNetworkCodeAndParams(params: any): any[];
|
|
778
778
|
defaultNetworkCode(currencyCode: string): any;
|
|
779
779
|
selectNetworkCodeFromUnifiedNetworks(currencyCode: any, networkCode: any, indexedNetworkEntries: any): any;
|
|
@@ -799,7 +799,7 @@ export default class Exchange {
|
|
|
799
799
|
handleParamInteger(params: object, paramName: string, defaultValue?: Int): [Int, object];
|
|
800
800
|
resolvePath(path: any, params: any): any[];
|
|
801
801
|
getListFromObjectValues(objects: any, key: IndexType): any[];
|
|
802
|
-
getSymbolsForMarketType(marketType?:
|
|
802
|
+
getSymbolsForMarketType(marketType?: Str, subType?: Str, symbolWithActiveStatus?: boolean, symbolWithUnknownStatus?: boolean): any[];
|
|
803
803
|
filterByArray(objects: any, key: IndexType, values?: any, indexed?: boolean): any;
|
|
804
804
|
fetch2(path: any, api?: any, method?: string, params?: {}, headers?: any, body?: any, config?: {}): Promise<any>;
|
|
805
805
|
request(path: any, api?: any, method?: string, params?: {}, headers?: any, body?: any, config?: {}): Promise<any>;
|
|
@@ -813,16 +813,16 @@ export default class Exchange {
|
|
|
813
813
|
editOrderWs(id: string, symbol: string, type: OrderType, side: OrderSide, amount: number, price?: number, params?: {}): Promise<Order>;
|
|
814
814
|
fetchPermissions(params?: {}): Promise<{}>;
|
|
815
815
|
fetchPosition(symbol: string, params?: {}): Promise<Position>;
|
|
816
|
-
watchPosition(symbol?:
|
|
816
|
+
watchPosition(symbol?: Str, params?: {}): Promise<Position>;
|
|
817
817
|
watchPositions(symbols?: string[], since?: Int, limit?: Int, params?: {}): Promise<Position[]>;
|
|
818
818
|
watchPositionForSymbols(symbols?: string[], since?: Int, limit?: Int, params?: {}): Promise<Position[]>;
|
|
819
819
|
fetchPositionsForSymbol(symbol: string, params?: {}): Promise<Position[]>;
|
|
820
820
|
fetchPositions(symbols?: string[], params?: {}): Promise<Position[]>;
|
|
821
821
|
fetchPositionsRisk(symbols?: string[], params?: {}): Promise<Position[]>;
|
|
822
822
|
fetchBidsAsks(symbols?: string[], params?: {}): Promise<Dictionary<Ticker>>;
|
|
823
|
-
fetchBorrowInterest(code?:
|
|
824
|
-
fetchLedger(code?:
|
|
825
|
-
fetchLedgerEntry(id: string, code?:
|
|
823
|
+
fetchBorrowInterest(code?: Str, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<BorrowInterest[]>;
|
|
824
|
+
fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
|
|
825
|
+
fetchLedgerEntry(id: string, code?: Str, params?: {}): Promise<LedgerEntry>;
|
|
826
826
|
parseBidAsk(bidask: any, priceKey?: IndexType, amountKey?: IndexType, countOrIdKey?: IndexType): number[];
|
|
827
827
|
safeCurrency(currencyId: Str, currency?: Currency): CurrencyInterface;
|
|
828
828
|
safeMarket(marketId: Str, market?: Market, delimiter?: Str, marketType?: Str): MarketInterface;
|
|
@@ -862,9 +862,9 @@ export default class Exchange {
|
|
|
862
862
|
fetchTickers(symbols?: string[], params?: {}): Promise<Tickers>;
|
|
863
863
|
fetchOrderBooks(symbols?: string[], limit?: Int, params?: {}): Promise<Dictionary<OrderBook>>;
|
|
864
864
|
watchTickers(symbols?: string[], params?: {}): Promise<Tickers>;
|
|
865
|
-
fetchOrder(id: string, symbol?:
|
|
866
|
-
fetchOrderWs(id: string, symbol?:
|
|
867
|
-
fetchOrderStatus(id: string, symbol?:
|
|
865
|
+
fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
866
|
+
fetchOrderWs(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
867
|
+
fetchOrderStatus(id: string, symbol?: Str, params?: {}): Promise<string>;
|
|
868
868
|
fetchUnifiedOrder(order: any, params?: {}): Promise<Order>;
|
|
869
869
|
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: number, params?: {}): Promise<Order>;
|
|
870
870
|
createTrailingAmountOrder(symbol: string, type: OrderType, side: OrderSide, amount: any, price?: any, trailingAmount?: any, trailingTriggerPrice?: any, params?: {}): Promise<Order>;
|
|
@@ -878,38 +878,38 @@ export default class Exchange {
|
|
|
878
878
|
createOrderWithTakeProfitAndStopLoss(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: number, takeProfit?: number, stopLoss?: number, params?: {}): Promise<Order>;
|
|
879
879
|
createOrders(orders: OrderRequest[], params?: {}): Promise<Order[]>;
|
|
880
880
|
createOrderWs(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: number, params?: {}): Promise<Order>;
|
|
881
|
-
cancelOrder(id: string, symbol?:
|
|
882
|
-
cancelOrderWs(id: string, symbol?:
|
|
883
|
-
cancelOrdersWs(ids: string[], symbol?:
|
|
884
|
-
cancelAllOrders(symbol?:
|
|
885
|
-
cancelAllOrdersWs(symbol?:
|
|
881
|
+
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<{}>;
|
|
882
|
+
cancelOrderWs(id: string, symbol?: Str, params?: {}): Promise<{}>;
|
|
883
|
+
cancelOrdersWs(ids: string[], symbol?: Str, params?: {}): Promise<{}>;
|
|
884
|
+
cancelAllOrders(symbol?: Str, params?: {}): Promise<{}>;
|
|
885
|
+
cancelAllOrdersWs(symbol?: Str, params?: {}): Promise<{}>;
|
|
886
886
|
cancelUnifiedOrder(order: any, params?: {}): Promise<{}>;
|
|
887
|
-
fetchOrders(symbol?:
|
|
888
|
-
fetchOrdersWs(symbol?:
|
|
889
|
-
fetchOrderTrades(id: string, symbol?:
|
|
890
|
-
watchOrders(symbol?:
|
|
891
|
-
fetchOpenOrders(symbol?:
|
|
892
|
-
fetchOpenOrdersWs(symbol?:
|
|
893
|
-
fetchClosedOrders(symbol?:
|
|
887
|
+
fetchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
888
|
+
fetchOrdersWs(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
889
|
+
fetchOrderTrades(id: string, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
890
|
+
watchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
891
|
+
fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
892
|
+
fetchOpenOrdersWs(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
893
|
+
fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
894
894
|
fetchCanceledAndClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
895
|
-
fetchClosedOrdersWs(symbol?:
|
|
896
|
-
fetchMyTrades(symbol?:
|
|
897
|
-
fetchMyLiquidations(symbol?:
|
|
895
|
+
fetchClosedOrdersWs(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
896
|
+
fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
897
|
+
fetchMyLiquidations(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Liquidation[]>;
|
|
898
898
|
fetchLiquidations(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Liquidation[]>;
|
|
899
|
-
fetchMyTradesWs(symbol?:
|
|
900
|
-
watchMyTrades(symbol?:
|
|
899
|
+
fetchMyTradesWs(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
900
|
+
watchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
901
901
|
fetchGreeks(symbol: string, params?: {}): Promise<Greeks>;
|
|
902
|
-
fetchDepositsWithdrawals(code?:
|
|
903
|
-
fetchDeposits(symbol?:
|
|
904
|
-
fetchWithdrawals(symbol?:
|
|
905
|
-
fetchDepositsWs(code?:
|
|
906
|
-
fetchWithdrawalsWs(code?:
|
|
907
|
-
fetchFundingRateHistory(symbol?:
|
|
908
|
-
fetchFundingHistory(symbol?:
|
|
902
|
+
fetchDepositsWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
903
|
+
fetchDeposits(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
904
|
+
fetchWithdrawals(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
905
|
+
fetchDepositsWs(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<{}>;
|
|
906
|
+
fetchWithdrawalsWs(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<{}>;
|
|
907
|
+
fetchFundingRateHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<FundingRateHistory[]>;
|
|
908
|
+
fetchFundingHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<FundingHistory[]>;
|
|
909
909
|
closePosition(symbol: string, side?: OrderSide, params?: {}): Promise<Order>;
|
|
910
910
|
closeAllPositions(params?: {}): Promise<Position[]>;
|
|
911
911
|
fetchL3OrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
|
|
912
|
-
parseLastPrice(price: any, market?: Market):
|
|
912
|
+
parseLastPrice(price: any, market?: Market): LastPrice;
|
|
913
913
|
fetchDepositAddress(code: string, params?: {}): Promise<any>;
|
|
914
914
|
account(): Account;
|
|
915
915
|
commonCurrencyCode(currency: string): string;
|
|
@@ -944,10 +944,10 @@ export default class Exchange {
|
|
|
944
944
|
createStopLimitOrder(symbol: string, side: OrderSide, amount: number, price: number, stopPrice: number, params?: {}): Promise<Order>;
|
|
945
945
|
createStopMarketOrder(symbol: string, side: OrderSide, amount: number, stopPrice: number, params?: {}): Promise<Order>;
|
|
946
946
|
safeCurrencyCode(currencyId: Str, currency?: Currency): string;
|
|
947
|
-
filterBySymbolSinceLimit(array: any, symbol?:
|
|
947
|
+
filterBySymbolSinceLimit(array: any, symbol?: Str, since?: Int, limit?: Int, tail?: boolean): any;
|
|
948
948
|
filterByCurrencySinceLimit(array: any, code?: any, since?: Int, limit?: Int, tail?: boolean): any;
|
|
949
949
|
filterBySymbolsSinceLimit(array: any, symbols?: string[], since?: Int, limit?: Int, tail?: boolean): any;
|
|
950
|
-
parseLastPrices(pricesData: any, symbols?: string[], params?: {}):
|
|
950
|
+
parseLastPrices(pricesData: any, symbols?: string[], params?: {}): LastPrices;
|
|
951
951
|
parseTickers(tickers: any, symbols?: string[], params?: {}): Dictionary<Ticker>;
|
|
952
952
|
parseDepositAddresses(addresses: any, codes?: string[], indexed?: boolean, params?: {}): {};
|
|
953
953
|
parseBorrowInterests(response: any, market?: Market): any[];
|
|
@@ -958,7 +958,7 @@ export default class Exchange {
|
|
|
958
958
|
isTriggerOrder(params: any): any[];
|
|
959
959
|
isPostOnly(isMarketOrder: boolean, exchangeSpecificParam: any, params?: {}): boolean;
|
|
960
960
|
handlePostOnly(isMarketOrder: boolean, exchangeSpecificPostOnlyOption: boolean, params?: any): any[];
|
|
961
|
-
fetchLastPrices(symbols?: string[], params?: {}): Promise<
|
|
961
|
+
fetchLastPrices(symbols?: string[], params?: {}): Promise<LastPrices>;
|
|
962
962
|
fetchTradingFees(params?: {}): Promise<{}>;
|
|
963
963
|
fetchTradingFeesWs(params?: {}): Promise<{}>;
|
|
964
964
|
fetchTradingFee(symbol: string, params?: {}): Promise<{}>;
|
|
@@ -980,16 +980,16 @@ export default class Exchange {
|
|
|
980
980
|
parseIncomes(incomes: any, market?: any, since?: Int, limit?: Int): FundingHistory[];
|
|
981
981
|
getMarketFromSymbols(symbols?: string[]): MarketInterface;
|
|
982
982
|
parseWsOHLCVs(ohlcvs: object[], market?: any, timeframe?: string, since?: Int, limit?: Int): any[];
|
|
983
|
-
fetchTransactions(code?:
|
|
983
|
+
fetchTransactions(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
984
984
|
filterByArrayPositions(objects: any, key: IndexType, values?: any, indexed?: boolean): Position[];
|
|
985
985
|
filterByArrayTickers(objects: any, key: IndexType, values?: any, indexed?: boolean): Dictionary<Ticker>;
|
|
986
986
|
createOHLCVObject(symbol: string, timeframe: string, data: any): Dictionary<Dictionary<OHLCV[]>>;
|
|
987
987
|
handleMaxEntriesPerRequestAndParams(method: string, maxEntriesPerRequest?: Int, params?: {}): [Int, any];
|
|
988
|
-
fetchPaginatedCallDynamic(method: string, symbol?:
|
|
989
|
-
safeDeterministicCall(method: string, symbol?:
|
|
990
|
-
fetchPaginatedCallDeterministic(method: string, symbol?:
|
|
991
|
-
fetchPaginatedCallCursor(method: string, symbol?:
|
|
992
|
-
fetchPaginatedCallIncremental(method: string, symbol?:
|
|
988
|
+
fetchPaginatedCallDynamic(method: string, symbol?: Str, since?: Int, limit?: Int, params?: {}, maxEntriesPerRequest?: Int): Promise<any>;
|
|
989
|
+
safeDeterministicCall(method: string, symbol?: Str, since?: Int, limit?: Int, timeframe?: Str, params?: {}): Promise<any>;
|
|
990
|
+
fetchPaginatedCallDeterministic(method: string, symbol?: Str, since?: Int, limit?: Int, timeframe?: Str, params?: {}, maxEntriesPerRequest?: any): Promise<any>;
|
|
991
|
+
fetchPaginatedCallCursor(method: string, symbol?: Str, since?: any, limit?: any, params?: {}, cursorReceived?: any, cursorSent?: any, cursorIncrement?: any, maxEntriesPerRequest?: any): Promise<any>;
|
|
992
|
+
fetchPaginatedCallIncremental(method: string, symbol?: Str, since?: any, limit?: any, params?: {}, pageKey?: any, maxEntriesPerRequest?: any): Promise<any>;
|
|
993
993
|
sortCursorPaginatedResult(result: any): any;
|
|
994
994
|
removeRepeatedElementsFromArray(input: any): any;
|
|
995
995
|
handleUntilOption(key: string, request: any, params: any, multiplier?: number): any[];
|
|
@@ -997,9 +997,9 @@ export default class Exchange {
|
|
|
997
997
|
parseLiquidation(liquidation: any, market?: Market): Liquidation;
|
|
998
998
|
parseLiquidations(liquidations: any, market?: any, since?: Int, limit?: Int): Liquidation[];
|
|
999
999
|
parseGreeks(greeks: any, market?: Market): Greeks;
|
|
1000
|
-
parseMarginModes(response: object[], symbols?: string[], symbolKey?:
|
|
1000
|
+
parseMarginModes(response: object[], symbols?: string[], symbolKey?: Str, marketType?: MarketType): MarginModes;
|
|
1001
1001
|
parseMarginMode(marginMode: any, market?: Market): MarginMode;
|
|
1002
|
-
parseLeverages(response: object[], symbols?: string[], symbolKey?:
|
|
1002
|
+
parseLeverages(response: object[], symbols?: string[], symbolKey?: Str, marketType?: MarketType): Leverages;
|
|
1003
1003
|
parseLeverage(leverage: any, market?: Market): Leverage;
|
|
1004
1004
|
}
|
|
1005
1005
|
export { Exchange, };
|