ccxt 4.3.6 → 4.3.8
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/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +5 -0
- package/dist/cjs/src/alpaca.js +6 -0
- package/dist/cjs/src/base/Exchange.js +47 -3
- package/dist/cjs/src/binance.js +3 -1
- package/dist/cjs/src/bingx.js +3 -1
- package/dist/cjs/src/bitbank.js +3 -0
- package/dist/cjs/src/bitget.js +75 -2
- package/dist/cjs/src/bithumb.js +4 -0
- package/dist/cjs/src/bitmex.js +2 -0
- package/dist/cjs/src/bitopro.js +5 -0
- package/dist/cjs/src/bitso.js +3 -0
- package/dist/cjs/src/bitstamp.js +3 -0
- package/dist/cjs/src/bitteam.js +4 -0
- package/dist/cjs/src/bitvavo.js +3 -0
- package/dist/cjs/src/bl3p.js +3 -0
- package/dist/cjs/src/btcalpha.js +3 -0
- package/dist/cjs/src/btcbox.js +3 -0
- package/dist/cjs/src/btcmarkets.js +3 -0
- package/dist/cjs/src/btcturk.js +3 -0
- package/dist/cjs/src/bybit.js +123 -12
- package/dist/cjs/src/cex.js +6 -0
- package/dist/cjs/src/coinbase.js +95 -17
- package/dist/cjs/src/coinbaseinternational.js +2 -0
- package/dist/cjs/src/coinbasepro.js +6 -0
- package/dist/cjs/src/coincheck.js +3 -0
- package/dist/cjs/src/coinex.js +257 -190
- package/dist/cjs/src/coinlist.js +4 -0
- package/dist/cjs/src/coinmate.js +3 -0
- package/dist/cjs/src/coinone.js +3 -0
- package/dist/cjs/src/coinsph.js +4 -0
- package/dist/cjs/src/coinspot.js +3 -0
- package/dist/cjs/src/cryptocom.js +2 -0
- package/dist/cjs/src/exmo.js +5 -0
- package/dist/cjs/src/gate.js +124 -22
- package/dist/cjs/src/hitbtc.js +4 -3
- package/dist/cjs/src/htx.js +2 -0
- package/dist/cjs/src/idex.js +3 -0
- package/dist/cjs/src/independentreserve.js +3 -0
- package/dist/cjs/src/indodax.js +3 -0
- package/dist/cjs/src/kucoin.js +2 -0
- package/dist/cjs/src/kucoinfutures.js +2 -0
- package/dist/cjs/src/latoken.js +6 -0
- package/dist/cjs/src/luno.js +3 -0
- package/dist/cjs/src/lykke.js +5 -0
- package/dist/cjs/src/mercado.js +3 -0
- package/dist/cjs/src/mexc.js +111 -0
- package/dist/cjs/src/ndax.js +4 -0
- package/dist/cjs/src/novadax.js +4 -0
- package/dist/cjs/src/okx.js +84 -1
- package/dist/cjs/src/onetrading.js +3 -0
- package/dist/cjs/src/p2b.js +3 -0
- package/dist/cjs/src/pro/bybit.js +1 -1
- package/dist/cjs/src/pro/coinbase.js +30 -29
- package/dist/cjs/src/probit.js +3 -0
- package/dist/cjs/src/timex.js +3 -0
- package/dist/cjs/src/tradeogre.js +3 -0
- package/dist/cjs/src/wavesexchange.js +3 -0
- package/dist/cjs/src/wazirx.js +3 -0
- package/dist/cjs/src/woo.js +3 -1
- package/dist/cjs/src/yobit.js +3 -0
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/coinbase.d.ts +5 -0
- package/js/src/ace.js +5 -0
- package/js/src/alpaca.js +6 -0
- package/js/src/ascendex.d.ts +2 -2
- package/js/src/base/Exchange.d.ts +23 -19
- package/js/src/base/Exchange.js +47 -3
- package/js/src/base/functions/generic.d.ts +20 -19
- package/js/src/bigone.d.ts +1 -1
- package/js/src/binance.d.ts +3 -3
- package/js/src/binance.js +3 -1
- package/js/src/bingx.d.ts +3 -3
- package/js/src/bingx.js +3 -1
- package/js/src/bitbank.d.ts +1 -1
- package/js/src/bitbank.js +3 -0
- package/js/src/bitfinex.d.ts +1 -1
- package/js/src/bitfinex2.d.ts +1 -1
- package/js/src/bitflyer.d.ts +1 -1
- package/js/src/bitget.d.ts +4 -3
- package/js/src/bitget.js +75 -2
- package/js/src/bithumb.d.ts +1 -1
- package/js/src/bithumb.js +4 -0
- package/js/src/bitmart.d.ts +1 -1
- package/js/src/bitmex.d.ts +1 -1
- package/js/src/bitmex.js +2 -0
- package/js/src/bitopro.d.ts +1 -1
- package/js/src/bitopro.js +5 -0
- package/js/src/bitrue.d.ts +1 -1
- package/js/src/bitso.d.ts +1 -1
- package/js/src/bitso.js +3 -0
- package/js/src/bitstamp.d.ts +1 -1
- package/js/src/bitstamp.js +3 -0
- package/js/src/bitteam.js +4 -0
- package/js/src/bitvavo.d.ts +1 -1
- package/js/src/bitvavo.js +3 -0
- package/js/src/bl3p.js +3 -0
- package/js/src/blockchaincom.d.ts +1 -1
- package/js/src/btcalpha.js +3 -0
- package/js/src/btcbox.js +3 -0
- package/js/src/btcmarkets.d.ts +1 -1
- package/js/src/btcmarkets.js +3 -0
- package/js/src/btcturk.js +3 -0
- package/js/src/bybit.d.ts +8 -7
- package/js/src/bybit.js +123 -12
- package/js/src/cex.js +6 -0
- package/js/src/coinbase.d.ts +2 -2
- package/js/src/coinbase.js +95 -17
- package/js/src/coinbaseinternational.d.ts +2 -2
- package/js/src/coinbaseinternational.js +2 -0
- package/js/src/coinbasepro.d.ts +1 -1
- package/js/src/coinbasepro.js +6 -0
- package/js/src/coincheck.js +3 -0
- package/js/src/coinex.d.ts +8 -7
- package/js/src/coinex.js +257 -190
- package/js/src/coinlist.d.ts +1 -1
- package/js/src/coinlist.js +4 -0
- package/js/src/coinmate.d.ts +1 -1
- package/js/src/coinmate.js +3 -0
- package/js/src/coinone.js +3 -0
- package/js/src/coinsph.d.ts +1 -1
- package/js/src/coinsph.js +4 -0
- package/js/src/coinspot.js +3 -0
- package/js/src/cryptocom.d.ts +1 -1
- package/js/src/cryptocom.js +2 -0
- package/js/src/delta.d.ts +2 -2
- package/js/src/deribit.d.ts +1 -1
- package/js/src/digifinex.d.ts +3 -3
- package/js/src/exmo.d.ts +3 -3
- package/js/src/exmo.js +5 -0
- package/js/src/gate.d.ts +8 -7
- package/js/src/gate.js +124 -22
- package/js/src/gemini.d.ts +2 -2
- package/js/src/hitbtc.d.ts +3 -3
- package/js/src/hitbtc.js +4 -3
- package/js/src/hollaex.d.ts +2 -2
- package/js/src/htx.d.ts +3 -3
- package/js/src/htx.js +2 -0
- package/js/src/huobijp.d.ts +1 -1
- package/js/src/hyperliquid.d.ts +2 -2
- package/js/src/idex.d.ts +2 -2
- package/js/src/idex.js +3 -0
- package/js/src/independentreserve.js +3 -0
- package/js/src/indodax.d.ts +1 -1
- package/js/src/indodax.js +3 -0
- package/js/src/kraken.d.ts +1 -1
- package/js/src/kucoin.d.ts +2 -2
- package/js/src/kucoin.js +2 -0
- package/js/src/kucoinfutures.d.ts +1 -1
- package/js/src/kucoinfutures.js +2 -0
- package/js/src/kuna.d.ts +1 -1
- package/js/src/latoken.js +6 -0
- package/js/src/lbank.d.ts +1 -1
- package/js/src/luno.js +3 -0
- package/js/src/lykke.d.ts +1 -1
- package/js/src/lykke.js +5 -0
- package/js/src/mercado.d.ts +1 -1
- package/js/src/mercado.js +3 -0
- package/js/src/mexc.d.ts +5 -4
- package/js/src/mexc.js +111 -0
- package/js/src/ndax.d.ts +1 -1
- package/js/src/ndax.js +4 -0
- package/js/src/novadax.d.ts +1 -1
- package/js/src/novadax.js +4 -0
- package/js/src/okcoin.d.ts +2 -2
- package/js/src/okx.d.ts +10 -9
- package/js/src/okx.js +84 -1
- package/js/src/onetrading.d.ts +1 -1
- package/js/src/onetrading.js +3 -0
- package/js/src/p2b.js +3 -0
- package/js/src/paymium.d.ts +1 -1
- package/js/src/phemex.d.ts +1 -1
- package/js/src/poloniex.d.ts +1 -1
- package/js/src/pro/bybit.js +1 -1
- package/js/src/pro/coinbase.d.ts +2 -2
- package/js/src/pro/coinbase.js +30 -29
- package/js/src/pro/luno.d.ts +2 -2
- package/js/src/probit.d.ts +2 -2
- package/js/src/probit.js +3 -0
- package/js/src/timex.js +3 -0
- package/js/src/tokocrypto.d.ts +1 -1
- package/js/src/tradeogre.js +3 -0
- package/js/src/upbit.d.ts +2 -2
- package/js/src/wavesexchange.d.ts +1 -1
- package/js/src/wavesexchange.js +3 -0
- package/js/src/wazirx.js +3 -0
- package/js/src/whitebit.d.ts +2 -2
- package/js/src/woo.d.ts +1 -1
- package/js/src/woo.js +3 -1
- package/js/src/yobit.d.ts +1 -1
- package/js/src/yobit.js +3 -0
- package/js/src/zaif.d.ts +1 -1
- package/js/src/zonda.d.ts +2 -2
- package/package.json +1 -1
package/js/src/indodax.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export default class indodax extends Exchange {
|
|
|
32
32
|
currency: string;
|
|
33
33
|
}>;
|
|
34
34
|
fetchDepositsWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
35
|
-
withdraw(code: string, amount: number, address:
|
|
35
|
+
withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
|
|
36
36
|
parseTransaction(transaction: any, currency?: Currency): Transaction;
|
|
37
37
|
parseTransactionStatus(status: any): string;
|
|
38
38
|
fetchDepositAddresses(codes?: string[], params?: {}): Promise<{
|
package/js/src/indodax.js
CHANGED
|
@@ -72,8 +72,11 @@ export default class indodax extends Exchange {
|
|
|
72
72
|
'fetchOrderBook': true,
|
|
73
73
|
'fetchOrders': false,
|
|
74
74
|
'fetchPosition': false,
|
|
75
|
+
'fetchPositionHistory': false,
|
|
75
76
|
'fetchPositionMode': false,
|
|
76
77
|
'fetchPositions': false,
|
|
78
|
+
'fetchPositionsForSymbol': false,
|
|
79
|
+
'fetchPositionsHistory': false,
|
|
77
80
|
'fetchPositionsRisk': false,
|
|
78
81
|
'fetchPremiumIndexOHLCV': false,
|
|
79
82
|
'fetchTicker': true,
|
package/js/src/kraken.d.ts
CHANGED
|
@@ -104,7 +104,7 @@ export default class kraken extends Exchange {
|
|
|
104
104
|
network: any;
|
|
105
105
|
info: any;
|
|
106
106
|
};
|
|
107
|
-
withdraw(code: string, amount: number, address:
|
|
107
|
+
withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
|
|
108
108
|
fetchPositions(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Position[]>;
|
|
109
109
|
parsePosition(position: any, market?: Market): import("./base/types.js").Position;
|
|
110
110
|
parseAccountType(account: any): string;
|
package/js/src/kucoin.d.ts
CHANGED
|
@@ -63,7 +63,7 @@ export default class kucoin extends Exchange {
|
|
|
63
63
|
tag: string;
|
|
64
64
|
network: string;
|
|
65
65
|
};
|
|
66
|
-
fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<
|
|
66
|
+
fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<import("./base/types.js").Dictionary<any>>;
|
|
67
67
|
fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
|
|
68
68
|
handleTriggerPrices(params: any): any[];
|
|
69
69
|
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
|
|
@@ -86,7 +86,7 @@ export default class kucoin extends Exchange {
|
|
|
86
86
|
fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
87
87
|
parseTrade(trade: any, market?: Market): Trade;
|
|
88
88
|
fetchTradingFee(symbol: string, params?: {}): Promise<TradingFeeInterface>;
|
|
89
|
-
withdraw(code: string, amount: number, address:
|
|
89
|
+
withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
|
|
90
90
|
loadCurrencyPrecision(currency: any, networkCode?: Str): Promise<void>;
|
|
91
91
|
parseTransactionStatus(status: any): string;
|
|
92
92
|
parseTransaction(transaction: any, currency?: Currency): Transaction;
|
package/js/src/kucoin.js
CHANGED
|
@@ -91,7 +91,9 @@ export default class kucoin extends Exchange {
|
|
|
91
91
|
'fetchOrderBooks': false,
|
|
92
92
|
'fetchOrdersByStatus': true,
|
|
93
93
|
'fetchOrderTrades': true,
|
|
94
|
+
'fetchPositionHistory': false,
|
|
94
95
|
'fetchPositionMode': false,
|
|
96
|
+
'fetchPositionsHistory': false,
|
|
95
97
|
'fetchPremiumIndexOHLCV': false,
|
|
96
98
|
'fetchStatus': true,
|
|
97
99
|
'fetchTicker': true,
|
|
@@ -37,7 +37,7 @@ export default class kucoinfutures extends kucoin {
|
|
|
37
37
|
createContractOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): any;
|
|
38
38
|
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<any>;
|
|
39
39
|
cancelAllOrders(symbol?: Str, params?: {}): Promise<any>;
|
|
40
|
-
addMargin(symbol: string, amount:
|
|
40
|
+
addMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
|
|
41
41
|
parseMarginModification(info: any, market?: Market): MarginModification;
|
|
42
42
|
fetchOrdersByStatus(status: any, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
43
43
|
fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
package/js/src/kucoinfutures.js
CHANGED
|
@@ -81,8 +81,10 @@ export default class kucoinfutures extends kucoin {
|
|
|
81
81
|
'fetchOrder': true,
|
|
82
82
|
'fetchOrderBook': true,
|
|
83
83
|
'fetchPosition': true,
|
|
84
|
+
'fetchPositionHistory': false,
|
|
84
85
|
'fetchPositionMode': false,
|
|
85
86
|
'fetchPositions': true,
|
|
87
|
+
'fetchPositionsHistory': false,
|
|
86
88
|
'fetchPremiumIndexOHLCV': false,
|
|
87
89
|
'fetchStatus': true,
|
|
88
90
|
'fetchTicker': true,
|
package/js/src/kuna.d.ts
CHANGED
|
@@ -54,7 +54,7 @@ export default class kuna extends Exchange {
|
|
|
54
54
|
fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
55
55
|
fetchOrdersByStatus(status: any, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
56
56
|
fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
57
|
-
withdraw(code: string, amount: number, address:
|
|
57
|
+
withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
|
|
58
58
|
fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
59
59
|
fetchWithdrawal(id: string, code?: Str, params?: {}): Promise<Transaction>;
|
|
60
60
|
createDepositAddress(code: string, params?: {}): Promise<{
|
package/js/src/latoken.js
CHANGED
|
@@ -58,7 +58,13 @@ export default class latoken extends Exchange {
|
|
|
58
58
|
'fetchOrder': true,
|
|
59
59
|
'fetchOrderBook': true,
|
|
60
60
|
'fetchOrders': true,
|
|
61
|
+
'fetchPosition': false,
|
|
62
|
+
'fetchPositionHistory': false,
|
|
61
63
|
'fetchPositionMode': false,
|
|
64
|
+
'fetchPositions': false,
|
|
65
|
+
'fetchPositionsForSymbol': false,
|
|
66
|
+
'fetchPositionsHistory': false,
|
|
67
|
+
'fetchPositionsRisk': false,
|
|
62
68
|
'fetchTicker': true,
|
|
63
69
|
'fetchTickers': true,
|
|
64
70
|
'fetchTime': true,
|
package/js/src/lbank.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ export default class lbank extends Exchange {
|
|
|
51
51
|
network: string;
|
|
52
52
|
info: any;
|
|
53
53
|
}>;
|
|
54
|
-
withdraw(code: string, amount: number, address:
|
|
54
|
+
withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
|
|
55
55
|
parseTransactionStatus(status: any, type: any): string;
|
|
56
56
|
parseTransaction(transaction: any, currency?: Currency): Transaction;
|
|
57
57
|
fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
package/js/src/luno.js
CHANGED
|
@@ -64,8 +64,11 @@ export default class luno extends Exchange {
|
|
|
64
64
|
'fetchOrderBook': true,
|
|
65
65
|
'fetchOrders': true,
|
|
66
66
|
'fetchPosition': false,
|
|
67
|
+
'fetchPositionHistory': false,
|
|
67
68
|
'fetchPositionMode': false,
|
|
68
69
|
'fetchPositions': false,
|
|
70
|
+
'fetchPositionsForSymbol': false,
|
|
71
|
+
'fetchPositionsHistory': false,
|
|
69
72
|
'fetchPositionsRisk': false,
|
|
70
73
|
'fetchPremiumIndexOHLCV': false,
|
|
71
74
|
'fetchTicker': true,
|
package/js/src/lykke.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ export default class lykke extends Exchange {
|
|
|
35
35
|
}>;
|
|
36
36
|
parseTransaction(transaction: any, currency?: Currency): Transaction;
|
|
37
37
|
fetchDepositsWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
38
|
-
withdraw(code: string, amount: number, address:
|
|
38
|
+
withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
|
|
39
39
|
sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
|
|
40
40
|
url: string;
|
|
41
41
|
method: string;
|
package/js/src/lykke.js
CHANGED
|
@@ -66,8 +66,13 @@ export default class lykke extends Exchange {
|
|
|
66
66
|
'fetchOrderBook': true,
|
|
67
67
|
'fetchOrders': false,
|
|
68
68
|
'fetchOrderTrades': false,
|
|
69
|
+
'fetchPosition': false,
|
|
70
|
+
'fetchPositionHistory': false,
|
|
69
71
|
'fetchPositionMode': false,
|
|
70
72
|
'fetchPositions': false,
|
|
73
|
+
'fetchPositionsForSymbol': false,
|
|
74
|
+
'fetchPositionsHistory': false,
|
|
75
|
+
'fetchPositionsRisk': false,
|
|
71
76
|
'fetchPremiumIndexOHLCV': false,
|
|
72
77
|
'fetchTicker': true,
|
|
73
78
|
'fetchTickers': true,
|
package/js/src/mercado.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export default class mercado extends Exchange {
|
|
|
19
19
|
parseOrderStatus(status: any): string;
|
|
20
20
|
parseOrder(order: any, market?: Market): Order;
|
|
21
21
|
fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
22
|
-
withdraw(code: string, amount: number, address:
|
|
22
|
+
withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
|
|
23
23
|
parseTransaction(transaction: any, currency?: Currency): Transaction;
|
|
24
24
|
parseOHLCV(ohlcv: any, market?: Market): OHLCV;
|
|
25
25
|
fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
|
package/js/src/mercado.js
CHANGED
|
@@ -66,8 +66,11 @@ export default class mercado extends Exchange {
|
|
|
66
66
|
'fetchOrderBook': true,
|
|
67
67
|
'fetchOrders': true,
|
|
68
68
|
'fetchPosition': false,
|
|
69
|
+
'fetchPositionHistory': false,
|
|
69
70
|
'fetchPositionMode': false,
|
|
70
71
|
'fetchPositions': false,
|
|
72
|
+
'fetchPositionsForSymbol': false,
|
|
73
|
+
'fetchPositionsHistory': false,
|
|
71
74
|
'fetchPositionsRisk': false,
|
|
72
75
|
'fetchPremiumIndexOHLCV': false,
|
|
73
76
|
'fetchTicker': true,
|
package/js/src/mexc.d.ts
CHANGED
|
@@ -59,8 +59,8 @@ export default class mexc extends Exchange {
|
|
|
59
59
|
fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
60
60
|
fetchOrderTrades(id: string, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
61
61
|
modifyMarginHelper(symbol: string, amount: any, addOrReduce: any, params?: {}): Promise<any>;
|
|
62
|
-
reduceMargin(symbol: string, amount:
|
|
63
|
-
addMargin(symbol: string, amount:
|
|
62
|
+
reduceMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
|
|
63
|
+
addMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
|
|
64
64
|
setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<any>;
|
|
65
65
|
fetchFundingHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<FundingHistory[]>;
|
|
66
66
|
parseFundingRate(contract: any, market?: Market): {
|
|
@@ -111,7 +111,7 @@ export default class mexc extends Exchange {
|
|
|
111
111
|
network: string;
|
|
112
112
|
info: any;
|
|
113
113
|
};
|
|
114
|
-
fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<
|
|
114
|
+
fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<import("./base/types.js").Dictionary<any>>;
|
|
115
115
|
createDepositAddress(code: string, params?: {}): Promise<{
|
|
116
116
|
currency: string;
|
|
117
117
|
address: string;
|
|
@@ -153,7 +153,7 @@ export default class mexc extends Exchange {
|
|
|
153
153
|
};
|
|
154
154
|
parseAccountId(status: any): string;
|
|
155
155
|
parseTransferStatus(status: any): string;
|
|
156
|
-
withdraw(code: string, amount: number, address:
|
|
156
|
+
withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
|
|
157
157
|
setPositionMode(hedged: boolean, symbol?: Str, params?: {}): Promise<any>;
|
|
158
158
|
fetchPositionMode(symbol?: Str, params?: {}): Promise<{
|
|
159
159
|
info: any;
|
|
@@ -175,6 +175,7 @@ export default class mexc extends Exchange {
|
|
|
175
175
|
fetchLeverage(symbol: string, params?: {}): Promise<Leverage>;
|
|
176
176
|
parseLeverage(leverage: any, market?: any): Leverage;
|
|
177
177
|
handleMarginModeAndParams(methodName: any, params?: {}, defaultValue?: any): any[];
|
|
178
|
+
fetchPositionsHistory(symbols?: Strings, since?: Int, limit?: Int, params?: {}): Promise<Position[]>;
|
|
178
179
|
sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
|
|
179
180
|
url: any;
|
|
180
181
|
method: string;
|
package/js/src/mexc.js
CHANGED
|
@@ -93,8 +93,10 @@ export default class mexc extends Exchange {
|
|
|
93
93
|
'fetchOrders': true,
|
|
94
94
|
'fetchOrderTrades': true,
|
|
95
95
|
'fetchPosition': true,
|
|
96
|
+
'fetchPositionHistory': 'emulated',
|
|
96
97
|
'fetchPositionMode': true,
|
|
97
98
|
'fetchPositions': true,
|
|
99
|
+
'fetchPositionsHistory': true,
|
|
98
100
|
'fetchPositionsRisk': undefined,
|
|
99
101
|
'fetchPremiumIndexOHLCV': false,
|
|
100
102
|
'fetchStatus': true,
|
|
@@ -4867,6 +4869,8 @@ export default class mexc extends Exchange {
|
|
|
4867
4869
|
return this.parsePositions(data, symbols);
|
|
4868
4870
|
}
|
|
4869
4871
|
parsePosition(position, market = undefined) {
|
|
4872
|
+
//
|
|
4873
|
+
// fetchPositions
|
|
4870
4874
|
//
|
|
4871
4875
|
// {
|
|
4872
4876
|
// "positionId": 1394650,
|
|
@@ -4891,6 +4895,40 @@ export default class mexc extends Exchange {
|
|
|
4891
4895
|
// "autoAddIm": false
|
|
4892
4896
|
// }
|
|
4893
4897
|
//
|
|
4898
|
+
// fetchPositionsHistory
|
|
4899
|
+
//
|
|
4900
|
+
// {
|
|
4901
|
+
// positionId: '390281084',
|
|
4902
|
+
// symbol: 'RVN_USDT',
|
|
4903
|
+
// positionType: '1',
|
|
4904
|
+
// openType: '2',
|
|
4905
|
+
// state: '3',
|
|
4906
|
+
// holdVol: '0',
|
|
4907
|
+
// frozenVol: '0',
|
|
4908
|
+
// closeVol: '1141',
|
|
4909
|
+
// holdAvgPrice: '0.03491',
|
|
4910
|
+
// holdAvgPriceFullyScale: '0.03491',
|
|
4911
|
+
// openAvgPrice: '0.03491',
|
|
4912
|
+
// openAvgPriceFullyScale: '0.03491',
|
|
4913
|
+
// closeAvgPrice: '0.03494',
|
|
4914
|
+
// liquidatePrice: '0.03433',
|
|
4915
|
+
// oim: '0',
|
|
4916
|
+
// im: '0',
|
|
4917
|
+
// holdFee: '0',
|
|
4918
|
+
// realised: '0.1829',
|
|
4919
|
+
// leverage: '50',
|
|
4920
|
+
// createTime: '1711512408000',
|
|
4921
|
+
// updateTime: '1711512553000',
|
|
4922
|
+
// autoAddIm: false,
|
|
4923
|
+
// version: '4',
|
|
4924
|
+
// profitRatio: '0.0227',
|
|
4925
|
+
// newOpenAvgPrice: '0.03491',
|
|
4926
|
+
// newCloseAvgPrice: '0.03494',
|
|
4927
|
+
// closeProfitLoss: '0.3423',
|
|
4928
|
+
// fee: '0.1593977',
|
|
4929
|
+
// positionShowStatus: 'CLOSED'
|
|
4930
|
+
// }
|
|
4931
|
+
//
|
|
4894
4932
|
market = this.safeMarket(this.safeString(position, 'symbol'), market);
|
|
4895
4933
|
const symbol = market['symbol'];
|
|
4896
4934
|
const contracts = this.safeString(position, 'holdVol');
|
|
@@ -5528,6 +5566,79 @@ export default class mexc extends Exchange {
|
|
|
5528
5566
|
}
|
|
5529
5567
|
return [marginMode, params];
|
|
5530
5568
|
}
|
|
5569
|
+
async fetchPositionsHistory(symbols = undefined, since = undefined, limit = undefined, params = {}) {
|
|
5570
|
+
/**
|
|
5571
|
+
* @method
|
|
5572
|
+
* @name mexc#fetchPositionsHistory
|
|
5573
|
+
* @description fetches historical positions
|
|
5574
|
+
* @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-user-s-history-position-information
|
|
5575
|
+
* @param {string[]} [symbols] unified contract symbols
|
|
5576
|
+
* @param {int} [since] not used by mexc fetchPositionsHistory
|
|
5577
|
+
* @param {int} [limit] the maximum amount of candles to fetch, default=1000
|
|
5578
|
+
* @param {object} params extra parameters specific to the exchange api endpoint
|
|
5579
|
+
*
|
|
5580
|
+
* EXCHANGE SPECIFIC PARAMETERS
|
|
5581
|
+
* @param {int} type position type,1: long, 2: short
|
|
5582
|
+
* @param {int} page_num current page number, default is 1
|
|
5583
|
+
* @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
5584
|
+
*/
|
|
5585
|
+
await this.loadMarkets();
|
|
5586
|
+
const request = {};
|
|
5587
|
+
if (symbols !== undefined) {
|
|
5588
|
+
const symbolsLength = symbols.length;
|
|
5589
|
+
if (symbolsLength === 1) {
|
|
5590
|
+
const market = this.market(symbols[0]);
|
|
5591
|
+
request['symbol'] = market['id'];
|
|
5592
|
+
}
|
|
5593
|
+
}
|
|
5594
|
+
if (limit !== undefined) {
|
|
5595
|
+
request['page_size'] = limit;
|
|
5596
|
+
}
|
|
5597
|
+
const response = await this.contractPrivateGetPositionListHistoryPositions(this.extend(request, params));
|
|
5598
|
+
//
|
|
5599
|
+
// {
|
|
5600
|
+
// success: true,
|
|
5601
|
+
// code: '0',
|
|
5602
|
+
// data: [
|
|
5603
|
+
// {
|
|
5604
|
+
// positionId: '390281084',
|
|
5605
|
+
// symbol: 'RVN_USDT',
|
|
5606
|
+
// positionType: '1',
|
|
5607
|
+
// openType: '2',
|
|
5608
|
+
// state: '3',
|
|
5609
|
+
// holdVol: '0',
|
|
5610
|
+
// frozenVol: '0',
|
|
5611
|
+
// closeVol: '1141',
|
|
5612
|
+
// holdAvgPrice: '0.03491',
|
|
5613
|
+
// holdAvgPriceFullyScale: '0.03491',
|
|
5614
|
+
// openAvgPrice: '0.03491',
|
|
5615
|
+
// openAvgPriceFullyScale: '0.03491',
|
|
5616
|
+
// closeAvgPrice: '0.03494',
|
|
5617
|
+
// liquidatePrice: '0.03433',
|
|
5618
|
+
// oim: '0',
|
|
5619
|
+
// im: '0',
|
|
5620
|
+
// holdFee: '0',
|
|
5621
|
+
// realised: '0.1829',
|
|
5622
|
+
// leverage: '50',
|
|
5623
|
+
// createTime: '1711512408000',
|
|
5624
|
+
// updateTime: '1711512553000',
|
|
5625
|
+
// autoAddIm: false,
|
|
5626
|
+
// version: '4',
|
|
5627
|
+
// profitRatio: '0.0227',
|
|
5628
|
+
// newOpenAvgPrice: '0.03491',
|
|
5629
|
+
// newCloseAvgPrice: '0.03494',
|
|
5630
|
+
// closeProfitLoss: '0.3423',
|
|
5631
|
+
// fee: '0.1593977',
|
|
5632
|
+
// positionShowStatus: 'CLOSED'
|
|
5633
|
+
// },
|
|
5634
|
+
// ...
|
|
5635
|
+
// ]
|
|
5636
|
+
// }
|
|
5637
|
+
//
|
|
5638
|
+
const data = this.safeList(response, 'data');
|
|
5639
|
+
const positions = this.parsePositions(data, symbols, params);
|
|
5640
|
+
return this.filterBySinceLimit(positions, since, limit);
|
|
5641
|
+
}
|
|
5531
5642
|
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
|
|
5532
5643
|
const section = this.safeString(api, 0);
|
|
5533
5644
|
const access = this.safeString(api, 1);
|
package/js/src/ndax.d.ts
CHANGED
|
@@ -76,7 +76,7 @@ export default class ndax extends Exchange {
|
|
|
76
76
|
fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
77
77
|
parseTransactionStatusByType(status: any, type?: any): string;
|
|
78
78
|
parseTransaction(transaction: any, currency?: Currency): Transaction;
|
|
79
|
-
withdraw(code: string, amount: number, address:
|
|
79
|
+
withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
|
|
80
80
|
nonce(): number;
|
|
81
81
|
sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
|
|
82
82
|
url: string;
|
package/js/src/ndax.js
CHANGED
|
@@ -73,7 +73,11 @@ export default class ndax extends Exchange {
|
|
|
73
73
|
'fetchOrders': true,
|
|
74
74
|
'fetchOrderTrades': true,
|
|
75
75
|
'fetchPosition': false,
|
|
76
|
+
'fetchPositionHistory': false,
|
|
77
|
+
'fetchPositionMode': false,
|
|
76
78
|
'fetchPositions': false,
|
|
79
|
+
'fetchPositionsForSymbol': false,
|
|
80
|
+
'fetchPositionsHistory': false,
|
|
77
81
|
'fetchPositionsRisk': false,
|
|
78
82
|
'fetchPremiumIndexOHLCV': false,
|
|
79
83
|
'fetchTicker': true,
|
package/js/src/novadax.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ export default class novadax extends Exchange {
|
|
|
42
42
|
status: string;
|
|
43
43
|
};
|
|
44
44
|
parseTransferStatus(status: any): string;
|
|
45
|
-
withdraw(code: string, amount: number, address:
|
|
45
|
+
withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
|
|
46
46
|
fetchAccounts(params?: {}): Promise<Account[]>;
|
|
47
47
|
fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
48
48
|
fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
package/js/src/novadax.js
CHANGED
|
@@ -78,7 +78,11 @@ export default class novadax extends Exchange {
|
|
|
78
78
|
'fetchOrders': true,
|
|
79
79
|
'fetchOrderTrades': true,
|
|
80
80
|
'fetchPosition': false,
|
|
81
|
+
'fetchPositionHistory': false,
|
|
82
|
+
'fetchPositionMode': false,
|
|
81
83
|
'fetchPositions': false,
|
|
84
|
+
'fetchPositionsForSymbol': false,
|
|
85
|
+
'fetchPositionsHistory': false,
|
|
82
86
|
'fetchPositionsRisk': false,
|
|
83
87
|
'fetchPremiumIndexOHLCV': false,
|
|
84
88
|
'fetchTicker': true,
|
package/js/src/okcoin.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ export default class okcoin extends Exchange {
|
|
|
42
42
|
info: any;
|
|
43
43
|
};
|
|
44
44
|
fetchDepositAddress(code: string, params?: {}): Promise<any>;
|
|
45
|
-
fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<
|
|
45
|
+
fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<import("./base/types.js").Dictionary<any>>;
|
|
46
46
|
transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
|
|
47
47
|
parseTransfer(transfer: any, currency?: Currency): {
|
|
48
48
|
info: any;
|
|
@@ -56,7 +56,7 @@ export default class okcoin extends Exchange {
|
|
|
56
56
|
status: string;
|
|
57
57
|
};
|
|
58
58
|
parseTransferStatus(status: any): string;
|
|
59
|
-
withdraw(code: string, amount: number, address:
|
|
59
|
+
withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
|
|
60
60
|
fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
61
61
|
fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
62
62
|
parseTransactionStatus(status: any): string;
|
package/js/src/okx.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/okx.js';
|
|
2
|
-
import type { TransferEntry, Int, OrderSide, OrderType, Trade, OHLCV, Order, FundingRateHistory, OrderRequest, FundingHistory, Str, Transaction, Ticker, OrderBook, Balances, Tickers, Market, Greeks, Strings, MarketInterface, Currency, Leverage, Num, Account, OptionChain, Option, MarginModification, TradingFeeInterface, Currencies, Conversion, CancellationRequest } from './base/types.js';
|
|
2
|
+
import type { TransferEntry, Int, OrderSide, OrderType, Trade, OHLCV, Order, FundingRateHistory, OrderRequest, FundingHistory, Str, Transaction, Ticker, OrderBook, Balances, Tickers, Market, Greeks, Strings, MarketInterface, Currency, Leverage, Num, Account, OptionChain, Option, MarginModification, TradingFeeInterface, Currencies, Conversion, CancellationRequest, Position } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class okx
|
|
5
5
|
* @augments Exchange
|
|
@@ -85,9 +85,9 @@ export default class okx extends Exchange {
|
|
|
85
85
|
network: string;
|
|
86
86
|
info: any;
|
|
87
87
|
};
|
|
88
|
-
fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<
|
|
88
|
+
fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<import("./base/types.js").Dictionary<any>>;
|
|
89
89
|
fetchDepositAddress(code: string, params?: {}): Promise<any>;
|
|
90
|
-
withdraw(code: string, amount: number, address:
|
|
90
|
+
withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
|
|
91
91
|
fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
92
92
|
fetchDeposit(id: string, code?: Str, params?: {}): Promise<Transaction>;
|
|
93
93
|
fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
@@ -96,10 +96,10 @@ export default class okx extends Exchange {
|
|
|
96
96
|
parseTransaction(transaction: any, currency?: Currency): Transaction;
|
|
97
97
|
fetchLeverage(symbol: string, params?: {}): Promise<Leverage>;
|
|
98
98
|
parseLeverage(leverage: any, market?: any): Leverage;
|
|
99
|
-
fetchPosition(symbol: string, params?: {}): Promise<
|
|
100
|
-
fetchPositions(symbols?: Strings, params?: {}): Promise<
|
|
101
|
-
fetchPositionsForSymbol(symbol: string, params?: {}): Promise<
|
|
102
|
-
parsePosition(position: any, market?: Market):
|
|
99
|
+
fetchPosition(symbol: string, params?: {}): Promise<Position>;
|
|
100
|
+
fetchPositions(symbols?: Strings, params?: {}): Promise<Position[]>;
|
|
101
|
+
fetchPositionsForSymbol(symbol: string, params?: {}): Promise<Position[]>;
|
|
102
|
+
parsePosition(position: any, market?: Market): Position;
|
|
103
103
|
transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
|
|
104
104
|
parseTransfer(transfer: any, currency?: Currency): {
|
|
105
105
|
info: any;
|
|
@@ -196,8 +196,8 @@ export default class okx extends Exchange {
|
|
|
196
196
|
fetchBorrowRateHistory(code: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
|
|
197
197
|
modifyMarginHelper(symbol: string, amount: any, type: any, params?: {}): Promise<MarginModification>;
|
|
198
198
|
parseMarginModification(data: any, market?: Market): MarginModification;
|
|
199
|
-
reduceMargin(symbol: string, amount:
|
|
200
|
-
addMargin(symbol: string, amount:
|
|
199
|
+
reduceMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
|
|
200
|
+
addMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
|
|
201
201
|
fetchMarketLeverageTiers(symbol: string, params?: {}): Promise<any[]>;
|
|
202
202
|
parseMarketLeverageTiers(info: any, market?: Market): any[];
|
|
203
203
|
fetchBorrowInterest(code?: Str, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
|
|
@@ -307,4 +307,5 @@ export default class okx extends Exchange {
|
|
|
307
307
|
fetchConvertCurrencies(params?: {}): Promise<Currencies>;
|
|
308
308
|
handleErrors(httpCode: any, reason: any, url: any, method: any, headers: any, body: any, response: any, requestHeaders: any, requestBody: any): any;
|
|
309
309
|
fetchMarginAdjustmentHistory(symbol?: Str, type?: Str, since?: Num, limit?: Num, params?: {}): Promise<MarginModification[]>;
|
|
310
|
+
fetchPositionsHistory(symbols?: Strings, since?: Int, limit?: Int, params?: {}): Promise<Position[]>;
|
|
310
311
|
}
|
package/js/src/okx.js
CHANGED
|
@@ -114,8 +114,10 @@ export default class okx extends Exchange {
|
|
|
114
114
|
'fetchOrderTrades': true,
|
|
115
115
|
'fetchPermissions': undefined,
|
|
116
116
|
'fetchPosition': true,
|
|
117
|
+
'fetchPositionHistory': 'emulated',
|
|
117
118
|
'fetchPositions': true,
|
|
118
119
|
'fetchPositionsForSymbol': true,
|
|
120
|
+
'fetchPositionsHistory': true,
|
|
119
121
|
'fetchPositionsRisk': false,
|
|
120
122
|
'fetchPremiumIndexOHLCV': false,
|
|
121
123
|
'fetchSettlementHistory': true,
|
|
@@ -7926,7 +7928,7 @@ export default class okx extends Exchange {
|
|
|
7926
7928
|
// }
|
|
7927
7929
|
//
|
|
7928
7930
|
const rows = this.safeList(response, 'data', []);
|
|
7929
|
-
return this.parseConversions(rows, 'baseCcy', 'quoteCcy', since, limit);
|
|
7931
|
+
return this.parseConversions(rows, code, 'baseCcy', 'quoteCcy', since, limit);
|
|
7930
7932
|
}
|
|
7931
7933
|
parseConversion(conversion, fromCurrency = undefined, toCurrency = undefined) {
|
|
7932
7934
|
//
|
|
@@ -8202,4 +8204,85 @@ export default class okx extends Exchange {
|
|
|
8202
8204
|
const modifications = this.parseMarginModifications(data);
|
|
8203
8205
|
return this.filterBySymbolSinceLimit(modifications, symbol, since, limit);
|
|
8204
8206
|
}
|
|
8207
|
+
async fetchPositionsHistory(symbols = undefined, since = undefined, limit = undefined, params = {}) {
|
|
8208
|
+
/**
|
|
8209
|
+
* @method
|
|
8210
|
+
* @name okx#fetchPositionsHistory
|
|
8211
|
+
* @description fetches historical positions
|
|
8212
|
+
* @see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-positions-history
|
|
8213
|
+
* @param {string} [symbols] unified market symbols
|
|
8214
|
+
* @param {int} [since] timestamp in ms of the earliest position to fetch
|
|
8215
|
+
* @param {int} [limit] the maximum amount of records to fetch, default=100, max=100
|
|
8216
|
+
* @param {object} params extra parameters specific to the exchange api endpoint
|
|
8217
|
+
* @param {string} [params.marginMode] "cross" or "isolated"
|
|
8218
|
+
*
|
|
8219
|
+
* EXCHANGE SPECIFIC PARAMETERS
|
|
8220
|
+
* @param {string} [params.instType] margin, swap, futures or option
|
|
8221
|
+
* @param {string} [params.type] the type of latest close position 1: close position partially, 2:close all, 3:liquidation, 4:partial liquidation; 5:adl, is it is the latest type if there are several types for the same position
|
|
8222
|
+
* @param {string} [params.posId] position id, there is attribute expiration, the posid will be expired if it is more than 30 days after the last full close position, then position will use new posid
|
|
8223
|
+
* @param {string} [params.before] timestamp in ms of the earliest position to fetch based on the last update time of the position
|
|
8224
|
+
* @param {string} [params.after] timestamp in ms of the latest position to fetch based on the last update time of the position
|
|
8225
|
+
* @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
8226
|
+
*/
|
|
8227
|
+
await this.loadMarkets();
|
|
8228
|
+
const marginMode = this.safeString(params, 'marginMode');
|
|
8229
|
+
const instType = this.safeStringUpper(params, 'instType');
|
|
8230
|
+
params = this.omit(params, ['until', 'marginMode', 'instType']);
|
|
8231
|
+
if (limit === undefined) {
|
|
8232
|
+
limit = 100;
|
|
8233
|
+
}
|
|
8234
|
+
const request = {
|
|
8235
|
+
'limit': limit,
|
|
8236
|
+
};
|
|
8237
|
+
if (symbols !== undefined) {
|
|
8238
|
+
const symbolsLength = symbols.length;
|
|
8239
|
+
if (symbolsLength === 1) {
|
|
8240
|
+
const market = this.market(symbols[0]);
|
|
8241
|
+
request['instId'] = market['id'];
|
|
8242
|
+
}
|
|
8243
|
+
}
|
|
8244
|
+
if (marginMode !== undefined) {
|
|
8245
|
+
request['mgnMode'] = marginMode;
|
|
8246
|
+
}
|
|
8247
|
+
if (instType !== undefined) {
|
|
8248
|
+
request['instType'] = instType;
|
|
8249
|
+
}
|
|
8250
|
+
const response = await this.privateGetAccountPositionsHistory(this.extend(request, params));
|
|
8251
|
+
//
|
|
8252
|
+
// {
|
|
8253
|
+
// code: '0',
|
|
8254
|
+
// data: [
|
|
8255
|
+
// {
|
|
8256
|
+
// cTime: '1708735940395',
|
|
8257
|
+
// ccy: 'USDT',
|
|
8258
|
+
// closeAvgPx: '0.6330444444444444',
|
|
8259
|
+
// closeTotalPos: '27',
|
|
8260
|
+
// direction: 'long',
|
|
8261
|
+
// fee: '-1.69566',
|
|
8262
|
+
// fundingFee: '-11.870404179341788',
|
|
8263
|
+
// instId: 'XRP-USDT-SWAP',
|
|
8264
|
+
// instType: 'SWAP',
|
|
8265
|
+
// lever: '3.0',
|
|
8266
|
+
// liqPenalty: '0',
|
|
8267
|
+
// mgnMode: 'cross',
|
|
8268
|
+
// openAvgPx: '0.623',
|
|
8269
|
+
// openMaxPos: '15',
|
|
8270
|
+
// pnl: '27.11999999999988',
|
|
8271
|
+
// pnlRatio: '0.0241732402722634',
|
|
8272
|
+
// posId: '681423155054862336',
|
|
8273
|
+
// realizedPnl: '13.553935820658092',
|
|
8274
|
+
// triggerPx: '',
|
|
8275
|
+
// type: '2',
|
|
8276
|
+
// uTime: '1711088748170',
|
|
8277
|
+
// uly: 'XRP-USDT'
|
|
8278
|
+
// },
|
|
8279
|
+
// ...
|
|
8280
|
+
// ],
|
|
8281
|
+
// msg: ''
|
|
8282
|
+
// }
|
|
8283
|
+
//
|
|
8284
|
+
const data = this.safeList(response, 'data');
|
|
8285
|
+
const positions = this.parsePositions(data, symbols, params);
|
|
8286
|
+
return this.filterBySinceLimit(positions, since, limit);
|
|
8287
|
+
}
|
|
8205
8288
|
}
|
package/js/src/onetrading.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ export default class onetrading extends Exchange {
|
|
|
50
50
|
}>;
|
|
51
51
|
fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
52
52
|
fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
53
|
-
withdraw(code: string, amount: number, address:
|
|
53
|
+
withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
|
|
54
54
|
parseTransaction(transaction: any, currency?: Currency): Transaction;
|
|
55
55
|
parseOrderStatus(status: any): string;
|
|
56
56
|
parseOrder(order: any, market?: Market): Order;
|
package/js/src/onetrading.js
CHANGED
|
@@ -77,8 +77,11 @@ export default class onetrading extends Exchange {
|
|
|
77
77
|
'fetchOrders': false,
|
|
78
78
|
'fetchOrderTrades': true,
|
|
79
79
|
'fetchPosition': false,
|
|
80
|
+
'fetchPositionHistory': false,
|
|
80
81
|
'fetchPositionMode': false,
|
|
81
82
|
'fetchPositions': false,
|
|
83
|
+
'fetchPositionsForSymbol': false,
|
|
84
|
+
'fetchPositionsHistory': false,
|
|
82
85
|
'fetchPositionsRisk': false,
|
|
83
86
|
'fetchPremiumIndexOHLCV': false,
|
|
84
87
|
'fetchTicker': true,
|
package/js/src/p2b.js
CHANGED
|
@@ -82,8 +82,11 @@ export default class p2b extends Exchange {
|
|
|
82
82
|
'fetchOrderTrades': true,
|
|
83
83
|
'fetchPermissions': false,
|
|
84
84
|
'fetchPosition': false,
|
|
85
|
+
'fetchPositionHistory': false,
|
|
86
|
+
'fetchPositionMode': false,
|
|
85
87
|
'fetchPositions': false,
|
|
86
88
|
'fetchPositionsForSymbol': false,
|
|
89
|
+
'fetchPositionsHistory': false,
|
|
87
90
|
'fetchPositionsRisk': false,
|
|
88
91
|
'fetchPremiumIndexOHLCV': false,
|
|
89
92
|
'fetchTicker': true,
|
package/js/src/paymium.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export default class paymium extends Exchange {
|
|
|
27
27
|
tag: any;
|
|
28
28
|
network: any;
|
|
29
29
|
}>;
|
|
30
|
-
fetchDepositAddresses(codes?: string[], params?: {}): Promise<
|
|
30
|
+
fetchDepositAddresses(codes?: string[], params?: {}): Promise<import("./base/types.js").Dictionary<any>>;
|
|
31
31
|
parseDepositAddress(depositAddress: any, currency?: Currency): {
|
|
32
32
|
info: any;
|
|
33
33
|
currency: string;
|