ccxt 4.1.91 → 4.1.95
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/CHANGELOG.md +37 -0
- package/README.md +3 -3
- package/dist/ccxt.browser.js +727 -286
- package/dist/ccxt.browser.min.js +7 -7
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/binance.js +11 -9
- package/dist/cjs/src/bingx.js +11 -6
- package/dist/cjs/src/bitget.js +152 -103
- package/dist/cjs/src/bitrue.js +2 -11
- package/dist/cjs/src/bybit.js +1 -0
- package/dist/cjs/src/coinbase.js +44 -2
- package/dist/cjs/src/coinone.js +394 -143
- package/dist/cjs/src/hitbtc.js +41 -0
- package/dist/cjs/src/kucoinfutures.js +22 -6
- package/dist/cjs/src/okx.js +2 -0
- package/dist/cjs/src/pro/bingx.js +44 -5
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bybit.d.ts +1 -0
- package/js/src/abstract/coinbase.d.ts +6 -0
- package/js/src/abstract/coinone.d.ts +44 -2
- package/js/src/abstract/kucoinfutures.d.ts +2 -0
- package/js/src/abstract/okx.d.ts +2 -0
- package/js/src/binance.js +11 -9
- package/js/src/bingx.js +11 -6
- package/js/src/bitget.d.ts +1 -0
- package/js/src/bitget.js +152 -103
- package/js/src/bitrue.js +2 -11
- package/js/src/bybit.js +1 -0
- package/js/src/coinbase.js +44 -2
- package/js/src/coinone.d.ts +1 -0
- package/js/src/coinone.js +394 -143
- package/js/src/hitbtc.d.ts +1 -0
- package/js/src/hitbtc.js +41 -0
- package/js/src/kucoinfutures.js +22 -6
- package/js/src/okx.js +2 -0
- package/js/src/pro/bingx.d.ts +2 -0
- package/js/src/pro/bingx.js +44 -5
- package/package.json +1 -1
- package/skip-tests.json +7 -0
- package/changelog.js +0 -101
package/dist/cjs/src/coinbase.js
CHANGED
|
@@ -197,6 +197,8 @@ class coinbase extends coinbase$1 {
|
|
|
197
197
|
'brokerage/products/{product_id}',
|
|
198
198
|
'brokerage/products/{product_id}/candles',
|
|
199
199
|
'brokerage/products/{product_id}/ticker',
|
|
200
|
+
'brokerage/portfolios',
|
|
201
|
+
'brokerage/portfolios/{portfolio_uuid}',
|
|
200
202
|
'brokerage/transaction_summary',
|
|
201
203
|
'brokerage/product_book',
|
|
202
204
|
'brokerage/best_bid_ask',
|
|
@@ -208,9 +210,17 @@ class coinbase extends coinbase$1 {
|
|
|
208
210
|
'brokerage/orders/batch_cancel',
|
|
209
211
|
'brokerage/orders/edit',
|
|
210
212
|
'brokerage/orders/edit_preview',
|
|
213
|
+
'brokerage/portfolios',
|
|
214
|
+
'brokerage/portfolios/move_funds',
|
|
211
215
|
'brokerage/convert/quote',
|
|
212
216
|
'brokerage/convert/trade/{trade_id}',
|
|
213
217
|
],
|
|
218
|
+
'put': [
|
|
219
|
+
'brokerage/portfolios/{portfolio_uuid}',
|
|
220
|
+
],
|
|
221
|
+
'delete': [
|
|
222
|
+
'brokerage/portfolios/{portfolio_uuid}',
|
|
223
|
+
],
|
|
214
224
|
},
|
|
215
225
|
},
|
|
216
226
|
},
|
|
@@ -266,7 +276,9 @@ class coinbase extends coinbase$1 {
|
|
|
266
276
|
'invalid_scope': errors.AuthenticationError,
|
|
267
277
|
'not_found': errors.ExchangeError,
|
|
268
278
|
'rate_limit_exceeded': errors.RateLimitExceeded,
|
|
269
|
-
'internal_server_error': errors.ExchangeError,
|
|
279
|
+
'internal_server_error': errors.ExchangeError,
|
|
280
|
+
'UNSUPPORTED_ORDER_CONFIGURATION': errors.BadRequest,
|
|
281
|
+
'INSUFFICIENT_FUND': errors.BadRequest,
|
|
270
282
|
},
|
|
271
283
|
'broad': {
|
|
272
284
|
'request timestamp expired': errors.InvalidNonce,
|
|
@@ -2271,6 +2283,8 @@ class coinbase extends coinbase$1 {
|
|
|
2271
2283
|
params = this.omit(params, ['timeInForce', 'triggerPrice', 'stopLossPrice', 'takeProfitPrice', 'stopPrice', 'stop_price', 'stopDirection', 'stop_direction', 'clientOrderId', 'postOnly', 'post_only', 'end_time']);
|
|
2272
2284
|
const response = await this.v3PrivatePostBrokerageOrders(this.extend(request, params));
|
|
2273
2285
|
//
|
|
2286
|
+
// successful order
|
|
2287
|
+
//
|
|
2274
2288
|
// {
|
|
2275
2289
|
// "success": true,
|
|
2276
2290
|
// "failure_reason": "UNKNOWN_FAILURE_REASON",
|
|
@@ -2284,9 +2298,37 @@ class coinbase extends coinbase$1 {
|
|
|
2284
2298
|
// "order_configuration": null
|
|
2285
2299
|
// }
|
|
2286
2300
|
//
|
|
2301
|
+
// failed order
|
|
2302
|
+
//
|
|
2303
|
+
// {
|
|
2304
|
+
// "success": false,
|
|
2305
|
+
// "failure_reason": "UNKNOWN_FAILURE_REASON",
|
|
2306
|
+
// "order_id": "",
|
|
2307
|
+
// "error_response": {
|
|
2308
|
+
// "error": "UNSUPPORTED_ORDER_CONFIGURATION",
|
|
2309
|
+
// "message": "source is not enabled for trading",
|
|
2310
|
+
// "error_details": "",
|
|
2311
|
+
// "new_order_failure_reason": "UNSUPPORTED_ORDER_CONFIGURATION"
|
|
2312
|
+
// },
|
|
2313
|
+
// "order_configuration": {
|
|
2314
|
+
// "limit_limit_gtc": {
|
|
2315
|
+
// "base_size": "100",
|
|
2316
|
+
// "limit_price": "40000",
|
|
2317
|
+
// "post_only": false
|
|
2318
|
+
// }
|
|
2319
|
+
// }
|
|
2320
|
+
// }
|
|
2321
|
+
//
|
|
2287
2322
|
const success = this.safeValue(response, 'success');
|
|
2288
2323
|
if (success !== true) {
|
|
2289
|
-
|
|
2324
|
+
const errorResponse = this.safeValue(response, 'error_response');
|
|
2325
|
+
const errorTitle = this.safeString(errorResponse, 'error');
|
|
2326
|
+
const errorMessage = this.safeString(errorResponse, 'message');
|
|
2327
|
+
if (errorResponse !== undefined) {
|
|
2328
|
+
this.throwExactlyMatchedException(this.exceptions['exact'], errorTitle, errorMessage);
|
|
2329
|
+
this.throwBroadlyMatchedException(this.exceptions['broad'], errorTitle, errorMessage);
|
|
2330
|
+
throw new errors.ExchangeError(errorMessage);
|
|
2331
|
+
}
|
|
2290
2332
|
}
|
|
2291
2333
|
const data = this.safeValue(response, 'success_response', {});
|
|
2292
2334
|
return this.parseOrder(data, market);
|