ccxt 4.3.23 → 4.3.24
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 +5 -5
- package/dist/cjs/ccxt.js +9 -6
- package/dist/cjs/src/base/Exchange.js +4 -3
- package/dist/cjs/src/bitrue.js +6 -1
- package/dist/cjs/src/coinbaseadvanced.js +17 -0
- package/dist/cjs/src/{coinbasepro.js → coinbaseexchange.js} +40 -40
- package/dist/cjs/src/coinex.js +41 -76
- package/dist/cjs/src/kucoin.js +1 -0
- package/dist/cjs/src/pro/bitget.js +12 -3
- package/dist/cjs/src/pro/{coinbasepro.js → coinbaseexchange.js} +13 -13
- package/js/ccxt.d.ts +11 -8
- package/js/ccxt.js +8 -6
- package/js/src/abstract/coinbaseadvanced.d.ts +97 -0
- package/js/src/abstract/coinbaseadvanced.js +11 -0
- package/js/src/base/Exchange.js +4 -3
- package/js/src/bitrue.js +6 -1
- package/js/src/coinbaseadvanced.d.ts +4 -0
- package/js/src/coinbaseadvanced.js +18 -0
- package/js/src/{coinbasepro.d.ts → coinbaseexchange.d.ts} +3 -3
- package/js/src/{coinbasepro.js → coinbaseexchange.js} +39 -39
- package/js/src/coinex.d.ts +1 -1
- package/js/src/coinex.js +41 -76
- package/js/src/kucoin.js +1 -0
- package/js/src/pro/bitget.js +12 -3
- package/js/src/pro/{coinbasepro.d.ts → coinbaseexchange.d.ts} +2 -2
- package/js/src/pro/{coinbasepro.js → coinbaseexchange.js} +12 -12
- package/package.json +1 -1
- /package/dist/cjs/src/abstract/{coinbasepro.js → coinbaseexchange.js} +0 -0
- /package/js/src/abstract/{coinbasepro.d.ts → coinbaseexchange.d.ts} +0 -0
- /package/js/src/abstract/{coinbasepro.js → coinbaseexchange.js} +0 -0
|
@@ -1123,7 +1123,7 @@ class bitget extends bitget$1 {
|
|
|
1123
1123
|
// "executePrice": "35123", // this is limit price
|
|
1124
1124
|
// "triggerType": "fill_price",
|
|
1125
1125
|
// "planType": "amount",
|
|
1126
|
-
// #### in case order had fill: ####
|
|
1126
|
+
// #### in case order had a partial fill: ####
|
|
1127
1127
|
// fillPrice: '35123',
|
|
1128
1128
|
// tradeId: '1171775539946528779',
|
|
1129
1129
|
// baseVolume: '7', // field present in market order
|
|
@@ -1243,6 +1243,8 @@ class bitget extends bitget$1 {
|
|
|
1243
1243
|
let totalAmount = undefined;
|
|
1244
1244
|
let filledAmount = undefined;
|
|
1245
1245
|
let cost = undefined;
|
|
1246
|
+
let remaining = undefined;
|
|
1247
|
+
const totalFilled = this.safeString(order, 'accBaseVolume');
|
|
1246
1248
|
if (isSpot) {
|
|
1247
1249
|
if (isMargin) {
|
|
1248
1250
|
filledAmount = this.omitZero(this.safeString(order, 'fillTotalAmount'));
|
|
@@ -1250,7 +1252,13 @@ class bitget extends bitget$1 {
|
|
|
1250
1252
|
cost = this.safeString(order, 'quoteSize');
|
|
1251
1253
|
}
|
|
1252
1254
|
else {
|
|
1253
|
-
|
|
1255
|
+
const partialFillAmount = this.safeString(order, 'baseVolume');
|
|
1256
|
+
if (partialFillAmount !== undefined) {
|
|
1257
|
+
filledAmount = partialFillAmount;
|
|
1258
|
+
}
|
|
1259
|
+
else {
|
|
1260
|
+
filledAmount = totalFilled;
|
|
1261
|
+
}
|
|
1254
1262
|
if (isMarketOrder) {
|
|
1255
1263
|
if (isBuy) {
|
|
1256
1264
|
totalAmount = accBaseVolume;
|
|
@@ -1273,6 +1281,7 @@ class bitget extends bitget$1 {
|
|
|
1273
1281
|
totalAmount = this.safeString(order, 'size');
|
|
1274
1282
|
cost = this.safeString(order, 'fillNotionalUsd');
|
|
1275
1283
|
}
|
|
1284
|
+
remaining = this.omitZero(Precise["default"].stringSub(totalAmount, totalFilled));
|
|
1276
1285
|
return this.safeOrder({
|
|
1277
1286
|
'info': order,
|
|
1278
1287
|
'symbol': symbol,
|
|
@@ -1291,7 +1300,7 @@ class bitget extends bitget$1 {
|
|
|
1291
1300
|
'cost': cost,
|
|
1292
1301
|
'average': avgPrice,
|
|
1293
1302
|
'filled': filledAmount,
|
|
1294
|
-
'remaining':
|
|
1303
|
+
'remaining': remaining,
|
|
1295
1304
|
'status': this.parseWsOrderStatus(rawStatus),
|
|
1296
1305
|
'fee': feeObject,
|
|
1297
1306
|
'trades': undefined,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var coinbaseexchange$1 = require('../coinbaseexchange.js');
|
|
4
4
|
var errors = require('../base/errors.js');
|
|
5
5
|
var Cache = require('../base/ws/Cache.js');
|
|
6
6
|
var sha256 = require('../static_dependencies/noble-hashes/sha256.js');
|
|
7
7
|
|
|
8
8
|
// ---------------------------------------------------------------------------
|
|
9
9
|
// ---------------------------------------------------------------------------
|
|
10
|
-
class
|
|
10
|
+
class coinbaseexchange extends coinbaseexchange$1 {
|
|
11
11
|
describe() {
|
|
12
12
|
return this.deepExtend(super.describe(), {
|
|
13
13
|
'has': {
|
|
@@ -28,7 +28,7 @@ class coinbasepro extends coinbasepro$1 {
|
|
|
28
28
|
},
|
|
29
29
|
'urls': {
|
|
30
30
|
'api': {
|
|
31
|
-
'ws': 'wss://ws-feed.
|
|
31
|
+
'ws': 'wss://ws-feed.exchange.coinbase.com',
|
|
32
32
|
},
|
|
33
33
|
'test': {
|
|
34
34
|
'ws': 'wss://ws-feed-public.sandbox.exchange.coinbase.com',
|
|
@@ -109,7 +109,7 @@ class coinbasepro extends coinbasepro$1 {
|
|
|
109
109
|
async watchTicker(symbol, params = {}) {
|
|
110
110
|
/**
|
|
111
111
|
* @method
|
|
112
|
-
* @name
|
|
112
|
+
* @name coinbaseexchange#watchTicker
|
|
113
113
|
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
114
114
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
115
115
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -121,7 +121,7 @@ class coinbasepro extends coinbasepro$1 {
|
|
|
121
121
|
async watchTickers(symbols = undefined, params = {}) {
|
|
122
122
|
/**
|
|
123
123
|
* @method
|
|
124
|
-
* @name
|
|
124
|
+
* @name coinbaseexchange#watchTickers
|
|
125
125
|
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
|
|
126
126
|
* @param {string[]} [symbols] unified symbol of the market to fetch the ticker for
|
|
127
127
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -146,7 +146,7 @@ class coinbasepro extends coinbasepro$1 {
|
|
|
146
146
|
async watchTrades(symbol, since = undefined, limit = undefined, params = {}) {
|
|
147
147
|
/**
|
|
148
148
|
* @method
|
|
149
|
-
* @name
|
|
149
|
+
* @name coinbaseexchange#watchTrades
|
|
150
150
|
* @description get the list of most recent trades for a particular symbol
|
|
151
151
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
152
152
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
@@ -192,7 +192,7 @@ class coinbasepro extends coinbasepro$1 {
|
|
|
192
192
|
async watchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
193
193
|
/**
|
|
194
194
|
* @method
|
|
195
|
-
* @name
|
|
195
|
+
* @name coinbaseexchange#watchMyTrades
|
|
196
196
|
* @description watches information on multiple trades made by the user
|
|
197
197
|
* @param {string} symbol unified market symbol of the market trades were made in
|
|
198
198
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
@@ -217,7 +217,7 @@ class coinbasepro extends coinbasepro$1 {
|
|
|
217
217
|
async watchMyTradesForSymbols(symbols = undefined, since = undefined, limit = undefined, params = {}) {
|
|
218
218
|
/**
|
|
219
219
|
* @method
|
|
220
|
-
* @name
|
|
220
|
+
* @name coinbaseexchange#watchMyTradesForSymbols
|
|
221
221
|
* @description watches information on multiple trades made by the user
|
|
222
222
|
* @param {string[]} symbols unified symbol of the market to fetch trades for
|
|
223
223
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
@@ -241,7 +241,7 @@ class coinbasepro extends coinbasepro$1 {
|
|
|
241
241
|
async watchOrdersForSymbols(symbols = undefined, since = undefined, limit = undefined, params = {}) {
|
|
242
242
|
/**
|
|
243
243
|
* @method
|
|
244
|
-
* @name
|
|
244
|
+
* @name coinbaseexchange#watchOrdersForSymbols
|
|
245
245
|
* @description watches information on multiple orders made by the user
|
|
246
246
|
* @param {string[]} symbols unified symbol of the market to fetch orders for
|
|
247
247
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
@@ -265,7 +265,7 @@ class coinbasepro extends coinbasepro$1 {
|
|
|
265
265
|
async watchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
266
266
|
/**
|
|
267
267
|
* @method
|
|
268
|
-
* @name
|
|
268
|
+
* @name coinbaseexchange#watchOrders
|
|
269
269
|
* @description watches information on multiple orders made by the user
|
|
270
270
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
271
271
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
@@ -290,7 +290,7 @@ class coinbasepro extends coinbasepro$1 {
|
|
|
290
290
|
async watchOrderBookForSymbols(symbols, limit = undefined, params = {}) {
|
|
291
291
|
/**
|
|
292
292
|
* @method
|
|
293
|
-
* @name
|
|
293
|
+
* @name coinbaseexchange#watchOrderBookForSymbols
|
|
294
294
|
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
295
295
|
* @param {string[]} symbols unified array of symbols
|
|
296
296
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
@@ -332,7 +332,7 @@ class coinbasepro extends coinbasepro$1 {
|
|
|
332
332
|
async watchOrderBook(symbol, limit = undefined, params = {}) {
|
|
333
333
|
/**
|
|
334
334
|
* @method
|
|
335
|
-
* @name
|
|
335
|
+
* @name coinbaseexchange#watchOrderBook
|
|
336
336
|
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
337
337
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
338
338
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
@@ -965,4 +965,4 @@ class coinbasepro extends coinbasepro$1 {
|
|
|
965
965
|
}
|
|
966
966
|
}
|
|
967
967
|
|
|
968
|
-
module.exports =
|
|
968
|
+
module.exports = coinbaseexchange;
|
package/js/ccxt.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import * as functions from './src/base/functions.js';
|
|
|
4
4
|
import * as errors from './src/base/errors.js';
|
|
5
5
|
import type { Market, Trade, Fee, Ticker, OrderBook, Order, Transaction, Tickers, Currency, Balance, DepositAddress, WithdrawalResponse, DepositAddressResponse, OHLCV, Balances, PartialBalances, Dictionary, MinMax, Position, FundingRateHistory, Liquidation, FundingHistory, MarginMode, Greeks, Leverage, Leverages, Option, OptionChain, Conversion } from './src/base/types.js';
|
|
6
6
|
import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, ProxyError, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout } from './src/base/errors.js';
|
|
7
|
-
declare const version = "4.3.
|
|
7
|
+
declare const version = "4.3.23";
|
|
8
8
|
import ace from './src/ace.js';
|
|
9
9
|
import alpaca from './src/alpaca.js';
|
|
10
10
|
import ascendex from './src/ascendex.js';
|
|
@@ -44,8 +44,9 @@ import btcturk from './src/btcturk.js';
|
|
|
44
44
|
import bybit from './src/bybit.js';
|
|
45
45
|
import cex from './src/cex.js';
|
|
46
46
|
import coinbase from './src/coinbase.js';
|
|
47
|
+
import coinbaseadvanced from './src/coinbaseadvanced.js';
|
|
48
|
+
import coinbaseexchange from './src/coinbaseexchange.js';
|
|
47
49
|
import coinbaseinternational from './src/coinbaseinternational.js';
|
|
48
|
-
import coinbasepro from './src/coinbasepro.js';
|
|
49
50
|
import coincheck from './src/coincheck.js';
|
|
50
51
|
import coinex from './src/coinex.js';
|
|
51
52
|
import coinlist from './src/coinlist.js';
|
|
@@ -133,8 +134,8 @@ import blockchaincomPro from './src/pro/blockchaincom.js';
|
|
|
133
134
|
import bybitPro from './src/pro/bybit.js';
|
|
134
135
|
import cexPro from './src/pro/cex.js';
|
|
135
136
|
import coinbasePro from './src/pro/coinbase.js';
|
|
137
|
+
import coinbaseexchangePro from './src/pro/coinbaseexchange.js';
|
|
136
138
|
import coinbaseinternationalPro from './src/pro/coinbaseinternational.js';
|
|
137
|
-
import coinbaseproPro from './src/pro/coinbasepro.js';
|
|
138
139
|
import coincheckPro from './src/pro/coincheck.js';
|
|
139
140
|
import coinexPro from './src/pro/coinex.js';
|
|
140
141
|
import coinonePro from './src/pro/coinone.js';
|
|
@@ -214,8 +215,9 @@ declare const exchanges: {
|
|
|
214
215
|
bybit: typeof bybit;
|
|
215
216
|
cex: typeof cex;
|
|
216
217
|
coinbase: typeof coinbase;
|
|
218
|
+
coinbaseadvanced: typeof coinbaseadvanced;
|
|
219
|
+
coinbaseexchange: typeof coinbaseexchange;
|
|
217
220
|
coinbaseinternational: typeof coinbaseinternational;
|
|
218
|
-
coinbasepro: typeof coinbasepro;
|
|
219
221
|
coincheck: typeof coincheck;
|
|
220
222
|
coinex: typeof coinex;
|
|
221
223
|
coinlist: typeof coinlist;
|
|
@@ -305,8 +307,8 @@ declare const pro: {
|
|
|
305
307
|
bybit: typeof bybitPro;
|
|
306
308
|
cex: typeof cexPro;
|
|
307
309
|
coinbase: typeof coinbasePro;
|
|
310
|
+
coinbaseexchange: typeof coinbaseexchangePro;
|
|
308
311
|
coinbaseinternational: typeof coinbaseinternationalPro;
|
|
309
|
-
coinbasepro: typeof coinbaseproPro;
|
|
310
312
|
coincheck: typeof coincheckPro;
|
|
311
313
|
coinex: typeof coinexPro;
|
|
312
314
|
coinone: typeof coinonePro;
|
|
@@ -377,8 +379,8 @@ declare const ccxt: {
|
|
|
377
379
|
bybit: typeof bybitPro;
|
|
378
380
|
cex: typeof cexPro;
|
|
379
381
|
coinbase: typeof coinbasePro;
|
|
382
|
+
coinbaseexchange: typeof coinbaseexchangePro;
|
|
380
383
|
coinbaseinternational: typeof coinbaseinternationalPro;
|
|
381
|
-
coinbasepro: typeof coinbaseproPro;
|
|
382
384
|
coincheck: typeof coincheckPro;
|
|
383
385
|
coinex: typeof coinexPro;
|
|
384
386
|
coinone: typeof coinonePro;
|
|
@@ -459,8 +461,9 @@ declare const ccxt: {
|
|
|
459
461
|
bybit: typeof bybit;
|
|
460
462
|
cex: typeof cex;
|
|
461
463
|
coinbase: typeof coinbase;
|
|
464
|
+
coinbaseadvanced: typeof coinbaseadvanced;
|
|
465
|
+
coinbaseexchange: typeof coinbaseexchange;
|
|
462
466
|
coinbaseinternational: typeof coinbaseinternational;
|
|
463
|
-
coinbasepro: typeof coinbasepro;
|
|
464
467
|
coincheck: typeof coincheck;
|
|
465
468
|
coinex: typeof coinex;
|
|
466
469
|
coinlist: typeof coinlist;
|
|
@@ -525,5 +528,5 @@ declare const ccxt: {
|
|
|
525
528
|
zaif: typeof zaif;
|
|
526
529
|
zonda: typeof zonda;
|
|
527
530
|
} & typeof functions & typeof errors;
|
|
528
|
-
export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, ProxyError, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, Market, Trade, Fee, Ticker, OrderBook, Order, Transaction, Tickers, Currency, Balance, DepositAddress, WithdrawalResponse, DepositAddressResponse, OHLCV, Balances, PartialBalances, Dictionary, MinMax, Position, FundingRateHistory, Liquidation, FundingHistory, MarginMode, Greeks, Leverage, Leverages, Option, OptionChain, Conversion, ace, alpaca, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbay, bitbns, bitcoincom, bitfinex, bitfinex2, bitflyer, bitget, bithumb, bitmart, bitmex, bitopro, bitpanda, bitrue, bitso, bitstamp, bitteam, bitvavo, bl3p, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, cex, coinbase,
|
|
531
|
+
export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, ProxyError, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, Market, Trade, Fee, Ticker, OrderBook, Order, Transaction, Tickers, Currency, Balance, DepositAddress, WithdrawalResponse, DepositAddressResponse, OHLCV, Balances, PartialBalances, Dictionary, MinMax, Position, FundingRateHistory, Liquidation, FundingHistory, MarginMode, Greeks, Leverage, Leverages, Option, OptionChain, Conversion, ace, alpaca, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbay, bitbns, bitcoincom, bitfinex, bitfinex2, bitflyer, bitget, bithumb, bitmart, bitmex, bitopro, bitpanda, bitrue, bitso, bitstamp, bitteam, bitvavo, bl3p, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, cex, coinbase, coinbaseadvanced, coinbaseexchange, coinbaseinternational, coincheck, coinex, coinlist, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, currencycom, delta, deribit, digifinex, exmo, fmfwio, gate, gateio, gemini, hitbtc, hitbtc3, hollaex, htx, huobi, huobijp, hyperliquid, idex, independentreserve, indodax, kraken, krakenfutures, kucoin, kucoinfutures, kuna, latoken, lbank, luno, lykke, mercado, mexc, ndax, novadax, oceanex, okcoin, okx, onetrading, p2b, paymium, phemex, poloniex, poloniexfutures, probit, timex, tokocrypto, tradeogre, upbit, wavesexchange, wazirx, whitebit, woo, woofipro, yobit, zaif, zonda, };
|
|
529
532
|
export default ccxt;
|
package/js/ccxt.js
CHANGED
|
@@ -38,7 +38,7 @@ import * as errors from './src/base/errors.js';
|
|
|
38
38
|
import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, ProxyError, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout } from './src/base/errors.js';
|
|
39
39
|
//-----------------------------------------------------------------------------
|
|
40
40
|
// this is updated by vss.js when building
|
|
41
|
-
const version = '4.3.
|
|
41
|
+
const version = '4.3.24';
|
|
42
42
|
Exchange.ccxtVersion = version;
|
|
43
43
|
//-----------------------------------------------------------------------------
|
|
44
44
|
import ace from './src/ace.js';
|
|
@@ -80,8 +80,9 @@ import btcturk from './src/btcturk.js';
|
|
|
80
80
|
import bybit from './src/bybit.js';
|
|
81
81
|
import cex from './src/cex.js';
|
|
82
82
|
import coinbase from './src/coinbase.js';
|
|
83
|
+
import coinbaseadvanced from './src/coinbaseadvanced.js';
|
|
84
|
+
import coinbaseexchange from './src/coinbaseexchange.js';
|
|
83
85
|
import coinbaseinternational from './src/coinbaseinternational.js';
|
|
84
|
-
import coinbasepro from './src/coinbasepro.js';
|
|
85
86
|
import coincheck from './src/coincheck.js';
|
|
86
87
|
import coinex from './src/coinex.js';
|
|
87
88
|
import coinlist from './src/coinlist.js';
|
|
@@ -170,8 +171,8 @@ import blockchaincomPro from './src/pro/blockchaincom.js';
|
|
|
170
171
|
import bybitPro from './src/pro/bybit.js';
|
|
171
172
|
import cexPro from './src/pro/cex.js';
|
|
172
173
|
import coinbasePro from './src/pro/coinbase.js';
|
|
174
|
+
import coinbaseexchangePro from './src/pro/coinbaseexchange.js';
|
|
173
175
|
import coinbaseinternationalPro from './src/pro/coinbaseinternational.js';
|
|
174
|
-
import coinbaseproPro from './src/pro/coinbasepro.js';
|
|
175
176
|
import coincheckPro from './src/pro/coincheck.js';
|
|
176
177
|
import coinexPro from './src/pro/coinex.js';
|
|
177
178
|
import coinonePro from './src/pro/coinone.js';
|
|
@@ -251,8 +252,9 @@ const exchanges = {
|
|
|
251
252
|
'bybit': bybit,
|
|
252
253
|
'cex': cex,
|
|
253
254
|
'coinbase': coinbase,
|
|
255
|
+
'coinbaseadvanced': coinbaseadvanced,
|
|
256
|
+
'coinbaseexchange': coinbaseexchange,
|
|
254
257
|
'coinbaseinternational': coinbaseinternational,
|
|
255
|
-
'coinbasepro': coinbasepro,
|
|
256
258
|
'coincheck': coincheck,
|
|
257
259
|
'coinex': coinex,
|
|
258
260
|
'coinlist': coinlist,
|
|
@@ -342,8 +344,8 @@ const pro = {
|
|
|
342
344
|
'bybit': bybitPro,
|
|
343
345
|
'cex': cexPro,
|
|
344
346
|
'coinbase': coinbasePro,
|
|
347
|
+
'coinbaseexchange': coinbaseexchangePro,
|
|
345
348
|
'coinbaseinternational': coinbaseinternationalPro,
|
|
346
|
-
'coinbasepro': coinbaseproPro,
|
|
347
349
|
'coincheck': coincheckPro,
|
|
348
350
|
'coinex': coinexPro,
|
|
349
351
|
'coinone': coinonePro,
|
|
@@ -396,6 +398,6 @@ pro.exchanges = Object.keys(pro);
|
|
|
396
398
|
pro['Exchange'] = Exchange; // now the same for rest and ts
|
|
397
399
|
//-----------------------------------------------------------------------------
|
|
398
400
|
const ccxt = Object.assign({ version, Exchange, Precise, 'exchanges': Object.keys(exchanges), 'pro': pro }, exchanges, functions, errors);
|
|
399
|
-
export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, ProxyError, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, ace, alpaca, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbay, bitbns, bitcoincom, bitfinex, bitfinex2, bitflyer, bitget, bithumb, bitmart, bitmex, bitopro, bitpanda, bitrue, bitso, bitstamp, bitteam, bitvavo, bl3p, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, cex, coinbase,
|
|
401
|
+
export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, ProxyError, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, ace, alpaca, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbay, bitbns, bitcoincom, bitfinex, bitfinex2, bitflyer, bitget, bithumb, bitmart, bitmex, bitopro, bitpanda, bitrue, bitso, bitstamp, bitteam, bitvavo, bl3p, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, cex, coinbase, coinbaseadvanced, coinbaseexchange, coinbaseinternational, coincheck, coinex, coinlist, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, currencycom, delta, deribit, digifinex, exmo, fmfwio, gate, gateio, gemini, hitbtc, hitbtc3, hollaex, htx, huobi, huobijp, hyperliquid, idex, independentreserve, indodax, kraken, krakenfutures, kucoin, kucoinfutures, kuna, latoken, lbank, luno, lykke, mercado, mexc, ndax, novadax, oceanex, okcoin, okx, onetrading, p2b, paymium, phemex, poloniex, poloniexfutures, probit, timex, tokocrypto, tradeogre, upbit, wavesexchange, wazirx, whitebit, woo, woofipro, yobit, zaif, zonda, };
|
|
400
402
|
export default ccxt;
|
|
401
403
|
//-----------------------------------------------------------------------------
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { implicitReturnType } from '../base/types.js';
|
|
2
|
+
import _coinbase from '../coinbase.js';
|
|
3
|
+
interface coinbase {
|
|
4
|
+
v2PublicGetCurrencies(params?: {}): Promise<implicitReturnType>;
|
|
5
|
+
v2PublicGetCurrenciesCrypto(params?: {}): Promise<implicitReturnType>;
|
|
6
|
+
v2PublicGetTime(params?: {}): Promise<implicitReturnType>;
|
|
7
|
+
v2PublicGetExchangeRates(params?: {}): Promise<implicitReturnType>;
|
|
8
|
+
v2PublicGetUsersUserId(params?: {}): Promise<implicitReturnType>;
|
|
9
|
+
v2PublicGetPricesSymbolBuy(params?: {}): Promise<implicitReturnType>;
|
|
10
|
+
v2PublicGetPricesSymbolSell(params?: {}): Promise<implicitReturnType>;
|
|
11
|
+
v2PublicGetPricesSymbolSpot(params?: {}): Promise<implicitReturnType>;
|
|
12
|
+
v2PrivateGetAccounts(params?: {}): Promise<implicitReturnType>;
|
|
13
|
+
v2PrivateGetAccountsAccountId(params?: {}): Promise<implicitReturnType>;
|
|
14
|
+
v2PrivateGetAccountsAccountIdAddresses(params?: {}): Promise<implicitReturnType>;
|
|
15
|
+
v2PrivateGetAccountsAccountIdAddressesAddressId(params?: {}): Promise<implicitReturnType>;
|
|
16
|
+
v2PrivateGetAccountsAccountIdAddressesAddressIdTransactions(params?: {}): Promise<implicitReturnType>;
|
|
17
|
+
v2PrivateGetAccountsAccountIdTransactions(params?: {}): Promise<implicitReturnType>;
|
|
18
|
+
v2PrivateGetAccountsAccountIdTransactionsTransactionId(params?: {}): Promise<implicitReturnType>;
|
|
19
|
+
v2PrivateGetAccountsAccountIdBuys(params?: {}): Promise<implicitReturnType>;
|
|
20
|
+
v2PrivateGetAccountsAccountIdBuysBuyId(params?: {}): Promise<implicitReturnType>;
|
|
21
|
+
v2PrivateGetAccountsAccountIdSells(params?: {}): Promise<implicitReturnType>;
|
|
22
|
+
v2PrivateGetAccountsAccountIdSellsSellId(params?: {}): Promise<implicitReturnType>;
|
|
23
|
+
v2PrivateGetAccountsAccountIdDeposits(params?: {}): Promise<implicitReturnType>;
|
|
24
|
+
v2PrivateGetAccountsAccountIdDepositsDepositId(params?: {}): Promise<implicitReturnType>;
|
|
25
|
+
v2PrivateGetAccountsAccountIdWithdrawals(params?: {}): Promise<implicitReturnType>;
|
|
26
|
+
v2PrivateGetAccountsAccountIdWithdrawalsWithdrawalId(params?: {}): Promise<implicitReturnType>;
|
|
27
|
+
v2PrivateGetPaymentMethods(params?: {}): Promise<implicitReturnType>;
|
|
28
|
+
v2PrivateGetPaymentMethodsPaymentMethodId(params?: {}): Promise<implicitReturnType>;
|
|
29
|
+
v2PrivateGetUser(params?: {}): Promise<implicitReturnType>;
|
|
30
|
+
v2PrivateGetUserAuth(params?: {}): Promise<implicitReturnType>;
|
|
31
|
+
v2PrivatePostAccounts(params?: {}): Promise<implicitReturnType>;
|
|
32
|
+
v2PrivatePostAccountsAccountIdPrimary(params?: {}): Promise<implicitReturnType>;
|
|
33
|
+
v2PrivatePostAccountsAccountIdAddresses(params?: {}): Promise<implicitReturnType>;
|
|
34
|
+
v2PrivatePostAccountsAccountIdTransactions(params?: {}): Promise<implicitReturnType>;
|
|
35
|
+
v2PrivatePostAccountsAccountIdTransactionsTransactionIdComplete(params?: {}): Promise<implicitReturnType>;
|
|
36
|
+
v2PrivatePostAccountsAccountIdTransactionsTransactionIdResend(params?: {}): Promise<implicitReturnType>;
|
|
37
|
+
v2PrivatePostAccountsAccountIdBuys(params?: {}): Promise<implicitReturnType>;
|
|
38
|
+
v2PrivatePostAccountsAccountIdBuysBuyIdCommit(params?: {}): Promise<implicitReturnType>;
|
|
39
|
+
v2PrivatePostAccountsAccountIdSells(params?: {}): Promise<implicitReturnType>;
|
|
40
|
+
v2PrivatePostAccountsAccountIdSellsSellIdCommit(params?: {}): Promise<implicitReturnType>;
|
|
41
|
+
v2PrivatePostAccountsAccountIdDeposits(params?: {}): Promise<implicitReturnType>;
|
|
42
|
+
v2PrivatePostAccountsAccountIdDepositsDepositIdCommit(params?: {}): Promise<implicitReturnType>;
|
|
43
|
+
v2PrivatePostAccountsAccountIdWithdrawals(params?: {}): Promise<implicitReturnType>;
|
|
44
|
+
v2PrivatePostAccountsAccountIdWithdrawalsWithdrawalIdCommit(params?: {}): Promise<implicitReturnType>;
|
|
45
|
+
v2PrivatePutAccountsAccountId(params?: {}): Promise<implicitReturnType>;
|
|
46
|
+
v2PrivatePutUser(params?: {}): Promise<implicitReturnType>;
|
|
47
|
+
v2PrivateDeleteAccountsId(params?: {}): Promise<implicitReturnType>;
|
|
48
|
+
v2PrivateDeleteAccountsAccountIdTransactionsTransactionId(params?: {}): Promise<implicitReturnType>;
|
|
49
|
+
v3PublicGetBrokerageTime(params?: {}): Promise<implicitReturnType>;
|
|
50
|
+
v3PublicGetBrokerageMarketProductBook(params?: {}): Promise<implicitReturnType>;
|
|
51
|
+
v3PublicGetBrokerageMarketProducts(params?: {}): Promise<implicitReturnType>;
|
|
52
|
+
v3PublicGetBrokerageMarketProductsProductId(params?: {}): Promise<implicitReturnType>;
|
|
53
|
+
v3PublicGetBrokerageMarketProductsProductIdCandles(params?: {}): Promise<implicitReturnType>;
|
|
54
|
+
v3PublicGetBrokerageMarketProductsProductIdTicker(params?: {}): Promise<implicitReturnType>;
|
|
55
|
+
v3PrivateGetBrokerageAccounts(params?: {}): Promise<implicitReturnType>;
|
|
56
|
+
v3PrivateGetBrokerageAccountsAccountUuid(params?: {}): Promise<implicitReturnType>;
|
|
57
|
+
v3PrivateGetBrokerageOrdersHistoricalBatch(params?: {}): Promise<implicitReturnType>;
|
|
58
|
+
v3PrivateGetBrokerageOrdersHistoricalFills(params?: {}): Promise<implicitReturnType>;
|
|
59
|
+
v3PrivateGetBrokerageOrdersHistoricalOrderId(params?: {}): Promise<implicitReturnType>;
|
|
60
|
+
v3PrivateGetBrokerageProducts(params?: {}): Promise<implicitReturnType>;
|
|
61
|
+
v3PrivateGetBrokerageProductsProductId(params?: {}): Promise<implicitReturnType>;
|
|
62
|
+
v3PrivateGetBrokerageProductsProductIdCandles(params?: {}): Promise<implicitReturnType>;
|
|
63
|
+
v3PrivateGetBrokerageProductsProductIdTicker(params?: {}): Promise<implicitReturnType>;
|
|
64
|
+
v3PrivateGetBrokerageBestBidAsk(params?: {}): Promise<implicitReturnType>;
|
|
65
|
+
v3PrivateGetBrokerageProductBook(params?: {}): Promise<implicitReturnType>;
|
|
66
|
+
v3PrivateGetBrokerageTransactionSummary(params?: {}): Promise<implicitReturnType>;
|
|
67
|
+
v3PrivateGetBrokeragePortfolios(params?: {}): Promise<implicitReturnType>;
|
|
68
|
+
v3PrivateGetBrokeragePortfoliosPortfolioUuid(params?: {}): Promise<implicitReturnType>;
|
|
69
|
+
v3PrivateGetBrokerageConvertTradeTradeId(params?: {}): Promise<implicitReturnType>;
|
|
70
|
+
v3PrivateGetBrokerageCfmBalanceSummary(params?: {}): Promise<implicitReturnType>;
|
|
71
|
+
v3PrivateGetBrokerageCfmPositions(params?: {}): Promise<implicitReturnType>;
|
|
72
|
+
v3PrivateGetBrokerageCfmPositionsProductId(params?: {}): Promise<implicitReturnType>;
|
|
73
|
+
v3PrivateGetBrokerageCfmSweeps(params?: {}): Promise<implicitReturnType>;
|
|
74
|
+
v3PrivateGetBrokerageIntxPortfolioPortfolioUuid(params?: {}): Promise<implicitReturnType>;
|
|
75
|
+
v3PrivateGetBrokerageIntxPositionsPortfolioUuid(params?: {}): Promise<implicitReturnType>;
|
|
76
|
+
v3PrivateGetBrokerageIntxPositionsPortfolioUuidSymbol(params?: {}): Promise<implicitReturnType>;
|
|
77
|
+
v3PrivateGetBrokeragePaymentMethods(params?: {}): Promise<implicitReturnType>;
|
|
78
|
+
v3PrivateGetBrokeragePaymentMethodsPaymentMethodId(params?: {}): Promise<implicitReturnType>;
|
|
79
|
+
v3PrivatePostBrokerageOrders(params?: {}): Promise<implicitReturnType>;
|
|
80
|
+
v3PrivatePostBrokerageOrdersBatchCancel(params?: {}): Promise<implicitReturnType>;
|
|
81
|
+
v3PrivatePostBrokerageOrdersEdit(params?: {}): Promise<implicitReturnType>;
|
|
82
|
+
v3PrivatePostBrokerageOrdersEditPreview(params?: {}): Promise<implicitReturnType>;
|
|
83
|
+
v3PrivatePostBrokerageOrdersPreview(params?: {}): Promise<implicitReturnType>;
|
|
84
|
+
v3PrivatePostBrokeragePortfolios(params?: {}): Promise<implicitReturnType>;
|
|
85
|
+
v3PrivatePostBrokeragePortfoliosMoveFunds(params?: {}): Promise<implicitReturnType>;
|
|
86
|
+
v3PrivatePostBrokerageConvertQuote(params?: {}): Promise<implicitReturnType>;
|
|
87
|
+
v3PrivatePostBrokerageConvertTradeTradeId(params?: {}): Promise<implicitReturnType>;
|
|
88
|
+
v3PrivatePostBrokerageCfmSweepsSchedule(params?: {}): Promise<implicitReturnType>;
|
|
89
|
+
v3PrivatePostBrokerageIntxAllocate(params?: {}): Promise<implicitReturnType>;
|
|
90
|
+
v3PrivatePostBrokerageOrdersClosePosition(params?: {}): Promise<implicitReturnType>;
|
|
91
|
+
v3PrivatePutBrokeragePortfoliosPortfolioUuid(params?: {}): Promise<implicitReturnType>;
|
|
92
|
+
v3PrivateDeleteBrokeragePortfoliosPortfolioUuid(params?: {}): Promise<implicitReturnType>;
|
|
93
|
+
v3PrivateDeleteBrokerageCfmSweeps(params?: {}): Promise<implicitReturnType>;
|
|
94
|
+
}
|
|
95
|
+
declare abstract class coinbase extends _coinbase {
|
|
96
|
+
}
|
|
97
|
+
export default coinbase;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// ----------------------------------------------------------------------------
|
|
2
|
+
|
|
3
|
+
// PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
|
|
4
|
+
// https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
|
5
|
+
// EDIT THE CORRESPONDENT .ts FILE INSTEAD
|
|
6
|
+
|
|
7
|
+
// -------------------------------------------------------------------------------
|
|
8
|
+
import _coinbase from '../coinbase.js';
|
|
9
|
+
class coinbase extends _coinbase {
|
|
10
|
+
}
|
|
11
|
+
export default coinbase;
|
package/js/src/base/Exchange.js
CHANGED
|
@@ -230,7 +230,7 @@ export default class Exchange {
|
|
|
230
230
|
// }
|
|
231
231
|
// }
|
|
232
232
|
//
|
|
233
|
-
this.options = this.getDefaultOptions(); // exchange-specific options
|
|
233
|
+
this.options = this.getDefaultOptions(); // exchange-specific options if any
|
|
234
234
|
// fetch implementation options (JS only)
|
|
235
235
|
// http properties
|
|
236
236
|
this.headers = {};
|
|
@@ -5944,8 +5944,9 @@ export default class Exchange {
|
|
|
5944
5944
|
errors = 0;
|
|
5945
5945
|
const responseLength = response.length;
|
|
5946
5946
|
if (this.verbose) {
|
|
5947
|
-
const
|
|
5948
|
-
const
|
|
5947
|
+
const cursorString = (cursorValue === undefined) ? '' : cursorValue;
|
|
5948
|
+
const iteration = (i + 1);
|
|
5949
|
+
const cursorMessage = 'Cursor pagination call ' + iteration.toString() + ' method ' + method + ' response length ' + responseLength.toString() + ' cursor ' + cursorString;
|
|
5949
5950
|
this.log(cursorMessage);
|
|
5950
5951
|
}
|
|
5951
5952
|
if (responseLength === 0) {
|
package/js/src/bitrue.js
CHANGED
|
@@ -3145,6 +3145,11 @@ export default class bitrue extends Exchange {
|
|
|
3145
3145
|
signPath = signPath + '/' + version + '/' + path;
|
|
3146
3146
|
let signMessage = timestamp + method + signPath;
|
|
3147
3147
|
if (method === 'GET') {
|
|
3148
|
+
const keys = Object.keys(params);
|
|
3149
|
+
const keysLength = keys.length;
|
|
3150
|
+
if (keysLength > 0) {
|
|
3151
|
+
signMessage += '?' + this.urlencode(params);
|
|
3152
|
+
}
|
|
3148
3153
|
const signature = this.hmac(this.encode(signMessage), this.encode(this.secret), sha256);
|
|
3149
3154
|
headers = {
|
|
3150
3155
|
'X-CH-APIKEY': this.apiKey,
|
|
@@ -3158,7 +3163,7 @@ export default class bitrue extends Exchange {
|
|
|
3158
3163
|
'recvWindow': recvWindow,
|
|
3159
3164
|
}, params);
|
|
3160
3165
|
body = this.json(query);
|
|
3161
|
-
signMessage
|
|
3166
|
+
signMessage += body;
|
|
3162
3167
|
const signature = this.hmac(this.encode(signMessage), this.encode(this.secret), sha256);
|
|
3163
3168
|
headers = {
|
|
3164
3169
|
'Content-Type': 'application/json',
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// ----------------------------------------------------------------------------
|
|
2
|
+
|
|
3
|
+
// PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
|
|
4
|
+
// https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
|
5
|
+
// EDIT THE CORRESPONDENT .ts FILE INSTEAD
|
|
6
|
+
|
|
7
|
+
// ---------------------------------------------------------------------------
|
|
8
|
+
import coinbase from './coinbase.js';
|
|
9
|
+
// ---------------------------------------------------------------------------
|
|
10
|
+
export default class coinbaseadvanced extends coinbase {
|
|
11
|
+
describe() {
|
|
12
|
+
return this.deepExtend(super.describe(), {
|
|
13
|
+
'id': 'coinbaseadvanced',
|
|
14
|
+
'name': 'Coinbase Advanced',
|
|
15
|
+
'alias': true,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import Exchange from './abstract/
|
|
1
|
+
import Exchange from './abstract/coinbaseexchange.js';
|
|
2
2
|
import type { Int, OrderSide, OrderType, Trade, OHLCV, Order, Balances, Str, Transaction, Ticker, OrderBook, Tickers, Strings, Market, Currency, Num, Account, Currencies, TradingFees, Dict } from './base/types.js';
|
|
3
3
|
/**
|
|
4
|
-
* @class
|
|
4
|
+
* @class coinbaseexchange
|
|
5
5
|
* @augments Exchange
|
|
6
6
|
*/
|
|
7
|
-
export default class
|
|
7
|
+
export default class coinbaseexchange extends Exchange {
|
|
8
8
|
describe(): any;
|
|
9
9
|
fetchCurrencies(params?: {}): Promise<Currencies>;
|
|
10
10
|
fetchMarkets(params?: {}): Promise<Market[]>;
|