ccxt 4.0.108 → 4.0.109
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/ccxt.browser.js +139 -19
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/bitfinex2.js +3 -3
- package/dist/cjs/src/bitflyer.js +17 -0
- package/dist/cjs/src/bitget.js +40 -3
- package/dist/cjs/src/bitmart.js +78 -12
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/bitfinex2.js +3 -3
- package/js/src/bitflyer.js +17 -0
- package/js/src/bitget.js +40 -3
- package/js/src/bitmart.js +78 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -214,13 +214,13 @@ console.log(version, Object.keys(exchanges));
|
|
|
214
214
|
|
|
215
215
|
All-in-one browser bundle (dependencies included), served from a CDN of your choice:
|
|
216
216
|
|
|
217
|
-
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.0.
|
|
218
|
-
* unpkg: https://unpkg.com/ccxt@4.0.
|
|
217
|
+
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.0.109/dist/ccxt.browser.js
|
|
218
|
+
* unpkg: https://unpkg.com/ccxt@4.0.109/dist/ccxt.browser.js
|
|
219
219
|
|
|
220
220
|
CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers.
|
|
221
221
|
|
|
222
222
|
```HTML
|
|
223
|
-
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.0.
|
|
223
|
+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.0.109/dist/ccxt.browser.js"></script>
|
|
224
224
|
```
|
|
225
225
|
|
|
226
226
|
Creates a global `ccxt` object:
|
package/dist/ccxt.browser.js
CHANGED
|
@@ -35349,9 +35349,6 @@ class bitfinex2 extends _abstract_bitfinex2_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
35349
35349
|
else if (type.indexOf('fee') >= 0 || type.indexOf('charged') >= 0) {
|
|
35350
35350
|
return 'fee';
|
|
35351
35351
|
}
|
|
35352
|
-
else if (type.indexOf('exchange') >= 0 || type.indexOf('position') >= 0) {
|
|
35353
|
-
return 'trade';
|
|
35354
|
-
}
|
|
35355
35352
|
else if (type.indexOf('rebate') >= 0) {
|
|
35356
35353
|
return 'rebate';
|
|
35357
35354
|
}
|
|
@@ -35364,6 +35361,9 @@ class bitfinex2 extends _abstract_bitfinex2_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
35364
35361
|
else if (type.indexOf('payment') >= 0) {
|
|
35365
35362
|
return 'payout';
|
|
35366
35363
|
}
|
|
35364
|
+
else if (type.indexOf('exchange') >= 0 || type.indexOf('position') >= 0) {
|
|
35365
|
+
return 'trade';
|
|
35366
|
+
}
|
|
35367
35367
|
else {
|
|
35368
35368
|
return type;
|
|
35369
35369
|
}
|
|
@@ -35845,6 +35845,7 @@ class bitflyer extends _abstract_bitflyer_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
35845
35845
|
* @method
|
|
35846
35846
|
* @name bitflyer#fetchMarkets
|
|
35847
35847
|
* @description retrieves data on all markets for bitflyer
|
|
35848
|
+
* @see https://lightning.bitflyer.com/docs?lang=en#market-list
|
|
35848
35849
|
* @param {object} [params] extra parameters specific to the exchange api endpoint
|
|
35849
35850
|
* @returns {object[]} an array of objects representing market data
|
|
35850
35851
|
*/
|
|
@@ -36012,6 +36013,7 @@ class bitflyer extends _abstract_bitflyer_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
36012
36013
|
* @method
|
|
36013
36014
|
* @name bitflyer#fetchBalance
|
|
36014
36015
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
36016
|
+
* @see https://lightning.bitflyer.com/docs?lang=en#get-account-asset-balance
|
|
36015
36017
|
* @param {object} [params] extra parameters specific to the bitflyer api endpoint
|
|
36016
36018
|
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
36017
36019
|
*/
|
|
@@ -36043,6 +36045,7 @@ class bitflyer extends _abstract_bitflyer_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
36043
36045
|
* @method
|
|
36044
36046
|
* @name bitflyer#fetchOrderBook
|
|
36045
36047
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
36048
|
+
* @see https://lightning.bitflyer.com/docs?lang=en#order-book
|
|
36046
36049
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
36047
36050
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
36048
36051
|
* @param {object} [params] extra parameters specific to the bitflyer api endpoint
|
|
@@ -36088,6 +36091,7 @@ class bitflyer extends _abstract_bitflyer_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
36088
36091
|
* @method
|
|
36089
36092
|
* @name bitflyer#fetchTicker
|
|
36090
36093
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
36094
|
+
* @see https://lightning.bitflyer.com/docs?lang=en#ticker
|
|
36091
36095
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
36092
36096
|
* @param {object} [params] extra parameters specific to the bitflyer api endpoint
|
|
36093
36097
|
* @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
@@ -36169,6 +36173,7 @@ class bitflyer extends _abstract_bitflyer_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
36169
36173
|
* @method
|
|
36170
36174
|
* @name bitflyer#fetchTrades
|
|
36171
36175
|
* @description get the list of most recent trades for a particular symbol
|
|
36176
|
+
* @see https://lightning.bitflyer.com/docs?lang=en#list-executions
|
|
36172
36177
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
36173
36178
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
36174
36179
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
@@ -36204,6 +36209,7 @@ class bitflyer extends _abstract_bitflyer_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
36204
36209
|
* @method
|
|
36205
36210
|
* @name bitflyer#fetchTradingFee
|
|
36206
36211
|
* @description fetch the trading fees for a market
|
|
36212
|
+
* @see https://lightning.bitflyer.com/docs?lang=en#get-trading-commission
|
|
36207
36213
|
* @param {string} symbol unified market symbol
|
|
36208
36214
|
* @param {object} [params] extra parameters specific to the bitflyer api endpoint
|
|
36209
36215
|
* @returns {object} a [fee structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
|
|
@@ -36232,6 +36238,7 @@ class bitflyer extends _abstract_bitflyer_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
36232
36238
|
* @method
|
|
36233
36239
|
* @name bitflyer#createOrder
|
|
36234
36240
|
* @description create a trade order
|
|
36241
|
+
* @see https://lightning.bitflyer.com/docs?lang=en#send-a-new-order
|
|
36235
36242
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
36236
36243
|
* @param {string} type 'market' or 'limit'
|
|
36237
36244
|
* @param {string} side 'buy' or 'sell'
|
|
@@ -36261,6 +36268,7 @@ class bitflyer extends _abstract_bitflyer_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
36261
36268
|
* @method
|
|
36262
36269
|
* @name bitflyer#cancelOrder
|
|
36263
36270
|
* @description cancels an open order
|
|
36271
|
+
* @see https://lightning.bitflyer.com/docs?lang=en#cancel-order
|
|
36264
36272
|
* @param {string} id order id
|
|
36265
36273
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
36266
36274
|
* @param {object} [params] extra parameters specific to the bitflyer api endpoint
|
|
@@ -36337,6 +36345,7 @@ class bitflyer extends _abstract_bitflyer_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
36337
36345
|
* @method
|
|
36338
36346
|
* @name bitflyer#fetchOrders
|
|
36339
36347
|
* @description fetches information on multiple orders made by the user
|
|
36348
|
+
* @see https://lightning.bitflyer.com/docs?lang=en#list-orders
|
|
36340
36349
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
36341
36350
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
36342
36351
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
@@ -36364,6 +36373,7 @@ class bitflyer extends _abstract_bitflyer_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
36364
36373
|
* @method
|
|
36365
36374
|
* @name bitflyer#fetchOpenOrders
|
|
36366
36375
|
* @description fetch all unfilled currently open orders
|
|
36376
|
+
* @see https://lightning.bitflyer.com/docs?lang=en#list-orders
|
|
36367
36377
|
* @param {string} symbol unified market symbol
|
|
36368
36378
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
36369
36379
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
@@ -36380,6 +36390,7 @@ class bitflyer extends _abstract_bitflyer_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
36380
36390
|
* @method
|
|
36381
36391
|
* @name bitflyer#fetchClosedOrders
|
|
36382
36392
|
* @description fetches information on multiple closed orders made by the user
|
|
36393
|
+
* @see https://lightning.bitflyer.com/docs?lang=en#list-orders
|
|
36383
36394
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
36384
36395
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
36385
36396
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
@@ -36396,6 +36407,7 @@ class bitflyer extends _abstract_bitflyer_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
36396
36407
|
* @method
|
|
36397
36408
|
* @name bitflyer#fetchOrder
|
|
36398
36409
|
* @description fetches information on an order made by the user
|
|
36410
|
+
* @see https://lightning.bitflyer.com/docs?lang=en#list-orders
|
|
36399
36411
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
36400
36412
|
* @param {object} [params] extra parameters specific to the bitflyer api endpoint
|
|
36401
36413
|
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
@@ -36415,6 +36427,7 @@ class bitflyer extends _abstract_bitflyer_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
36415
36427
|
* @method
|
|
36416
36428
|
* @name bitflyer#fetchMyTrades
|
|
36417
36429
|
* @description fetch all trades made by the user
|
|
36430
|
+
* @see https://lightning.bitflyer.com/docs?lang=en#list-executions
|
|
36418
36431
|
* @param {string} symbol unified market symbol
|
|
36419
36432
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
36420
36433
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
@@ -36454,6 +36467,7 @@ class bitflyer extends _abstract_bitflyer_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
36454
36467
|
* @method
|
|
36455
36468
|
* @name bitflyer#fetchPositions
|
|
36456
36469
|
* @description fetch all open positions
|
|
36470
|
+
* @see https://lightning.bitflyer.com/docs?lang=en#get-open-interest-summary
|
|
36457
36471
|
* @param {string[]} symbols list of unified market symbols
|
|
36458
36472
|
* @param {object} [params] extra parameters specific to the bitflyer api endpoint
|
|
36459
36473
|
* @returns {object[]} a list of [position structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#position-structure}
|
|
@@ -36491,6 +36505,7 @@ class bitflyer extends _abstract_bitflyer_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
36491
36505
|
* @method
|
|
36492
36506
|
* @name bitflyer#withdraw
|
|
36493
36507
|
* @description make a withdrawal
|
|
36508
|
+
* @see https://lightning.bitflyer.com/docs?lang=en#withdrawing-funds
|
|
36494
36509
|
* @param {string} code unified currency code
|
|
36495
36510
|
* @param {float} amount the amount to withdraw
|
|
36496
36511
|
* @param {string} address the address to withdraw to
|
|
@@ -36522,6 +36537,7 @@ class bitflyer extends _abstract_bitflyer_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
36522
36537
|
* @method
|
|
36523
36538
|
* @name bitflyer#fetchDeposits
|
|
36524
36539
|
* @description fetch all deposits made to an account
|
|
36540
|
+
* @see https://lightning.bitflyer.com/docs?lang=en#get-crypto-assets-deposit-history
|
|
36525
36541
|
* @param {string} code unified currency code
|
|
36526
36542
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
36527
36543
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
@@ -36559,6 +36575,7 @@ class bitflyer extends _abstract_bitflyer_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
36559
36575
|
* @method
|
|
36560
36576
|
* @name bitflyer#fetchWithdrawals
|
|
36561
36577
|
* @description fetch all withdrawals made from an account
|
|
36578
|
+
* @see https://lightning.bitflyer.com/docs?lang=en#get-crypto-assets-transaction-history
|
|
36562
36579
|
* @param {string} code unified currency code
|
|
36563
36580
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
36564
36581
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
@@ -38629,6 +38646,7 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
38629
38646
|
* @method
|
|
38630
38647
|
* @name bitget#fetchTime
|
|
38631
38648
|
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
38649
|
+
* @see https://bitgetlimited.github.io/apidoc/en/spot/#get-server-time
|
|
38632
38650
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
38633
38651
|
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
38634
38652
|
*/
|
|
@@ -38648,6 +38666,8 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
38648
38666
|
* @method
|
|
38649
38667
|
* @name bitget#fetchMarkets
|
|
38650
38668
|
* @description retrieves data on all markets for bitget
|
|
38669
|
+
* @see https://bitgetlimited.github.io/apidoc/en/spot/#get-symbols
|
|
38670
|
+
* @see https://bitgetlimited.github.io/apidoc/en/mix/#get-all-symbols
|
|
38651
38671
|
* @param {object} [params] extra parameters specific to the exchange api endpoint
|
|
38652
38672
|
* @returns {object[]} an array of objects representing market data
|
|
38653
38673
|
*/
|
|
@@ -38921,6 +38941,7 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
38921
38941
|
* @method
|
|
38922
38942
|
* @name bitget#fetchCurrencies
|
|
38923
38943
|
* @description fetches all available currencies on an exchange
|
|
38944
|
+
* @see https://bitgetlimited.github.io/apidoc/en/spot/#get-coin-list
|
|
38924
38945
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
38925
38946
|
* @returns {object} an associative dictionary of currencies
|
|
38926
38947
|
*/
|
|
@@ -39361,6 +39382,7 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
39361
39382
|
* @method
|
|
39362
39383
|
* @name bitget#fetchDepositAddress
|
|
39363
39384
|
* @description fetch the deposit address for a currency associated with this account
|
|
39385
|
+
* @see https://bitgetlimited.github.io/apidoc/en/spot/#get-coin-address
|
|
39364
39386
|
* @param {string} code unified currency code
|
|
39365
39387
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
39366
39388
|
* @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
|
|
@@ -39418,6 +39440,8 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
39418
39440
|
* @method
|
|
39419
39441
|
* @name bitget#fetchOrderBook
|
|
39420
39442
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
39443
|
+
* @see https://bitgetlimited.github.io/apidoc/en/spot/#get-depth
|
|
39444
|
+
* @see https://bitgetlimited.github.io/apidoc/en/mix/#get-depth
|
|
39421
39445
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
39422
39446
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
39423
39447
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
@@ -39576,6 +39600,8 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
39576
39600
|
* @method
|
|
39577
39601
|
* @name bitget#fetchTicker
|
|
39578
39602
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
39603
|
+
* @see https://bitgetlimited.github.io/apidoc/en/spot/#get-single-ticker
|
|
39604
|
+
* @see https://bitgetlimited.github.io/apidoc/en/mix/#get-single-symbol-ticker
|
|
39579
39605
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
39580
39606
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
39581
39607
|
* @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
@@ -39907,6 +39933,7 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
39907
39933
|
* @method
|
|
39908
39934
|
* @name bitget#fetchTradingFee
|
|
39909
39935
|
* @description fetch the trading fees for a market
|
|
39936
|
+
* @see https://bitgetlimited.github.io/apidoc/en/spot/#get-single-symbol
|
|
39910
39937
|
* @param {string} symbol unified market symbol
|
|
39911
39938
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
39912
39939
|
* @returns {object} a [fee structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
|
|
@@ -39945,6 +39972,7 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
39945
39972
|
* @method
|
|
39946
39973
|
* @name bitget#fetchTradingFees
|
|
39947
39974
|
* @description fetch the trading fees for multiple markets
|
|
39975
|
+
* @see https://bitgetlimited.github.io/apidoc/en/spot/#get-symbols
|
|
39948
39976
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
39949
39977
|
* @returns {object} a dictionary of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure} indexed by market symbols
|
|
39950
39978
|
*/
|
|
@@ -40143,9 +40171,9 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
40143
40171
|
/**
|
|
40144
40172
|
* @method
|
|
40145
40173
|
* @name bitget#fetchBalance
|
|
40174
|
+
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
40146
40175
|
* @see https://bitgetlimited.github.io/apidoc/en/spot/#get-account-assets
|
|
40147
40176
|
* @see https://bitgetlimited.github.io/apidoc/en/mix/#get-account-list
|
|
40148
|
-
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
40149
40177
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
40150
40178
|
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
40151
40179
|
*/
|
|
@@ -40403,13 +40431,13 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
40403
40431
|
/**
|
|
40404
40432
|
* @method
|
|
40405
40433
|
* @name bitget#createOrder
|
|
40434
|
+
* @description create a trade order
|
|
40406
40435
|
* @see https://bitgetlimited.github.io/apidoc/en/spot/#place-order
|
|
40407
40436
|
* @see https://bitgetlimited.github.io/apidoc/en/spot/#place-plan-order
|
|
40408
40437
|
* @see https://bitgetlimited.github.io/apidoc/en/mix/#place-order
|
|
40409
40438
|
* @see https://bitgetlimited.github.io/apidoc/en/mix/#place-stop-order
|
|
40410
40439
|
* @see https://bitgetlimited.github.io/apidoc/en/mix/#place-position-tpsl
|
|
40411
40440
|
* @see https://bitgetlimited.github.io/apidoc/en/mix/#place-plan-order
|
|
40412
|
-
* @description create a trade order
|
|
40413
40441
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
40414
40442
|
* @param {string} type 'market' or 'limit'
|
|
40415
40443
|
* @param {string} side 'buy' or 'sell' or 'open_long' or 'open_short' or 'close_long' or 'close_short'
|
|
@@ -40602,6 +40630,10 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
40602
40630
|
* @method
|
|
40603
40631
|
* @name bitget#editOrder
|
|
40604
40632
|
* @description edit a trade order
|
|
40633
|
+
* @see https://bitgetlimited.github.io/apidoc/en/spot/#modify-plan-order
|
|
40634
|
+
* @see https://bitgetlimited.github.io/apidoc/en/mix/#modify-plan-order
|
|
40635
|
+
* @see https://bitgetlimited.github.io/apidoc/en/mix/#modify-plan-order-tpsl
|
|
40636
|
+
* @see https://bitgetlimited.github.io/apidoc/en/mix/#modify-stop-order
|
|
40605
40637
|
* @param {string} id cancel order id
|
|
40606
40638
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
40607
40639
|
* @param {string} type 'market' or 'limit'
|
|
@@ -40705,6 +40737,10 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
40705
40737
|
* @method
|
|
40706
40738
|
* @name bitget#cancelOrder
|
|
40707
40739
|
* @description cancels an open order
|
|
40740
|
+
* @see https://bitgetlimited.github.io/apidoc/en/spot/#cancel-order
|
|
40741
|
+
* @see https://bitgetlimited.github.io/apidoc/en/spot/#cancel-plan-order
|
|
40742
|
+
* @see https://bitgetlimited.github.io/apidoc/en/mix/#cancel-order
|
|
40743
|
+
* @see https://bitgetlimited.github.io/apidoc/en/mix/#cancel-plan-order-tpsl
|
|
40708
40744
|
* @param {string} id order id
|
|
40709
40745
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
40710
40746
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
@@ -40749,6 +40785,8 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
40749
40785
|
* @method
|
|
40750
40786
|
* @name bitget#cancelOrders
|
|
40751
40787
|
* @description cancel multiple orders
|
|
40788
|
+
* @see https://bitgetlimited.github.io/apidoc/en/spot/#cancel-order-in-batch-v2-single-instruments
|
|
40789
|
+
* @see https://bitgetlimited.github.io/apidoc/en/mix/#batch-cancel-order
|
|
40752
40790
|
* @param {string[]} ids order ids
|
|
40753
40791
|
* @param {string} symbol unified market symbol, default is undefined
|
|
40754
40792
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
@@ -40887,6 +40925,8 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
40887
40925
|
* @method
|
|
40888
40926
|
* @name bitget#fetchOrder
|
|
40889
40927
|
* @description fetches information on an order made by the user
|
|
40928
|
+
* @see https://bitgetlimited.github.io/apidoc/en/spot/#get-order-details
|
|
40929
|
+
* @see https://bitgetlimited.github.io/apidoc/en/mix/#get-order-details
|
|
40890
40930
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
40891
40931
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
40892
40932
|
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
@@ -40968,11 +41008,11 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
40968
41008
|
/**
|
|
40969
41009
|
* @method
|
|
40970
41010
|
* @name bitget#fetchOpenOrders
|
|
41011
|
+
* @description fetch all unfilled currently open orders
|
|
40971
41012
|
* @see https://bitgetlimited.github.io/apidoc/en/spot/#get-order-list
|
|
40972
41013
|
* @see https://bitgetlimited.github.io/apidoc/en/mix/#get-all-open-order
|
|
40973
41014
|
* @see https://bitgetlimited.github.io/apidoc/en/mix/#get-plan-order-tpsl-list
|
|
40974
41015
|
* @see https://bitgetlimited.github.io/apidoc/en/mix/#get-open-order
|
|
40975
|
-
* @description fetch all unfilled currently open orders
|
|
40976
41016
|
* @param {string} symbol unified market symbol
|
|
40977
41017
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
40978
41018
|
* @param {int} [limit] the maximum number of open order structures to retrieve
|
|
@@ -41354,6 +41394,7 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
41354
41394
|
* @method
|
|
41355
41395
|
* @name bitget#fetchLedger
|
|
41356
41396
|
* @description fetch the history of changes, actions done by the user or operations that altered balance of the user
|
|
41397
|
+
* @see https://bitgetlimited.github.io/apidoc/en/spot/#get-bills
|
|
41357
41398
|
* @param {string} code unified currency code, default is undefined
|
|
41358
41399
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
41359
41400
|
* @param {int} [limit] max number of ledger entrys to return, default is undefined
|
|
@@ -41497,6 +41538,8 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
41497
41538
|
* @method
|
|
41498
41539
|
* @name bitget#fetchOrderTrades
|
|
41499
41540
|
* @description fetch all the trades made from a single order
|
|
41541
|
+
* @see https://bitgetlimited.github.io/apidoc/en/spot/#get-transaction-details
|
|
41542
|
+
* @see https://bitgetlimited.github.io/apidoc/en/mix/#get-order-fill-detail
|
|
41500
41543
|
* @param {string} id order id
|
|
41501
41544
|
* @param {string} symbol unified market symbol
|
|
41502
41545
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
@@ -41549,6 +41592,7 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
41549
41592
|
* @method
|
|
41550
41593
|
* @name bitget#fetchPosition
|
|
41551
41594
|
* @description fetch data on a single open contract trade position
|
|
41595
|
+
* @see https://bitgetlimited.github.io/apidoc/en/mix/#get-symbol-position-v2
|
|
41552
41596
|
* @param {string} symbol unified market symbol of the market the position is held in, default is undefined
|
|
41553
41597
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
41554
41598
|
* @returns {object} a [position structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#position-structure}
|
|
@@ -41598,6 +41642,8 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
41598
41642
|
* @method
|
|
41599
41643
|
* @name bitget#fetchPositions
|
|
41600
41644
|
* @description fetch all open positions
|
|
41645
|
+
* @see https://bitgetlimited.github.io/apidoc/en/mix/#get-all-position-v2
|
|
41646
|
+
* @see https://bitgetlimited.github.io/apidoc/en/mix/#get-history-position
|
|
41601
41647
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
41602
41648
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
41603
41649
|
* @returns {object[]} a list of [position structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#position-structure}
|
|
@@ -41857,6 +41903,7 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
41857
41903
|
* @method
|
|
41858
41904
|
* @name bitget#fetchFundingRateHistory
|
|
41859
41905
|
* @description fetches historical funding rate prices
|
|
41906
|
+
* @see https://bitgetlimited.github.io/apidoc/en/mix/#get-history-funding-rate
|
|
41860
41907
|
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
41861
41908
|
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
41862
41909
|
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure} to fetch
|
|
@@ -41913,6 +41960,7 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
41913
41960
|
* @method
|
|
41914
41961
|
* @name bitget#fetchFundingRate
|
|
41915
41962
|
* @description fetch the current funding rate
|
|
41963
|
+
* @see https://bitgetlimited.github.io/apidoc/en/mix/#get-current-funding-rate
|
|
41916
41964
|
* @param {string} symbol unified market symbol
|
|
41917
41965
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
41918
41966
|
* @returns {object} a [funding rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-structure}
|
|
@@ -42116,6 +42164,7 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
42116
42164
|
* @method
|
|
42117
42165
|
* @name bitget#reduceMargin
|
|
42118
42166
|
* @description remove margin from a position
|
|
42167
|
+
* @see https://bitgetlimited.github.io/apidoc/en/mix/#change-margin
|
|
42119
42168
|
* @param {string} symbol unified market symbol
|
|
42120
42169
|
* @param {float} amount the amount of margin to remove
|
|
42121
42170
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
@@ -42135,6 +42184,7 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
42135
42184
|
* @method
|
|
42136
42185
|
* @name bitget#addMargin
|
|
42137
42186
|
* @description add margin
|
|
42187
|
+
* @see https://bitgetlimited.github.io/apidoc/en/mix/#change-margin
|
|
42138
42188
|
* @param {string} symbol unified market symbol
|
|
42139
42189
|
* @param {float} amount amount of margin to add
|
|
42140
42190
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
@@ -42151,6 +42201,7 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
42151
42201
|
* @method
|
|
42152
42202
|
* @name bitget#fetchLeverage
|
|
42153
42203
|
* @description fetch the set leverage for a market
|
|
42204
|
+
* @see https://bitgetlimited.github.io/apidoc/en/mix/#get-single-account
|
|
42154
42205
|
* @param {string} symbol unified market symbol
|
|
42155
42206
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
42156
42207
|
* @returns {object} a [leverage structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#leverage-structure}
|
|
@@ -42195,6 +42246,7 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
42195
42246
|
* @method
|
|
42196
42247
|
* @name bitget#setLeverage
|
|
42197
42248
|
* @description set the level of leverage for a market
|
|
42249
|
+
* @see https://bitgetlimited.github.io/apidoc/en/mix/#change-leverage
|
|
42198
42250
|
* @param {float} leverage the rate of leverage
|
|
42199
42251
|
* @param {string} symbol unified market symbol
|
|
42200
42252
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
@@ -42216,6 +42268,7 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
42216
42268
|
* @method
|
|
42217
42269
|
* @name bitget#setMarginMode
|
|
42218
42270
|
* @description set margin mode to 'cross' or 'isolated'
|
|
42271
|
+
* @see https://bitgetlimited.github.io/apidoc/en/mix/#change-margin-mode
|
|
42219
42272
|
* @param {string} marginMode 'cross' or 'isolated'
|
|
42220
42273
|
* @param {string} symbol unified market symbol
|
|
42221
42274
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
@@ -42246,6 +42299,7 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
42246
42299
|
* @method
|
|
42247
42300
|
* @name bitget#setPositionMode
|
|
42248
42301
|
* @description set hedged to true or false for a market
|
|
42302
|
+
* @see https://bitgetlimited.github.io/apidoc/en/mix/#change-hold-mode
|
|
42249
42303
|
* @param {bool} hedged set to true to use dualSidePosition
|
|
42250
42304
|
* @param {string} symbol not used by bitget setPositionMode ()
|
|
42251
42305
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
@@ -45738,7 +45792,7 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
45738
45792
|
// "updateTime" : 1681701559408
|
|
45739
45793
|
// }
|
|
45740
45794
|
//
|
|
45741
|
-
// swap: fetchOpenOrders
|
|
45795
|
+
// swap: fetchOrder, fetchOpenOrders
|
|
45742
45796
|
//
|
|
45743
45797
|
// {
|
|
45744
45798
|
// "order_id": "230935812485489",
|
|
@@ -46281,29 +46335,95 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
46281
46335
|
/**
|
|
46282
46336
|
* @method
|
|
46283
46337
|
* @name bitmart#fetchOrder
|
|
46338
|
+
* @description fetches information on an order made by the user
|
|
46284
46339
|
* @see https://developer-pro.bitmart.com/en/spot/#query-order-by-id-v4-signed
|
|
46285
46340
|
* @see https://developer-pro.bitmart.com/en/spot/#query-order-by-clientorderid-v4-signed
|
|
46286
|
-
* @
|
|
46341
|
+
* @see https://developer-pro.bitmart.com/en/futures/#get-order-detail-keyed
|
|
46342
|
+
* @param {string} id the id of the order
|
|
46287
46343
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
46288
46344
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
46289
|
-
* @param {string} [params.clientOrderId] fetch the order by client order id instead of order id
|
|
46345
|
+
* @param {string} [params.clientOrderId] *spot* fetch the order by client order id instead of order id
|
|
46290
46346
|
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
46291
46347
|
*/
|
|
46292
46348
|
await this.loadMarkets();
|
|
46293
46349
|
const request = {};
|
|
46294
|
-
|
|
46295
|
-
|
|
46296
|
-
request['orderId'] = id;
|
|
46297
|
-
}
|
|
46350
|
+
let type = undefined;
|
|
46351
|
+
let market = undefined;
|
|
46298
46352
|
let response = undefined;
|
|
46299
|
-
if (
|
|
46300
|
-
|
|
46353
|
+
if (symbol !== undefined) {
|
|
46354
|
+
market = this.market(symbol);
|
|
46301
46355
|
}
|
|
46302
|
-
|
|
46303
|
-
|
|
46356
|
+
[type, params] = this.handleMarketTypeAndParams('fetchOrder', market, params);
|
|
46357
|
+
if (type === 'spot') {
|
|
46358
|
+
const clientOrderId = this.safeString(params, 'clientOrderId');
|
|
46359
|
+
if (!clientOrderId) {
|
|
46360
|
+
request['orderId'] = id;
|
|
46361
|
+
}
|
|
46362
|
+
if (clientOrderId !== undefined) {
|
|
46363
|
+
response = await this.privatePostSpotV4QueryClientOrder(this.extend(request, params));
|
|
46364
|
+
}
|
|
46365
|
+
else {
|
|
46366
|
+
response = await this.privatePostSpotV4QueryOrder(this.extend(request, params));
|
|
46367
|
+
}
|
|
46304
46368
|
}
|
|
46369
|
+
else if (type === 'swap') {
|
|
46370
|
+
this.checkRequiredSymbol('fetchOrder', symbol);
|
|
46371
|
+
request['symbol'] = market['id'];
|
|
46372
|
+
request['order_id'] = id;
|
|
46373
|
+
response = await this.privateGetContractPrivateOrder(this.extend(request, params));
|
|
46374
|
+
}
|
|
46375
|
+
//
|
|
46376
|
+
// spot
|
|
46377
|
+
//
|
|
46378
|
+
// {
|
|
46379
|
+
// "code": 1000,
|
|
46380
|
+
// "message": "success",
|
|
46381
|
+
// "data": {
|
|
46382
|
+
// "orderId": "183347420821295423",
|
|
46383
|
+
// "clientOrderId": "183347420821295423",
|
|
46384
|
+
// "symbol": "BTC_USDT",
|
|
46385
|
+
// "side": "buy",
|
|
46386
|
+
// "orderMode": "spot",
|
|
46387
|
+
// "type": "limit",
|
|
46388
|
+
// "state": "new",
|
|
46389
|
+
// "price": "24000.00",
|
|
46390
|
+
// "priceAvg": "0.00",
|
|
46391
|
+
// "size": "0.00022",
|
|
46392
|
+
// "filledSize": "0.00000",
|
|
46393
|
+
// "notional": "5.28000000",
|
|
46394
|
+
// "filledNotional": "0.00000000",
|
|
46395
|
+
// "createTime": 1695783014734,
|
|
46396
|
+
// "updateTime": 1695783014762
|
|
46397
|
+
// },
|
|
46398
|
+
// "trace": "ce3e6422c8b44d5fag855348a68693ed.63.14957831547451715"
|
|
46399
|
+
// }
|
|
46400
|
+
//
|
|
46401
|
+
// swap
|
|
46402
|
+
//
|
|
46403
|
+
// {
|
|
46404
|
+
// "code": 1000,
|
|
46405
|
+
// "message": "Ok",
|
|
46406
|
+
// "data": {
|
|
46407
|
+
// "order_id": "230927283405028",
|
|
46408
|
+
// "client_order_id": "",
|
|
46409
|
+
// "price": "23000",
|
|
46410
|
+
// "size": "1",
|
|
46411
|
+
// "symbol": "BTCUSDT",
|
|
46412
|
+
// "state": 2,
|
|
46413
|
+
// "side": 1,
|
|
46414
|
+
// "type": "limit",
|
|
46415
|
+
// "leverage": "10",
|
|
46416
|
+
// "open_type": "isolated",
|
|
46417
|
+
// "deal_avg_price": "0",
|
|
46418
|
+
// "deal_size": "0",
|
|
46419
|
+
// "create_time": 1695783433600,
|
|
46420
|
+
// "update_time": 1695783433613
|
|
46421
|
+
// },
|
|
46422
|
+
// "trace": "4cad855075664097af6ba5257c47605d.63.14957831547451715"
|
|
46423
|
+
// }
|
|
46424
|
+
//
|
|
46305
46425
|
const data = this.safeValue(response, 'data', {});
|
|
46306
|
-
return this.parseOrder(data,
|
|
46426
|
+
return this.parseOrder(data, market);
|
|
46307
46427
|
}
|
|
46308
46428
|
async fetchDepositAddress(code, params = {}) {
|
|
46309
46429
|
/**
|
|
@@ -273177,7 +273297,7 @@ SOFTWARE.
|
|
|
273177
273297
|
|
|
273178
273298
|
//-----------------------------------------------------------------------------
|
|
273179
273299
|
// this is updated by vss.js when building
|
|
273180
|
-
const version = '4.0.
|
|
273300
|
+
const version = '4.0.109';
|
|
273181
273301
|
_src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange.ccxtVersion */ .e.ccxtVersion = version;
|
|
273182
273302
|
//-----------------------------------------------------------------------------
|
|
273183
273303
|
|