ccxt 4.5.26 → 4.5.28
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 +6 -5
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +4 -1
- package/dist/cjs/src/abstract/zebpay.js +11 -0
- package/dist/cjs/src/base/Exchange.js +2 -2
- package/dist/cjs/src/binance.js +18 -7
- package/dist/cjs/src/bingx.js +5 -5
- package/dist/cjs/src/bitget.js +18 -17
- package/dist/cjs/src/bitmex.js +5 -1
- package/dist/cjs/src/blofin.js +5 -5
- package/dist/cjs/src/bybit.js +58 -29
- package/dist/cjs/src/coincatch.js +9 -9
- package/dist/cjs/src/coinex.js +93 -0
- package/dist/cjs/src/coinmate.js +20 -0
- package/dist/cjs/src/coinsph.js +23 -0
- package/dist/cjs/src/cryptocom.js +7 -0
- package/dist/cjs/src/gate.js +2 -0
- package/dist/cjs/src/hyperliquid.js +12 -15
- package/dist/cjs/src/pro/binance.js +1 -1
- package/dist/cjs/src/pro/bybit.js +1 -1
- package/dist/cjs/src/whitebit.js +4 -2
- package/dist/cjs/src/zebpay.js +1908 -0
- package/js/ccxt.d.ts +5 -2
- package/js/ccxt.js +4 -2
- package/js/src/abstract/binance.d.ts +3 -1
- package/js/src/abstract/binancecoinm.d.ts +3 -1
- package/js/src/abstract/binanceus.d.ts +3 -1
- package/js/src/abstract/binanceusdm.d.ts +3 -1
- package/js/src/abstract/coinex.d.ts +16 -0
- package/js/src/abstract/coinmate.d.ts +3 -0
- package/js/src/abstract/coinsph.d.ts +21 -0
- package/js/src/abstract/cryptocom.d.ts +7 -0
- package/js/src/abstract/gate.d.ts +2 -0
- package/js/src/abstract/gateio.d.ts +2 -0
- package/js/src/abstract/zebpay.d.ts +49 -0
- package/js/src/abstract/zebpay.js +11 -0
- package/js/src/base/Exchange.js +2 -2
- package/js/src/binance.d.ts +1 -0
- package/js/src/binance.js +18 -7
- package/js/src/bingx.js +5 -5
- package/js/src/bitget.js +19 -18
- package/js/src/bitmex.js +5 -1
- package/js/src/blofin.js +5 -5
- package/js/src/bybit.d.ts +3 -0
- package/js/src/bybit.js +58 -29
- package/js/src/coincatch.js +9 -9
- package/js/src/coinex.d.ts +11 -0
- package/js/src/coinex.js +93 -0
- package/js/src/coinmate.d.ts +9 -0
- package/js/src/coinmate.js +20 -0
- package/js/src/coinsph.js +23 -0
- package/js/src/cryptocom.js +7 -0
- package/js/src/gate.js +2 -0
- package/js/src/hyperliquid.js +12 -15
- package/js/src/pro/binance.js +1 -1
- package/js/src/pro/bybit.js +1 -1
- package/js/src/whitebit.js +4 -2
- package/js/src/zebpay.d.ts +361 -0
- package/js/src/zebpay.js +1907 -0
- package/package.json +1 -1
package/js/src/coinmate.js
CHANGED
|
@@ -141,10 +141,12 @@ export default class coinmate extends Exchange {
|
|
|
141
141
|
'products',
|
|
142
142
|
'transactions',
|
|
143
143
|
'tradingPairs',
|
|
144
|
+
'system/time',
|
|
144
145
|
],
|
|
145
146
|
},
|
|
146
147
|
'private': {
|
|
147
148
|
'post': [
|
|
149
|
+
'currencies',
|
|
148
150
|
'balances',
|
|
149
151
|
'bitcoinCashWithdrawal',
|
|
150
152
|
'bitcoinCashDepositAddresses',
|
|
@@ -197,6 +199,7 @@ export default class coinmate extends Exchange {
|
|
|
197
199
|
'solWithdrawal',
|
|
198
200
|
'solDepositAddresses',
|
|
199
201
|
'unconfirmedSolDeposits',
|
|
202
|
+
'bankWireWithdrawal',
|
|
200
203
|
],
|
|
201
204
|
},
|
|
202
205
|
},
|
|
@@ -329,6 +332,23 @@ export default class coinmate extends Exchange {
|
|
|
329
332
|
'precisionMode': TICK_SIZE,
|
|
330
333
|
});
|
|
331
334
|
}
|
|
335
|
+
/**
|
|
336
|
+
* @method
|
|
337
|
+
* @name coinmate#fetchTime
|
|
338
|
+
* @description fetches the current integer timestamp in milliseconds from the bingx server
|
|
339
|
+
* @see https://coinmate.docs.apiary.io/#reference/system/get-server-time/get
|
|
340
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
341
|
+
* @returns {int} the current integer timestamp in milliseconds from the bingx server
|
|
342
|
+
*/
|
|
343
|
+
async fetchTime(params = {}) {
|
|
344
|
+
const response = await this.publicGetSystemTime(params);
|
|
345
|
+
//
|
|
346
|
+
// {
|
|
347
|
+
// "serverTime": 1765250628745
|
|
348
|
+
// }
|
|
349
|
+
//
|
|
350
|
+
return this.safeInteger(response, 'serverTime');
|
|
351
|
+
}
|
|
332
352
|
/**
|
|
333
353
|
* @method
|
|
334
354
|
* @name coinmate#fetchMarkets
|
package/js/src/coinsph.js
CHANGED
|
@@ -189,6 +189,7 @@ export default class coinsph extends Exchange {
|
|
|
189
189
|
'get': {
|
|
190
190
|
'openapi/v1/ping': 1,
|
|
191
191
|
'openapi/v1/time': 1,
|
|
192
|
+
'openapi/v1/user/ip': 1,
|
|
192
193
|
// cost 1 if 'symbol' param defined (one market symbol) or if 'symbols' param is a list of 1-20 market symbols
|
|
193
194
|
// cost 20 if 'symbols' param is a list of 21-100 market symbols
|
|
194
195
|
// cost 40 if 'symbols' param is a list of 101 or more market symbols or if both 'symbol' and 'symbols' params are omited
|
|
@@ -210,11 +211,14 @@ export default class coinsph extends Exchange {
|
|
|
210
211
|
},
|
|
211
212
|
'private': {
|
|
212
213
|
'get': {
|
|
214
|
+
'openapi/v1/check-sys-status': 1,
|
|
213
215
|
'openapi/wallet/v1/config/getall': 10,
|
|
214
216
|
'openapi/wallet/v1/deposit/address': 10,
|
|
215
217
|
'openapi/wallet/v1/deposit/history': 1,
|
|
216
218
|
'openapi/wallet/v1/withdraw/history': 1,
|
|
219
|
+
'openapi/wallet/v1/withdraw/address-whitelist': 1,
|
|
217
220
|
'openapi/v1/account': 10,
|
|
221
|
+
'openapi/v1/api-keys': 1,
|
|
218
222
|
// cost 3 for a single symbol; 40 when the symbol parameter is omitted
|
|
219
223
|
'openapi/v1/openOrders': { 'cost': 3, 'noSymbol': 40 },
|
|
220
224
|
'openapi/v1/asset/tradeFee': 1,
|
|
@@ -228,6 +232,15 @@ export default class coinsph extends Exchange {
|
|
|
228
232
|
'merchant-api/v1/get-invoices': 1,
|
|
229
233
|
'openapi/account/v3/crypto-accounts': 1,
|
|
230
234
|
'openapi/transfer/v3/transfers/{id}': 1,
|
|
235
|
+
'openapi/v1/sub-account/list': 10,
|
|
236
|
+
'openapi/v1/sub-account/asset': 10,
|
|
237
|
+
'openapi/v1/sub-account/transfer/universal-transfer-history': 10,
|
|
238
|
+
'openapi/v1/sub-account/transfer/sub-history': 10,
|
|
239
|
+
'openapi/v1/sub-account/apikey/ip-restriction': 10,
|
|
240
|
+
'openapi/v1/sub-account/wallet/deposit/address': 1,
|
|
241
|
+
'openapi/v1/sub-account/wallet/deposit/history': 1,
|
|
242
|
+
'openapi/v1/fund-collect/get-fund-record': 1,
|
|
243
|
+
'openapi/v1/asset/transaction/history': 20,
|
|
231
244
|
},
|
|
232
245
|
'post': {
|
|
233
246
|
'openapi/wallet/v1/withdraw/apply': 600,
|
|
@@ -244,12 +257,22 @@ export default class coinsph extends Exchange {
|
|
|
244
257
|
'openapi/convert/v1/get-supported-trading-pairs': 1,
|
|
245
258
|
'openapi/convert/v1/get-quote': 1,
|
|
246
259
|
'openapi/convert/v1/accpet-quote': 1,
|
|
260
|
+
'openapi/convert/v1/query-order-history': 1,
|
|
247
261
|
'openapi/fiat/v1/support-channel': 1,
|
|
248
262
|
'openapi/fiat/v1/cash-out': 1,
|
|
249
263
|
'openapi/fiat/v1/history': 1,
|
|
250
264
|
'openapi/migration/v4/sellorder': 1,
|
|
251
265
|
'openapi/migration/v4/validate-field': 1,
|
|
252
266
|
'openapi/transfer/v3/transfers': 1,
|
|
267
|
+
'openapi/v1/sub-account/create': 30,
|
|
268
|
+
'openapi/v1/sub-account/transfer/universal-transfer': 100,
|
|
269
|
+
'openapi/v1/sub-account/transfer/sub-to-master': 100,
|
|
270
|
+
'openapi/v1/sub-account/apikey/add-ip-restriction': 30,
|
|
271
|
+
'openapi/v1/sub-account/apikey/delete-ip-restriction': 30,
|
|
272
|
+
'openapi/v1/fund-collect/collect-from-sub-account': 1,
|
|
273
|
+
},
|
|
274
|
+
'put': {
|
|
275
|
+
'openapi/v1/userDataStream': 1,
|
|
253
276
|
},
|
|
254
277
|
'delete': {
|
|
255
278
|
'openapi/v1/order': 1,
|
package/js/src/cryptocom.js
CHANGED
|
@@ -212,6 +212,13 @@ export default class cryptocom extends Exchange {
|
|
|
212
212
|
'private/get-deposit-history': 10 / 3,
|
|
213
213
|
'private/get-fee-rate': 2,
|
|
214
214
|
'private/get-instrument-fee-rate': 2,
|
|
215
|
+
'private/fiat/fiat-deposit-info': 10 / 3,
|
|
216
|
+
'private/fiat/fiat-deposit-history': 10 / 3,
|
|
217
|
+
'private/fiat/fiat-withdraw-history': 10 / 3,
|
|
218
|
+
'private/fiat/fiat-create-withdraw': 10 / 3,
|
|
219
|
+
'private/fiat/fiat-transaction-quota': 10 / 3,
|
|
220
|
+
'private/fiat/fiat-transaction-limit': 10 / 3,
|
|
221
|
+
'private/fiat/fiat-get-bank-accounts': 10 / 3,
|
|
215
222
|
'private/staking/stake': 2,
|
|
216
223
|
'private/staking/unstake': 2,
|
|
217
224
|
'private/staking/get-staking-position': 2,
|
package/js/src/gate.js
CHANGED
|
@@ -321,6 +321,7 @@ export default class gate extends Exchange {
|
|
|
321
321
|
'small_balance': 1,
|
|
322
322
|
'small_balance_history': 1,
|
|
323
323
|
'push': 1,
|
|
324
|
+
'getLowCapExchangeList': 1,
|
|
324
325
|
},
|
|
325
326
|
'post': {
|
|
326
327
|
'transfers': 2.5,
|
|
@@ -510,6 +511,7 @@ export default class gate extends Exchange {
|
|
|
510
511
|
},
|
|
511
512
|
'put': {
|
|
512
513
|
'{settle}/orders/{order_id}': 1,
|
|
514
|
+
'{settle}/price_orders/{order_id}': 1,
|
|
513
515
|
},
|
|
514
516
|
'delete': {
|
|
515
517
|
'{settle}/orders': 20 / 75,
|
package/js/src/hyperliquid.js
CHANGED
|
@@ -240,11 +240,11 @@ export default class hyperliquid extends Exchange {
|
|
|
240
240
|
'UXPL': 'XPL',
|
|
241
241
|
},
|
|
242
242
|
'fetchMarkets': {
|
|
243
|
-
'types': ['spot', 'swap', 'hip3'],
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
243
|
+
'types': ['spot', 'swap', 'hip3'],
|
|
244
|
+
'hip3': {
|
|
245
|
+
'limit': 10,
|
|
246
|
+
'dexes': [], // list of dexes eg flx, xyz, etc
|
|
247
|
+
},
|
|
248
248
|
},
|
|
249
249
|
},
|
|
250
250
|
'features': {
|
|
@@ -579,19 +579,16 @@ export default class hyperliquid extends Exchange {
|
|
|
579
579
|
let fetchDexesList = [];
|
|
580
580
|
const options = this.safeDict(this.options, 'fetchMarkets', {});
|
|
581
581
|
const hip3 = this.safeDict(options, 'hip3', {});
|
|
582
|
-
const
|
|
583
|
-
const
|
|
584
|
-
if (
|
|
585
|
-
const
|
|
586
|
-
if (
|
|
587
|
-
|
|
588
|
-
}
|
|
589
|
-
else {
|
|
590
|
-
fetchDexesList = defaultDexes;
|
|
582
|
+
const dexesProvided = this.safeList(hip3, 'dexes'); // let users provide their own list of dexes to load
|
|
583
|
+
const maxLimit = this.safeInteger(hip3, 'limit', 10);
|
|
584
|
+
if (dexesProvided !== undefined) {
|
|
585
|
+
const userProvidedDexesLength = dexesProvided.length;
|
|
586
|
+
if (userProvidedDexesLength > 0) {
|
|
587
|
+
fetchDexesList = dexesProvided;
|
|
591
588
|
}
|
|
592
589
|
}
|
|
593
590
|
else {
|
|
594
|
-
for (let i = 1; i <
|
|
591
|
+
for (let i = 1; i < maxLimit; i++) {
|
|
595
592
|
const dex = this.safeDict(fetchDexes, i, {});
|
|
596
593
|
const dexName = this.safeString(dex, 'name');
|
|
597
594
|
fetchDexesList.push(dexName);
|
package/js/src/pro/binance.js
CHANGED
|
@@ -3794,7 +3794,7 @@ export default class binance extends binanceRest {
|
|
|
3794
3794
|
'datetime': this.iso8601(timestamp),
|
|
3795
3795
|
'lastTradeTimestamp': lastTradeTimestamp,
|
|
3796
3796
|
'lastUpdateTimestamp': lastUpdateTimestamp,
|
|
3797
|
-
'type': this.safeStringLower(order, 'o'),
|
|
3797
|
+
'type': this.parseOrderType(this.safeStringLower(order, 'o')),
|
|
3798
3798
|
'timeInForce': timeInForce,
|
|
3799
3799
|
'postOnly': undefined,
|
|
3800
3800
|
'reduceOnly': this.safeBool(order, 'R'),
|
package/js/src/pro/bybit.js
CHANGED
package/js/src/whitebit.js
CHANGED
|
@@ -22,7 +22,7 @@ export default class whitebit extends Exchange {
|
|
|
22
22
|
'name': 'WhiteBit',
|
|
23
23
|
'version': 'v4',
|
|
24
24
|
'countries': ['EE'],
|
|
25
|
-
'rateLimit':
|
|
25
|
+
'rateLimit': 20,
|
|
26
26
|
'pro': true,
|
|
27
27
|
'has': {
|
|
28
28
|
'CORS': undefined,
|
|
@@ -299,6 +299,7 @@ export default class whitebit extends Exchange {
|
|
|
299
299
|
'timeDifference': 0,
|
|
300
300
|
'adjustForTimeDifference': false,
|
|
301
301
|
'fiatCurrencies': ['EUR', 'USD', 'RUB', 'UAH'],
|
|
302
|
+
'nonceWindow': false,
|
|
302
303
|
'fetchBalance': {
|
|
303
304
|
'account': 'spot',
|
|
304
305
|
},
|
|
@@ -3923,7 +3924,8 @@ export default class whitebit extends Exchange {
|
|
|
3923
3924
|
const nonce = this.nonce().toString();
|
|
3924
3925
|
const secret = this.encode(this.secret);
|
|
3925
3926
|
const request = '/' + 'api' + '/' + version + pathWithParams;
|
|
3926
|
-
|
|
3927
|
+
const [nonceWindow, requestParams] = this.handleOptionAndParams(params, 'sign', 'nonceWindow', false);
|
|
3928
|
+
body = this.json(this.extend({ 'request': request, 'nonce': nonce, 'nonceWindow': nonceWindow }, requestParams));
|
|
3927
3929
|
const payload = this.stringToBase64(body);
|
|
3928
3930
|
const signature = this.hmac(this.encode(payload), secret, sha512);
|
|
3929
3931
|
headers = {
|
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
import Exchange from './abstract/zebpay.js';
|
|
2
|
+
import type { Balances, Currencies, Dict, Int, int, Leverage, Leverages, MarginModification, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees } from './base/types.js';
|
|
3
|
+
/**
|
|
4
|
+
* @class
|
|
5
|
+
* @augments Exchange
|
|
6
|
+
*/
|
|
7
|
+
export default class zebpay extends Exchange {
|
|
8
|
+
describe(): any;
|
|
9
|
+
/**
|
|
10
|
+
* @method
|
|
11
|
+
* @name zebpay#fetchStatus
|
|
12
|
+
* @description the latest known information on the availability of the exchange API
|
|
13
|
+
* @see [Spot] https://github.com/zebpay/zebpay-api-references/blob/main/spot/api-reference/public-endpoints.md#system-status
|
|
14
|
+
* @see [Swap] https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/public-endpoints/system.md#get-system-status
|
|
15
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
16
|
+
* @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
|
|
17
|
+
*/
|
|
18
|
+
fetchStatus(params?: {}): Promise<{
|
|
19
|
+
status: string;
|
|
20
|
+
updated: any;
|
|
21
|
+
eta: any;
|
|
22
|
+
url: any;
|
|
23
|
+
info: any;
|
|
24
|
+
}>;
|
|
25
|
+
/**
|
|
26
|
+
* @method
|
|
27
|
+
* @name zebpayfutures#fetchTime
|
|
28
|
+
* @description fetches the current integer timestamp in milliseconds from the poloniexfutures server
|
|
29
|
+
* @see [Spot] https://github.com/zebpay/zebpay-api-references/blob/main/spot/api-reference/public-endpoints.md#get-server-time
|
|
30
|
+
* @see [Swap] https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/public-endpoints/system.md#get-system-time
|
|
31
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
32
|
+
* @returns {int} the current integer timestamp in milliseconds from the poloniexfutures server
|
|
33
|
+
*/
|
|
34
|
+
fetchTime(params?: {}): Promise<Int>;
|
|
35
|
+
/**
|
|
36
|
+
* @method
|
|
37
|
+
* @name zebpay#fetchMarkets
|
|
38
|
+
* @description retrieves data on all markets for zebpay
|
|
39
|
+
* @see [Spot] https://github.com/zebpay/zebpay-api-references/blob/main/spot/api-reference/public-endpoints.md#get-trading-pairs
|
|
40
|
+
* @see [Swap] https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/public-endpoints/market.md#fetch-markets
|
|
41
|
+
* @param {object} [params] extra parameters specific to the exchange api endpoint
|
|
42
|
+
* @returns {object[]} an array of objects representing market data
|
|
43
|
+
*/
|
|
44
|
+
fetchMarkets(params?: {}): Promise<Market[]>;
|
|
45
|
+
/**
|
|
46
|
+
* @method
|
|
47
|
+
* @name zebpay#fetchCurrencies
|
|
48
|
+
* @description fetches all available currencies on an exchange
|
|
49
|
+
* @see [Spot] https://github.com/zebpay/zebpay-api-references/blob/main/spot/api-reference/public-endpoints.md#get-coin-settings
|
|
50
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
51
|
+
* @returns {object} an associative dictionary of currencies
|
|
52
|
+
*/
|
|
53
|
+
fetchCurrencies(params?: {}): Promise<Currencies>;
|
|
54
|
+
/**
|
|
55
|
+
* @method
|
|
56
|
+
* @name zebpay#fetchTradingFee
|
|
57
|
+
* @description fetch the trading fees for a market
|
|
58
|
+
* @see [Spot] https://github.com/zebpay/zebpay-api-references/blob/main/spot/api-reference/private-endpoints.md#get-exchange-fee
|
|
59
|
+
* @see [Swap] https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/public-endpoints/exchange.md#get-trade-fee-single-symbol
|
|
60
|
+
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
61
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
62
|
+
* @param {object} [params.side] side to fetch trading fee
|
|
63
|
+
* @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
|
|
64
|
+
*/
|
|
65
|
+
fetchTradingFee(symbol: string, params?: {}): Promise<TradingFeeInterface>;
|
|
66
|
+
/**
|
|
67
|
+
* @method
|
|
68
|
+
* @name zebpay(futures)#fetchTradingFees
|
|
69
|
+
* @description fetch the trading fees for multiple markets
|
|
70
|
+
* @see [Swap] https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/public-endpoints/exchange.md#get-trade-fees-all-symbols
|
|
71
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
72
|
+
* @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
|
|
73
|
+
*/
|
|
74
|
+
fetchTradingFees(params?: {}): Promise<TradingFees>;
|
|
75
|
+
/**
|
|
76
|
+
* @method
|
|
77
|
+
* @name zebpay#fetchOrderBook
|
|
78
|
+
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
79
|
+
* @see [Spot] https://github.com/zebpay/zebpay-api-references/blob/main/spot/api-reference/public-endpoints.md#get-order-book
|
|
80
|
+
* @see [Swap] https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/public-endpoints/market.md#get-order-book
|
|
81
|
+
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
82
|
+
* @param {int} [limit] the maximum amount of order book entries to return
|
|
83
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
84
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
85
|
+
*/
|
|
86
|
+
fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
|
|
87
|
+
/**
|
|
88
|
+
* @method
|
|
89
|
+
* @name zebpay#fetchTicker
|
|
90
|
+
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
91
|
+
* @see [Spot] https://github.com/zebpay/zebpay-api-references/blob/main/spot/api-reference/public-endpoints.md#get-ticker
|
|
92
|
+
* @see [Swap] https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/public-endpoints/market.md#get-24hr-ticker
|
|
93
|
+
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
94
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
95
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
96
|
+
*/
|
|
97
|
+
fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
|
|
98
|
+
/**
|
|
99
|
+
* @method
|
|
100
|
+
* @name zebpay#fetchTickers
|
|
101
|
+
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
102
|
+
* @see [Spot] https://github.com/zebpay/zebpay-api-references/blob/main/spot/api-reference/public-endpoints.md#get-all-tickers
|
|
103
|
+
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
104
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
105
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
106
|
+
*/
|
|
107
|
+
fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
|
|
108
|
+
/**
|
|
109
|
+
* @method
|
|
110
|
+
* @name zebpay#fetchOHLCV
|
|
111
|
+
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
112
|
+
* @see [Spot] https://github.com/zebpay/zebpay-api-references/blob/main/spot/api-reference/public-endpoints.md#get-klinescandlesticks
|
|
113
|
+
* @see [Swap] https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/public-endpoints/market.md#-get-k-lines-ohlcv-data
|
|
114
|
+
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
115
|
+
* @param {string} timeframe the length of time each candle represents
|
|
116
|
+
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
117
|
+
* @param {int} [limit] the maximum amount of candles to fetch
|
|
118
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
119
|
+
* @param {int} [params.endtime] the latest time in ms to fetch orders for
|
|
120
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
121
|
+
*/
|
|
122
|
+
fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
|
|
123
|
+
/**
|
|
124
|
+
* @method
|
|
125
|
+
* @name zebpay#fetchTrades
|
|
126
|
+
* @description get the list of most recent trades for a particular symbol
|
|
127
|
+
* @see [Spot] https://github.com/zebpay/zebpay-api-references/blob/main/spot/api-reference/public-endpoints.md#get-recent-trades
|
|
128
|
+
* @see https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/public-endpoints/market.md#get-aggregate-trades
|
|
129
|
+
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
130
|
+
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
131
|
+
* @param {int} [limit] the maximum amount of trades to fetch
|
|
132
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
133
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
134
|
+
*/
|
|
135
|
+
fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
136
|
+
/**
|
|
137
|
+
* @method
|
|
138
|
+
* @name zebpay#fetchMyTrades
|
|
139
|
+
* @description get the list of most recent trades for a particular symbol
|
|
140
|
+
* @see https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/private-endpoints/trade.md#-get-trade-history
|
|
141
|
+
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
142
|
+
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
143
|
+
* @param {int} [limit] the maximum amount of trades to fetch
|
|
144
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
145
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
146
|
+
*/
|
|
147
|
+
fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
148
|
+
/**
|
|
149
|
+
* @method
|
|
150
|
+
* @name zebpatspot#fetchOrderTrades
|
|
151
|
+
* @description fetch all the trades made from a single order
|
|
152
|
+
* @see [Spot] https://github.com/zebpay/zebpay-api-references/blob/main/spot/api-reference/private-endpoints.md#get-order-fills
|
|
153
|
+
* @param {string} id order id
|
|
154
|
+
* @param {string} symbol unified market symbol
|
|
155
|
+
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
156
|
+
* @param {int} [limit] the maximum number of trades to retrieve
|
|
157
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
158
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
159
|
+
*/
|
|
160
|
+
fetchOrderTrades(id: string, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
161
|
+
parseTrade(trade: Dict, market?: Market): Trade;
|
|
162
|
+
/**
|
|
163
|
+
* @method
|
|
164
|
+
* @name zebpay#fetchBalance
|
|
165
|
+
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
166
|
+
* @see [Spot] https://github.com/zebpay/zebpay-api-references/blob/main/spot/api-reference/private-endpoints.md#get-account-balance
|
|
167
|
+
* @see [Swap] https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/private-endpoints/wallet.md#get-wallet-balance
|
|
168
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
169
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
170
|
+
*/
|
|
171
|
+
fetchBalance(params?: {}): Promise<Balances>;
|
|
172
|
+
/**
|
|
173
|
+
* @method
|
|
174
|
+
* @name zebpay#createOrder
|
|
175
|
+
* @description Create an order on the exchange
|
|
176
|
+
* @see [Spot] https://github.com/zebpay/zebpay-api-references/blob/main/spot/api-reference/private-endpoints.md#place-new-order
|
|
177
|
+
* @see [Swap] https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/private-endpoints/trade.md#--create-order
|
|
178
|
+
* @param {string} symbol Unified CCXT market symbol
|
|
179
|
+
* @param {string} type 'limit' or 'market'
|
|
180
|
+
* @param {string} side 'buy' or 'sell'
|
|
181
|
+
* @param {float} amount the amount of currency to trade
|
|
182
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
183
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
184
|
+
* @param {string} [params.formType] The price at which a trigger order is triggered at
|
|
185
|
+
* @param {string} [params.marginAsset] The asset the order creates, default is INR.
|
|
186
|
+
* @param {boolean} [params.takeProfit] Takeprofit flag for the order.
|
|
187
|
+
* @param {boolean} [params.stopLoss] Stop loss flag for the order.
|
|
188
|
+
* @param {string} [params.positionId] PositionId of the order.
|
|
189
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
190
|
+
*/
|
|
191
|
+
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
|
|
192
|
+
orderRequest(symbol: any, type: any, amount: any, request: any, price?: any, params?: {}): any[];
|
|
193
|
+
/**
|
|
194
|
+
* @method
|
|
195
|
+
* @name zebpay#cancelOrder
|
|
196
|
+
* @description cancels an open order
|
|
197
|
+
* @see [Spot] https://github.com/zebpay/zebpay-api-references/blob/main/spot/api-reference/private-endpoints.md#cancel-order
|
|
198
|
+
* @see [Swap] https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/private-endpoints/trade.md#-cancel-order
|
|
199
|
+
* @param {string} id order id
|
|
200
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
201
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
202
|
+
* @param {object} [params.timestamp] extra parameters specific to the exchange API endpoint
|
|
203
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
204
|
+
*/
|
|
205
|
+
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
206
|
+
/**
|
|
207
|
+
* @method
|
|
208
|
+
* @name zebpay#cancelOrders
|
|
209
|
+
* @description cancels all open orders
|
|
210
|
+
* @see [Spot] https://github.com/zebpay/zebpay-api-references/blob/main/spot/api-reference/private-endpoints.md#cancel-all-orders
|
|
211
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
212
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
213
|
+
* @param {object} [params.timestamp] extra parameters specific to the exchange API endpoint
|
|
214
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
215
|
+
*/
|
|
216
|
+
cancelAllOrders(symbol?: Str, params?: {}): Promise<Order[]>;
|
|
217
|
+
/**
|
|
218
|
+
* @method
|
|
219
|
+
* @name zebpay#fetchOpenOrders
|
|
220
|
+
* @description fetches information on multiple open orders made by the user
|
|
221
|
+
* @see [Spot] https://github.com/zebpay/zebpay-api-references/blob/main/spot/api-reference/private-endpoints.md#get-orders
|
|
222
|
+
* @see [Swap] https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/private-endpoints/trade.md#-get-open-orders
|
|
223
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
224
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
225
|
+
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
226
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
227
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
228
|
+
*/
|
|
229
|
+
fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
230
|
+
/**
|
|
231
|
+
* @method
|
|
232
|
+
* @name zebpay#fetchOrder
|
|
233
|
+
* @description fetches information on an order made by the user
|
|
234
|
+
* @see [Spot] https://github.com/zebpay/zebpay-api-references/blob/main/spot/api-reference/private-endpoints.md#get-order-details
|
|
235
|
+
* @see [Swap] https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/private-endpoints/trade.md#-get-order-details
|
|
236
|
+
* @param {string} id order id
|
|
237
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
238
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
239
|
+
* @param {string} [params.clientOrderId] cancel order by client order id
|
|
240
|
+
* @param {string} [params.timestamp] cancel order by client order id
|
|
241
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
242
|
+
*/
|
|
243
|
+
fetchOrder(id: Str, symbol?: Str, params?: {}): Promise<Order>;
|
|
244
|
+
parseOrder(order: Dict, market?: Market): Order;
|
|
245
|
+
/**
|
|
246
|
+
* @method
|
|
247
|
+
* @name zebpay#closePosition
|
|
248
|
+
* @description closes open positions for a market
|
|
249
|
+
* @see [Swap] https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/private-endpoints/trade.md#-close-position
|
|
250
|
+
* @param {string} symbol Unified CCXT market symbol
|
|
251
|
+
* @param {string} side not used by kucoinfutures closePositions
|
|
252
|
+
* @param {object} [params] extra parameters specific to the okx api endpoint
|
|
253
|
+
* @param {string} [params.positionId] client order id of the order
|
|
254
|
+
* @returns {object[]} [A list of position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
255
|
+
*/
|
|
256
|
+
closePosition(symbol: string, side?: OrderSide, params?: {}): Promise<Order>;
|
|
257
|
+
/**
|
|
258
|
+
* @method
|
|
259
|
+
* @name zebpay#fetchLeverages
|
|
260
|
+
* @description fetch the set leverage for all contract and margin markets
|
|
261
|
+
* @see [Swap] https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/private-endpoints/trade.md#-get-all-user-leverages
|
|
262
|
+
* @param {string[]} [symbols] a list of unified market symbols
|
|
263
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
264
|
+
* @returns {object} a list of [leverage structures]{@link https://docs.ccxt.com/#/?id=leverage-structure}
|
|
265
|
+
*/
|
|
266
|
+
fetchLeverages(symbols?: Strings, params?: {}): Promise<Leverages>;
|
|
267
|
+
/**
|
|
268
|
+
* @method
|
|
269
|
+
* @name zebpay#fetchLeverage
|
|
270
|
+
* @description fetch the set leverage for a market
|
|
271
|
+
* @see [Swap] https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/private-endpoints/trade.md#get-user-leverage-single-symbol
|
|
272
|
+
* @param {string} symbol unified market symbol
|
|
273
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
274
|
+
* @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
|
|
275
|
+
*/
|
|
276
|
+
fetchLeverage(symbol: string, params?: {}): Promise<Leverage>;
|
|
277
|
+
/**
|
|
278
|
+
* @method
|
|
279
|
+
* @name zebpay#setLeverage
|
|
280
|
+
* @description set the level of leverage for a market
|
|
281
|
+
* @see [Swap] https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/private-endpoints/trade.md#-update-user-leverage
|
|
282
|
+
* @param {float} leverage the rate of leverage
|
|
283
|
+
* @param {string} symbol unified market symbol
|
|
284
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
285
|
+
* @returns {object} response from the exchange
|
|
286
|
+
*/
|
|
287
|
+
setLeverage(leverage: int, symbol?: Str, params?: {}): Promise<any>;
|
|
288
|
+
/**
|
|
289
|
+
* @method
|
|
290
|
+
* @name zebpay#fetchPositions
|
|
291
|
+
* @see [Swap] https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/private-endpoints/trade.md#--get-positions
|
|
292
|
+
* @description Fetches current contract trading positions
|
|
293
|
+
* @param {string[]} symbols List of unified symbols
|
|
294
|
+
* @param {object} [params] Not used by krakenfutures
|
|
295
|
+
* @returns Parsed exchange response for positions
|
|
296
|
+
*/
|
|
297
|
+
fetchPositions(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Position[]>;
|
|
298
|
+
/**
|
|
299
|
+
* @method
|
|
300
|
+
* @name zebpayfutures#addMargin
|
|
301
|
+
* @description add margin
|
|
302
|
+
* @see [Swap] https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/private-endpoints/trade.md#-add-margin-to-position
|
|
303
|
+
* @param {string} symbol unified market symbol
|
|
304
|
+
* @param {float} amount amount of margin to add
|
|
305
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint.
|
|
306
|
+
* @param {string} [params.positionId] PositionId of the order to add margin.
|
|
307
|
+
* @param {string} [params.timestamp] Tiemstamp.
|
|
308
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
|
|
309
|
+
*/
|
|
310
|
+
addMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
|
|
311
|
+
/**
|
|
312
|
+
* @method
|
|
313
|
+
* @name zebpayfutures#reduceMargin
|
|
314
|
+
* @description add margin
|
|
315
|
+
* @see [Swap] https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/private-endpoints/trade.md#-reduce-margin-from-position
|
|
316
|
+
* @param {string} symbol unified market symbol.
|
|
317
|
+
* @param {float} amount amount of margin to add.
|
|
318
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint.
|
|
319
|
+
* @param {string} [params.positionId] PositionId of the order to add margin.
|
|
320
|
+
* @param {string} [params.timestamp] Tiemstamp.
|
|
321
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
|
|
322
|
+
*/
|
|
323
|
+
reduceMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
|
|
324
|
+
fetchSpotMarkets(params?: {}): Promise<Market[]>;
|
|
325
|
+
fetchSwapMarkets(params?: {}): Promise<Market[]>;
|
|
326
|
+
parseBalance(response: any): Balances;
|
|
327
|
+
parsePosition(position: Dict, market?: Market): {
|
|
328
|
+
info: Dict;
|
|
329
|
+
symbol: string;
|
|
330
|
+
timestamp: number;
|
|
331
|
+
datetime: string;
|
|
332
|
+
initialMargin: number;
|
|
333
|
+
initialMarginPercentage: any;
|
|
334
|
+
maintenanceMargin: any;
|
|
335
|
+
maintenanceMarginPercentage: any;
|
|
336
|
+
entryPrice: number;
|
|
337
|
+
notional: number;
|
|
338
|
+
leverage: number;
|
|
339
|
+
unrealizedPnl: any;
|
|
340
|
+
contracts: number;
|
|
341
|
+
contractSize: number;
|
|
342
|
+
marginRatio: any;
|
|
343
|
+
liquidationPrice: number;
|
|
344
|
+
markPrice: any;
|
|
345
|
+
collateral: any;
|
|
346
|
+
marginType: string;
|
|
347
|
+
side: string;
|
|
348
|
+
percentage: any;
|
|
349
|
+
};
|
|
350
|
+
parseLeverage(leverage: Dict, market?: Market): Leverage;
|
|
351
|
+
parseTradingFee(fee: Dict, market?: Market): TradingFeeInterface;
|
|
352
|
+
parseTicker(ticker: Dict, market?: Market): Ticker;
|
|
353
|
+
parseMarginModification(info: any, market?: Market): MarginModification;
|
|
354
|
+
sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
|
|
355
|
+
url: any;
|
|
356
|
+
method: string;
|
|
357
|
+
body: any;
|
|
358
|
+
headers: any;
|
|
359
|
+
};
|
|
360
|
+
handleErrors(code: int, reason: string, url: string, method: string, headers: Dict, body: string, response: any, requestHeaders: any, requestBody: any): any;
|
|
361
|
+
}
|