ccxt 4.2.38 → 4.2.40
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.js +1340 -407
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ascendex.js +28 -24
- package/dist/cjs/src/base/Exchange.js +28 -16
- package/dist/cjs/src/binance.js +528 -181
- package/dist/cjs/src/bingx.js +250 -23
- package/dist/cjs/src/bitget.js +14 -3
- package/dist/cjs/src/bitso.js +18 -2
- package/dist/cjs/src/bitstamp.js +24 -2
- package/dist/cjs/src/bl3p.js +6 -0
- package/dist/cjs/src/blockchaincom.js +21 -0
- package/dist/cjs/src/btcalpha.js +9 -0
- package/dist/cjs/src/btcbox.js +9 -0
- package/dist/cjs/src/btcmarkets.js +19 -0
- package/dist/cjs/src/bybit.js +3 -1
- package/dist/cjs/src/coinbase.js +21 -8
- package/dist/cjs/src/coinbasepro.js +1 -0
- package/dist/cjs/src/coinlist.js +9 -7
- package/dist/cjs/src/coinmetro.js +2 -1
- package/dist/cjs/src/krakenfutures.js +133 -16
- package/dist/cjs/src/luno.js +1 -1
- package/dist/cjs/src/mexc.js +43 -43
- package/dist/cjs/src/okx.js +11 -17
- package/dist/cjs/src/phemex.js +1 -0
- package/dist/cjs/src/poloniexfutures.js +11 -5
- package/dist/cjs/src/pro/bitmart.js +141 -48
- package/dist/cjs/src/pro/bybit.js +5 -5
- package/dist/cjs/src/pro/mexc.js +1 -1
- package/dist/cjs/src/wavesexchange.js +1 -1
- package/dist/cjs/src/woo.js +1 -1
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bingx.d.ts +4 -0
- package/js/src/abstract/coinbase.d.ts +1 -0
- package/js/src/abstract/coinbasepro.d.ts +1 -0
- package/js/src/abstract/okx.d.ts +1 -0
- package/js/src/ascendex.d.ts +2 -2
- package/js/src/ascendex.js +28 -24
- package/js/src/base/Exchange.d.ts +12 -8
- package/js/src/base/Exchange.js +28 -16
- package/js/src/base/types.d.ts +2 -0
- package/js/src/bigone.d.ts +2 -2
- package/js/src/binance.d.ts +9 -9
- package/js/src/binance.js +528 -181
- package/js/src/bingx.d.ts +6 -5
- package/js/src/bingx.js +250 -23
- package/js/src/bitfinex.d.ts +3 -3
- package/js/src/bitfinex2.d.ts +2 -2
- package/js/src/bitget.d.ts +5 -5
- package/js/src/bitget.js +14 -3
- package/js/src/bitmart.d.ts +2 -2
- package/js/src/bitmex.d.ts +2 -2
- package/js/src/bitrue.d.ts +2 -2
- package/js/src/bitso.d.ts +1 -1
- package/js/src/bitso.js +18 -2
- package/js/src/bitstamp.d.ts +1 -1
- package/js/src/bitstamp.js +24 -2
- package/js/src/bitvavo.d.ts +1 -1
- package/js/src/bl3p.js +6 -0
- package/js/src/blockchaincom.js +21 -0
- package/js/src/blofin.d.ts +2 -2
- package/js/src/btcalpha.js +9 -0
- package/js/src/btcbox.js +9 -0
- package/js/src/btcmarkets.js +19 -0
- package/js/src/bybit.d.ts +7 -7
- package/js/src/bybit.js +3 -1
- package/js/src/cex.d.ts +1 -1
- package/js/src/coinbase.d.ts +2 -2
- package/js/src/coinbase.js +21 -8
- package/js/src/coinbasepro.js +1 -0
- package/js/src/coinex.d.ts +4 -4
- package/js/src/coinlist.d.ts +2 -2
- package/js/src/coinlist.js +9 -7
- package/js/src/coinmetro.js +2 -1
- package/js/src/coinone.d.ts +1 -1
- package/js/src/delta.d.ts +2 -2
- package/js/src/deribit.d.ts +3 -3
- package/js/src/digifinex.d.ts +3 -3
- package/js/src/exmo.d.ts +2 -2
- package/js/src/gate.d.ts +6 -6
- package/js/src/hitbtc.d.ts +2 -2
- package/js/src/hollaex.d.ts +1 -1
- package/js/src/htx.d.ts +3 -3
- package/js/src/huobijp.d.ts +1 -1
- package/js/src/kraken.d.ts +2 -2
- package/js/src/krakenfutures.d.ts +4 -2
- package/js/src/krakenfutures.js +133 -16
- package/js/src/kucoin.d.ts +5 -5
- package/js/src/kucoinfutures.d.ts +2 -2
- package/js/src/latoken.d.ts +1 -1
- package/js/src/lbank.d.ts +2 -2
- package/js/src/luno.d.ts +1 -1
- package/js/src/luno.js +1 -1
- package/js/src/mexc.d.ts +4 -4
- package/js/src/mexc.js +43 -43
- package/js/src/ndax.d.ts +1 -1
- package/js/src/novadax.d.ts +1 -1
- package/js/src/okcoin.d.ts +2 -2
- package/js/src/okx.d.ts +7 -7
- package/js/src/okx.js +11 -17
- package/js/src/paymium.d.ts +2 -2
- package/js/src/phemex.d.ts +4 -4
- package/js/src/phemex.js +1 -0
- package/js/src/poloniex.d.ts +2 -2
- package/js/src/poloniexfutures.d.ts +2 -2
- package/js/src/poloniexfutures.js +11 -5
- package/js/src/pro/bitmart.d.ts +4 -0
- package/js/src/pro/bitmart.js +141 -48
- package/js/src/pro/bitvavo.d.ts +1 -1
- package/js/src/pro/bybit.d.ts +1 -1
- package/js/src/pro/bybit.js +5 -5
- package/js/src/pro/cex.d.ts +2 -2
- package/js/src/pro/coinbase.d.ts +2 -2
- package/js/src/pro/coinex.d.ts +1 -1
- package/js/src/pro/lbank.d.ts +1 -1
- package/js/src/pro/mexc.js +1 -1
- package/js/src/probit.d.ts +1 -1
- package/js/src/timex.d.ts +1 -1
- package/js/src/upbit.d.ts +1 -1
- package/js/src/wavesexchange.js +1 -1
- package/js/src/whitebit.d.ts +2 -2
- package/js/src/woo.d.ts +3 -3
- package/js/src/woo.js +1 -1
- package/js/src/zonda.d.ts +3 -3
- package/package.json +2 -2
|
@@ -638,6 +638,10 @@ export default class Exchange {
|
|
|
638
638
|
withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
|
|
639
639
|
createDepositAddress(code: string, params?: {}): Promise<DepositAddressResponse>;
|
|
640
640
|
setLeverage(leverage: Int, symbol?: string, params?: {}): Promise<{}>;
|
|
641
|
+
fetchLeverage(symbol: string, params?: {}): Promise<{}>;
|
|
642
|
+
setPositionMode(hedged: boolean, symbol?: Str, params?: {}): Promise<{}>;
|
|
643
|
+
setMarginMode(marginMode: string, symbol?: Str, params?: {}): Promise<{}>;
|
|
644
|
+
fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<{}>;
|
|
641
645
|
fetchOpenInterestHistory(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OpenInterest[]>;
|
|
642
646
|
fetchOpenInterest(symbol: string, params?: {}): Promise<OpenInterest>;
|
|
643
647
|
signIn(params?: {}): Promise<{}>;
|
|
@@ -717,11 +721,11 @@ export default class Exchange {
|
|
|
717
721
|
networkCodeToId(networkCode: any, currencyCode?: any): string;
|
|
718
722
|
networkIdToCode(networkId: any, currencyCode?: any): string;
|
|
719
723
|
handleNetworkCodeAndParams(params: any): any[];
|
|
720
|
-
defaultNetworkCode(currencyCode:
|
|
724
|
+
defaultNetworkCode(currencyCode: string): any;
|
|
721
725
|
selectNetworkCodeFromUnifiedNetworks(currencyCode: any, networkCode: any, indexedNetworkEntries: any): any;
|
|
722
726
|
selectNetworkIdFromRawNetworks(currencyCode: any, networkCode: any, indexedNetworkEntries: any): any;
|
|
723
727
|
selectNetworkKeyFromNetworks(currencyCode: any, networkCode: any, indexedNetworkEntries: any, isIndexedByUnifiedNetworkCode?: boolean): any;
|
|
724
|
-
safeNumber2(dictionary:
|
|
728
|
+
safeNumber2(dictionary: object, key1: IndexType, key2: IndexType, d?: any): number;
|
|
725
729
|
parseOrderBook(orderbook: object, symbol: string, timestamp?: Int, bidsKey?: string, asksKey?: string, priceKey?: IndexType, amountKey?: IndexType, countOrIdKey?: IndexType): OrderBook;
|
|
726
730
|
parseOHLCVs(ohlcvs: object[], market?: any, timeframe?: string, since?: Int, limit?: Int): OHLCV[];
|
|
727
731
|
parseLeverageTiers(response: any, symbols?: string[], marketIdKey?: any): {};
|
|
@@ -784,12 +788,12 @@ export default class Exchange {
|
|
|
784
788
|
getSupportedMapping(key: any, mapping?: {}): any;
|
|
785
789
|
fetchCrossBorrowRate(code: string, params?: {}): Promise<{}>;
|
|
786
790
|
fetchIsolatedBorrowRate(symbol: string, params?: {}): Promise<{}>;
|
|
787
|
-
handleOptionAndParams(params:
|
|
788
|
-
handleOptionAndParams2(params:
|
|
789
|
-
handleOption(methodName:
|
|
791
|
+
handleOptionAndParams(params: object, methodName: string, optionName: string, defaultValue?: any): any[];
|
|
792
|
+
handleOptionAndParams2(params: object, methodName: string, methodName2: string, optionName: string, defaultValue?: any): any[];
|
|
793
|
+
handleOption(methodName: string, optionName: string, defaultValue?: any): any;
|
|
790
794
|
handleMarketTypeAndParams(methodName: string, market?: Market, params?: {}): any;
|
|
791
|
-
handleSubTypeAndParams(methodName:
|
|
792
|
-
handleMarginModeAndParams(methodName:
|
|
795
|
+
handleSubTypeAndParams(methodName: string, market?: any, params?: {}, defaultValue?: any): any[];
|
|
796
|
+
handleMarginModeAndParams(methodName: string, params?: {}, defaultValue?: any): any[];
|
|
793
797
|
throwExactlyMatchedException(exact: any, string: any, message: any): void;
|
|
794
798
|
throwBroadlyMatchedException(broad: any, string: any, message: any): void;
|
|
795
799
|
findBroadlyMatchedKey(broad: any, string: any): string;
|
|
@@ -851,7 +855,7 @@ export default class Exchange {
|
|
|
851
855
|
fetchDepositAddress(code: string, params?: {}): Promise<any>;
|
|
852
856
|
account(): Account;
|
|
853
857
|
commonCurrencyCode(currency: string): string;
|
|
854
|
-
currency(code:
|
|
858
|
+
currency(code: string): any;
|
|
855
859
|
market(symbol: string): MarketInterface;
|
|
856
860
|
createExpiredOptionMarket(symbol: string): MarketInterface;
|
|
857
861
|
handleWithdrawTagAndParams(tag: any, params: any): any;
|
package/js/src/base/Exchange.js
CHANGED
|
@@ -1932,6 +1932,18 @@ export default class Exchange {
|
|
|
1932
1932
|
async setLeverage(leverage, symbol = undefined, params = {}) {
|
|
1933
1933
|
throw new NotSupported(this.id + ' setLeverage() is not supported yet');
|
|
1934
1934
|
}
|
|
1935
|
+
async fetchLeverage(symbol, params = {}) {
|
|
1936
|
+
throw new NotSupported(this.id + ' fetchLeverage() is not supported yet');
|
|
1937
|
+
}
|
|
1938
|
+
async setPositionMode(hedged, symbol = undefined, params = {}) {
|
|
1939
|
+
throw new NotSupported(this.id + ' setPositionMode() is not supported yet');
|
|
1940
|
+
}
|
|
1941
|
+
async setMarginMode(marginMode, symbol = undefined, params = {}) {
|
|
1942
|
+
throw new NotSupported(this.id + ' setMarginMode() is not supported yet');
|
|
1943
|
+
}
|
|
1944
|
+
async fetchDepositAddressesByNetwork(code, params = {}) {
|
|
1945
|
+
throw new NotSupported(this.id + ' fetchDepositAddressesByNetwork() is not supported yet');
|
|
1946
|
+
}
|
|
1935
1947
|
async fetchOpenInterestHistory(symbol, timeframe = '1h', since = undefined, limit = undefined, params = {}) {
|
|
1936
1948
|
throw new NotSupported(this.id + ' fetchOpenInterestHistory() is not supported yet');
|
|
1937
1949
|
}
|
|
@@ -3158,11 +3170,11 @@ export default class Exchange {
|
|
|
3158
3170
|
* @param {string|undefined} currencyCode unified currency code, but this argument is not required by default, unless there is an exchange (like huobi) that needs an override of the method to be able to pass currencyCode argument additionally
|
|
3159
3171
|
* @returns {string|undefined} unified network code
|
|
3160
3172
|
*/
|
|
3161
|
-
const networkCodesByIds = this.
|
|
3173
|
+
const networkCodesByIds = this.safeDict(this.options, 'networksById', {});
|
|
3162
3174
|
let networkCode = this.safeString(networkCodesByIds, networkId, networkId);
|
|
3163
3175
|
// replace mainnet network-codes (i.e. ERC20->ETH)
|
|
3164
3176
|
if (currencyCode !== undefined) {
|
|
3165
|
-
const defaultNetworkCodeReplacements = this.
|
|
3177
|
+
const defaultNetworkCodeReplacements = this.safeDict(this.options, 'defaultNetworkCodeReplacements', {});
|
|
3166
3178
|
if (currencyCode in defaultNetworkCodeReplacements) {
|
|
3167
3179
|
const replacementObject = this.safeDict(defaultNetworkCodeReplacements, currencyCode, {});
|
|
3168
3180
|
networkCode = this.safeString(replacementObject, networkCode, networkCode);
|
|
@@ -3180,14 +3192,14 @@ export default class Exchange {
|
|
|
3180
3192
|
}
|
|
3181
3193
|
defaultNetworkCode(currencyCode) {
|
|
3182
3194
|
let defaultNetworkCode = undefined;
|
|
3183
|
-
const defaultNetworks = this.
|
|
3195
|
+
const defaultNetworks = this.safeDict(this.options, 'defaultNetworks', {});
|
|
3184
3196
|
if (currencyCode in defaultNetworks) {
|
|
3185
3197
|
// if currency had set its network in "defaultNetworks", use it
|
|
3186
3198
|
defaultNetworkCode = defaultNetworks[currencyCode];
|
|
3187
3199
|
}
|
|
3188
3200
|
else {
|
|
3189
3201
|
// otherwise, try to use the global-scope 'defaultNetwork' value (even if that network is not supported by currency, it doesn't make any problem, this will be just used "at first" if currency supports this network at all)
|
|
3190
|
-
const defaultNetwork = this.
|
|
3202
|
+
const defaultNetwork = this.safeDict(this.options, 'defaultNetwork');
|
|
3191
3203
|
if (defaultNetwork !== undefined) {
|
|
3192
3204
|
defaultNetworkCode = defaultNetwork;
|
|
3193
3205
|
}
|
|
@@ -3692,14 +3704,14 @@ export default class Exchange {
|
|
|
3692
3704
|
throw new NotSupported(this.id + ' fetchStatus() is not supported yet');
|
|
3693
3705
|
}
|
|
3694
3706
|
async fetchFundingFee(code, params = {}) {
|
|
3695
|
-
const warnOnFetchFundingFee = this.
|
|
3707
|
+
const warnOnFetchFundingFee = this.safeBool(this.options, 'warnOnFetchFundingFee', true);
|
|
3696
3708
|
if (warnOnFetchFundingFee) {
|
|
3697
3709
|
throw new NotSupported(this.id + ' fetchFundingFee() method is deprecated, it will be removed in July 2022, please, use fetchTransactionFee() or set exchange.options["warnOnFetchFundingFee"] = false to suppress this warning');
|
|
3698
3710
|
}
|
|
3699
3711
|
return await this.fetchTransactionFee(code, params);
|
|
3700
3712
|
}
|
|
3701
3713
|
async fetchFundingFees(codes = undefined, params = {}) {
|
|
3702
|
-
const warnOnFetchFundingFees = this.
|
|
3714
|
+
const warnOnFetchFundingFees = this.safeBool(this.options, 'warnOnFetchFundingFees', true);
|
|
3703
3715
|
if (warnOnFetchFundingFees) {
|
|
3704
3716
|
throw new NotSupported(this.id + ' fetchFundingFees() method is deprecated, it will be removed in July 2022. Please, use fetchTransactionFees() or set exchange.options["warnOnFetchFundingFees"] = false to suppress this warning');
|
|
3705
3717
|
}
|
|
@@ -3750,7 +3762,7 @@ export default class Exchange {
|
|
|
3750
3762
|
throw new NotSupported(this.id + ' fetchIsolatedBorrowRate() is not supported yet');
|
|
3751
3763
|
}
|
|
3752
3764
|
const borrowRates = await this.fetchIsolatedBorrowRates(params);
|
|
3753
|
-
const rate = this.
|
|
3765
|
+
const rate = this.safeDict(borrowRates, symbol);
|
|
3754
3766
|
if (rate === undefined) {
|
|
3755
3767
|
throw new ExchangeError(this.id + ' fetchIsolatedBorrowRate() could not find the borrow rate for market symbol ' + symbol);
|
|
3756
3768
|
}
|
|
@@ -3811,7 +3823,7 @@ export default class Exchange {
|
|
|
3811
3823
|
}
|
|
3812
3824
|
handleMarketTypeAndParams(methodName, market = undefined, params = {}) {
|
|
3813
3825
|
const defaultType = this.safeString2(this.options, 'defaultType', 'type', 'spot');
|
|
3814
|
-
const methodOptions = this.
|
|
3826
|
+
const methodOptions = this.safeDict(this.options, methodName);
|
|
3815
3827
|
let methodType = defaultType;
|
|
3816
3828
|
if (methodOptions !== undefined) {
|
|
3817
3829
|
if (typeof methodOptions === 'string') {
|
|
@@ -3847,7 +3859,7 @@ export default class Exchange {
|
|
|
3847
3859
|
}
|
|
3848
3860
|
// if it was not defined in market object
|
|
3849
3861
|
if (subType === undefined) {
|
|
3850
|
-
const values = this.handleOptionAndParams(
|
|
3862
|
+
const values = this.handleOptionAndParams({}, methodName, 'subType', defaultValue); // no need to re-test params here
|
|
3851
3863
|
subType = values[0];
|
|
3852
3864
|
}
|
|
3853
3865
|
}
|
|
@@ -3903,7 +3915,7 @@ export default class Exchange {
|
|
|
3903
3915
|
const market = this.market(symbol);
|
|
3904
3916
|
symbol = market['symbol'];
|
|
3905
3917
|
const tickers = await this.fetchTickers([symbol], params);
|
|
3906
|
-
const ticker = this.
|
|
3918
|
+
const ticker = this.safeDict(tickers, symbol);
|
|
3907
3919
|
if (ticker === undefined) {
|
|
3908
3920
|
throw new NullResponse(this.id + ' fetchTickers() could not find a ticker for ' + symbol);
|
|
3909
3921
|
}
|
|
@@ -3940,7 +3952,7 @@ export default class Exchange {
|
|
|
3940
3952
|
return order['status'];
|
|
3941
3953
|
}
|
|
3942
3954
|
async fetchUnifiedOrder(order, params = {}) {
|
|
3943
|
-
return await this.fetchOrder(this.
|
|
3955
|
+
return await this.fetchOrder(this.safeString(order, 'id'), this.safeString(order, 'symbol'), params);
|
|
3944
3956
|
}
|
|
3945
3957
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
3946
3958
|
throw new NotSupported(this.id + ' createOrder() is not supported yet');
|
|
@@ -4210,7 +4222,7 @@ export default class Exchange {
|
|
|
4210
4222
|
throw new NotSupported(this.id + ' cancelAllOrdersWs() is not supported yet');
|
|
4211
4223
|
}
|
|
4212
4224
|
async cancelUnifiedOrder(order, params = {}) {
|
|
4213
|
-
return this.cancelOrder(this.
|
|
4225
|
+
return this.cancelOrder(this.safeString(order, 'id'), this.safeString(order, 'symbol'), params);
|
|
4214
4226
|
}
|
|
4215
4227
|
async fetchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
4216
4228
|
if (this.has['fetchOpenOrders'] && this.has['fetchClosedOrders']) {
|
|
@@ -4702,7 +4714,7 @@ export default class Exchange {
|
|
|
4702
4714
|
return result;
|
|
4703
4715
|
}
|
|
4704
4716
|
isTriggerOrder(params) {
|
|
4705
|
-
const isTrigger = this.
|
|
4717
|
+
const isTrigger = this.safeBool2(params, 'trigger', 'stop');
|
|
4706
4718
|
if (isTrigger) {
|
|
4707
4719
|
params = this.omit(params, ['trigger', 'stop']);
|
|
4708
4720
|
}
|
|
@@ -4718,7 +4730,7 @@ export default class Exchange {
|
|
|
4718
4730
|
* @returns {boolean} true if a post only order, false otherwise
|
|
4719
4731
|
*/
|
|
4720
4732
|
const timeInForce = this.safeStringUpper(params, 'timeInForce');
|
|
4721
|
-
let postOnly = this.
|
|
4733
|
+
let postOnly = this.safeBool2(params, 'postOnly', 'post_only', false);
|
|
4722
4734
|
// we assume timeInForce is uppercase from safeStringUpper (params, 'timeInForce')
|
|
4723
4735
|
const ioc = timeInForce === 'IOC';
|
|
4724
4736
|
const fok = timeInForce === 'FOK';
|
|
@@ -4912,7 +4924,7 @@ export default class Exchange {
|
|
|
4912
4924
|
* @param {string} account key for account name in this.options['accountsByType']
|
|
4913
4925
|
* @returns the exchange specific account name or the isolated margin id for transfers
|
|
4914
4926
|
*/
|
|
4915
|
-
const accountsByType = this.
|
|
4927
|
+
const accountsByType = this.safeDict(this.options, 'accountsByType', {});
|
|
4916
4928
|
const lowercaseAccount = account.toLowerCase();
|
|
4917
4929
|
if (lowercaseAccount in accountsByType) {
|
|
4918
4930
|
return accountsByType[lowercaseAccount];
|
|
@@ -5389,7 +5401,7 @@ export default class Exchange {
|
|
|
5389
5401
|
return input;
|
|
5390
5402
|
}
|
|
5391
5403
|
handleUntilOption(key, request, params, multiplier = 1) {
|
|
5392
|
-
const until = this.
|
|
5404
|
+
const until = this.safeInteger2(params, 'until', 'till');
|
|
5393
5405
|
if (until !== undefined) {
|
|
5394
5406
|
request[key] = this.parseToInt(until * multiplier);
|
|
5395
5407
|
params = this.omit(params, ['until', 'till']);
|
package/js/src/base/types.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ export declare type SubType = 'linear' | 'inverse' | undefined;
|
|
|
11
11
|
export interface Dictionary<T> {
|
|
12
12
|
[key: string]: T;
|
|
13
13
|
}
|
|
14
|
+
export declare type Dict = Dictionary<any>;
|
|
15
|
+
export declare type List = Array<any>;
|
|
14
16
|
/** Request parameters */
|
|
15
17
|
export interface MinMax {
|
|
16
18
|
min: Num;
|
package/js/src/bigone.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export default class bigone extends Exchange {
|
|
|
23
23
|
fetchBalance(params?: {}): Promise<Balances>;
|
|
24
24
|
parseType(type: string): string;
|
|
25
25
|
parseOrder(order: any, market?: Market): Order;
|
|
26
|
-
createMarketBuyOrderWithCost(symbol: string, cost:
|
|
26
|
+
createMarketBuyOrderWithCost(symbol: string, cost: number, params?: {}): Promise<Order>;
|
|
27
27
|
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: number, params?: {}): Promise<Order>;
|
|
28
28
|
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
29
29
|
cancelAllOrders(symbol?: Str, params?: {}): Promise<any>;
|
|
@@ -51,7 +51,7 @@ export default class bigone extends Exchange {
|
|
|
51
51
|
parseTransaction(transaction: any, currency?: Currency): Transaction;
|
|
52
52
|
fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
53
53
|
fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
54
|
-
transfer(code: string, amount: number, fromAccount:
|
|
54
|
+
transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
|
|
55
55
|
parseTransfer(transfer: any, currency?: Currency): {
|
|
56
56
|
info: any;
|
|
57
57
|
id: any;
|
package/js/src/binance.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export default class binance extends Exchange {
|
|
|
10
10
|
isLinear(type: any, subType?: any): boolean;
|
|
11
11
|
setSandboxMode(enable: any): void;
|
|
12
12
|
convertExpireDate(date: any): string;
|
|
13
|
-
createExpiredOptionMarket(symbol:
|
|
13
|
+
createExpiredOptionMarket(symbol: string): MarketInterface;
|
|
14
14
|
market(symbol: any): any;
|
|
15
15
|
safeMarket(marketId?: any, market?: any, delimiter?: any, marketType?: any): MarketInterface;
|
|
16
16
|
costToPrecision(symbol: any, cost: any): any;
|
|
@@ -51,15 +51,15 @@ export default class binance extends Exchange {
|
|
|
51
51
|
editSpotOrder(id: string, symbol: any, type: any, side: any, amount: number, price?: number, params?: {}): Promise<Order>;
|
|
52
52
|
editSpotOrderRequest(id: string, symbol: any, type: any, side: any, amount: number, price?: number, params?: {}): any;
|
|
53
53
|
editContractOrder(id: string, symbol: any, type: any, side: any, amount: number, price?: number, params?: {}): Promise<Order>;
|
|
54
|
-
editOrder(id: string, symbol:
|
|
54
|
+
editOrder(id: string, symbol: string, type: OrderType, side: OrderSide, amount?: number, price?: number, params?: {}): Promise<Order>;
|
|
55
55
|
parseOrderStatus(status: any): string;
|
|
56
56
|
parseOrder(order: any, market?: Market): Order;
|
|
57
57
|
createOrders(orders: OrderRequest[], params?: {}): Promise<Order[]>;
|
|
58
58
|
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: number, params?: {}): Promise<Order>;
|
|
59
59
|
createOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: number, params?: {}): any;
|
|
60
|
-
createMarketOrderWithCost(symbol: string, side: OrderSide, cost:
|
|
61
|
-
createMarketBuyOrderWithCost(symbol: string, cost:
|
|
62
|
-
createMarketSellOrderWithCost(symbol: string, cost:
|
|
60
|
+
createMarketOrderWithCost(symbol: string, side: OrderSide, cost: number, params?: {}): Promise<Order>;
|
|
61
|
+
createMarketBuyOrderWithCost(symbol: string, cost: number, params?: {}): Promise<Order>;
|
|
62
|
+
createMarketSellOrderWithCost(symbol: string, cost: number, params?: {}): Promise<Order>;
|
|
63
63
|
fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
64
64
|
fetchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
65
65
|
fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
@@ -114,7 +114,7 @@ export default class binance extends Exchange {
|
|
|
114
114
|
id: string;
|
|
115
115
|
amount: number;
|
|
116
116
|
};
|
|
117
|
-
transfer(code: string, amount: number, fromAccount:
|
|
117
|
+
transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
|
|
118
118
|
fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
|
|
119
119
|
fetchDepositAddress(code: string, params?: {}): Promise<{
|
|
120
120
|
currency: string;
|
|
@@ -123,7 +123,7 @@ export default class binance extends Exchange {
|
|
|
123
123
|
network: any;
|
|
124
124
|
info: any;
|
|
125
125
|
}>;
|
|
126
|
-
fetchTransactionFees(codes?:
|
|
126
|
+
fetchTransactionFees(codes?: string[], params?: {}): Promise<{
|
|
127
127
|
withdraw: {};
|
|
128
128
|
deposit: {};
|
|
129
129
|
info: any;
|
|
@@ -261,7 +261,7 @@ export default class binance extends Exchange {
|
|
|
261
261
|
fetchFundingHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<import("./base/types.js").FundingHistory[]>;
|
|
262
262
|
setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<any>;
|
|
263
263
|
setMarginMode(marginMode: string, symbol?: Str, params?: {}): Promise<any>;
|
|
264
|
-
setPositionMode(hedged:
|
|
264
|
+
setPositionMode(hedged: boolean, symbol?: Str, params?: {}): Promise<any>;
|
|
265
265
|
fetchSettlementHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
|
|
266
266
|
fetchMySettlementHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
|
|
267
267
|
parseSettlement(settlement: any, market: any): {
|
|
@@ -297,7 +297,7 @@ export default class binance extends Exchange {
|
|
|
297
297
|
body: any;
|
|
298
298
|
headers: any;
|
|
299
299
|
};
|
|
300
|
-
getExceptionsByUrl(url: any, exactOrBroad: any): any
|
|
300
|
+
getExceptionsByUrl(url: any, exactOrBroad: any): import("./base/types.js").Dictionary<any>;
|
|
301
301
|
handleErrors(code: any, reason: any, url: any, method: any, headers: any, body: any, response: any, requestHeaders: any, requestBody: any): any;
|
|
302
302
|
calculateRateLimiterCost(api: any, method: any, path: any, params: any, config?: {}): any;
|
|
303
303
|
request(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any, config?: {}): Promise<any>;
|