ccxt 4.3.76 → 4.3.77
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 +3 -3
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/binance.js +2 -2
- package/dist/cjs/src/bithumb.js +14 -14
- package/dist/cjs/src/bitmart.js +4 -0
- package/dist/cjs/src/bybit.js +6 -1
- package/dist/cjs/src/kraken.js +3 -0
- package/dist/cjs/src/pro/bybit.js +19 -0
- package/dist/cjs/src/pro/woo.js +1 -1
- package/dist/cjs/src/xt.js +4 -0
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/binance.js +2 -2
- package/js/src/bithumb.js +14 -14
- package/js/src/bitmart.js +4 -0
- package/js/src/bybit.js +6 -1
- package/js/src/kraken.js +3 -0
- package/js/src/pro/bybit.js +19 -0
- package/js/src/pro/woo.js +1 -1
- package/js/src/xt.d.ts +4 -0
- package/js/src/xt.js +4 -0
- package/package.json +1 -1
package/dist/cjs/ccxt.js
CHANGED
|
@@ -194,7 +194,7 @@ var xt$1 = require('./src/pro/xt.js');
|
|
|
194
194
|
|
|
195
195
|
//-----------------------------------------------------------------------------
|
|
196
196
|
// this is updated by vss.js when building
|
|
197
|
-
const version = '4.3.
|
|
197
|
+
const version = '4.3.77';
|
|
198
198
|
Exchange["default"].ccxtVersion = version;
|
|
199
199
|
const exchanges = {
|
|
200
200
|
'ace': ace,
|
package/dist/cjs/src/binance.js
CHANGED
|
@@ -2797,7 +2797,7 @@ class binance extends binance$1 {
|
|
|
2797
2797
|
'active': depositEnable && withdrawEnable,
|
|
2798
2798
|
'deposit': depositEnable,
|
|
2799
2799
|
'withdraw': withdrawEnable,
|
|
2800
|
-
'fee':
|
|
2800
|
+
'fee': withdrawFee,
|
|
2801
2801
|
'precision': this.parseNumber(precisionTick),
|
|
2802
2802
|
'limits': {
|
|
2803
2803
|
'withdraw': {
|
|
@@ -2805,7 +2805,7 @@ class binance extends binance$1 {
|
|
|
2805
2805
|
'max': this.safeNumber(networkItem, 'withdrawMax'),
|
|
2806
2806
|
},
|
|
2807
2807
|
'deposit': {
|
|
2808
|
-
'min':
|
|
2808
|
+
'min': this.safeNumber(networkItem, 'depositDust'),
|
|
2809
2809
|
'max': undefined,
|
|
2810
2810
|
},
|
|
2811
2811
|
},
|
package/dist/cjs/src/bithumb.js
CHANGED
|
@@ -198,7 +198,7 @@ class bithumb extends bithumb$1 {
|
|
|
198
198
|
* @method
|
|
199
199
|
* @name bithumb#fetchMarkets
|
|
200
200
|
* @description retrieves data on all markets for bithumb
|
|
201
|
-
* @see https://apidocs.bithumb.com/reference/%ED%98%84%EC%9E%AC%EA%B0%80-%EC%A0%95%EB%B3%B4-%EC%A1%B0%ED%9A%8C-all
|
|
201
|
+
* @see https://apidocs.bithumb.com/v1.2.0/reference/%ED%98%84%EC%9E%AC%EA%B0%80-%EC%A0%95%EB%B3%B4-%EC%A1%B0%ED%9A%8C-all
|
|
202
202
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
203
203
|
* @returns {object[]} an array of objects representing market data
|
|
204
204
|
*/
|
|
@@ -341,7 +341,7 @@ class bithumb extends bithumb$1 {
|
|
|
341
341
|
* @method
|
|
342
342
|
* @name bithumb#fetchBalance
|
|
343
343
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
344
|
-
* @see https://apidocs.bithumb.com/reference/%EB%B3%B4%EC%9C%A0%EC%9E%90%EC%82%B0-%EC%A1%B0%ED%9A%8C
|
|
344
|
+
* @see https://apidocs.bithumb.com/v1.2.0/reference/%EB%B3%B4%EC%9C%A0%EC%9E%90%EC%82%B0-%EC%A1%B0%ED%9A%8C
|
|
345
345
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
346
346
|
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
347
347
|
*/
|
|
@@ -357,7 +357,7 @@ class bithumb extends bithumb$1 {
|
|
|
357
357
|
* @method
|
|
358
358
|
* @name bithumb#fetchOrderBook
|
|
359
359
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
360
|
-
* @see https://apidocs.bithumb.com/reference/%ED%98%B8%EA%B0%80-%EC%A0%95%EB%B3%B4-%EC%A1%B0%ED%9A%8C
|
|
360
|
+
* @see https://apidocs.bithumb.com/v1.2.0/reference/%ED%98%B8%EA%B0%80-%EC%A0%95%EB%B3%B4-%EC%A1%B0%ED%9A%8C
|
|
361
361
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
362
362
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
363
363
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -450,7 +450,7 @@ class bithumb extends bithumb$1 {
|
|
|
450
450
|
* @method
|
|
451
451
|
* @name bithumb#fetchTickers
|
|
452
452
|
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
453
|
-
* @see https://apidocs.bithumb.com/reference/%ED%98%84%EC%9E%AC%EA%B0%80-%EC%A0%95%EB%B3%B4-%EC%A1%B0%ED%9A%8C-all
|
|
453
|
+
* @see https://apidocs.bithumb.com/v1.2.0/reference/%ED%98%84%EC%9E%AC%EA%B0%80-%EC%A0%95%EB%B3%B4-%EC%A1%B0%ED%9A%8C-all
|
|
454
454
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
455
455
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
456
456
|
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -512,7 +512,7 @@ class bithumb extends bithumb$1 {
|
|
|
512
512
|
* @method
|
|
513
513
|
* @name bithumb#fetchTicker
|
|
514
514
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
515
|
-
* @see https://apidocs.bithumb.com/reference/%ED%98%84%EC%9E%AC%EA%B0%80-%EC%A0%95%EB%B3%B4-%EC%A1%B0%ED%9A%8C
|
|
515
|
+
* @see https://apidocs.bithumb.com/v1.2.0/reference/%ED%98%84%EC%9E%AC%EA%B0%80-%EC%A0%95%EB%B3%B4-%EC%A1%B0%ED%9A%8C
|
|
516
516
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
517
517
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
518
518
|
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -571,7 +571,7 @@ class bithumb extends bithumb$1 {
|
|
|
571
571
|
* @method
|
|
572
572
|
* @name bithumb#fetchOHLCV
|
|
573
573
|
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
574
|
-
* @see https://apidocs.bithumb.com/reference/candlestick-rest-api
|
|
574
|
+
* @see https://apidocs.bithumb.com/v1.2.0/reference/candlestick-rest-api
|
|
575
575
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
576
576
|
* @param {string} timeframe the length of time each candle represents
|
|
577
577
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
@@ -696,7 +696,7 @@ class bithumb extends bithumb$1 {
|
|
|
696
696
|
* @method
|
|
697
697
|
* @name bithumb#fetchTrades
|
|
698
698
|
* @description get the list of most recent trades for a particular symbol
|
|
699
|
-
* @see https://apidocs.bithumb.com/reference/%EC%B5%9C%EA%B7%BC-%EC%B2%B4%EA%B2%B0-%EB%82%B4%EC%97%AD
|
|
699
|
+
* @see https://apidocs.bithumb.com/v1.2.0/reference/%EC%B5%9C%EA%B7%BC-%EC%B2%B4%EA%B2%B0-%EB%82%B4%EC%97%AD
|
|
700
700
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
701
701
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
702
702
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
@@ -735,9 +735,9 @@ class bithumb extends bithumb$1 {
|
|
|
735
735
|
* @method
|
|
736
736
|
* @name bithumb#createOrder
|
|
737
737
|
* @description create a trade order
|
|
738
|
-
* @see https://apidocs.bithumb.com/reference/%EC%A7%80%EC%A0%95%EA%B0%80-%EC%A3%BC%EB%AC%B8%ED%95%98%EA%B8%B0
|
|
739
|
-
* @see https://apidocs.bithumb.com/reference/%EC%8B%9C%EC%9E%A5%EA%B0%80-%EB%A7%A4%EC%88%98%ED%95%98%EA%B8%B0
|
|
740
|
-
* @see https://apidocs.bithumb.com/reference/%EC%8B%9C%EC%9E%A5%EA%B0%80-%EB%A7%A4%EB%8F%84%ED%95%98%EA%B8%B0
|
|
738
|
+
* @see https://apidocs.bithumb.com/v1.2.0/reference/%EC%A7%80%EC%A0%95%EA%B0%80-%EC%A3%BC%EB%AC%B8%ED%95%98%EA%B8%B0
|
|
739
|
+
* @see https://apidocs.bithumb.com/v1.2.0/reference/%EC%8B%9C%EC%9E%A5%EA%B0%80-%EB%A7%A4%EC%88%98%ED%95%98%EA%B8%B0
|
|
740
|
+
* @see https://apidocs.bithumb.com/v1.2.0/reference/%EC%8B%9C%EC%9E%A5%EA%B0%80-%EB%A7%A4%EB%8F%84%ED%95%98%EA%B8%B0
|
|
741
741
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
742
742
|
* @param {string} type 'market' or 'limit'
|
|
743
743
|
* @param {string} side 'buy' or 'sell'
|
|
@@ -779,7 +779,7 @@ class bithumb extends bithumb$1 {
|
|
|
779
779
|
* @method
|
|
780
780
|
* @name bithumb#fetchOrder
|
|
781
781
|
* @description fetches information on an order made by the user
|
|
782
|
-
* @see https://apidocs.bithumb.com/reference/%EA%B1%B0%EB%9E%98-%EC%A3%BC%EB%AC%B8%EB%82%B4%EC%97%AD-%EC%83%81%EC%84%B8-%EC%A1%B0%ED%9A%8C
|
|
782
|
+
* @see https://apidocs.bithumb.com/v1.2.0/reference/%EA%B1%B0%EB%9E%98-%EC%A3%BC%EB%AC%B8%EB%82%B4%EC%97%AD-%EC%83%81%EC%84%B8-%EC%A1%B0%ED%9A%8C
|
|
783
783
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
784
784
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
785
785
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
@@ -938,7 +938,7 @@ class bithumb extends bithumb$1 {
|
|
|
938
938
|
* @method
|
|
939
939
|
* @name bithumb#fetchOpenOrders
|
|
940
940
|
* @description fetch all unfilled currently open orders
|
|
941
|
-
* @see https://apidocs.bithumb.com/reference/%EA%B1%B0%EB%9E%98-%EC%A3%BC%EB%AC%B8%EB%82%B4%EC%97%AD-%EC%A1%B0%ED%9A%8C
|
|
941
|
+
* @see https://apidocs.bithumb.com/v1.2.0/reference/%EA%B1%B0%EB%9E%98-%EC%A3%BC%EB%AC%B8%EB%82%B4%EC%97%AD-%EC%A1%B0%ED%9A%8C
|
|
942
942
|
* @param {string} symbol unified market symbol
|
|
943
943
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
944
944
|
* @param {int} [limit] the maximum number of open order structures to retrieve
|
|
@@ -987,7 +987,7 @@ class bithumb extends bithumb$1 {
|
|
|
987
987
|
* @method
|
|
988
988
|
* @name bithumb#cancelOrder
|
|
989
989
|
* @description cancels an open order
|
|
990
|
-
* @see https://apidocs.bithumb.com/reference/%EC%A3%BC%EB%AC%B8-%EC%B7%A8%EC%86%8C%ED%95%98%EA%B8%B0
|
|
990
|
+
* @see https://apidocs.bithumb.com/v1.2.0/reference/%EC%A3%BC%EB%AC%B8-%EC%B7%A8%EC%86%8C%ED%95%98%EA%B8%B0
|
|
991
991
|
* @param {string} id order id
|
|
992
992
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
993
993
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -1031,7 +1031,7 @@ class bithumb extends bithumb$1 {
|
|
|
1031
1031
|
* @method
|
|
1032
1032
|
* @name bithumb#withdraw
|
|
1033
1033
|
* @description make a withdrawal
|
|
1034
|
-
* @see https://apidocs.bithumb.com/reference/%EC%BD%94%EC%9D%B8-%EC%B6%9C%EA%B8%88%ED%95%98%EA%B8%B0-%EA%B0%9C%EC%9D%B8
|
|
1034
|
+
* @see https://apidocs.bithumb.com/v1.2.0/reference/%EC%BD%94%EC%9D%B8-%EC%B6%9C%EA%B8%88%ED%95%98%EA%B8%B0-%EA%B0%9C%EC%9D%B8
|
|
1035
1035
|
* @param {string} code unified currency code
|
|
1036
1036
|
* @param {float} amount the amount to withdraw
|
|
1037
1037
|
* @param {string} address the address to withdraw to
|
package/dist/cjs/src/bitmart.js
CHANGED
|
@@ -2463,6 +2463,7 @@ class bitmart extends bitmart$1 {
|
|
|
2463
2463
|
* @see https://developer-pro.bitmart.com/en/futures/#submit-plan-order-signed
|
|
2464
2464
|
* @see https://developer-pro.bitmart.com/en/futures/#submit-order-signed
|
|
2465
2465
|
* @see https://developer-pro.bitmart.com/en/futures/#submit-plan-order-signed
|
|
2466
|
+
* @see https://developer-pro.bitmart.com/en/futuresv2/#submit-plan-order-signed
|
|
2466
2467
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
2467
2468
|
* @param {string} type 'market', 'limit' or 'trailing' for swap markets only
|
|
2468
2469
|
* @param {string} side 'buy' or 'sell'
|
|
@@ -2716,6 +2717,9 @@ class bitmart extends bitmart$1 {
|
|
|
2716
2717
|
if (leverage !== undefined) {
|
|
2717
2718
|
request['leverage'] = this.numberToString(leverage);
|
|
2718
2719
|
}
|
|
2720
|
+
else if (isTriggerOrder) {
|
|
2721
|
+
request['leverage'] = '1'; // for plan orders leverage is required, if not available default to 1
|
|
2722
|
+
}
|
|
2719
2723
|
return this.extend(request, params);
|
|
2720
2724
|
}
|
|
2721
2725
|
createSpotOrderRequest(symbol, type, side, amount, price = undefined, params = {}) {
|
package/dist/cjs/src/bybit.js
CHANGED
|
@@ -3786,7 +3786,12 @@ class bybit extends bybit$1 {
|
|
|
3786
3786
|
}
|
|
3787
3787
|
else {
|
|
3788
3788
|
if (!isTrailingAmountOrder && !isAlternativeEndpoint) {
|
|
3789
|
-
|
|
3789
|
+
if (market['option']) {
|
|
3790
|
+
request['qty'] = this.numberToString(amount);
|
|
3791
|
+
}
|
|
3792
|
+
else {
|
|
3793
|
+
request['qty'] = this.amountToPrecision(symbol, amount);
|
|
3794
|
+
}
|
|
3790
3795
|
}
|
|
3791
3796
|
}
|
|
3792
3797
|
if (isTrailingAmountOrder) {
|
package/dist/cjs/src/kraken.js
CHANGED
|
@@ -1850,6 +1850,9 @@ class kraken extends kraken$1 {
|
|
|
1850
1850
|
const extendedPostFlags = (flags !== undefined) ? flags + ',post' : 'post';
|
|
1851
1851
|
request['oflags'] = extendedPostFlags;
|
|
1852
1852
|
}
|
|
1853
|
+
if ((flags !== undefined) && (request['oflags'] === undefined)) {
|
|
1854
|
+
request['oflags'] = flags;
|
|
1855
|
+
}
|
|
1853
1856
|
params = this.omit(params, ['timeInForce', 'reduceOnly', 'stopLossPrice', 'takeProfitPrice', 'trailingAmount', 'trailingLimitAmount', 'offset']);
|
|
1854
1857
|
return [request, params];
|
|
1855
1858
|
}
|
|
@@ -77,6 +77,25 @@ class bybit extends bybit$1 {
|
|
|
77
77
|
},
|
|
78
78
|
},
|
|
79
79
|
},
|
|
80
|
+
'demotrading': {
|
|
81
|
+
'ws': {
|
|
82
|
+
'public': {
|
|
83
|
+
'spot': 'wss://stream.{hostname}/v5/public/spot',
|
|
84
|
+
'inverse': 'wss://stream.{hostname}/v5/public/inverse',
|
|
85
|
+
'option': 'wss://stream.{hostname}/v5/public/option',
|
|
86
|
+
'linear': 'wss://stream.{hostname}/v5/public/linear',
|
|
87
|
+
},
|
|
88
|
+
'private': {
|
|
89
|
+
'spot': {
|
|
90
|
+
'unified': 'wss://stream-demo.{hostname}/v5/private',
|
|
91
|
+
'nonUnified': 'wss://stream-demo.{hostname}/spot/private/v3',
|
|
92
|
+
},
|
|
93
|
+
'contract': 'wss://stream-demo.{hostname}/v5/private',
|
|
94
|
+
'usdc': 'wss://stream-demo.{hostname}/trade/option/usdc/private/v1',
|
|
95
|
+
'trade': 'wss://stream-demo.bybit.com/v5/trade',
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
},
|
|
80
99
|
},
|
|
81
100
|
'options': {
|
|
82
101
|
'watchTicker': {
|
package/dist/cjs/src/pro/woo.js
CHANGED
package/dist/cjs/src/xt.js
CHANGED
|
@@ -8,6 +8,10 @@ var sha256 = require('./static_dependencies/noble-hashes/sha256.js');
|
|
|
8
8
|
|
|
9
9
|
// ---------------------------------------------------------------------------
|
|
10
10
|
// ---------------------------------------------------------------------------
|
|
11
|
+
/**
|
|
12
|
+
* @class xt
|
|
13
|
+
* @augments Exchange
|
|
14
|
+
*/
|
|
11
15
|
class xt extends xt$1 {
|
|
12
16
|
describe() {
|
|
13
17
|
return this.deepExtend(super.describe(), {
|
package/js/ccxt.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import * as functions from './src/base/functions.js';
|
|
|
4
4
|
import * as errors from './src/base/errors.js';
|
|
5
5
|
import type { Int, int, Str, Strings, Num, Bool, IndexType, OrderSide, OrderType, MarketType, SubType, Dict, NullableDict, List, NullableList, Fee, OHLCV, OHLCVC, implicitReturnType, Market, Currency, Dictionary, MinMax, FeeInterface, TradingFeeInterface, MarketInterface, Trade, Order, OrderBook, Ticker, Transaction, Tickers, CurrencyInterface, Balance, BalanceAccount, Account, PartialBalances, Balances, DepositAddress, WithdrawalResponse, DepositAddressResponse, FundingRate, FundingRates, Position, BorrowInterest, LeverageTier, LedgerEntry, DepositWithdrawFeeNetwork, DepositWithdrawFee, TransferEntry, CrossBorrowRate, IsolatedBorrowRate, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, CancellationRequest, FundingHistory, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, LeverageTiers } from './src/base/types.js';
|
|
6
6
|
import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending } from './src/base/errors.js';
|
|
7
|
-
declare const version = "4.3.
|
|
7
|
+
declare const version = "4.3.76";
|
|
8
8
|
import ace from './src/ace.js';
|
|
9
9
|
import alpaca from './src/alpaca.js';
|
|
10
10
|
import ascendex from './src/ascendex.js';
|
package/js/ccxt.js
CHANGED
|
@@ -38,7 +38,7 @@ import * as errors from './src/base/errors.js';
|
|
|
38
38
|
import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending } from './src/base/errors.js';
|
|
39
39
|
//-----------------------------------------------------------------------------
|
|
40
40
|
// this is updated by vss.js when building
|
|
41
|
-
const version = '4.3.
|
|
41
|
+
const version = '4.3.77';
|
|
42
42
|
Exchange.ccxtVersion = version;
|
|
43
43
|
//-----------------------------------------------------------------------------
|
|
44
44
|
import ace from './src/ace.js';
|
package/js/src/binance.js
CHANGED
|
@@ -2800,7 +2800,7 @@ export default class binance extends Exchange {
|
|
|
2800
2800
|
'active': depositEnable && withdrawEnable,
|
|
2801
2801
|
'deposit': depositEnable,
|
|
2802
2802
|
'withdraw': withdrawEnable,
|
|
2803
|
-
'fee':
|
|
2803
|
+
'fee': withdrawFee,
|
|
2804
2804
|
'precision': this.parseNumber(precisionTick),
|
|
2805
2805
|
'limits': {
|
|
2806
2806
|
'withdraw': {
|
|
@@ -2808,7 +2808,7 @@ export default class binance extends Exchange {
|
|
|
2808
2808
|
'max': this.safeNumber(networkItem, 'withdrawMax'),
|
|
2809
2809
|
},
|
|
2810
2810
|
'deposit': {
|
|
2811
|
-
'min':
|
|
2811
|
+
'min': this.safeNumber(networkItem, 'depositDust'),
|
|
2812
2812
|
'max': undefined,
|
|
2813
2813
|
},
|
|
2814
2814
|
},
|
package/js/src/bithumb.js
CHANGED
|
@@ -201,7 +201,7 @@ export default class bithumb extends Exchange {
|
|
|
201
201
|
* @method
|
|
202
202
|
* @name bithumb#fetchMarkets
|
|
203
203
|
* @description retrieves data on all markets for bithumb
|
|
204
|
-
* @see https://apidocs.bithumb.com/reference/%ED%98%84%EC%9E%AC%EA%B0%80-%EC%A0%95%EB%B3%B4-%EC%A1%B0%ED%9A%8C-all
|
|
204
|
+
* @see https://apidocs.bithumb.com/v1.2.0/reference/%ED%98%84%EC%9E%AC%EA%B0%80-%EC%A0%95%EB%B3%B4-%EC%A1%B0%ED%9A%8C-all
|
|
205
205
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
206
206
|
* @returns {object[]} an array of objects representing market data
|
|
207
207
|
*/
|
|
@@ -344,7 +344,7 @@ export default class bithumb extends Exchange {
|
|
|
344
344
|
* @method
|
|
345
345
|
* @name bithumb#fetchBalance
|
|
346
346
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
347
|
-
* @see https://apidocs.bithumb.com/reference/%EB%B3%B4%EC%9C%A0%EC%9E%90%EC%82%B0-%EC%A1%B0%ED%9A%8C
|
|
347
|
+
* @see https://apidocs.bithumb.com/v1.2.0/reference/%EB%B3%B4%EC%9C%A0%EC%9E%90%EC%82%B0-%EC%A1%B0%ED%9A%8C
|
|
348
348
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
349
349
|
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
350
350
|
*/
|
|
@@ -360,7 +360,7 @@ export default class bithumb extends Exchange {
|
|
|
360
360
|
* @method
|
|
361
361
|
* @name bithumb#fetchOrderBook
|
|
362
362
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
363
|
-
* @see https://apidocs.bithumb.com/reference/%ED%98%B8%EA%B0%80-%EC%A0%95%EB%B3%B4-%EC%A1%B0%ED%9A%8C
|
|
363
|
+
* @see https://apidocs.bithumb.com/v1.2.0/reference/%ED%98%B8%EA%B0%80-%EC%A0%95%EB%B3%B4-%EC%A1%B0%ED%9A%8C
|
|
364
364
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
365
365
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
366
366
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -453,7 +453,7 @@ export default class bithumb extends Exchange {
|
|
|
453
453
|
* @method
|
|
454
454
|
* @name bithumb#fetchTickers
|
|
455
455
|
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
456
|
-
* @see https://apidocs.bithumb.com/reference/%ED%98%84%EC%9E%AC%EA%B0%80-%EC%A0%95%EB%B3%B4-%EC%A1%B0%ED%9A%8C-all
|
|
456
|
+
* @see https://apidocs.bithumb.com/v1.2.0/reference/%ED%98%84%EC%9E%AC%EA%B0%80-%EC%A0%95%EB%B3%B4-%EC%A1%B0%ED%9A%8C-all
|
|
457
457
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
458
458
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
459
459
|
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -515,7 +515,7 @@ export default class bithumb extends Exchange {
|
|
|
515
515
|
* @method
|
|
516
516
|
* @name bithumb#fetchTicker
|
|
517
517
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
518
|
-
* @see https://apidocs.bithumb.com/reference/%ED%98%84%EC%9E%AC%EA%B0%80-%EC%A0%95%EB%B3%B4-%EC%A1%B0%ED%9A%8C
|
|
518
|
+
* @see https://apidocs.bithumb.com/v1.2.0/reference/%ED%98%84%EC%9E%AC%EA%B0%80-%EC%A0%95%EB%B3%B4-%EC%A1%B0%ED%9A%8C
|
|
519
519
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
520
520
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
521
521
|
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -574,7 +574,7 @@ export default class bithumb extends Exchange {
|
|
|
574
574
|
* @method
|
|
575
575
|
* @name bithumb#fetchOHLCV
|
|
576
576
|
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
577
|
-
* @see https://apidocs.bithumb.com/reference/candlestick-rest-api
|
|
577
|
+
* @see https://apidocs.bithumb.com/v1.2.0/reference/candlestick-rest-api
|
|
578
578
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
579
579
|
* @param {string} timeframe the length of time each candle represents
|
|
580
580
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
@@ -699,7 +699,7 @@ export default class bithumb extends Exchange {
|
|
|
699
699
|
* @method
|
|
700
700
|
* @name bithumb#fetchTrades
|
|
701
701
|
* @description get the list of most recent trades for a particular symbol
|
|
702
|
-
* @see https://apidocs.bithumb.com/reference/%EC%B5%9C%EA%B7%BC-%EC%B2%B4%EA%B2%B0-%EB%82%B4%EC%97%AD
|
|
702
|
+
* @see https://apidocs.bithumb.com/v1.2.0/reference/%EC%B5%9C%EA%B7%BC-%EC%B2%B4%EA%B2%B0-%EB%82%B4%EC%97%AD
|
|
703
703
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
704
704
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
705
705
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
@@ -738,9 +738,9 @@ export default class bithumb extends Exchange {
|
|
|
738
738
|
* @method
|
|
739
739
|
* @name bithumb#createOrder
|
|
740
740
|
* @description create a trade order
|
|
741
|
-
* @see https://apidocs.bithumb.com/reference/%EC%A7%80%EC%A0%95%EA%B0%80-%EC%A3%BC%EB%AC%B8%ED%95%98%EA%B8%B0
|
|
742
|
-
* @see https://apidocs.bithumb.com/reference/%EC%8B%9C%EC%9E%A5%EA%B0%80-%EB%A7%A4%EC%88%98%ED%95%98%EA%B8%B0
|
|
743
|
-
* @see https://apidocs.bithumb.com/reference/%EC%8B%9C%EC%9E%A5%EA%B0%80-%EB%A7%A4%EB%8F%84%ED%95%98%EA%B8%B0
|
|
741
|
+
* @see https://apidocs.bithumb.com/v1.2.0/reference/%EC%A7%80%EC%A0%95%EA%B0%80-%EC%A3%BC%EB%AC%B8%ED%95%98%EA%B8%B0
|
|
742
|
+
* @see https://apidocs.bithumb.com/v1.2.0/reference/%EC%8B%9C%EC%9E%A5%EA%B0%80-%EB%A7%A4%EC%88%98%ED%95%98%EA%B8%B0
|
|
743
|
+
* @see https://apidocs.bithumb.com/v1.2.0/reference/%EC%8B%9C%EC%9E%A5%EA%B0%80-%EB%A7%A4%EB%8F%84%ED%95%98%EA%B8%B0
|
|
744
744
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
745
745
|
* @param {string} type 'market' or 'limit'
|
|
746
746
|
* @param {string} side 'buy' or 'sell'
|
|
@@ -782,7 +782,7 @@ export default class bithumb extends Exchange {
|
|
|
782
782
|
* @method
|
|
783
783
|
* @name bithumb#fetchOrder
|
|
784
784
|
* @description fetches information on an order made by the user
|
|
785
|
-
* @see https://apidocs.bithumb.com/reference/%EA%B1%B0%EB%9E%98-%EC%A3%BC%EB%AC%B8%EB%82%B4%EC%97%AD-%EC%83%81%EC%84%B8-%EC%A1%B0%ED%9A%8C
|
|
785
|
+
* @see https://apidocs.bithumb.com/v1.2.0/reference/%EA%B1%B0%EB%9E%98-%EC%A3%BC%EB%AC%B8%EB%82%B4%EC%97%AD-%EC%83%81%EC%84%B8-%EC%A1%B0%ED%9A%8C
|
|
786
786
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
787
787
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
788
788
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
@@ -941,7 +941,7 @@ export default class bithumb extends Exchange {
|
|
|
941
941
|
* @method
|
|
942
942
|
* @name bithumb#fetchOpenOrders
|
|
943
943
|
* @description fetch all unfilled currently open orders
|
|
944
|
-
* @see https://apidocs.bithumb.com/reference/%EA%B1%B0%EB%9E%98-%EC%A3%BC%EB%AC%B8%EB%82%B4%EC%97%AD-%EC%A1%B0%ED%9A%8C
|
|
944
|
+
* @see https://apidocs.bithumb.com/v1.2.0/reference/%EA%B1%B0%EB%9E%98-%EC%A3%BC%EB%AC%B8%EB%82%B4%EC%97%AD-%EC%A1%B0%ED%9A%8C
|
|
945
945
|
* @param {string} symbol unified market symbol
|
|
946
946
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
947
947
|
* @param {int} [limit] the maximum number of open order structures to retrieve
|
|
@@ -990,7 +990,7 @@ export default class bithumb extends Exchange {
|
|
|
990
990
|
* @method
|
|
991
991
|
* @name bithumb#cancelOrder
|
|
992
992
|
* @description cancels an open order
|
|
993
|
-
* @see https://apidocs.bithumb.com/reference/%EC%A3%BC%EB%AC%B8-%EC%B7%A8%EC%86%8C%ED%95%98%EA%B8%B0
|
|
993
|
+
* @see https://apidocs.bithumb.com/v1.2.0/reference/%EC%A3%BC%EB%AC%B8-%EC%B7%A8%EC%86%8C%ED%95%98%EA%B8%B0
|
|
994
994
|
* @param {string} id order id
|
|
995
995
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
996
996
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -1034,7 +1034,7 @@ export default class bithumb extends Exchange {
|
|
|
1034
1034
|
* @method
|
|
1035
1035
|
* @name bithumb#withdraw
|
|
1036
1036
|
* @description make a withdrawal
|
|
1037
|
-
* @see https://apidocs.bithumb.com/reference/%EC%BD%94%EC%9D%B8-%EC%B6%9C%EA%B8%88%ED%95%98%EA%B8%B0-%EA%B0%9C%EC%9D%B8
|
|
1037
|
+
* @see https://apidocs.bithumb.com/v1.2.0/reference/%EC%BD%94%EC%9D%B8-%EC%B6%9C%EA%B8%88%ED%95%98%EA%B8%B0-%EA%B0%9C%EC%9D%B8
|
|
1038
1038
|
* @param {string} code unified currency code
|
|
1039
1039
|
* @param {float} amount the amount to withdraw
|
|
1040
1040
|
* @param {string} address the address to withdraw to
|
package/js/src/bitmart.js
CHANGED
|
@@ -2466,6 +2466,7 @@ export default class bitmart extends Exchange {
|
|
|
2466
2466
|
* @see https://developer-pro.bitmart.com/en/futures/#submit-plan-order-signed
|
|
2467
2467
|
* @see https://developer-pro.bitmart.com/en/futures/#submit-order-signed
|
|
2468
2468
|
* @see https://developer-pro.bitmart.com/en/futures/#submit-plan-order-signed
|
|
2469
|
+
* @see https://developer-pro.bitmart.com/en/futuresv2/#submit-plan-order-signed
|
|
2469
2470
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
2470
2471
|
* @param {string} type 'market', 'limit' or 'trailing' for swap markets only
|
|
2471
2472
|
* @param {string} side 'buy' or 'sell'
|
|
@@ -2719,6 +2720,9 @@ export default class bitmart extends Exchange {
|
|
|
2719
2720
|
if (leverage !== undefined) {
|
|
2720
2721
|
request['leverage'] = this.numberToString(leverage);
|
|
2721
2722
|
}
|
|
2723
|
+
else if (isTriggerOrder) {
|
|
2724
|
+
request['leverage'] = '1'; // for plan orders leverage is required, if not available default to 1
|
|
2725
|
+
}
|
|
2722
2726
|
return this.extend(request, params);
|
|
2723
2727
|
}
|
|
2724
2728
|
createSpotOrderRequest(symbol, type, side, amount, price = undefined, params = {}) {
|
package/js/src/bybit.js
CHANGED
|
@@ -3789,7 +3789,12 @@ export default class bybit extends Exchange {
|
|
|
3789
3789
|
}
|
|
3790
3790
|
else {
|
|
3791
3791
|
if (!isTrailingAmountOrder && !isAlternativeEndpoint) {
|
|
3792
|
-
|
|
3792
|
+
if (market['option']) {
|
|
3793
|
+
request['qty'] = this.numberToString(amount);
|
|
3794
|
+
}
|
|
3795
|
+
else {
|
|
3796
|
+
request['qty'] = this.amountToPrecision(symbol, amount);
|
|
3797
|
+
}
|
|
3793
3798
|
}
|
|
3794
3799
|
}
|
|
3795
3800
|
if (isTrailingAmountOrder) {
|
package/js/src/kraken.js
CHANGED
|
@@ -1853,6 +1853,9 @@ export default class kraken extends Exchange {
|
|
|
1853
1853
|
const extendedPostFlags = (flags !== undefined) ? flags + ',post' : 'post';
|
|
1854
1854
|
request['oflags'] = extendedPostFlags;
|
|
1855
1855
|
}
|
|
1856
|
+
if ((flags !== undefined) && (request['oflags'] === undefined)) {
|
|
1857
|
+
request['oflags'] = flags;
|
|
1858
|
+
}
|
|
1856
1859
|
params = this.omit(params, ['timeInForce', 'reduceOnly', 'stopLossPrice', 'takeProfitPrice', 'trailingAmount', 'trailingLimitAmount', 'offset']);
|
|
1857
1860
|
return [request, params];
|
|
1858
1861
|
}
|
package/js/src/pro/bybit.js
CHANGED
|
@@ -80,6 +80,25 @@ export default class bybit extends bybitRest {
|
|
|
80
80
|
},
|
|
81
81
|
},
|
|
82
82
|
},
|
|
83
|
+
'demotrading': {
|
|
84
|
+
'ws': {
|
|
85
|
+
'public': {
|
|
86
|
+
'spot': 'wss://stream.{hostname}/v5/public/spot',
|
|
87
|
+
'inverse': 'wss://stream.{hostname}/v5/public/inverse',
|
|
88
|
+
'option': 'wss://stream.{hostname}/v5/public/option',
|
|
89
|
+
'linear': 'wss://stream.{hostname}/v5/public/linear',
|
|
90
|
+
},
|
|
91
|
+
'private': {
|
|
92
|
+
'spot': {
|
|
93
|
+
'unified': 'wss://stream-demo.{hostname}/v5/private',
|
|
94
|
+
'nonUnified': 'wss://stream-demo.{hostname}/spot/private/v3',
|
|
95
|
+
},
|
|
96
|
+
'contract': 'wss://stream-demo.{hostname}/v5/private',
|
|
97
|
+
'usdc': 'wss://stream-demo.{hostname}/trade/option/usdc/private/v1',
|
|
98
|
+
'trade': 'wss://stream-demo.bybit.com/v5/trade',
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
},
|
|
83
102
|
},
|
|
84
103
|
'options': {
|
|
85
104
|
'watchTicker': {
|
package/js/src/pro/woo.js
CHANGED
|
@@ -646,7 +646,7 @@ export default class woo extends wooRest {
|
|
|
646
646
|
},
|
|
647
647
|
};
|
|
648
648
|
const message = this.extend(request, params);
|
|
649
|
-
this.watch(url, messageHash, message, messageHash);
|
|
649
|
+
this.watch(url, messageHash, message, messageHash, message);
|
|
650
650
|
}
|
|
651
651
|
return await future;
|
|
652
652
|
}
|
package/js/src/xt.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import Exchange from './abstract/xt.js';
|
|
2
2
|
import { Currencies, Currency, Dict, FundingHistory, FundingRateHistory, Int, LeverageTier, MarginModification, Market, Num, OHLCV, Order, OrderSide, OrderType, Str, Tickers, Transaction, TransferEntry } from './base/types.js';
|
|
3
|
+
/**
|
|
4
|
+
* @class xt
|
|
5
|
+
* @augments Exchange
|
|
6
|
+
*/
|
|
3
7
|
export default class xt extends Exchange {
|
|
4
8
|
describe(): any;
|
|
5
9
|
nonce(): number;
|
package/js/src/xt.js
CHANGED
|
@@ -11,6 +11,10 @@ import { TICK_SIZE } from './base/functions/number.js';
|
|
|
11
11
|
import { ArgumentsRequired, AuthenticationError, BadRequest, BadSymbol, ExchangeError, InsufficientFunds, InvalidOrder, NetworkError, NotSupported, OnMaintenance, PermissionDenied, RateLimitExceeded, RequestTimeout } from './base/errors.js';
|
|
12
12
|
import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
|
|
13
13
|
// ---------------------------------------------------------------------------
|
|
14
|
+
/**
|
|
15
|
+
* @class xt
|
|
16
|
+
* @augments Exchange
|
|
17
|
+
*/
|
|
14
18
|
export default class xt extends Exchange {
|
|
15
19
|
describe() {
|
|
16
20
|
return this.deepExtend(super.describe(), {
|
package/package.json
CHANGED