ccxt 4.4.85 → 4.4.87
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 +18 -7
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +16 -9
- package/dist/cjs/src/abstract/bittrade.js +9 -0
- package/dist/cjs/src/abstract/modetrade.js +9 -0
- package/dist/cjs/src/ascendex.js +189 -155
- package/dist/cjs/src/base/Exchange.js +10 -8
- package/dist/cjs/src/bequant.js +1 -1
- package/dist/cjs/src/binance.js +1 -1
- package/dist/cjs/src/bitget.js +5 -4
- package/dist/cjs/src/bitmart.js +1 -1
- package/dist/cjs/src/bitteam.js +31 -0
- package/dist/cjs/src/bittrade.js +2049 -0
- package/dist/cjs/src/coinbase.js +2 -6
- package/dist/cjs/src/coinmetro.js +5 -1
- package/dist/cjs/src/deribit.js +4 -5
- package/dist/cjs/src/derive.js +4 -5
- package/dist/cjs/src/ellipx.js +2 -3
- package/dist/cjs/src/gate.js +92 -76
- package/dist/cjs/src/hollaex.js +107 -49
- package/dist/cjs/src/htx.js +30 -52
- package/dist/cjs/src/hyperliquid.js +36 -20
- package/dist/cjs/src/kraken.js +5 -8
- package/dist/cjs/src/mexc.js +2 -2
- package/dist/cjs/src/modetrade.js +2839 -0
- package/dist/cjs/src/ndax.js +25 -24
- package/dist/cjs/src/okcoin.js +12 -31
- package/dist/cjs/src/okx.js +104 -2
- package/dist/cjs/src/okxus.js +53 -0
- package/dist/cjs/src/onetrading.js +9 -6
- package/dist/cjs/src/oxfun.js +42 -114
- package/dist/cjs/src/paradex.js +10 -1
- package/dist/cjs/src/phemex.js +4 -6
- package/dist/cjs/src/poloniex.js +181 -170
- package/dist/cjs/src/pro/binance.js +1 -0
- package/dist/cjs/src/pro/bittrade.js +605 -0
- package/dist/cjs/src/pro/luno.js +6 -5
- package/dist/cjs/src/pro/mexc.js +3 -0
- package/dist/cjs/src/pro/modetrade.js +1334 -0
- package/dist/cjs/src/pro/okxus.js +38 -0
- package/dist/cjs/src/probit.js +18 -51
- package/dist/cjs/src/timex.js +5 -10
- package/dist/cjs/src/vertex.js +3 -4
- package/dist/cjs/src/whitebit.js +41 -11
- package/dist/cjs/src/woo.js +101 -77
- package/dist/cjs/src/woofipro.js +24 -21
- package/dist/cjs/src/xt.js +36 -44
- package/js/ccxt.d.ts +20 -11
- package/js/ccxt.js +14 -8
- package/js/src/abstract/modetrade.d.ts +122 -0
- package/js/src/abstract/myokx.d.ts +2 -0
- package/js/src/abstract/okx.d.ts +2 -0
- package/js/src/abstract/okxus.d.ts +352 -0
- package/js/src/abstract/okxus.js +11 -0
- package/js/src/ascendex.d.ts +2 -0
- package/js/src/ascendex.js +189 -155
- package/js/src/base/Exchange.js +10 -8
- package/js/src/bequant.js +1 -1
- package/js/src/binance.js +1 -1
- package/js/src/bitget.js +5 -4
- package/js/src/bitmart.js +1 -1
- package/js/src/bitteam.js +31 -0
- package/js/src/{huobijp.d.ts → bittrade.d.ts} +29 -29
- package/js/src/{huobijp.js → bittrade.js} +35 -35
- package/js/src/coinbase.js +2 -6
- package/js/src/coinmetro.js +5 -1
- package/js/src/deribit.js +4 -5
- package/js/src/derive.js +4 -3
- package/js/src/ellipx.d.ts +1 -1
- package/js/src/ellipx.js +3 -5
- package/js/src/gate.js +92 -76
- package/js/src/hollaex.js +107 -49
- package/js/src/htx.js +30 -52
- package/js/src/hyperliquid.js +36 -20
- package/js/src/kraken.js +5 -8
- package/js/src/mexc.js +2 -2
- package/js/src/modetrade.d.ts +475 -0
- package/js/src/modetrade.js +2840 -0
- package/js/src/ndax.js +25 -24
- package/js/src/okcoin.js +12 -31
- package/js/src/okx.d.ts +24 -1
- package/js/src/okx.js +104 -2
- package/js/src/okxus.d.ts +4 -0
- package/js/src/okxus.js +54 -0
- package/js/src/onetrading.js +9 -6
- package/js/src/oxfun.js +42 -114
- package/js/src/paradex.js +10 -1
- package/js/src/phemex.js +4 -6
- package/js/src/poloniex.d.ts +2 -0
- package/js/src/poloniex.js +181 -170
- package/js/src/pro/binance.js +1 -0
- package/js/src/pro/{huobijp.d.ts → bittrade.d.ts} +6 -6
- package/js/src/pro/{huobijp.js → bittrade.js} +7 -7
- package/js/src/pro/luno.js +6 -5
- package/js/src/pro/mexc.js +3 -0
- package/js/src/pro/modetrade.d.ts +155 -0
- package/js/src/pro/modetrade.js +1335 -0
- package/js/src/pro/okxus.d.ts +4 -0
- package/js/src/pro/okxus.js +39 -0
- package/js/src/probit.js +18 -51
- package/js/src/timex.js +5 -10
- package/js/src/vertex.js +3 -4
- package/js/src/whitebit.js +42 -11
- package/js/src/woo.d.ts +2 -0
- package/js/src/woo.js +101 -77
- package/js/src/woofipro.d.ts +2 -1
- package/js/src/woofipro.js +24 -21
- package/js/src/xt.js +36 -44
- package/package.json +1 -1
- package/js/src/abstract/kuna.d.ts +0 -185
- package/js/src/kuna.d.ts +0 -335
- package/js/src/kuna.js +0 -2006
- /package/js/src/abstract/{huobijp.d.ts → bittrade.d.ts} +0 -0
- /package/js/src/abstract/{huobijp.js → bittrade.js} +0 -0
- /package/js/src/abstract/{kuna.js → modetrade.js} +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import Exchange from './abstract/
|
|
1
|
+
import Exchange from './abstract/bittrade.js';
|
|
2
2
|
import type { Account, Balances, Currencies, Currency, Dict, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, int } from './base/types.js';
|
|
3
3
|
/**
|
|
4
|
-
* @class
|
|
4
|
+
* @class bittrade
|
|
5
5
|
* @augments Exchange
|
|
6
6
|
*/
|
|
7
|
-
export default class
|
|
7
|
+
export default class bittrade extends Exchange {
|
|
8
8
|
describe(): any;
|
|
9
9
|
/**
|
|
10
10
|
* @method
|
|
11
|
-
* @name
|
|
11
|
+
* @name bittrade#fetchTime
|
|
12
12
|
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
13
13
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
14
14
|
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
@@ -36,7 +36,7 @@ export default class huobijp extends Exchange {
|
|
|
36
36
|
costToPrecision(symbol: any, cost: any): string;
|
|
37
37
|
/**
|
|
38
38
|
* @method
|
|
39
|
-
* @name
|
|
39
|
+
* @name bittrade#fetchMarkets
|
|
40
40
|
* @description retrieves data on all markets for huobijp
|
|
41
41
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
42
42
|
* @returns {object[]} an array of objects representing market data
|
|
@@ -45,7 +45,7 @@ export default class huobijp extends Exchange {
|
|
|
45
45
|
parseTicker(ticker: Dict, market?: Market): Ticker;
|
|
46
46
|
/**
|
|
47
47
|
* @method
|
|
48
|
-
* @name
|
|
48
|
+
* @name bittrade#fetchOrderBook
|
|
49
49
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
50
50
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
51
51
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
@@ -55,7 +55,7 @@ export default class huobijp extends Exchange {
|
|
|
55
55
|
fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
|
|
56
56
|
/**
|
|
57
57
|
* @method
|
|
58
|
-
* @name
|
|
58
|
+
* @name bittrade#fetchTicker
|
|
59
59
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
60
60
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
61
61
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -64,7 +64,7 @@ export default class huobijp extends Exchange {
|
|
|
64
64
|
fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
|
|
65
65
|
/**
|
|
66
66
|
* @method
|
|
67
|
-
* @name
|
|
67
|
+
* @name bittrade#fetchTickers
|
|
68
68
|
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
69
69
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
70
70
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -74,7 +74,7 @@ export default class huobijp extends Exchange {
|
|
|
74
74
|
parseTrade(trade: Dict, market?: Market): Trade;
|
|
75
75
|
/**
|
|
76
76
|
* @method
|
|
77
|
-
* @name
|
|
77
|
+
* @name bittrade#fetchOrderTrades
|
|
78
78
|
* @description fetch all the trades made from a single order
|
|
79
79
|
* @param {string} id order id
|
|
80
80
|
* @param {string} symbol unified market symbol
|
|
@@ -86,7 +86,7 @@ export default class huobijp extends Exchange {
|
|
|
86
86
|
fetchOrderTrades(id: string, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
87
87
|
/**
|
|
88
88
|
* @method
|
|
89
|
-
* @name
|
|
89
|
+
* @name bittrade#fetchMyTrades
|
|
90
90
|
* @description fetch all trades made by the user
|
|
91
91
|
* @param {string} symbol unified market symbol
|
|
92
92
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
@@ -97,7 +97,7 @@ export default class huobijp extends Exchange {
|
|
|
97
97
|
fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
98
98
|
/**
|
|
99
99
|
* @method
|
|
100
|
-
* @name
|
|
100
|
+
* @name bittrade#fetchTrades
|
|
101
101
|
* @description get the list of most recent trades for a particular symbol
|
|
102
102
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
103
103
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
@@ -109,7 +109,7 @@ export default class huobijp extends Exchange {
|
|
|
109
109
|
parseOHLCV(ohlcv: any, market?: Market): OHLCV;
|
|
110
110
|
/**
|
|
111
111
|
* @method
|
|
112
|
-
* @name
|
|
112
|
+
* @name bittrade#fetchOHLCV
|
|
113
113
|
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
114
114
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
115
115
|
* @param {string} timeframe the length of time each candle represents
|
|
@@ -121,7 +121,7 @@ export default class huobijp extends Exchange {
|
|
|
121
121
|
fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
|
|
122
122
|
/**
|
|
123
123
|
* @method
|
|
124
|
-
* @name
|
|
124
|
+
* @name bittrade#fetchAccounts
|
|
125
125
|
* @description fetch all the accounts associated with a profile
|
|
126
126
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
127
127
|
* @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
|
|
@@ -129,7 +129,7 @@ export default class huobijp extends Exchange {
|
|
|
129
129
|
fetchAccounts(params?: {}): Promise<Account[]>;
|
|
130
130
|
/**
|
|
131
131
|
* @method
|
|
132
|
-
* @name
|
|
132
|
+
* @name bittrade#fetchCurrencies
|
|
133
133
|
* @description fetches all available currencies on an exchange
|
|
134
134
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
135
135
|
* @returns {object} an associative dictionary of currencies
|
|
@@ -138,7 +138,7 @@ export default class huobijp extends Exchange {
|
|
|
138
138
|
parseBalance(response: any): Balances;
|
|
139
139
|
/**
|
|
140
140
|
* @method
|
|
141
|
-
* @name
|
|
141
|
+
* @name bittrade#fetchBalance
|
|
142
142
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
143
143
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
144
144
|
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
@@ -147,7 +147,7 @@ export default class huobijp extends Exchange {
|
|
|
147
147
|
fetchOrdersByStates(states: any, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
148
148
|
/**
|
|
149
149
|
* @method
|
|
150
|
-
* @name
|
|
150
|
+
* @name bittrade#fetchOrder
|
|
151
151
|
* @description fetches information on an order made by the user
|
|
152
152
|
* @param {string} id order id
|
|
153
153
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
@@ -157,7 +157,7 @@ export default class huobijp extends Exchange {
|
|
|
157
157
|
fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
158
158
|
/**
|
|
159
159
|
* @method
|
|
160
|
-
* @name
|
|
160
|
+
* @name bittrade#fetchOrders
|
|
161
161
|
* @description fetches information on multiple orders made by the user
|
|
162
162
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
163
163
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
@@ -168,7 +168,7 @@ export default class huobijp extends Exchange {
|
|
|
168
168
|
fetchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
169
169
|
/**
|
|
170
170
|
* @method
|
|
171
|
-
* @name
|
|
171
|
+
* @name bittrade#fetchOpenOrders
|
|
172
172
|
* @description fetch all unfilled currently open orders
|
|
173
173
|
* @param {string} symbol unified market symbol
|
|
174
174
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
@@ -180,7 +180,7 @@ export default class huobijp extends Exchange {
|
|
|
180
180
|
fetchOpenOrdersV1(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
181
181
|
/**
|
|
182
182
|
* @method
|
|
183
|
-
* @name
|
|
183
|
+
* @name bittrade#fetchClosedOrders
|
|
184
184
|
* @description fetches information on multiple closed orders made by the user
|
|
185
185
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
186
186
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
@@ -194,7 +194,7 @@ export default class huobijp extends Exchange {
|
|
|
194
194
|
parseOrder(order: Dict, market?: Market): Order;
|
|
195
195
|
/**
|
|
196
196
|
* @method
|
|
197
|
-
* @name
|
|
197
|
+
* @name bittrade#createMarketBuyOrderWithCost
|
|
198
198
|
* @description create a market buy order by providing the symbol and cost
|
|
199
199
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
200
200
|
* @param {float} cost how much you want to trade in units of the quote currency
|
|
@@ -204,7 +204,7 @@ export default class huobijp extends Exchange {
|
|
|
204
204
|
createMarketBuyOrderWithCost(symbol: string, cost: number, params?: {}): Promise<Order>;
|
|
205
205
|
/**
|
|
206
206
|
* @method
|
|
207
|
-
* @name
|
|
207
|
+
* @name bittrade#createOrder
|
|
208
208
|
* @description create a trade order
|
|
209
209
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
210
210
|
* @param {string} type 'market' or 'limit'
|
|
@@ -217,20 +217,20 @@ export default class huobijp extends Exchange {
|
|
|
217
217
|
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
|
|
218
218
|
/**
|
|
219
219
|
* @method
|
|
220
|
-
* @name
|
|
220
|
+
* @name bittrade#cancelOrder
|
|
221
221
|
* @description cancels an open order
|
|
222
222
|
* @param {string} id order id
|
|
223
|
-
* @param {string} symbol not used by
|
|
223
|
+
* @param {string} symbol not used by bittrade cancelOrder ()
|
|
224
224
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
225
225
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
226
226
|
*/
|
|
227
227
|
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<any>;
|
|
228
228
|
/**
|
|
229
229
|
* @method
|
|
230
|
-
* @name
|
|
230
|
+
* @name bittrade#cancelOrders
|
|
231
231
|
* @description cancel multiple orders
|
|
232
232
|
* @param {string[]} ids order ids
|
|
233
|
-
* @param {string} symbol not used by
|
|
233
|
+
* @param {string} symbol not used by bittrade cancelOrders ()
|
|
234
234
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
235
235
|
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
236
236
|
*/
|
|
@@ -238,7 +238,7 @@ export default class huobijp extends Exchange {
|
|
|
238
238
|
parseCancelOrders(orders: any): any[];
|
|
239
239
|
/**
|
|
240
240
|
* @method
|
|
241
|
-
* @name
|
|
241
|
+
* @name bittrade#cancelAllOrders
|
|
242
242
|
* @description cancel all open orders
|
|
243
243
|
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
244
244
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -254,7 +254,7 @@ export default class huobijp extends Exchange {
|
|
|
254
254
|
};
|
|
255
255
|
/**
|
|
256
256
|
* @method
|
|
257
|
-
* @name
|
|
257
|
+
* @name bittrade#fetchDeposits
|
|
258
258
|
* @description fetch all deposits made to an account
|
|
259
259
|
* @param {string} code unified currency code
|
|
260
260
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
@@ -265,7 +265,7 @@ export default class huobijp extends Exchange {
|
|
|
265
265
|
fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
266
266
|
/**
|
|
267
267
|
* @method
|
|
268
|
-
* @name
|
|
268
|
+
* @name bittrade#fetchWithdrawals
|
|
269
269
|
* @description fetch all withdrawals made from an account
|
|
270
270
|
* @param {string} code unified currency code
|
|
271
271
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
@@ -278,7 +278,7 @@ export default class huobijp extends Exchange {
|
|
|
278
278
|
parseTransactionStatus(status: Str): string;
|
|
279
279
|
/**
|
|
280
280
|
* @method
|
|
281
|
-
* @name
|
|
281
|
+
* @name bittrade#withdraw
|
|
282
282
|
* @description make a withdrawal
|
|
283
283
|
* @param {string} code unified currency code
|
|
284
284
|
* @param {float} amount the amount to withdraw
|
|
@@ -5,21 +5,21 @@
|
|
|
5
5
|
// EDIT THE CORRESPONDENT .ts FILE INSTEAD
|
|
6
6
|
|
|
7
7
|
// ---------------------------------------------------------------------------
|
|
8
|
-
import Exchange from './abstract/
|
|
8
|
+
import Exchange from './abstract/bittrade.js';
|
|
9
9
|
import { AuthenticationError, ExchangeError, PermissionDenied, ExchangeNotAvailable, OnMaintenance, InvalidOrder, OrderNotFound, InsufficientFunds, BadSymbol, BadRequest, RequestTimeout, NetworkError, ArgumentsRequired, NotSupported } from './base/errors.js';
|
|
10
10
|
import { Precise } from './base/Precise.js';
|
|
11
11
|
import { TRUNCATE, TICK_SIZE } from './base/functions/number.js';
|
|
12
12
|
import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
|
|
13
13
|
// ---------------------------------------------------------------------------
|
|
14
14
|
/**
|
|
15
|
-
* @class
|
|
15
|
+
* @class bittrade
|
|
16
16
|
* @augments Exchange
|
|
17
17
|
*/
|
|
18
|
-
export default class
|
|
18
|
+
export default class bittrade extends Exchange {
|
|
19
19
|
describe() {
|
|
20
20
|
return this.deepExtend(super.describe(), {
|
|
21
|
-
'id': '
|
|
22
|
-
'name': '
|
|
21
|
+
'id': 'bittrade',
|
|
22
|
+
'name': 'BitTrade',
|
|
23
23
|
'countries': ['JP'],
|
|
24
24
|
'rateLimit': 100,
|
|
25
25
|
'userAgent': this.userAgents['chrome39'],
|
|
@@ -95,10 +95,10 @@ export default class huobijp extends Exchange {
|
|
|
95
95
|
'v2Public': 'https://{hostname}',
|
|
96
96
|
'v2Private': 'https://{hostname}',
|
|
97
97
|
},
|
|
98
|
-
'www': 'https://www.
|
|
99
|
-
'referral': 'https://www.
|
|
100
|
-
'doc': 'https://api-doc.
|
|
101
|
-
'fees': 'https://www.
|
|
98
|
+
'www': 'https://www.bittrade.co.jp',
|
|
99
|
+
'referral': 'https://www.bittrade.co.jp/register/?invite_code=znnq3',
|
|
100
|
+
'doc': 'https://api-doc.bittrade.co.jp',
|
|
101
|
+
'fees': 'https://www.bittrade.co.jp/ja-jp/support/fee',
|
|
102
102
|
},
|
|
103
103
|
'api': {
|
|
104
104
|
'v2Public': {
|
|
@@ -413,7 +413,7 @@ export default class huobijp extends Exchange {
|
|
|
413
413
|
}
|
|
414
414
|
/**
|
|
415
415
|
* @method
|
|
416
|
-
* @name
|
|
416
|
+
* @name bittrade#fetchTime
|
|
417
417
|
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
418
418
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
419
419
|
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
@@ -491,7 +491,7 @@ export default class huobijp extends Exchange {
|
|
|
491
491
|
}
|
|
492
492
|
/**
|
|
493
493
|
* @method
|
|
494
|
-
* @name
|
|
494
|
+
* @name bittrade#fetchMarkets
|
|
495
495
|
* @description retrieves data on all markets for huobijp
|
|
496
496
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
497
497
|
* @returns {object[]} an array of objects representing market data
|
|
@@ -693,7 +693,7 @@ export default class huobijp extends Exchange {
|
|
|
693
693
|
}
|
|
694
694
|
/**
|
|
695
695
|
* @method
|
|
696
|
-
* @name
|
|
696
|
+
* @name bittrade#fetchOrderBook
|
|
697
697
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
698
698
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
699
699
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
@@ -743,7 +743,7 @@ export default class huobijp extends Exchange {
|
|
|
743
743
|
}
|
|
744
744
|
/**
|
|
745
745
|
* @method
|
|
746
|
-
* @name
|
|
746
|
+
* @name bittrade#fetchTicker
|
|
747
747
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
748
748
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
749
749
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -784,7 +784,7 @@ export default class huobijp extends Exchange {
|
|
|
784
784
|
}
|
|
785
785
|
/**
|
|
786
786
|
* @method
|
|
787
|
-
* @name
|
|
787
|
+
* @name bittrade#fetchTickers
|
|
788
788
|
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
789
789
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
790
790
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -892,7 +892,7 @@ export default class huobijp extends Exchange {
|
|
|
892
892
|
}
|
|
893
893
|
/**
|
|
894
894
|
* @method
|
|
895
|
-
* @name
|
|
895
|
+
* @name bittrade#fetchOrderTrades
|
|
896
896
|
* @description fetch all the trades made from a single order
|
|
897
897
|
* @param {string} id order id
|
|
898
898
|
* @param {string} symbol unified market symbol
|
|
@@ -911,7 +911,7 @@ export default class huobijp extends Exchange {
|
|
|
911
911
|
}
|
|
912
912
|
/**
|
|
913
913
|
* @method
|
|
914
|
-
* @name
|
|
914
|
+
* @name bittrade#fetchMyTrades
|
|
915
915
|
* @description fetch all trades made by the user
|
|
916
916
|
* @param {string} symbol unified market symbol
|
|
917
917
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
@@ -939,7 +939,7 @@ export default class huobijp extends Exchange {
|
|
|
939
939
|
}
|
|
940
940
|
/**
|
|
941
941
|
* @method
|
|
942
|
-
* @name
|
|
942
|
+
* @name bittrade#fetchTrades
|
|
943
943
|
* @description get the list of most recent trades for a particular symbol
|
|
944
944
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
945
945
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
@@ -1017,7 +1017,7 @@ export default class huobijp extends Exchange {
|
|
|
1017
1017
|
}
|
|
1018
1018
|
/**
|
|
1019
1019
|
* @method
|
|
1020
|
-
* @name
|
|
1020
|
+
* @name bittrade#fetchOHLCV
|
|
1021
1021
|
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1022
1022
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
1023
1023
|
* @param {string} timeframe the length of time each candle represents
|
|
@@ -1054,7 +1054,7 @@ export default class huobijp extends Exchange {
|
|
|
1054
1054
|
}
|
|
1055
1055
|
/**
|
|
1056
1056
|
* @method
|
|
1057
|
-
* @name
|
|
1057
|
+
* @name bittrade#fetchAccounts
|
|
1058
1058
|
* @description fetch all the accounts associated with a profile
|
|
1059
1059
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1060
1060
|
* @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
|
|
@@ -1066,7 +1066,7 @@ export default class huobijp extends Exchange {
|
|
|
1066
1066
|
}
|
|
1067
1067
|
/**
|
|
1068
1068
|
* @method
|
|
1069
|
-
* @name
|
|
1069
|
+
* @name bittrade#fetchCurrencies
|
|
1070
1070
|
* @description fetches all available currencies on an exchange
|
|
1071
1071
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1072
1072
|
* @returns {object} an associative dictionary of currencies
|
|
@@ -1189,7 +1189,7 @@ export default class huobijp extends Exchange {
|
|
|
1189
1189
|
}
|
|
1190
1190
|
/**
|
|
1191
1191
|
* @method
|
|
1192
|
-
* @name
|
|
1192
|
+
* @name bittrade#fetchBalance
|
|
1193
1193
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
1194
1194
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1195
1195
|
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
@@ -1237,7 +1237,7 @@ export default class huobijp extends Exchange {
|
|
|
1237
1237
|
}
|
|
1238
1238
|
/**
|
|
1239
1239
|
* @method
|
|
1240
|
-
* @name
|
|
1240
|
+
* @name bittrade#fetchOrder
|
|
1241
1241
|
* @description fetches information on an order made by the user
|
|
1242
1242
|
* @param {string} id order id
|
|
1243
1243
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
@@ -1255,7 +1255,7 @@ export default class huobijp extends Exchange {
|
|
|
1255
1255
|
}
|
|
1256
1256
|
/**
|
|
1257
1257
|
* @method
|
|
1258
|
-
* @name
|
|
1258
|
+
* @name bittrade#fetchOrders
|
|
1259
1259
|
* @description fetches information on multiple orders made by the user
|
|
1260
1260
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
1261
1261
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
@@ -1268,7 +1268,7 @@ export default class huobijp extends Exchange {
|
|
|
1268
1268
|
}
|
|
1269
1269
|
/**
|
|
1270
1270
|
* @method
|
|
1271
|
-
* @name
|
|
1271
|
+
* @name bittrade#fetchOpenOrders
|
|
1272
1272
|
* @description fetch all unfilled currently open orders
|
|
1273
1273
|
* @param {string} symbol unified market symbol
|
|
1274
1274
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
@@ -1288,7 +1288,7 @@ export default class huobijp extends Exchange {
|
|
|
1288
1288
|
}
|
|
1289
1289
|
/**
|
|
1290
1290
|
* @method
|
|
1291
|
-
* @name
|
|
1291
|
+
* @name bittrade#fetchClosedOrders
|
|
1292
1292
|
* @description fetches information on multiple closed orders made by the user
|
|
1293
1293
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
1294
1294
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
@@ -1446,7 +1446,7 @@ export default class huobijp extends Exchange {
|
|
|
1446
1446
|
}
|
|
1447
1447
|
/**
|
|
1448
1448
|
* @method
|
|
1449
|
-
* @name
|
|
1449
|
+
* @name bittrade#createMarketBuyOrderWithCost
|
|
1450
1450
|
* @description create a market buy order by providing the symbol and cost
|
|
1451
1451
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
1452
1452
|
* @param {float} cost how much you want to trade in units of the quote currency
|
|
@@ -1464,7 +1464,7 @@ export default class huobijp extends Exchange {
|
|
|
1464
1464
|
}
|
|
1465
1465
|
/**
|
|
1466
1466
|
* @method
|
|
1467
|
-
* @name
|
|
1467
|
+
* @name bittrade#createOrder
|
|
1468
1468
|
* @description create a trade order
|
|
1469
1469
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
1470
1470
|
* @param {string} type 'market' or 'limit'
|
|
@@ -1555,10 +1555,10 @@ export default class huobijp extends Exchange {
|
|
|
1555
1555
|
}
|
|
1556
1556
|
/**
|
|
1557
1557
|
* @method
|
|
1558
|
-
* @name
|
|
1558
|
+
* @name bittrade#cancelOrder
|
|
1559
1559
|
* @description cancels an open order
|
|
1560
1560
|
* @param {string} id order id
|
|
1561
|
-
* @param {string} symbol not used by
|
|
1561
|
+
* @param {string} symbol not used by bittrade cancelOrder ()
|
|
1562
1562
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1563
1563
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1564
1564
|
*/
|
|
@@ -1577,10 +1577,10 @@ export default class huobijp extends Exchange {
|
|
|
1577
1577
|
}
|
|
1578
1578
|
/**
|
|
1579
1579
|
* @method
|
|
1580
|
-
* @name
|
|
1580
|
+
* @name bittrade#cancelOrders
|
|
1581
1581
|
* @description cancel multiple orders
|
|
1582
1582
|
* @param {string[]} ids order ids
|
|
1583
|
-
* @param {string} symbol not used by
|
|
1583
|
+
* @param {string} symbol not used by bittrade cancelOrders ()
|
|
1584
1584
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1585
1585
|
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1586
1586
|
*/
|
|
@@ -1690,7 +1690,7 @@ export default class huobijp extends Exchange {
|
|
|
1690
1690
|
}
|
|
1691
1691
|
/**
|
|
1692
1692
|
* @method
|
|
1693
|
-
* @name
|
|
1693
|
+
* @name bittrade#cancelAllOrders
|
|
1694
1694
|
* @description cancel all open orders
|
|
1695
1695
|
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
1696
1696
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -1758,7 +1758,7 @@ export default class huobijp extends Exchange {
|
|
|
1758
1758
|
}
|
|
1759
1759
|
/**
|
|
1760
1760
|
* @method
|
|
1761
|
-
* @name
|
|
1761
|
+
* @name bittrade#fetchDeposits
|
|
1762
1762
|
* @description fetch all deposits made to an account
|
|
1763
1763
|
* @param {string} code unified currency code
|
|
1764
1764
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
@@ -1791,7 +1791,7 @@ export default class huobijp extends Exchange {
|
|
|
1791
1791
|
}
|
|
1792
1792
|
/**
|
|
1793
1793
|
* @method
|
|
1794
|
-
* @name
|
|
1794
|
+
* @name bittrade#fetchWithdrawals
|
|
1795
1795
|
* @description fetch all withdrawals made from an account
|
|
1796
1796
|
* @param {string} code unified currency code
|
|
1797
1797
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
@@ -1927,7 +1927,7 @@ export default class huobijp extends Exchange {
|
|
|
1927
1927
|
}
|
|
1928
1928
|
/**
|
|
1929
1929
|
* @method
|
|
1930
|
-
* @name
|
|
1930
|
+
* @name bittrade#withdraw
|
|
1931
1931
|
* @description make a withdrawal
|
|
1932
1932
|
* @param {string} code unified currency code
|
|
1933
1933
|
* @param {float} amount the amount to withdraw
|
package/js/src/coinbase.js
CHANGED
|
@@ -1455,10 +1455,6 @@ export default class coinbase extends Exchange {
|
|
|
1455
1455
|
this.v3PublicGetBrokerageMarketProducts(this.extend(params, { 'product_type': 'FUTURE' })),
|
|
1456
1456
|
this.v3PublicGetBrokerageMarketProducts(this.extend(params, { 'product_type': 'FUTURE', 'contract_expiry_type': 'PERPETUAL' })),
|
|
1457
1457
|
];
|
|
1458
|
-
if (this.checkRequiredCredentials(false)) {
|
|
1459
|
-
unresolvedContractPromises.push(this.extend(params, { 'product_type': 'FUTURE' }));
|
|
1460
|
-
unresolvedContractPromises.push(this.extend(params, { 'product_type': 'FUTURE', 'contract_expiry_type': 'PERPETUAL' }));
|
|
1461
|
-
}
|
|
1462
1458
|
}
|
|
1463
1459
|
catch (e) {
|
|
1464
1460
|
unresolvedContractPromises = []; // the sync version of ccxt won't have the promise.all line so the request is made here. Some users can't access perpetual products
|
|
@@ -1475,8 +1471,8 @@ export default class coinbase extends Exchange {
|
|
|
1475
1471
|
const fees = this.safeDict(promises, 1, {});
|
|
1476
1472
|
const expiringFutures = this.safeDict(contractPromises, 0, {});
|
|
1477
1473
|
const perpetualFutures = this.safeDict(contractPromises, 1, {});
|
|
1478
|
-
const expiringFees = this.safeDict(contractPromises,
|
|
1479
|
-
const perpetualFees = this.safeDict(contractPromises,
|
|
1474
|
+
const expiringFees = this.safeDict(contractPromises, 0, {});
|
|
1475
|
+
const perpetualFees = this.safeDict(contractPromises, 1, {});
|
|
1480
1476
|
//
|
|
1481
1477
|
// {
|
|
1482
1478
|
// "total_volume": 0,
|
package/js/src/coinmetro.js
CHANGED
|
@@ -388,7 +388,11 @@ export default class coinmetro extends Exchange {
|
|
|
388
388
|
else if (typeRaw === 'fiat') {
|
|
389
389
|
type = 'fiat';
|
|
390
390
|
}
|
|
391
|
-
|
|
391
|
+
let precisionDigits = this.safeString2(currency, 'digits', 'notabeneDecimals');
|
|
392
|
+
if (code === 'RENDER') {
|
|
393
|
+
// RENDER is an exception (with broken info)
|
|
394
|
+
precisionDigits = '4';
|
|
395
|
+
}
|
|
392
396
|
result[code] = this.safeCurrencyStructure({
|
|
393
397
|
'id': id,
|
|
394
398
|
'code': code,
|
package/js/src/deribit.js
CHANGED
|
@@ -637,18 +637,17 @@ export default class deribit extends Exchange {
|
|
|
637
637
|
// "testnet": true
|
|
638
638
|
// }
|
|
639
639
|
//
|
|
640
|
-
const data = this.
|
|
640
|
+
const data = this.safeList(response, 'result', []);
|
|
641
641
|
const result = {};
|
|
642
642
|
for (let i = 0; i < data.length; i++) {
|
|
643
643
|
const currency = data[i];
|
|
644
644
|
const currencyId = this.safeString(currency, 'currency');
|
|
645
645
|
const code = this.safeCurrencyCode(currencyId);
|
|
646
|
-
|
|
647
|
-
result[code] = {
|
|
646
|
+
result[code] = this.safeCurrencyStructure({
|
|
648
647
|
'info': currency,
|
|
649
648
|
'code': code,
|
|
650
649
|
'id': currencyId,
|
|
651
|
-
'name':
|
|
650
|
+
'name': this.safeString(currency, 'currency_long'),
|
|
652
651
|
'active': undefined,
|
|
653
652
|
'deposit': undefined,
|
|
654
653
|
'withdraw': undefined,
|
|
@@ -670,7 +669,7 @@ export default class deribit extends Exchange {
|
|
|
670
669
|
},
|
|
671
670
|
},
|
|
672
671
|
'networks': undefined,
|
|
673
|
-
};
|
|
672
|
+
});
|
|
674
673
|
}
|
|
675
674
|
return result;
|
|
676
675
|
}
|
package/js/src/derive.js
CHANGED
|
@@ -5,12 +5,13 @@
|
|
|
5
5
|
// EDIT THE CORRESPONDENT .ts FILE INSTEAD
|
|
6
6
|
|
|
7
7
|
// ---------------------------------------------------------------------------
|
|
8
|
-
import { BadRequest, InvalidOrder, Precise, ExchangeError, OrderNotFound, ArgumentsRequired, InsufficientFunds, RateLimitExceeded, AuthenticationError } from '../ccxt.js';
|
|
9
8
|
import Exchange from './abstract/derive.js';
|
|
10
|
-
import
|
|
9
|
+
import Precise from './base/Precise.js';
|
|
10
|
+
import { BadRequest, InvalidOrder, ExchangeError, OrderNotFound, ArgumentsRequired, InsufficientFunds, RateLimitExceeded, AuthenticationError } from './base/errors.js';
|
|
11
|
+
import { ecdsa } from './base/functions/crypto.js';
|
|
11
12
|
import { keccak_256 as keccak } from './static_dependencies/noble-hashes/sha3.js';
|
|
12
13
|
import { secp256k1 } from './static_dependencies/noble-curves/secp256k1.js';
|
|
13
|
-
import {
|
|
14
|
+
import { TICK_SIZE } from './base/functions/number.js';
|
|
14
15
|
// ---------------------------------------------------------------------------
|
|
15
16
|
/**
|
|
16
17
|
* @class derive
|
package/js/src/ellipx.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/ellipx.js';
|
|
2
|
-
import { Str, Int, int, Dict, Num, Market, Ticker, OrderBook, OHLCV, Currencies, Trade, Balances, OrderType, OrderSide, Order, DepositAddress, TradingFeeInterface, Transaction } from '
|
|
2
|
+
import { Str, Int, int, Dict, Num, Market, Ticker, OrderBook, OHLCV, Currencies, Trade, Balances, OrderType, OrderSide, Order, DepositAddress, TradingFeeInterface, Transaction } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class ellipx
|
|
5
5
|
* @augments Exchange
|
package/js/src/ellipx.js
CHANGED
|
@@ -7,13 +7,11 @@
|
|
|
7
7
|
// ---------------------------------------------------------------------------
|
|
8
8
|
import Exchange from './abstract/ellipx.js';
|
|
9
9
|
import { AuthenticationError, BadRequest, DDoSProtection, ExchangeError, PermissionDenied, NotSupported, ArgumentsRequired } from './base/errors.js';
|
|
10
|
-
// import { Precise } from './base/Precise.js';
|
|
11
|
-
import { TICK_SIZE } from './base/functions/number.js';
|
|
12
|
-
// import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
|
|
13
|
-
import { Precise } from '../ccxt.js';
|
|
14
|
-
import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
|
|
15
10
|
import { ed25519 } from './static_dependencies/noble-curves/ed25519.js';
|
|
16
11
|
import { eddsa } from './base/functions/crypto.js';
|
|
12
|
+
import { Precise } from './base/Precise.js';
|
|
13
|
+
import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
|
|
14
|
+
import { TICK_SIZE } from './base/functions/number.js';
|
|
17
15
|
// ---------------------------------------------------------------------------
|
|
18
16
|
/**
|
|
19
17
|
* @class ellipx
|