ccxt 4.2.51 → 4.2.52
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/CHANGELOG.md +76 -16
- package/README.md +5 -6
- package/build.sh +1 -1
- package/dist/ccxt.browser.js +688 -1360
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -4
- package/dist/cjs/src/base/Exchange.js +65 -26
- package/dist/cjs/src/binance.js +45 -2
- package/dist/cjs/src/pro/binance.js +156 -1
- package/dist/cjs/src/pro/bitfinex2.js +3 -1
- package/dist/cjs/src/pro/gate.js +2 -1
- package/dist/cjs/src/woo.js +3 -1
- package/js/ccxt.d.ts +2 -5
- package/js/ccxt.js +2 -4
- package/js/src/base/Exchange.d.ts +65 -26
- package/js/src/base/Exchange.js +65 -26
- package/js/src/binance.d.ts +4 -0
- package/js/src/binance.js +45 -2
- package/js/src/deribit.js +1 -1
- package/js/src/ndax.js +1 -1
- package/js/src/pro/binance.d.ts +3 -0
- package/js/src/pro/binance.js +156 -1
- package/js/src/pro/bingx.js +1 -1
- package/js/src/pro/bitfinex2.js +3 -1
- package/js/src/pro/gate.js +2 -1
- package/js/src/woo.js +4 -2
- package/package.json +1 -1
- package/skip-tests.json +4 -5
- package/dist/cjs/src/abstract/bitforex.js +0 -9
- package/dist/cjs/src/bitforex.js +0 -884
- package/js/src/abstract/bitforex.d.ts +0 -27
- package/js/src/abstract/bitforex.js +0 -11
- package/js/src/bitforex.d.ts +0 -39
- package/js/src/bitforex.js +0 -885
|
@@ -294,51 +294,59 @@ export default class Exchange {
|
|
|
294
294
|
future: any;
|
|
295
295
|
option: any;
|
|
296
296
|
addMargin: any;
|
|
297
|
+
borrowCrossMargin: any;
|
|
298
|
+
borrowIsolatedMargin: any;
|
|
299
|
+
borrowMargin: any;
|
|
297
300
|
cancelAllOrders: any;
|
|
301
|
+
cancelAllOrdersWs: any;
|
|
298
302
|
cancelOrder: boolean;
|
|
299
303
|
cancelOrders: any;
|
|
304
|
+
cancelOrdersWs: any;
|
|
305
|
+
cancelOrderWs: any;
|
|
300
306
|
closeAllPositions: any;
|
|
301
307
|
closePosition: any;
|
|
302
308
|
createDepositAddress: any;
|
|
309
|
+
createLimitBuyOrder: any;
|
|
303
310
|
createLimitOrder: boolean;
|
|
304
|
-
|
|
305
|
-
|
|
311
|
+
createLimitSellOrder: any;
|
|
312
|
+
createMarketBuyOrder: any;
|
|
306
313
|
createMarketBuyOrderWithCost: any;
|
|
314
|
+
createMarketOrder: boolean;
|
|
307
315
|
createMarketOrderWithCost: any;
|
|
316
|
+
createMarketSellOrder: any;
|
|
308
317
|
createMarketSellOrderWithCost: any;
|
|
318
|
+
createOrder: boolean;
|
|
309
319
|
createOrders: any;
|
|
310
320
|
createOrderWithTakeProfitAndStopLoss: any;
|
|
321
|
+
createOrderWs: any;
|
|
311
322
|
createPostOnlyOrder: any;
|
|
312
323
|
createReduceOnlyOrder: any;
|
|
313
|
-
createStopLossOrder: any;
|
|
314
|
-
createStopOrder: any;
|
|
315
324
|
createStopLimitOrder: any;
|
|
325
|
+
createStopLossOrder: any;
|
|
316
326
|
createStopMarketOrder: any;
|
|
327
|
+
createStopOrder: any;
|
|
317
328
|
createTakeProfitOrder: any;
|
|
318
329
|
createTrailingAmountOrder: any;
|
|
319
330
|
createTrailingPercentOrder: any;
|
|
320
331
|
createTriggerOrder: any;
|
|
321
|
-
|
|
322
|
-
editOrderWs: any;
|
|
323
|
-
fetchOpenOrdersWs: any;
|
|
324
|
-
fetchClosedOrdersWs: any;
|
|
325
|
-
fetchOrderWs: any;
|
|
326
|
-
fetchOrdersWs: any;
|
|
327
|
-
cancelOrderWs: any;
|
|
328
|
-
cancelOrdersWs: any;
|
|
329
|
-
cancelAllOrdersWs: any;
|
|
330
|
-
fetchTradesWs: any;
|
|
331
|
-
fetchBalanceWs: any;
|
|
332
|
+
deposit: any;
|
|
332
333
|
editOrder: string;
|
|
334
|
+
editOrderWs: any;
|
|
333
335
|
fetchAccounts: any;
|
|
334
336
|
fetchBalance: boolean;
|
|
337
|
+
fetchBalanceWs: any;
|
|
335
338
|
fetchBidsAsks: any;
|
|
336
339
|
fetchBorrowInterest: any;
|
|
340
|
+
fetchBorrowRate: any;
|
|
341
|
+
fetchBorrowRateHistories: any;
|
|
337
342
|
fetchBorrowRateHistory: any;
|
|
338
|
-
|
|
343
|
+
fetchBorrowRates: any;
|
|
344
|
+
fetchBorrowRatesPerSymbol: any;
|
|
339
345
|
fetchCanceledAndClosedOrders: any;
|
|
346
|
+
fetchCanceledOrders: any;
|
|
340
347
|
fetchClosedOrder: any;
|
|
341
348
|
fetchClosedOrders: any;
|
|
349
|
+
fetchClosedOrdersWs: any;
|
|
342
350
|
fetchCrossBorrowRate: any;
|
|
343
351
|
fetchCrossBorrowRates: any;
|
|
344
352
|
fetchCurrencies: string;
|
|
@@ -348,78 +356,109 @@ export default class Exchange {
|
|
|
348
356
|
fetchDepositAddresses: any;
|
|
349
357
|
fetchDepositAddressesByNetwork: any;
|
|
350
358
|
fetchDeposits: any;
|
|
351
|
-
fetchDepositsWs: any;
|
|
352
359
|
fetchDepositsWithdrawals: any;
|
|
353
|
-
|
|
354
|
-
|
|
360
|
+
fetchDepositsWs: any;
|
|
361
|
+
fetchDepositWithdrawFee: any;
|
|
362
|
+
fetchDepositWithdrawFees: any;
|
|
355
363
|
fetchFundingHistory: any;
|
|
356
364
|
fetchFundingRate: any;
|
|
357
365
|
fetchFundingRateHistory: any;
|
|
358
366
|
fetchFundingRates: any;
|
|
367
|
+
fetchGreeks: any;
|
|
359
368
|
fetchIndexOHLCV: any;
|
|
360
369
|
fetchIsolatedBorrowRate: any;
|
|
361
370
|
fetchIsolatedBorrowRates: any;
|
|
371
|
+
fetchIsolatedPositions: any;
|
|
362
372
|
fetchL2OrderBook: boolean;
|
|
373
|
+
fetchL3OrderBook: any;
|
|
363
374
|
fetchLastPrices: any;
|
|
364
375
|
fetchLedger: any;
|
|
365
376
|
fetchLedgerEntry: any;
|
|
377
|
+
fetchLeverage: any;
|
|
366
378
|
fetchLeverageTiers: any;
|
|
379
|
+
fetchLiquidations: any;
|
|
380
|
+
fetchMarginMode: any;
|
|
367
381
|
fetchMarketLeverageTiers: any;
|
|
368
382
|
fetchMarkets: boolean;
|
|
369
383
|
fetchMarketsWs: any;
|
|
370
384
|
fetchMarkOHLCV: any;
|
|
385
|
+
fetchMyLiquidations: any;
|
|
386
|
+
fetchMySettlementHistory: any;
|
|
371
387
|
fetchMyTrades: any;
|
|
388
|
+
fetchMyTradesWs: any;
|
|
372
389
|
fetchOHLCV: any;
|
|
373
390
|
fetchOHLCVWs: any;
|
|
374
391
|
fetchOpenInterest: any;
|
|
375
392
|
fetchOpenInterestHistory: any;
|
|
376
393
|
fetchOpenOrder: any;
|
|
377
394
|
fetchOpenOrders: any;
|
|
395
|
+
fetchOpenOrdersWs: any;
|
|
378
396
|
fetchOrder: any;
|
|
379
397
|
fetchOrderBook: boolean;
|
|
380
398
|
fetchOrderBooks: any;
|
|
399
|
+
fetchOrderBookWs: any;
|
|
381
400
|
fetchOrders: any;
|
|
401
|
+
fetchOrdersByStatus: any;
|
|
402
|
+
fetchOrdersWs: any;
|
|
382
403
|
fetchOrderTrades: any;
|
|
404
|
+
fetchOrderWs: any;
|
|
383
405
|
fetchPermissions: any;
|
|
384
406
|
fetchPosition: any;
|
|
407
|
+
fetchPositionMode: any;
|
|
385
408
|
fetchPositions: any;
|
|
386
409
|
fetchPositionsForSymbol: any;
|
|
387
410
|
fetchPositionsRisk: any;
|
|
388
411
|
fetchPremiumIndexOHLCV: any;
|
|
412
|
+
fetchSettlementHistory: any;
|
|
389
413
|
fetchStatus: any;
|
|
390
414
|
fetchTicker: boolean;
|
|
391
415
|
fetchTickers: any;
|
|
416
|
+
fetchTickerWs: any;
|
|
392
417
|
fetchTime: any;
|
|
393
418
|
fetchTrades: boolean;
|
|
419
|
+
fetchTradesWs: any;
|
|
394
420
|
fetchTradingFee: any;
|
|
395
421
|
fetchTradingFees: any;
|
|
396
422
|
fetchTradingFeesWs: any;
|
|
397
423
|
fetchTradingLimits: any;
|
|
424
|
+
fetchTransactionFee: any;
|
|
425
|
+
fetchTransactionFees: any;
|
|
398
426
|
fetchTransactions: any;
|
|
427
|
+
fetchTransfer: any;
|
|
399
428
|
fetchTransfers: any;
|
|
429
|
+
fetchUnderlyingAssets: any;
|
|
430
|
+
fetchVolatilityHistory: any;
|
|
400
431
|
fetchWithdrawAddresses: any;
|
|
401
432
|
fetchWithdrawal: any;
|
|
402
433
|
fetchWithdrawals: any;
|
|
403
434
|
fetchWithdrawalsWs: any;
|
|
435
|
+
fetchWithdrawalWhitelist: any;
|
|
404
436
|
reduceMargin: any;
|
|
437
|
+
repayCrossMargin: any;
|
|
438
|
+
repayIsolatedMargin: any;
|
|
405
439
|
setLeverage: any;
|
|
406
440
|
setMargin: any;
|
|
407
441
|
setMarginMode: any;
|
|
408
442
|
setPositionMode: any;
|
|
409
443
|
signIn: any;
|
|
410
444
|
transfer: any;
|
|
411
|
-
|
|
445
|
+
watchBalance: any;
|
|
446
|
+
watchMyTrades: any;
|
|
447
|
+
watchOHLCV: any;
|
|
448
|
+
watchOHLCVForSymbols: any;
|
|
412
449
|
watchOrderBook: any;
|
|
450
|
+
watchOrderBookForSymbols: any;
|
|
413
451
|
watchOrders: any;
|
|
414
|
-
|
|
415
|
-
|
|
452
|
+
watchOrdersForSymbols: any;
|
|
453
|
+
watchPosition: any;
|
|
454
|
+
watchPositions: any;
|
|
455
|
+
watchStatus: any;
|
|
416
456
|
watchTicker: any;
|
|
457
|
+
watchTickers: any;
|
|
417
458
|
watchTrades: any;
|
|
418
459
|
watchTradesForSymbols: any;
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
watchBalance: any;
|
|
422
|
-
watchOHLCV: any;
|
|
460
|
+
withdraw: any;
|
|
461
|
+
ws: any;
|
|
423
462
|
};
|
|
424
463
|
urls: {
|
|
425
464
|
logo: any;
|
package/js/src/base/Exchange.js
CHANGED
|
@@ -349,51 +349,59 @@ export default class Exchange {
|
|
|
349
349
|
'future': undefined,
|
|
350
350
|
'option': undefined,
|
|
351
351
|
'addMargin': undefined,
|
|
352
|
+
'borrowCrossMargin': undefined,
|
|
353
|
+
'borrowIsolatedMargin': undefined,
|
|
354
|
+
'borrowMargin': undefined,
|
|
352
355
|
'cancelAllOrders': undefined,
|
|
356
|
+
'cancelAllOrdersWs': undefined,
|
|
353
357
|
'cancelOrder': true,
|
|
354
358
|
'cancelOrders': undefined,
|
|
359
|
+
'cancelOrdersWs': undefined,
|
|
360
|
+
'cancelOrderWs': undefined,
|
|
355
361
|
'closeAllPositions': undefined,
|
|
356
362
|
'closePosition': undefined,
|
|
357
363
|
'createDepositAddress': undefined,
|
|
364
|
+
'createLimitBuyOrder': undefined,
|
|
358
365
|
'createLimitOrder': true,
|
|
359
|
-
'
|
|
360
|
-
'
|
|
366
|
+
'createLimitSellOrder': undefined,
|
|
367
|
+
'createMarketBuyOrder': undefined,
|
|
361
368
|
'createMarketBuyOrderWithCost': undefined,
|
|
369
|
+
'createMarketOrder': true,
|
|
362
370
|
'createMarketOrderWithCost': undefined,
|
|
371
|
+
'createMarketSellOrder': undefined,
|
|
363
372
|
'createMarketSellOrderWithCost': undefined,
|
|
373
|
+
'createOrder': true,
|
|
364
374
|
'createOrders': undefined,
|
|
365
375
|
'createOrderWithTakeProfitAndStopLoss': undefined,
|
|
376
|
+
'createOrderWs': undefined,
|
|
366
377
|
'createPostOnlyOrder': undefined,
|
|
367
378
|
'createReduceOnlyOrder': undefined,
|
|
368
|
-
'createStopLossOrder': undefined,
|
|
369
|
-
'createStopOrder': undefined,
|
|
370
379
|
'createStopLimitOrder': undefined,
|
|
380
|
+
'createStopLossOrder': undefined,
|
|
371
381
|
'createStopMarketOrder': undefined,
|
|
382
|
+
'createStopOrder': undefined,
|
|
372
383
|
'createTakeProfitOrder': undefined,
|
|
373
384
|
'createTrailingAmountOrder': undefined,
|
|
374
385
|
'createTrailingPercentOrder': undefined,
|
|
375
386
|
'createTriggerOrder': undefined,
|
|
376
|
-
'
|
|
377
|
-
'editOrderWs': undefined,
|
|
378
|
-
'fetchOpenOrdersWs': undefined,
|
|
379
|
-
'fetchClosedOrdersWs': undefined,
|
|
380
|
-
'fetchOrderWs': undefined,
|
|
381
|
-
'fetchOrdersWs': undefined,
|
|
382
|
-
'cancelOrderWs': undefined,
|
|
383
|
-
'cancelOrdersWs': undefined,
|
|
384
|
-
'cancelAllOrdersWs': undefined,
|
|
385
|
-
'fetchTradesWs': undefined,
|
|
386
|
-
'fetchBalanceWs': undefined,
|
|
387
|
+
'deposit': undefined,
|
|
387
388
|
'editOrder': 'emulated',
|
|
389
|
+
'editOrderWs': undefined,
|
|
388
390
|
'fetchAccounts': undefined,
|
|
389
391
|
'fetchBalance': true,
|
|
392
|
+
'fetchBalanceWs': undefined,
|
|
390
393
|
'fetchBidsAsks': undefined,
|
|
391
394
|
'fetchBorrowInterest': undefined,
|
|
395
|
+
'fetchBorrowRate': undefined,
|
|
396
|
+
'fetchBorrowRateHistories': undefined,
|
|
392
397
|
'fetchBorrowRateHistory': undefined,
|
|
393
|
-
'
|
|
398
|
+
'fetchBorrowRates': undefined,
|
|
399
|
+
'fetchBorrowRatesPerSymbol': undefined,
|
|
394
400
|
'fetchCanceledAndClosedOrders': undefined,
|
|
401
|
+
'fetchCanceledOrders': undefined,
|
|
395
402
|
'fetchClosedOrder': undefined,
|
|
396
403
|
'fetchClosedOrders': undefined,
|
|
404
|
+
'fetchClosedOrdersWs': undefined,
|
|
397
405
|
'fetchCrossBorrowRate': undefined,
|
|
398
406
|
'fetchCrossBorrowRates': undefined,
|
|
399
407
|
'fetchCurrencies': 'emulated',
|
|
@@ -403,78 +411,109 @@ export default class Exchange {
|
|
|
403
411
|
'fetchDepositAddresses': undefined,
|
|
404
412
|
'fetchDepositAddressesByNetwork': undefined,
|
|
405
413
|
'fetchDeposits': undefined,
|
|
406
|
-
'fetchDepositsWs': undefined,
|
|
407
414
|
'fetchDepositsWithdrawals': undefined,
|
|
408
|
-
'
|
|
409
|
-
'
|
|
415
|
+
'fetchDepositsWs': undefined,
|
|
416
|
+
'fetchDepositWithdrawFee': undefined,
|
|
417
|
+
'fetchDepositWithdrawFees': undefined,
|
|
410
418
|
'fetchFundingHistory': undefined,
|
|
411
419
|
'fetchFundingRate': undefined,
|
|
412
420
|
'fetchFundingRateHistory': undefined,
|
|
413
421
|
'fetchFundingRates': undefined,
|
|
422
|
+
'fetchGreeks': undefined,
|
|
414
423
|
'fetchIndexOHLCV': undefined,
|
|
415
424
|
'fetchIsolatedBorrowRate': undefined,
|
|
416
425
|
'fetchIsolatedBorrowRates': undefined,
|
|
426
|
+
'fetchIsolatedPositions': undefined,
|
|
417
427
|
'fetchL2OrderBook': true,
|
|
428
|
+
'fetchL3OrderBook': undefined,
|
|
418
429
|
'fetchLastPrices': undefined,
|
|
419
430
|
'fetchLedger': undefined,
|
|
420
431
|
'fetchLedgerEntry': undefined,
|
|
432
|
+
'fetchLeverage': undefined,
|
|
421
433
|
'fetchLeverageTiers': undefined,
|
|
434
|
+
'fetchLiquidations': undefined,
|
|
435
|
+
'fetchMarginMode': undefined,
|
|
422
436
|
'fetchMarketLeverageTiers': undefined,
|
|
423
437
|
'fetchMarkets': true,
|
|
424
438
|
'fetchMarketsWs': undefined,
|
|
425
439
|
'fetchMarkOHLCV': undefined,
|
|
440
|
+
'fetchMyLiquidations': undefined,
|
|
441
|
+
'fetchMySettlementHistory': undefined,
|
|
426
442
|
'fetchMyTrades': undefined,
|
|
443
|
+
'fetchMyTradesWs': undefined,
|
|
427
444
|
'fetchOHLCV': undefined,
|
|
428
445
|
'fetchOHLCVWs': undefined,
|
|
429
446
|
'fetchOpenInterest': undefined,
|
|
430
447
|
'fetchOpenInterestHistory': undefined,
|
|
431
448
|
'fetchOpenOrder': undefined,
|
|
432
449
|
'fetchOpenOrders': undefined,
|
|
450
|
+
'fetchOpenOrdersWs': undefined,
|
|
433
451
|
'fetchOrder': undefined,
|
|
434
452
|
'fetchOrderBook': true,
|
|
435
453
|
'fetchOrderBooks': undefined,
|
|
454
|
+
'fetchOrderBookWs': undefined,
|
|
436
455
|
'fetchOrders': undefined,
|
|
456
|
+
'fetchOrdersByStatus': undefined,
|
|
457
|
+
'fetchOrdersWs': undefined,
|
|
437
458
|
'fetchOrderTrades': undefined,
|
|
459
|
+
'fetchOrderWs': undefined,
|
|
438
460
|
'fetchPermissions': undefined,
|
|
439
461
|
'fetchPosition': undefined,
|
|
462
|
+
'fetchPositionMode': undefined,
|
|
440
463
|
'fetchPositions': undefined,
|
|
441
464
|
'fetchPositionsForSymbol': undefined,
|
|
442
465
|
'fetchPositionsRisk': undefined,
|
|
443
466
|
'fetchPremiumIndexOHLCV': undefined,
|
|
467
|
+
'fetchSettlementHistory': undefined,
|
|
444
468
|
'fetchStatus': undefined,
|
|
445
469
|
'fetchTicker': true,
|
|
446
470
|
'fetchTickers': undefined,
|
|
471
|
+
'fetchTickerWs': undefined,
|
|
447
472
|
'fetchTime': undefined,
|
|
448
473
|
'fetchTrades': true,
|
|
474
|
+
'fetchTradesWs': undefined,
|
|
449
475
|
'fetchTradingFee': undefined,
|
|
450
476
|
'fetchTradingFees': undefined,
|
|
451
477
|
'fetchTradingFeesWs': undefined,
|
|
452
478
|
'fetchTradingLimits': undefined,
|
|
479
|
+
'fetchTransactionFee': undefined,
|
|
480
|
+
'fetchTransactionFees': undefined,
|
|
453
481
|
'fetchTransactions': undefined,
|
|
482
|
+
'fetchTransfer': undefined,
|
|
454
483
|
'fetchTransfers': undefined,
|
|
484
|
+
'fetchUnderlyingAssets': undefined,
|
|
485
|
+
'fetchVolatilityHistory': undefined,
|
|
455
486
|
'fetchWithdrawAddresses': undefined,
|
|
456
487
|
'fetchWithdrawal': undefined,
|
|
457
488
|
'fetchWithdrawals': undefined,
|
|
458
489
|
'fetchWithdrawalsWs': undefined,
|
|
490
|
+
'fetchWithdrawalWhitelist': undefined,
|
|
459
491
|
'reduceMargin': undefined,
|
|
492
|
+
'repayCrossMargin': undefined,
|
|
493
|
+
'repayIsolatedMargin': undefined,
|
|
460
494
|
'setLeverage': undefined,
|
|
461
495
|
'setMargin': undefined,
|
|
462
496
|
'setMarginMode': undefined,
|
|
463
497
|
'setPositionMode': undefined,
|
|
464
498
|
'signIn': undefined,
|
|
465
499
|
'transfer': undefined,
|
|
466
|
-
'
|
|
500
|
+
'watchBalance': undefined,
|
|
501
|
+
'watchMyTrades': undefined,
|
|
502
|
+
'watchOHLCV': undefined,
|
|
503
|
+
'watchOHLCVForSymbols': undefined,
|
|
467
504
|
'watchOrderBook': undefined,
|
|
505
|
+
'watchOrderBookForSymbols': undefined,
|
|
468
506
|
'watchOrders': undefined,
|
|
469
|
-
'
|
|
470
|
-
'
|
|
507
|
+
'watchOrdersForSymbols': undefined,
|
|
508
|
+
'watchPosition': undefined,
|
|
509
|
+
'watchPositions': undefined,
|
|
510
|
+
'watchStatus': undefined,
|
|
471
511
|
'watchTicker': undefined,
|
|
512
|
+
'watchTickers': undefined,
|
|
472
513
|
'watchTrades': undefined,
|
|
473
514
|
'watchTradesForSymbols': undefined,
|
|
474
|
-
'
|
|
475
|
-
'
|
|
476
|
-
'watchBalance': undefined,
|
|
477
|
-
'watchOHLCV': undefined,
|
|
515
|
+
'withdraw': undefined,
|
|
516
|
+
'ws': undefined,
|
|
478
517
|
},
|
|
479
518
|
'urls': {
|
|
480
519
|
'logo': undefined,
|
package/js/src/binance.d.ts
CHANGED
package/js/src/binance.js
CHANGED
|
@@ -47,6 +47,10 @@ export default class binance extends Exchange {
|
|
|
47
47
|
'createMarketBuyOrderWithCost': true,
|
|
48
48
|
'createMarketOrderWithCost': true,
|
|
49
49
|
'createMarketSellOrderWithCost': true,
|
|
50
|
+
'createLimitBuyOrder': true,
|
|
51
|
+
'createLimitSellOrder': true,
|
|
52
|
+
'createMarketBuyOrder': true,
|
|
53
|
+
'createMarketSellOrder': true,
|
|
50
54
|
'createOrder': true,
|
|
51
55
|
'createOrders': true,
|
|
52
56
|
'createOrderWithTakeProfitAndStopLoss': true,
|
|
@@ -111,6 +115,7 @@ export default class binance extends Exchange {
|
|
|
111
115
|
'fetchOrders': true,
|
|
112
116
|
'fetchOrderTrades': true,
|
|
113
117
|
'fetchPosition': true,
|
|
118
|
+
'fetchPositionMode': true,
|
|
114
119
|
'fetchPositions': true,
|
|
115
120
|
'fetchPositionsRisk': true,
|
|
116
121
|
'fetchPremiumIndexOHLCV': false,
|
|
@@ -126,6 +131,7 @@ export default class binance extends Exchange {
|
|
|
126
131
|
'fetchTransactionFee': 'emulated',
|
|
127
132
|
'fetchTransactionFees': true,
|
|
128
133
|
'fetchTransactions': false,
|
|
134
|
+
'fetchTransfer': false,
|
|
129
135
|
'fetchTransfers': true,
|
|
130
136
|
'fetchUnderlyingAssets': false,
|
|
131
137
|
'fetchVolatilityHistory': false,
|
|
@@ -4116,7 +4122,8 @@ export default class binance extends Exchange {
|
|
|
4116
4122
|
// "closeTime": 1677097200000
|
|
4117
4123
|
// }
|
|
4118
4124
|
//
|
|
4119
|
-
const
|
|
4125
|
+
const inverse = this.safeBool(market, 'inverse');
|
|
4126
|
+
const volumeIndex = inverse ? 7 : 5;
|
|
4120
4127
|
return [
|
|
4121
4128
|
this.safeInteger2(ohlcv, 0, 'closeTime'),
|
|
4122
4129
|
this.safeNumber2(ohlcv, 1, 'open'),
|
|
@@ -8102,7 +8109,6 @@ export default class binance extends Exchange {
|
|
|
8102
8109
|
/**
|
|
8103
8110
|
* @method
|
|
8104
8111
|
* @name binance#fetchTransfers
|
|
8105
|
-
* @see https://binance-docs.github.io/apidocs/spot/en/#user-universal-transfer-user_data
|
|
8106
8112
|
* @description fetch a history of internal transfers made on an account
|
|
8107
8113
|
* @see https://binance-docs.github.io/apidocs/spot/en/#query-user-universal-transfer-history-user_data
|
|
8108
8114
|
* @param {string} code unified currency code of the currency transferred
|
|
@@ -11991,4 +11997,41 @@ export default class binance extends Exchange {
|
|
|
11991
11997
|
'info': greeks,
|
|
11992
11998
|
};
|
|
11993
11999
|
}
|
|
12000
|
+
async fetchPositionMode(symbol = undefined, params = {}) {
|
|
12001
|
+
/**
|
|
12002
|
+
* @method
|
|
12003
|
+
* @name binance#fetchPositionMode
|
|
12004
|
+
* @description fetchs the position mode, hedged or one way, hedged for binance is set identically for all linear markets or all inverse markets
|
|
12005
|
+
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
12006
|
+
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
12007
|
+
* @param {string} params.subType "linear" or "inverse"
|
|
12008
|
+
* @returns {object} an object detailing whether the market is in hedged or one-way mode
|
|
12009
|
+
*/
|
|
12010
|
+
let market = undefined;
|
|
12011
|
+
if (symbol !== undefined) {
|
|
12012
|
+
market = this.market(symbol);
|
|
12013
|
+
}
|
|
12014
|
+
let subType = undefined;
|
|
12015
|
+
[subType, params] = this.handleSubTypeAndParams('fetchPositionMode', market, params);
|
|
12016
|
+
let response = undefined;
|
|
12017
|
+
if (subType === 'linear') {
|
|
12018
|
+
response = await this.fapiPrivateGetPositionSideDual(params);
|
|
12019
|
+
}
|
|
12020
|
+
else if (subType === 'inverse') {
|
|
12021
|
+
response = await this.dapiPrivateGetPositionSideDual(params);
|
|
12022
|
+
}
|
|
12023
|
+
else {
|
|
12024
|
+
throw new BadRequest(this.id + ' fetchPositionMode requires either a symbol argument or params["subType"]');
|
|
12025
|
+
}
|
|
12026
|
+
//
|
|
12027
|
+
// {
|
|
12028
|
+
// dualSidePosition: false
|
|
12029
|
+
// }
|
|
12030
|
+
//
|
|
12031
|
+
const dualSidePosition = this.safeBool(response, 'dualSidePosition');
|
|
12032
|
+
return {
|
|
12033
|
+
'info': response,
|
|
12034
|
+
'hedged': dualSidePosition,
|
|
12035
|
+
};
|
|
12036
|
+
}
|
|
11994
12037
|
}
|
package/js/src/deribit.js
CHANGED
|
@@ -10,7 +10,7 @@ import { TICK_SIZE } from './base/functions/number.js';
|
|
|
10
10
|
import { AuthenticationError, ExchangeError, ArgumentsRequired, PermissionDenied, InvalidOrder, OrderNotFound, DDoSProtection, NotSupported, ExchangeNotAvailable, InsufficientFunds, BadRequest, InvalidAddress, OnMaintenance } from './base/errors.js';
|
|
11
11
|
import { Precise } from './base/Precise.js';
|
|
12
12
|
import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
|
|
13
|
-
import totp from './base/functions/totp.js';
|
|
13
|
+
import { totp } from './base/functions/totp.js';
|
|
14
14
|
// ---------------------------------------------------------------------------
|
|
15
15
|
/**
|
|
16
16
|
* @class deribit
|
package/js/src/ndax.js
CHANGED
|
@@ -10,7 +10,7 @@ import { ExchangeError, AuthenticationError, InsufficientFunds, BadSymbol, Order
|
|
|
10
10
|
import { TICK_SIZE } from './base/functions/number.js';
|
|
11
11
|
import { Precise } from './base/Precise.js';
|
|
12
12
|
import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
|
|
13
|
-
import totp from './base/functions/totp.js';
|
|
13
|
+
import { totp } from './base/functions/totp.js';
|
|
14
14
|
// ---------------------------------------------------------------------------
|
|
15
15
|
/**
|
|
16
16
|
* @class ndax
|
package/js/src/pro/binance.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ export default class binance extends binanceRest {
|
|
|
20
20
|
handleTrade(client: Client, message: any): void;
|
|
21
21
|
watchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
|
|
22
22
|
handleOHLCV(client: Client, message: any): void;
|
|
23
|
+
fetchOHLCVWs(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
|
|
24
|
+
handleFetchOHLCV(client: Client, message: any): void;
|
|
23
25
|
watchTicker(symbol: string, params?: {}): Promise<Ticker>;
|
|
24
26
|
watchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
|
|
25
27
|
parseWsTicker(message: any, marketType: any): Ticker;
|
|
@@ -55,6 +57,7 @@ export default class binance extends binanceRest {
|
|
|
55
57
|
handlePositions(client: any, message: any): void;
|
|
56
58
|
parseWsPosition(position: any, market?: any): Position;
|
|
57
59
|
fetchMyTradesWs(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
60
|
+
fetchTradesWs(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
58
61
|
handleTradesWs(client: Client, message: any): void;
|
|
59
62
|
watchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
60
63
|
handleMyTrade(client: Client, message: any): void;
|