ccxt 4.4.2 → 4.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/base/Exchange.js +2 -2
- package/dist/cjs/src/base/functions/misc.js +11 -0
- package/dist/cjs/src/base/functions.js +1 -0
- package/dist/cjs/src/base/ws/WsClient.js +2 -1
- package/dist/cjs/src/binance.js +49 -22
- package/dist/cjs/src/bingx.js +1 -0
- package/dist/cjs/src/bitfinex2.js +7 -6
- package/dist/cjs/src/bitget.js +10 -6
- package/dist/cjs/src/bitmart.js +3 -1
- package/dist/cjs/src/bitmex.js +11 -10
- package/dist/cjs/src/bitso.js +5 -4
- package/dist/cjs/src/bitstamp.js +33 -45
- package/dist/cjs/src/blofin.js +21 -23
- package/dist/cjs/src/bybit.js +22 -20
- package/dist/cjs/src/coinbase.js +28 -7
- package/dist/cjs/src/coinbaseexchange.js +11 -11
- package/dist/cjs/src/coinlist.js +6 -5
- package/dist/cjs/src/coinmetro.js +3 -3
- package/dist/cjs/src/cryptocom.js +9 -6
- package/dist/cjs/src/currencycom.js +6 -6
- package/dist/cjs/src/delta.js +5 -5
- package/dist/cjs/src/digifinex.js +8 -6
- package/dist/cjs/src/gate.js +6 -5
- package/dist/cjs/src/hashkey.js +9 -7
- package/dist/cjs/src/htx.js +13 -16
- package/dist/cjs/src/hyperliquid.js +67 -114
- package/dist/cjs/src/kraken.js +8 -6
- package/dist/cjs/src/kucoin.js +9 -8
- package/dist/cjs/src/luno.js +10 -9
- package/dist/cjs/src/mexc.js +54 -2
- package/dist/cjs/src/ndax.js +6 -5
- package/dist/cjs/src/okcoin.js +18 -27
- package/dist/cjs/src/okx.js +18 -26
- package/dist/cjs/src/p2b.js +2 -2
- package/dist/cjs/src/pro/bybit.js +56 -0
- package/dist/cjs/src/pro/cryptocom.js +191 -21
- package/dist/cjs/src/pro/mexc.js +165 -3
- package/dist/cjs/src/pro/okx.js +6 -3
- package/dist/cjs/src/pro/oxfun.js +75 -0
- package/dist/cjs/src/pro/phemex.js +45 -1
- package/dist/cjs/src/pro/woofipro.js +67 -0
- package/dist/cjs/src/woo.js +7 -6
- package/dist/cjs/src/woofipro.js +8 -6
- package/dist/cjs/src/xt.js +10 -4
- package/dist/cjs/src/zonda.js +6 -5
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bitmart.d.ts +1 -0
- package/js/src/base/Exchange.d.ts +2 -2
- package/js/src/base/Exchange.js +2 -2
- package/js/src/base/functions/misc.d.ts +2 -1
- package/js/src/base/functions/misc.js +11 -1
- package/js/src/base/types.d.ts +1 -1
- package/js/src/base/ws/WsClient.js +2 -2
- package/js/src/binance.d.ts +4 -20
- package/js/src/binance.js +49 -22
- package/js/src/bingx.js +1 -0
- package/js/src/bitfinex2.d.ts +3 -19
- package/js/src/bitfinex2.js +7 -6
- package/js/src/bitget.d.ts +3 -19
- package/js/src/bitget.js +10 -6
- package/js/src/bitmart.js +3 -1
- package/js/src/bitmex.d.ts +3 -22
- package/js/src/bitmex.js +11 -10
- package/js/src/bitso.d.ts +3 -19
- package/js/src/bitso.js +5 -4
- package/js/src/bitstamp.d.ts +3 -35
- package/js/src/bitstamp.js +33 -45
- package/js/src/blofin.d.ts +3 -15
- package/js/src/blofin.js +21 -23
- package/js/src/bybit.d.ts +3 -19
- package/js/src/bybit.js +23 -21
- package/js/src/coinbase.d.ts +3 -19
- package/js/src/coinbase.js +28 -7
- package/js/src/coinbaseexchange.d.ts +3 -19
- package/js/src/coinbaseexchange.js +11 -11
- package/js/src/coinlist.d.ts +3 -19
- package/js/src/coinlist.js +6 -5
- package/js/src/coinmetro.d.ts +3 -19
- package/js/src/coinmetro.js +3 -3
- package/js/src/cryptocom.d.ts +3 -22
- package/js/src/cryptocom.js +9 -6
- package/js/src/currencycom.d.ts +3 -3
- package/js/src/currencycom.js +6 -6
- package/js/src/delta.d.ts +3 -19
- package/js/src/delta.js +5 -5
- package/js/src/digifinex.d.ts +3 -19
- package/js/src/digifinex.js +8 -6
- package/js/src/gate.d.ts +3 -19
- package/js/src/gate.js +6 -5
- package/js/src/hashkey.d.ts +3 -20
- package/js/src/hashkey.js +9 -7
- package/js/src/htx.d.ts +3 -19
- package/js/src/htx.js +13 -16
- package/js/src/hyperliquid.d.ts +3 -19
- package/js/src/hyperliquid.js +68 -115
- package/js/src/kraken.d.ts +5 -24
- package/js/src/kraken.js +8 -6
- package/js/src/kucoin.d.ts +3 -19
- package/js/src/kucoin.js +9 -8
- package/js/src/luno.d.ts +4 -20
- package/js/src/luno.js +10 -9
- package/js/src/mexc.js +54 -2
- package/js/src/ndax.d.ts +3 -19
- package/js/src/ndax.js +6 -5
- package/js/src/okcoin.d.ts +3 -19
- package/js/src/okcoin.js +18 -27
- package/js/src/okx.d.ts +3 -19
- package/js/src/okx.js +18 -26
- package/js/src/p2b.js +2 -2
- package/js/src/pro/bybit.d.ts +2 -0
- package/js/src/pro/bybit.js +56 -0
- package/js/src/pro/cryptocom.d.ts +7 -1
- package/js/src/pro/cryptocom.js +191 -21
- package/js/src/pro/mexc.d.ts +6 -1
- package/js/src/pro/mexc.js +166 -4
- package/js/src/pro/okx.js +6 -3
- package/js/src/pro/oxfun.d.ts +3 -0
- package/js/src/pro/oxfun.js +75 -0
- package/js/src/pro/phemex.d.ts +2 -1
- package/js/src/pro/phemex.js +45 -1
- package/js/src/pro/woofipro.d.ts +3 -0
- package/js/src/pro/woofipro.js +67 -0
- package/js/src/static_dependencies/jsencrypt/lib/jsbn/jsbn.d.ts +1 -1
- package/js/src/static_dependencies/starknet/utils/calldata/parser/index.d.ts +1 -1
- package/js/src/woo.d.ts +3 -19
- package/js/src/woo.js +7 -6
- package/js/src/woofipro.d.ts +3 -19
- package/js/src/woofipro.js +8 -6
- package/js/src/xt.d.ts +3 -22
- package/js/src/xt.js +10 -4
- package/js/src/zonda.d.ts +3 -19
- package/js/src/zonda.js +6 -5
- package/package.json +1 -1
package/js/src/bitfinex2.js
CHANGED
|
@@ -2920,6 +2920,7 @@ export default class bitfinex2 extends Exchange {
|
|
|
2920
2920
|
const id = this.safeString(itemList, 0);
|
|
2921
2921
|
const currencyId = this.safeString(itemList, 1);
|
|
2922
2922
|
const code = this.safeCurrencyCode(currencyId, currency);
|
|
2923
|
+
currency = this.safeCurrency(currencyId, currency);
|
|
2923
2924
|
const timestamp = this.safeInteger(itemList, 3);
|
|
2924
2925
|
const amount = this.safeNumber(itemList, 5);
|
|
2925
2926
|
const after = this.safeNumber(itemList, 6);
|
|
@@ -2929,7 +2930,8 @@ export default class bitfinex2 extends Exchange {
|
|
|
2929
2930
|
const first = this.safeStringLower(parts, 0);
|
|
2930
2931
|
type = this.parseLedgerEntryType(first);
|
|
2931
2932
|
}
|
|
2932
|
-
return {
|
|
2933
|
+
return this.safeLedgerEntry({
|
|
2934
|
+
'info': item,
|
|
2933
2935
|
'id': id,
|
|
2934
2936
|
'direction': undefined,
|
|
2935
2937
|
'account': undefined,
|
|
@@ -2944,18 +2946,17 @@ export default class bitfinex2 extends Exchange {
|
|
|
2944
2946
|
'after': after,
|
|
2945
2947
|
'status': undefined,
|
|
2946
2948
|
'fee': undefined,
|
|
2947
|
-
|
|
2948
|
-
};
|
|
2949
|
+
}, currency);
|
|
2949
2950
|
}
|
|
2950
2951
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2951
2952
|
/**
|
|
2952
2953
|
* @method
|
|
2953
2954
|
* @name bitfinex2#fetchLedger
|
|
2954
|
-
* @description fetch the history of changes, actions done by the user or operations that altered balance of the user
|
|
2955
|
+
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
2955
2956
|
* @see https://docs.bitfinex.com/reference/rest-auth-ledgers
|
|
2956
|
-
* @param {string} code unified currency code, default is undefined
|
|
2957
|
+
* @param {string} [code] unified currency code, default is undefined
|
|
2957
2958
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
2958
|
-
* @param {int} [limit] max number of ledger
|
|
2959
|
+
* @param {int} [limit] max number of ledger entries to return, default is undefined, max is 2500
|
|
2959
2960
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2960
2961
|
* @param {int} [params.until] timestamp in ms of the latest ledger entry
|
|
2961
2962
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
package/js/src/bitget.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/bitget.js';
|
|
2
|
-
import type { Int, OrderSide, OrderType, Trade, OHLCV, Order, FundingRateHistory, OrderRequest, FundingHistory, Balances, Str, Transaction, Ticker, OrderBook, Tickers, Market, Strings, Currency, Position, Liquidation, TransferEntry, Leverage, MarginMode, Num, MarginModification, TradingFeeInterface, Currencies, TradingFees, Conversion, CrossBorrowRate, IsolatedBorrowRate, Dict, LeverageTier, int } from './base/types.js';
|
|
2
|
+
import type { Int, OrderSide, OrderType, Trade, OHLCV, Order, FundingRateHistory, OrderRequest, FundingHistory, Balances, Str, Transaction, Ticker, OrderBook, Tickers, Market, Strings, Currency, Position, Liquidation, TransferEntry, Leverage, MarginMode, Num, MarginModification, TradingFeeInterface, Currencies, TradingFees, Conversion, CrossBorrowRate, IsolatedBorrowRate, Dict, LeverageTier, int, LedgerEntry } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class bitget
|
|
5
5
|
* @augments Exchange
|
|
@@ -70,24 +70,8 @@ export default class bitget extends Exchange {
|
|
|
70
70
|
fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
71
71
|
fetchCanceledOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
72
72
|
fetchCanceledAndClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
73
|
-
fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<
|
|
74
|
-
parseLedgerEntry(item: Dict, currency?: Currency):
|
|
75
|
-
info: Dict;
|
|
76
|
-
id: string;
|
|
77
|
-
timestamp: number;
|
|
78
|
-
datetime: string;
|
|
79
|
-
direction: string;
|
|
80
|
-
account: any;
|
|
81
|
-
referenceId: any;
|
|
82
|
-
referenceAccount: any;
|
|
83
|
-
type: string;
|
|
84
|
-
currency: string;
|
|
85
|
-
amount: number;
|
|
86
|
-
before: any;
|
|
87
|
-
after: number;
|
|
88
|
-
status: any;
|
|
89
|
-
fee: number;
|
|
90
|
-
};
|
|
73
|
+
fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
|
|
74
|
+
parseLedgerEntry(item: Dict, currency?: Currency): LedgerEntry;
|
|
91
75
|
parseLedgerType(type: any): string;
|
|
92
76
|
fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
93
77
|
fetchPosition(symbol: string, params?: {}): Promise<Position>;
|
package/js/src/bitget.js
CHANGED
|
@@ -5904,12 +5904,12 @@ export default class bitget extends Exchange {
|
|
|
5904
5904
|
/**
|
|
5905
5905
|
* @method
|
|
5906
5906
|
* @name bitget#fetchLedger
|
|
5907
|
+
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
5907
5908
|
* @see https://www.bitget.com/api-doc/spot/account/Get-Account-Bills
|
|
5908
5909
|
* @see https://www.bitget.com/api-doc/contract/account/Get-Account-Bill
|
|
5909
|
-
* @
|
|
5910
|
-
* @param {string} code unified currency code, default is undefined
|
|
5910
|
+
* @param {string} [code] unified currency code, default is undefined
|
|
5911
5911
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
5912
|
-
* @param {int} [limit] max number of ledger
|
|
5912
|
+
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
5913
5913
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5914
5914
|
* @param {int} [params.until] end time in ms
|
|
5915
5915
|
* @param {string} [params.symbol] *contract only* unified market symbol
|
|
@@ -6049,6 +6049,7 @@ export default class bitget extends Exchange {
|
|
|
6049
6049
|
//
|
|
6050
6050
|
const currencyId = this.safeString(item, 'coin');
|
|
6051
6051
|
const code = this.safeCurrencyCode(currencyId, currency);
|
|
6052
|
+
currency = this.safeCurrency(currencyId, currency);
|
|
6052
6053
|
const timestamp = this.safeInteger(item, 'cTime');
|
|
6053
6054
|
const after = this.safeNumber(item, 'balance');
|
|
6054
6055
|
const fee = this.safeNumber2(item, 'fees', 'fee');
|
|
@@ -6058,7 +6059,7 @@ export default class bitget extends Exchange {
|
|
|
6058
6059
|
if (amountRaw.indexOf('-') >= 0) {
|
|
6059
6060
|
direction = 'out';
|
|
6060
6061
|
}
|
|
6061
|
-
return {
|
|
6062
|
+
return this.safeLedgerEntry({
|
|
6062
6063
|
'info': item,
|
|
6063
6064
|
'id': this.safeString(item, 'billId'),
|
|
6064
6065
|
'timestamp': timestamp,
|
|
@@ -6073,8 +6074,11 @@ export default class bitget extends Exchange {
|
|
|
6073
6074
|
'before': undefined,
|
|
6074
6075
|
'after': after,
|
|
6075
6076
|
'status': undefined,
|
|
6076
|
-
'fee':
|
|
6077
|
-
|
|
6077
|
+
'fee': {
|
|
6078
|
+
'currency': code,
|
|
6079
|
+
'cost': fee,
|
|
6080
|
+
},
|
|
6081
|
+
}, currency);
|
|
6078
6082
|
}
|
|
6079
6083
|
parseLedgerType(type) {
|
|
6080
6084
|
const types = {
|
package/js/src/bitmart.js
CHANGED
|
@@ -232,6 +232,7 @@ export default class bitmart extends Exchange {
|
|
|
232
232
|
'spot/v4/query/trades': 5,
|
|
233
233
|
'spot/v4/query/order-trades': 5,
|
|
234
234
|
'spot/v4/cancel_orders': 3,
|
|
235
|
+
'spot/v4/cancel_all': 90,
|
|
235
236
|
'spot/v4/batch_orders': 3,
|
|
236
237
|
// newer endpoint
|
|
237
238
|
'spot/v3/cancel_order': 1,
|
|
@@ -2967,6 +2968,7 @@ export default class bitmart extends Exchange {
|
|
|
2967
2968
|
* @name bitmart#cancelAllOrders
|
|
2968
2969
|
* @description cancel all open orders in a market
|
|
2969
2970
|
* @see https://developer-pro.bitmart.com/en/spot/#cancel-all-orders
|
|
2971
|
+
* @see https://developer-pro.bitmart.com/en/spot/#new-batch-order-v4-signed
|
|
2970
2972
|
* @see https://developer-pro.bitmart.com/en/futures/#cancel-all-orders-signed
|
|
2971
2973
|
* @see https://developer-pro.bitmart.com/en/futuresv2/#cancel-all-orders-signed
|
|
2972
2974
|
* @param {string} symbol unified market symbol of the market to cancel orders in
|
|
@@ -2985,7 +2987,7 @@ export default class bitmart extends Exchange {
|
|
|
2985
2987
|
let type = undefined;
|
|
2986
2988
|
[type, params] = this.handleMarketTypeAndParams('cancelAllOrders', market, params);
|
|
2987
2989
|
if (type === 'spot') {
|
|
2988
|
-
response = await this.
|
|
2990
|
+
response = await this.privatePostSpotV4CancelAll(this.extend(request, params));
|
|
2989
2991
|
}
|
|
2990
2992
|
else if (type === 'swap') {
|
|
2991
2993
|
if (symbol === undefined) {
|
package/js/src/bitmex.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/bitmex.js';
|
|
2
|
-
import type { Int, OrderSide, OrderType, Trade, OHLCV, Order, Liquidation, OrderBook, Balances, Str, Dict, Transaction, Ticker, Tickers, Market, Strings, Currency, Leverage, Leverages, Num, Currencies, int } from './base/types.js';
|
|
2
|
+
import type { Int, OrderSide, OrderType, Trade, OHLCV, Order, Liquidation, OrderBook, Balances, Str, Dict, Transaction, Ticker, Tickers, Market, Strings, Currency, Leverage, Leverages, Num, Currencies, int, LedgerEntry } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class bitmex
|
|
5
5
|
* @augments Exchange
|
|
@@ -23,27 +23,8 @@ export default class bitmex extends Exchange {
|
|
|
23
23
|
fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
24
24
|
fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
25
25
|
parseLedgerEntryType(type: any): string;
|
|
26
|
-
parseLedgerEntry(item: Dict, currency?: Currency):
|
|
27
|
-
|
|
28
|
-
info: Dict;
|
|
29
|
-
timestamp: number;
|
|
30
|
-
datetime: string;
|
|
31
|
-
direction: any;
|
|
32
|
-
account: string;
|
|
33
|
-
referenceId: string;
|
|
34
|
-
referenceAccount: any;
|
|
35
|
-
type: string;
|
|
36
|
-
currency: string;
|
|
37
|
-
amount: string;
|
|
38
|
-
before: number;
|
|
39
|
-
after: number;
|
|
40
|
-
status: string;
|
|
41
|
-
fee: {
|
|
42
|
-
cost: number;
|
|
43
|
-
currency: string;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
|
|
26
|
+
parseLedgerEntry(item: Dict, currency?: Currency): LedgerEntry;
|
|
27
|
+
fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
|
|
47
28
|
fetchDepositsWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
48
29
|
parseTransactionStatus(status: Str): string;
|
|
49
30
|
parseTransaction(transaction: Dict, currency?: Currency): Transaction;
|
package/js/src/bitmex.js
CHANGED
|
@@ -1146,6 +1146,7 @@ export default class bitmex extends Exchange {
|
|
|
1146
1146
|
const type = this.parseLedgerEntryType(this.safeString(item, 'transactType'));
|
|
1147
1147
|
const currencyId = this.safeString(item, 'currency');
|
|
1148
1148
|
const code = this.safeCurrencyCode(currencyId, currency);
|
|
1149
|
+
currency = this.safeCurrency(currencyId, currency);
|
|
1149
1150
|
const amountString = this.safeString(item, 'amount');
|
|
1150
1151
|
let amount = this.convertToRealAmount(code, amountString);
|
|
1151
1152
|
let timestamp = this.parse8601(this.safeString(item, 'transactTime'));
|
|
@@ -1160,14 +1161,14 @@ export default class bitmex extends Exchange {
|
|
|
1160
1161
|
feeCost = this.convertToRealAmount(code, feeCost);
|
|
1161
1162
|
}
|
|
1162
1163
|
const fee = {
|
|
1163
|
-
'cost': this.
|
|
1164
|
+
'cost': this.parseToNumeric(feeCost),
|
|
1164
1165
|
'currency': code,
|
|
1165
1166
|
};
|
|
1166
1167
|
let after = this.safeString(item, 'walletBalance');
|
|
1167
1168
|
if (after !== undefined) {
|
|
1168
1169
|
after = this.convertToRealAmount(code, after);
|
|
1169
1170
|
}
|
|
1170
|
-
const before = this.
|
|
1171
|
+
const before = this.parseToNumeric(Precise.stringSub(this.numberToString(after), this.numberToString(amount)));
|
|
1171
1172
|
let direction = undefined;
|
|
1172
1173
|
if (Precise.stringLt(amountString, '0')) {
|
|
1173
1174
|
direction = 'out';
|
|
@@ -1177,9 +1178,9 @@ export default class bitmex extends Exchange {
|
|
|
1177
1178
|
direction = 'in';
|
|
1178
1179
|
}
|
|
1179
1180
|
const status = this.parseTransactionStatus(this.safeString(item, 'transactStatus'));
|
|
1180
|
-
return {
|
|
1181
|
-
'id': id,
|
|
1181
|
+
return this.safeLedgerEntry({
|
|
1182
1182
|
'info': item,
|
|
1183
|
+
'id': id,
|
|
1183
1184
|
'timestamp': timestamp,
|
|
1184
1185
|
'datetime': this.iso8601(timestamp),
|
|
1185
1186
|
'direction': direction,
|
|
@@ -1188,22 +1189,22 @@ export default class bitmex extends Exchange {
|
|
|
1188
1189
|
'referenceAccount': referenceAccount,
|
|
1189
1190
|
'type': type,
|
|
1190
1191
|
'currency': code,
|
|
1191
|
-
'amount': amount,
|
|
1192
|
+
'amount': this.parseToNumeric(amount),
|
|
1192
1193
|
'before': before,
|
|
1193
|
-
'after': this.
|
|
1194
|
+
'after': this.parseToNumeric(after),
|
|
1194
1195
|
'status': status,
|
|
1195
1196
|
'fee': fee,
|
|
1196
|
-
};
|
|
1197
|
+
}, currency);
|
|
1197
1198
|
}
|
|
1198
1199
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1199
1200
|
/**
|
|
1200
1201
|
* @method
|
|
1201
1202
|
* @name bitmex#fetchLedger
|
|
1202
|
-
* @description fetch the history of changes, actions done by the user or operations that altered balance of the user
|
|
1203
|
+
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
1203
1204
|
* @see https://www.bitmex.com/api/explorer/#!/User/User_getWalletHistory
|
|
1204
|
-
* @param {string} code unified currency code, default is undefined
|
|
1205
|
+
* @param {string} [code] unified currency code, default is undefined
|
|
1205
1206
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
1206
|
-
* @param {int} [limit] max number of ledger
|
|
1207
|
+
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
1207
1208
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1208
1209
|
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
1209
1210
|
*/
|
package/js/src/bitso.d.ts
CHANGED
|
@@ -1,30 +1,14 @@
|
|
|
1
1
|
import Exchange from './abstract/bitso.js';
|
|
2
|
-
import type { Balances, Currency, Dict, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Trade, TradingFees, Transaction, int } from './base/types.js';
|
|
2
|
+
import type { Balances, Currency, Dict, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Trade, TradingFees, Transaction, int, LedgerEntry } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class bitso
|
|
5
5
|
* @augments Exchange
|
|
6
6
|
*/
|
|
7
7
|
export default class bitso extends Exchange {
|
|
8
8
|
describe(): any;
|
|
9
|
-
fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<
|
|
9
|
+
fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
|
|
10
10
|
parseLedgerEntryType(type: any): string;
|
|
11
|
-
parseLedgerEntry(item: Dict, currency?: Currency):
|
|
12
|
-
id: string;
|
|
13
|
-
timestamp: number;
|
|
14
|
-
datetime: string;
|
|
15
|
-
direction: string;
|
|
16
|
-
account: string;
|
|
17
|
-
referenceId: string;
|
|
18
|
-
referenceAccount: string;
|
|
19
|
-
type: string;
|
|
20
|
-
currency: string;
|
|
21
|
-
amount: number;
|
|
22
|
-
before: number;
|
|
23
|
-
after: number;
|
|
24
|
-
status: string;
|
|
25
|
-
fee: any;
|
|
26
|
-
info: import("./base/types.js").Dictionary<any>;
|
|
27
|
-
};
|
|
11
|
+
parseLedgerEntry(item: Dict, currency?: Currency): LedgerEntry;
|
|
28
12
|
fetchMarkets(params?: {}): Promise<Market[]>;
|
|
29
13
|
parseBalance(response: any): Balances;
|
|
30
14
|
fetchBalance(params?: {}): Promise<Balances>;
|
package/js/src/bitso.js
CHANGED
|
@@ -194,10 +194,10 @@ export default class bitso extends Exchange {
|
|
|
194
194
|
/**
|
|
195
195
|
* @method
|
|
196
196
|
* @name bitso#fetchLedger
|
|
197
|
-
* @description fetch the history of changes, actions done by the user or operations that altered balance of the user
|
|
198
|
-
* @param {string} code unified currency code, default is undefined
|
|
197
|
+
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
198
|
+
* @param {string} [code] unified currency code, default is undefined
|
|
199
199
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
200
|
-
* @param {int} [limit] max number of ledger
|
|
200
|
+
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
201
201
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
202
202
|
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
203
203
|
*/
|
|
@@ -306,6 +306,7 @@ export default class bitso extends Exchange {
|
|
|
306
306
|
const amount = this.safeString(firstBalance, 'amount');
|
|
307
307
|
const currencyId = this.safeString(firstBalance, 'currency');
|
|
308
308
|
const code = this.safeCurrencyCode(currencyId, currency);
|
|
309
|
+
currency = this.safeCurrency(currencyId, currency);
|
|
309
310
|
const details = this.safeValue(item, 'details', {});
|
|
310
311
|
let referenceId = this.safeString2(details, 'fid', 'wid');
|
|
311
312
|
if (referenceId === undefined) {
|
|
@@ -330,6 +331,7 @@ export default class bitso extends Exchange {
|
|
|
330
331
|
}
|
|
331
332
|
const timestamp = this.parse8601(this.safeString(item, 'created_at'));
|
|
332
333
|
return this.safeLedgerEntry({
|
|
334
|
+
'info': item,
|
|
333
335
|
'id': this.safeString(item, 'eid'),
|
|
334
336
|
'direction': direction,
|
|
335
337
|
'account': undefined,
|
|
@@ -344,7 +346,6 @@ export default class bitso extends Exchange {
|
|
|
344
346
|
'after': undefined,
|
|
345
347
|
'status': 'ok',
|
|
346
348
|
'fee': fee,
|
|
347
|
-
'info': item,
|
|
348
349
|
}, currency);
|
|
349
350
|
}
|
|
350
351
|
async fetchMarkets(params = {}) {
|
package/js/src/bitstamp.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/bitstamp.js';
|
|
2
|
-
import type { Balances, Currencies, Currency, Dict, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry, int } from './base/types.js';
|
|
2
|
+
import type { Balances, Currencies, Currency, Dict, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry, int, LedgerEntry } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class bitstamp
|
|
5
5
|
* @augments Exchange
|
|
@@ -73,40 +73,8 @@ export default class bitstamp extends Exchange {
|
|
|
73
73
|
parseTransactionStatus(status: Str): string;
|
|
74
74
|
parseOrder(order: Dict, market?: Market): Order;
|
|
75
75
|
parseLedgerEntryType(type: any): string;
|
|
76
|
-
parseLedgerEntry(item: Dict, currency?: Currency):
|
|
77
|
-
|
|
78
|
-
info: Dict;
|
|
79
|
-
timestamp: number;
|
|
80
|
-
datetime: string;
|
|
81
|
-
direction: string;
|
|
82
|
-
account: any;
|
|
83
|
-
referenceId: string;
|
|
84
|
-
referenceAccount: any;
|
|
85
|
-
type: string;
|
|
86
|
-
currency: any;
|
|
87
|
-
amount: number;
|
|
88
|
-
before: any;
|
|
89
|
-
after: any;
|
|
90
|
-
status: string;
|
|
91
|
-
fee: import("./base/types.js").FeeInterface;
|
|
92
|
-
} | {
|
|
93
|
-
id: string;
|
|
94
|
-
info: Dict;
|
|
95
|
-
timestamp: number;
|
|
96
|
-
datetime: string;
|
|
97
|
-
direction: any;
|
|
98
|
-
account: any;
|
|
99
|
-
referenceId: string;
|
|
100
|
-
referenceAccount: any;
|
|
101
|
-
type: string;
|
|
102
|
-
currency: string;
|
|
103
|
-
amount: number;
|
|
104
|
-
before: any;
|
|
105
|
-
after: any;
|
|
106
|
-
status: string;
|
|
107
|
-
fee: import("./base/types.js").FeeInterface;
|
|
108
|
-
};
|
|
109
|
-
fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
|
|
76
|
+
parseLedgerEntry(item: Dict, currency?: Currency): LedgerEntry;
|
|
77
|
+
fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
|
|
110
78
|
fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
111
79
|
getCurrencyName(code: any): any;
|
|
112
80
|
isFiat(code: any): boolean;
|
package/js/src/bitstamp.js
CHANGED
|
@@ -392,46 +392,34 @@ export default class bitstamp extends Exchange {
|
|
|
392
392
|
'trading': {
|
|
393
393
|
'tierBased': true,
|
|
394
394
|
'percentage': true,
|
|
395
|
-
'taker': this.parseNumber('0.
|
|
396
|
-
'maker': this.parseNumber('0.
|
|
395
|
+
'taker': this.parseNumber('0.004'),
|
|
396
|
+
'maker': this.parseNumber('0.004'),
|
|
397
397
|
'tiers': {
|
|
398
398
|
'taker': [
|
|
399
|
-
[this.parseNumber('0'), this.parseNumber('0.
|
|
400
|
-
[this.parseNumber('
|
|
401
|
-
[this.parseNumber('100000'), this.parseNumber('0.
|
|
402
|
-
[this.parseNumber('
|
|
403
|
-
[this.parseNumber('
|
|
404
|
-
[this.parseNumber('
|
|
405
|
-
[this.parseNumber('
|
|
406
|
-
[this.parseNumber('
|
|
407
|
-
[this.parseNumber('
|
|
408
|
-
[this.parseNumber('
|
|
409
|
-
[this.parseNumber('
|
|
410
|
-
[this.parseNumber('100000000'), this.parseNumber('0.0007')],
|
|
411
|
-
[this.parseNumber('500000000'), this.parseNumber('0.0005')],
|
|
412
|
-
[this.parseNumber('2000000000'), this.parseNumber('0.0003')],
|
|
413
|
-
[this.parseNumber('6000000000'), this.parseNumber('0.0001')],
|
|
414
|
-
[this.parseNumber('20000000000'), this.parseNumber('0.00005')],
|
|
415
|
-
[this.parseNumber('20000000001'), this.parseNumber('0')],
|
|
399
|
+
[this.parseNumber('0'), this.parseNumber('0.004')],
|
|
400
|
+
[this.parseNumber('10000'), this.parseNumber('0.003')],
|
|
401
|
+
[this.parseNumber('100000'), this.parseNumber('0.002')],
|
|
402
|
+
[this.parseNumber('500000'), this.parseNumber('0.0018')],
|
|
403
|
+
[this.parseNumber('1500000'), this.parseNumber('0.0016')],
|
|
404
|
+
[this.parseNumber('5000000'), this.parseNumber('0.0012')],
|
|
405
|
+
[this.parseNumber('20000000'), this.parseNumber('0.001')],
|
|
406
|
+
[this.parseNumber('50000000'), this.parseNumber('0.0008')],
|
|
407
|
+
[this.parseNumber('100000000'), this.parseNumber('0.0006')],
|
|
408
|
+
[this.parseNumber('250000000'), this.parseNumber('0.0005')],
|
|
409
|
+
[this.parseNumber('1000000000'), this.parseNumber('0.0003')],
|
|
416
410
|
],
|
|
417
411
|
'maker': [
|
|
418
|
-
[this.parseNumber('0'), this.parseNumber('0.
|
|
419
|
-
[this.parseNumber('
|
|
420
|
-
[this.parseNumber('100000'), this.parseNumber('0.
|
|
421
|
-
[this.parseNumber('
|
|
422
|
-
[this.parseNumber('
|
|
423
|
-
[this.parseNumber('
|
|
424
|
-
[this.parseNumber('
|
|
425
|
-
[this.parseNumber('
|
|
426
|
-
[this.parseNumber('
|
|
427
|
-
[this.parseNumber('
|
|
428
|
-
[this.parseNumber('
|
|
429
|
-
[this.parseNumber('100000000'), this.parseNumber('0.0007')],
|
|
430
|
-
[this.parseNumber('500000000'), this.parseNumber('0.0005')],
|
|
431
|
-
[this.parseNumber('2000000000'), this.parseNumber('0.0003')],
|
|
432
|
-
[this.parseNumber('6000000000'), this.parseNumber('0.0001')],
|
|
433
|
-
[this.parseNumber('20000000000'), this.parseNumber('0.00005')],
|
|
434
|
-
[this.parseNumber('20000000001'), this.parseNumber('0')],
|
|
412
|
+
[this.parseNumber('0'), this.parseNumber('0.003')],
|
|
413
|
+
[this.parseNumber('10000'), this.parseNumber('0.002')],
|
|
414
|
+
[this.parseNumber('100000'), this.parseNumber('0.001')],
|
|
415
|
+
[this.parseNumber('500000'), this.parseNumber('0.0008')],
|
|
416
|
+
[this.parseNumber('1500000'), this.parseNumber('0.0006')],
|
|
417
|
+
[this.parseNumber('5000000'), this.parseNumber('0.0003')],
|
|
418
|
+
[this.parseNumber('20000000'), this.parseNumber('0.002')],
|
|
419
|
+
[this.parseNumber('50000000'), this.parseNumber('0.0001')],
|
|
420
|
+
[this.parseNumber('100000000'), this.parseNumber('0')],
|
|
421
|
+
[this.parseNumber('250000000'), this.parseNumber('0')],
|
|
422
|
+
[this.parseNumber('1000000000'), this.parseNumber('0')],
|
|
435
423
|
],
|
|
436
424
|
},
|
|
437
425
|
},
|
|
@@ -1993,9 +1981,9 @@ export default class bitstamp extends Exchange {
|
|
|
1993
1981
|
market = this.getMarketFromTrade(item);
|
|
1994
1982
|
}
|
|
1995
1983
|
const direction = (parsedTrade['side'] === 'buy') ? 'in' : 'out';
|
|
1996
|
-
return {
|
|
1997
|
-
'id': parsedTrade['id'],
|
|
1984
|
+
return this.safeLedgerEntry({
|
|
1998
1985
|
'info': item,
|
|
1986
|
+
'id': parsedTrade['id'],
|
|
1999
1987
|
'timestamp': parsedTrade['timestamp'],
|
|
2000
1988
|
'datetime': parsedTrade['datetime'],
|
|
2001
1989
|
'direction': direction,
|
|
@@ -2009,7 +1997,7 @@ export default class bitstamp extends Exchange {
|
|
|
2009
1997
|
'after': undefined,
|
|
2010
1998
|
'status': 'ok',
|
|
2011
1999
|
'fee': parsedTrade['fee'],
|
|
2012
|
-
};
|
|
2000
|
+
}, currency);
|
|
2013
2001
|
}
|
|
2014
2002
|
else {
|
|
2015
2003
|
const parsedTransaction = this.parseTransaction(item, currency);
|
|
@@ -2024,9 +2012,9 @@ export default class bitstamp extends Exchange {
|
|
|
2024
2012
|
const amount = this.safeString(item, currency['id']);
|
|
2025
2013
|
direction = Precise.stringGt(amount, '0') ? 'in' : 'out';
|
|
2026
2014
|
}
|
|
2027
|
-
return {
|
|
2028
|
-
'id': parsedTransaction['id'],
|
|
2015
|
+
return this.safeLedgerEntry({
|
|
2029
2016
|
'info': item,
|
|
2017
|
+
'id': parsedTransaction['id'],
|
|
2030
2018
|
'timestamp': parsedTransaction['timestamp'],
|
|
2031
2019
|
'datetime': parsedTransaction['datetime'],
|
|
2032
2020
|
'direction': direction,
|
|
@@ -2040,18 +2028,18 @@ export default class bitstamp extends Exchange {
|
|
|
2040
2028
|
'after': undefined,
|
|
2041
2029
|
'status': parsedTransaction['status'],
|
|
2042
2030
|
'fee': parsedTransaction['fee'],
|
|
2043
|
-
};
|
|
2031
|
+
}, currency);
|
|
2044
2032
|
}
|
|
2045
2033
|
}
|
|
2046
2034
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2047
2035
|
/**
|
|
2048
2036
|
* @method
|
|
2049
2037
|
* @name bitstamp#fetchLedger
|
|
2050
|
-
* @description fetch the history of changes, actions done by the user or operations that altered balance of the user
|
|
2038
|
+
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
2051
2039
|
* @see https://www.bitstamp.net/api/#tag/Transactions-private/operation/GetUserTransactions
|
|
2052
|
-
* @param {string} code unified currency code, default is undefined
|
|
2040
|
+
* @param {string} [code] unified currency code, default is undefined
|
|
2053
2041
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
2054
|
-
* @param {int} [limit] max number of ledger
|
|
2042
|
+
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
2055
2043
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2056
2044
|
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
2057
2045
|
*/
|
package/js/src/blofin.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/blofin.js';
|
|
2
|
-
import type { Int, OrderSide, OrderType, Trade, OHLCV, Order, FundingRateHistory, OrderRequest, Str, Transaction, Ticker, OrderBook, Balances, Tickers, Market, Strings, Currency, Position, TransferEntry, Leverage, Leverages, MarginMode, Num, TradingFeeInterface, Dict, int } from './base/types.js';
|
|
2
|
+
import type { Int, OrderSide, OrderType, Trade, OHLCV, Order, FundingRateHistory, OrderRequest, Str, Transaction, Ticker, OrderBook, Balances, Tickers, Market, Strings, Currency, Position, TransferEntry, Leverage, Leverages, MarginMode, Num, TradingFeeInterface, Dict, int, LedgerEntry } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class blofin
|
|
5
5
|
* @augments Exchange
|
|
@@ -71,23 +71,11 @@ export default class blofin extends Exchange {
|
|
|
71
71
|
fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
72
72
|
fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
73
73
|
fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
74
|
-
fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<
|
|
74
|
+
fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
|
|
75
75
|
parseTransaction(transaction: Dict, currency?: Currency): Transaction;
|
|
76
76
|
parseTransactionStatus(status: Str): string;
|
|
77
77
|
parseLedgerEntryType(type: any): string;
|
|
78
|
-
parseLedgerEntry(item: Dict, currency?: Currency):
|
|
79
|
-
id: string;
|
|
80
|
-
info: Dict;
|
|
81
|
-
timestamp: number;
|
|
82
|
-
datetime: string;
|
|
83
|
-
fromAccount: string;
|
|
84
|
-
toAccount: string;
|
|
85
|
-
type: string;
|
|
86
|
-
currency: string;
|
|
87
|
-
amount: number;
|
|
88
|
-
clientId: string;
|
|
89
|
-
status: string;
|
|
90
|
-
};
|
|
78
|
+
parseLedgerEntry(item: Dict, currency?: Currency): LedgerEntry;
|
|
91
79
|
parseIds(ids: any): any;
|
|
92
80
|
cancelOrders(ids: any, symbol?: Str, params?: {}): Promise<Order[]>;
|
|
93
81
|
transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
|
package/js/src/blofin.js
CHANGED
|
@@ -1506,15 +1506,15 @@ export default class blofin extends Exchange {
|
|
|
1506
1506
|
/**
|
|
1507
1507
|
* @method
|
|
1508
1508
|
* @name blofin#fetchLedger
|
|
1509
|
-
* @description fetch the history of changes, actions done by the user or operations that altered balance of the user
|
|
1509
|
+
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
1510
1510
|
* @see https://blofin.com/docs#get-funds-transfer-history
|
|
1511
|
-
* @param {string} code unified currency code, default is undefined
|
|
1511
|
+
* @param {string} [code] unified currency code, default is undefined
|
|
1512
1512
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
1513
|
-
* @param {int} [limit] max number of ledger
|
|
1513
|
+
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
1514
1514
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1515
1515
|
* @param {string} [params.marginMode] 'cross' or 'isolated'
|
|
1516
1516
|
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
1517
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [
|
|
1517
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
1518
1518
|
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
1519
1519
|
*/
|
|
1520
1520
|
await this.loadMarkets();
|
|
@@ -1650,29 +1650,27 @@ export default class blofin extends Exchange {
|
|
|
1650
1650
|
return this.safeString(types, type, type);
|
|
1651
1651
|
}
|
|
1652
1652
|
parseLedgerEntry(item, currency = undefined) {
|
|
1653
|
-
const
|
|
1654
|
-
const
|
|
1655
|
-
|
|
1656
|
-
const toAccount = this.safeString(item, 'toAccount');
|
|
1657
|
-
const type = this.parseLedgerEntryType(this.safeString(item, 'type'));
|
|
1658
|
-
const code = this.safeCurrencyCode(this.safeString(item, 'currency'), currency);
|
|
1659
|
-
const amountString = this.safeString(item, 'amount');
|
|
1660
|
-
const amount = this.parseNumber(amountString);
|
|
1653
|
+
const currencyId = this.safeString(item, 'currency');
|
|
1654
|
+
const code = this.safeCurrencyCode(currencyId, currency);
|
|
1655
|
+
currency = this.safeCurrency(currencyId, currency);
|
|
1661
1656
|
const timestamp = this.safeInteger(item, 'ts');
|
|
1662
|
-
|
|
1663
|
-
return {
|
|
1664
|
-
'id': id,
|
|
1657
|
+
return this.safeLedgerEntry({
|
|
1665
1658
|
'info': item,
|
|
1659
|
+
'id': this.safeString(item, 'transferId'),
|
|
1660
|
+
'direction': undefined,
|
|
1661
|
+
'account': undefined,
|
|
1662
|
+
'referenceId': this.safeString(item, 'clientId'),
|
|
1663
|
+
'referenceAccount': undefined,
|
|
1664
|
+
'type': this.parseLedgerEntryType(this.safeString(item, 'type')),
|
|
1665
|
+
'currency': code,
|
|
1666
|
+
'amount': this.safeNumber(item, 'amount'),
|
|
1666
1667
|
'timestamp': timestamp,
|
|
1667
1668
|
'datetime': this.iso8601(timestamp),
|
|
1668
|
-
'
|
|
1669
|
-
'
|
|
1670
|
-
'
|
|
1671
|
-
'
|
|
1672
|
-
|
|
1673
|
-
'clientId': referenceId,
|
|
1674
|
-
'status': status,
|
|
1675
|
-
};
|
|
1669
|
+
'before': undefined,
|
|
1670
|
+
'after': undefined,
|
|
1671
|
+
'status': 'ok',
|
|
1672
|
+
'fee': undefined,
|
|
1673
|
+
}, currency);
|
|
1676
1674
|
}
|
|
1677
1675
|
parseIds(ids) {
|
|
1678
1676
|
/**
|
package/js/src/bybit.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/bybit.js';
|
|
2
|
-
import type { Int, OrderSide, OrderType, Trade, Order, OHLCV, FundingRateHistory, OpenInterest, OrderRequest, Balances, Str, Transaction, Ticker, OrderBook, Tickers, Greeks, Strings, Market, Currency, MarketInterface, TransferEntry, Liquidation, Leverage, Num, FundingHistory, Option, OptionChain, TradingFeeInterface, Currencies, TradingFees, CancellationRequest, Position, CrossBorrowRate, Dict, LeverageTier, LeverageTiers, int } from './base/types.js';
|
|
2
|
+
import type { Int, OrderSide, OrderType, Trade, Order, OHLCV, FundingRateHistory, OpenInterest, OrderRequest, Balances, Str, Transaction, Ticker, OrderBook, Tickers, Greeks, Strings, Market, Currency, MarketInterface, TransferEntry, Liquidation, Leverage, Num, FundingHistory, Option, OptionChain, TradingFeeInterface, Currencies, TradingFees, CancellationRequest, Position, CrossBorrowRate, Dict, LeverageTier, LeverageTiers, int, LedgerEntry } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class bybit
|
|
5
5
|
* @augments Exchange
|
|
@@ -109,24 +109,8 @@ export default class bybit extends Exchange {
|
|
|
109
109
|
fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
110
110
|
parseTransactionStatus(status: Str): string;
|
|
111
111
|
parseTransaction(transaction: Dict, currency?: Currency): Transaction;
|
|
112
|
-
fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<
|
|
113
|
-
parseLedgerEntry(item: Dict, currency?: Currency):
|
|
114
|
-
id: string;
|
|
115
|
-
currency: string;
|
|
116
|
-
account: string;
|
|
117
|
-
referenceAccount: any;
|
|
118
|
-
referenceId: string;
|
|
119
|
-
status: any;
|
|
120
|
-
amount: number;
|
|
121
|
-
before: number;
|
|
122
|
-
after: number;
|
|
123
|
-
fee: number;
|
|
124
|
-
direction: string;
|
|
125
|
-
timestamp: number;
|
|
126
|
-
datetime: string;
|
|
127
|
-
type: string;
|
|
128
|
-
info: Dict;
|
|
129
|
-
};
|
|
112
|
+
fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
|
|
113
|
+
parseLedgerEntry(item: Dict, currency?: Currency): LedgerEntry;
|
|
130
114
|
parseLedgerEntryType(type: any): string;
|
|
131
115
|
withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
|
|
132
116
|
fetchPosition(symbol: string, params?: {}): Promise<Position>;
|