ccxt 4.1.3 → 4.1.5
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 +206 -31
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/base/Exchange.js +3 -0
- package/dist/cjs/src/coinex.js +1 -1
- package/dist/cjs/src/coinsph.js +1 -2
- package/dist/cjs/src/idex.js +1 -1
- package/dist/cjs/src/kraken.js +38 -6
- package/dist/cjs/src/kucoinfutures.js +1 -1
- package/dist/cjs/src/kuna.js +97 -10
- package/dist/cjs/src/okx.js +37 -0
- package/dist/cjs/src/pro/bitget.js +22 -6
- package/dist/cjs/src/whitebit.js +1 -1
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/kuna.d.ts +34 -0
- package/js/src/base/Exchange.js +3 -0
- package/js/src/coinex.js +1 -1
- package/js/src/coinsph.js +1 -2
- package/js/src/idex.js +1 -1
- package/js/src/kraken.d.ts +1 -1
- package/js/src/kraken.js +38 -6
- package/js/src/kucoinfutures.js +1 -1
- package/js/src/kuna.d.ts +1 -0
- package/js/src/kuna.js +97 -10
- package/js/src/okx.js +37 -0
- package/js/src/pro/bitget.d.ts +5 -0
- package/js/src/pro/bitget.js +22 -6
- package/js/src/whitebit.js +1 -1
- package/package.json +1 -1
package/dist/cjs/src/okx.js
CHANGED
|
@@ -1131,6 +1131,7 @@ class okx extends okx$1 {
|
|
|
1131
1131
|
* @method
|
|
1132
1132
|
* @name okx#fetchStatus
|
|
1133
1133
|
* @description the latest known information on the availability of the exchange API
|
|
1134
|
+
* @see https://www.okx.com/docs-v5/en/#status-get-status
|
|
1134
1135
|
* @param {object} [params] extra parameters specific to the okx api endpoint
|
|
1135
1136
|
* @returns {object} a [status structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#exchange-status-structure}
|
|
1136
1137
|
*/
|
|
@@ -1179,6 +1180,7 @@ class okx extends okx$1 {
|
|
|
1179
1180
|
* @method
|
|
1180
1181
|
* @name okx#fetchTime
|
|
1181
1182
|
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
1183
|
+
* @see https://www.okx.com/docs-v5/en/#public-data-rest-api-get-system-time
|
|
1182
1184
|
* @param {object} [params] extra parameters specific to the okx api endpoint
|
|
1183
1185
|
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
1184
1186
|
*/
|
|
@@ -1201,6 +1203,7 @@ class okx extends okx$1 {
|
|
|
1201
1203
|
* @method
|
|
1202
1204
|
* @name okx#fetchAccounts
|
|
1203
1205
|
* @description fetch all the accounts associated with a profile
|
|
1206
|
+
* @see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-account-configuration
|
|
1204
1207
|
* @param {object} [params] extra parameters specific to the okx api endpoint
|
|
1205
1208
|
* @returns {object} a dictionary of [account structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#account-structure} indexed by the account type
|
|
1206
1209
|
*/
|
|
@@ -1625,6 +1628,7 @@ class okx extends okx$1 {
|
|
|
1625
1628
|
* @method
|
|
1626
1629
|
* @name okx#fetchOrderBook
|
|
1627
1630
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
1631
|
+
* @see https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-order-book
|
|
1628
1632
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1629
1633
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
1630
1634
|
* @param {object} [params] extra parameters specific to the okx api endpoint
|
|
@@ -1726,6 +1730,7 @@ class okx extends okx$1 {
|
|
|
1726
1730
|
* @method
|
|
1727
1731
|
* @name okx#fetchTicker
|
|
1728
1732
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1733
|
+
* @see https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-ticker
|
|
1729
1734
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1730
1735
|
* @param {object} [params] extra parameters specific to the okx api endpoint
|
|
1731
1736
|
* @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
@@ -1816,6 +1821,7 @@ class okx extends okx$1 {
|
|
|
1816
1821
|
* @method
|
|
1817
1822
|
* @name okx#fetchTickers
|
|
1818
1823
|
* @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
|
|
1824
|
+
* @see https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-tickers
|
|
1819
1825
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1820
1826
|
* @param {object} [params] extra parameters specific to the okx api endpoint
|
|
1821
1827
|
* @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
@@ -2128,6 +2134,7 @@ class okx extends okx$1 {
|
|
|
2128
2134
|
* @method
|
|
2129
2135
|
* @name okx#fetchFundingRateHistory
|
|
2130
2136
|
* @description fetches historical funding rate prices
|
|
2137
|
+
* @see https://www.okx.com/docs-v5/en/#public-data-rest-api-get-funding-rate-history
|
|
2131
2138
|
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
2132
2139
|
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
2133
2140
|
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure} to fetch
|
|
@@ -2266,6 +2273,7 @@ class okx extends okx$1 {
|
|
|
2266
2273
|
* @method
|
|
2267
2274
|
* @name okx#fetchTradingFee
|
|
2268
2275
|
* @description fetch the trading fees for a market
|
|
2276
|
+
* @see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-fee-rates
|
|
2269
2277
|
* @param {string} symbol unified market symbol
|
|
2270
2278
|
* @param {object} [params] extra parameters specific to the okx api endpoint
|
|
2271
2279
|
* @returns {object} a [fee structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
|
|
@@ -2315,6 +2323,8 @@ class okx extends okx$1 {
|
|
|
2315
2323
|
* @method
|
|
2316
2324
|
* @name okx#fetchBalance
|
|
2317
2325
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
2326
|
+
* @see https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-balance
|
|
2327
|
+
* @see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-balance
|
|
2318
2328
|
* @param {object} [params] extra parameters specific to the okx api endpoint
|
|
2319
2329
|
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
2320
2330
|
*/
|
|
@@ -2850,6 +2860,7 @@ class okx extends okx$1 {
|
|
|
2850
2860
|
* @method
|
|
2851
2861
|
* @name okx#cancelOrder
|
|
2852
2862
|
* @description cancels an open order
|
|
2863
|
+
* @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-cancel-order
|
|
2853
2864
|
* @param {string} id order id
|
|
2854
2865
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
2855
2866
|
* @param {object} [params] extra parameters specific to the okx api endpoint
|
|
@@ -2904,6 +2915,8 @@ class okx extends okx$1 {
|
|
|
2904
2915
|
* @method
|
|
2905
2916
|
* @name okx#cancelOrders
|
|
2906
2917
|
* @description cancel multiple orders
|
|
2918
|
+
* @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-cancel-multiple-orders
|
|
2919
|
+
* @see https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-post-cancel-algo-order
|
|
2907
2920
|
* @param {string[]} ids order ids
|
|
2908
2921
|
* @param {string} symbol unified market symbol
|
|
2909
2922
|
* @param {object} [params] extra parameters specific to the okx api endpoint
|
|
@@ -3206,6 +3219,8 @@ class okx extends okx$1 {
|
|
|
3206
3219
|
* @method
|
|
3207
3220
|
* @name okx#fetchOrder
|
|
3208
3221
|
* @description fetch an order by the id
|
|
3222
|
+
* @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-details
|
|
3223
|
+
* @see https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-get-algo-order-details
|
|
3209
3224
|
* @param {string} id the order id
|
|
3210
3225
|
* @param {string} symbol unified market symbol
|
|
3211
3226
|
* @param {object} [params] extra and exchange specific parameters
|
|
@@ -3352,6 +3367,8 @@ class okx extends okx$1 {
|
|
|
3352
3367
|
* @name okx#fetchOpenOrders
|
|
3353
3368
|
* @description Fetch orders that are still open
|
|
3354
3369
|
* @description fetch all unfilled currently open orders
|
|
3370
|
+
* @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-list
|
|
3371
|
+
* @see https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-get-algo-order-list
|
|
3355
3372
|
* @param {string} symbol unified market symbol
|
|
3356
3373
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
3357
3374
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
@@ -3500,6 +3517,8 @@ class okx extends okx$1 {
|
|
|
3500
3517
|
* @method
|
|
3501
3518
|
* @name okx#fetchCanceledOrders
|
|
3502
3519
|
* @description fetches information on multiple canceled orders made by the user
|
|
3520
|
+
* @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-history-last-7-days
|
|
3521
|
+
* @see https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-get-algo-order-history
|
|
3503
3522
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
3504
3523
|
* @param {int} [since] timestamp in ms of the earliest order, default is undefined
|
|
3505
3524
|
* @param {int} [limit] max number of orders to return, default is undefined
|
|
@@ -3674,6 +3693,8 @@ class okx extends okx$1 {
|
|
|
3674
3693
|
* @method
|
|
3675
3694
|
* @name okx#fetchClosedOrders
|
|
3676
3695
|
* @description fetches information on multiple closed orders made by the user
|
|
3696
|
+
* @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-history-last-7-days
|
|
3697
|
+
* @see https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-get-algo-order-history
|
|
3677
3698
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
3678
3699
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
3679
3700
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
@@ -3839,6 +3860,7 @@ class okx extends okx$1 {
|
|
|
3839
3860
|
* @method
|
|
3840
3861
|
* @name okx#fetchMyTrades
|
|
3841
3862
|
* @description fetch all trades made by the user
|
|
3863
|
+
* @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-transaction-details-last-3-months
|
|
3842
3864
|
* @param {string} symbol unified market symbol
|
|
3843
3865
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
3844
3866
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
@@ -3899,6 +3921,7 @@ class okx extends okx$1 {
|
|
|
3899
3921
|
* @method
|
|
3900
3922
|
* @name okx#fetchOrderTrades
|
|
3901
3923
|
* @description fetch all the trades made from a single order
|
|
3924
|
+
* @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-transaction-details-last-3-months
|
|
3902
3925
|
* @param {string} id order id
|
|
3903
3926
|
* @param {string} symbol unified market symbol
|
|
3904
3927
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
@@ -4217,6 +4240,7 @@ class okx extends okx$1 {
|
|
|
4217
4240
|
* @method
|
|
4218
4241
|
* @name okx#fetchDepositAddressesByNetwork
|
|
4219
4242
|
* @description fetch a dictionary of addresses for a currency, indexed by network
|
|
4243
|
+
* @see https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-deposit-address
|
|
4220
4244
|
* @param {string} code unified currency code of the currency for the deposit address
|
|
4221
4245
|
* @param {object} [params] extra parameters specific to the okx api endpoint
|
|
4222
4246
|
* @returns {object} a dictionary of [address structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure} indexed by the network
|
|
@@ -4258,6 +4282,7 @@ class okx extends okx$1 {
|
|
|
4258
4282
|
* @method
|
|
4259
4283
|
* @name okx#fetchDepositAddress
|
|
4260
4284
|
* @description fetch the deposit address for a currency associated with this account
|
|
4285
|
+
* @see https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-deposit-address
|
|
4261
4286
|
* @param {string} code unified currency code
|
|
4262
4287
|
* @param {object} [params] extra parameters specific to the okx api endpoint
|
|
4263
4288
|
* @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
|
|
@@ -4298,6 +4323,7 @@ class okx extends okx$1 {
|
|
|
4298
4323
|
* @method
|
|
4299
4324
|
* @name okx#withdraw
|
|
4300
4325
|
* @description make a withdrawal
|
|
4326
|
+
* @see https://www.okx.com/docs-v5/en/#funding-account-rest-api-withdrawal
|
|
4301
4327
|
* @param {string} code unified currency code
|
|
4302
4328
|
* @param {float} amount the amount to withdraw
|
|
4303
4329
|
* @param {string} address the address to withdraw to
|
|
@@ -5242,6 +5268,7 @@ class okx extends okx$1 {
|
|
|
5242
5268
|
* @method
|
|
5243
5269
|
* @name okx#fetchTransfers
|
|
5244
5270
|
* @description fetch a history of internal transfers made on an account
|
|
5271
|
+
* @see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-bills-details-last-3-months
|
|
5245
5272
|
* @param {string} code unified currency code of the currency transferred
|
|
5246
5273
|
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
5247
5274
|
* @param {int} [limit] the maximum number of transfers structures to retrieve
|
|
@@ -5408,6 +5435,7 @@ class okx extends okx$1 {
|
|
|
5408
5435
|
* @method
|
|
5409
5436
|
* @name okx#fetchFundingRate
|
|
5410
5437
|
* @description fetch the current funding rate
|
|
5438
|
+
* @see https://www.okx.com/docs-v5/en/#public-data-rest-api-get-funding-rate
|
|
5411
5439
|
* @param {string} symbol unified market symbol
|
|
5412
5440
|
* @param {object} [params] extra parameters specific to the okx api endpoint
|
|
5413
5441
|
* @returns {object} a [funding rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-structure}
|
|
@@ -5446,6 +5474,7 @@ class okx extends okx$1 {
|
|
|
5446
5474
|
* @method
|
|
5447
5475
|
* @name okx#fetchFundingHistory
|
|
5448
5476
|
* @description fetch the history of funding payments paid and received on this account
|
|
5477
|
+
* @see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-bills-details-last-3-months
|
|
5449
5478
|
* @param {string} symbol unified market symbol
|
|
5450
5479
|
* @param {int} [since] the earliest time in ms to fetch funding history for
|
|
5451
5480
|
* @param {int} [limit] the maximum number of funding history structures to retrieve
|
|
@@ -5666,6 +5695,7 @@ class okx extends okx$1 {
|
|
|
5666
5695
|
* @method
|
|
5667
5696
|
* @name okx#setPositionMode
|
|
5668
5697
|
* @description set hedged to true or false for a market
|
|
5698
|
+
* @see https://www.okx.com/docs-v5/en/#trading-account-rest-api-set-position-mode
|
|
5669
5699
|
* @param {bool} hedged set to true to use long_short_mode, false for net_mode
|
|
5670
5700
|
* @param {string} symbol not used by okx setPositionMode
|
|
5671
5701
|
* @param {object} [params] extra parameters specific to the okx api endpoint
|
|
@@ -5700,6 +5730,7 @@ class okx extends okx$1 {
|
|
|
5700
5730
|
* @method
|
|
5701
5731
|
* @name okx#setMarginMode
|
|
5702
5732
|
* @description set margin mode to 'cross' or 'isolated'
|
|
5733
|
+
* @see https://www.okx.com/docs-v5/en/#trading-account-rest-api-set-leverage
|
|
5703
5734
|
* @param {string} marginMode 'cross' or 'isolated'
|
|
5704
5735
|
* @param {string} symbol unified market symbol
|
|
5705
5736
|
* @param {object} [params] extra parameters specific to the okx api endpoint
|
|
@@ -5748,6 +5779,7 @@ class okx extends okx$1 {
|
|
|
5748
5779
|
* @method
|
|
5749
5780
|
* @name okx#fetchBorrowRates
|
|
5750
5781
|
* @description fetch the borrow interest rates of all currencies
|
|
5782
|
+
* @see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-interest-rate
|
|
5751
5783
|
* @param {object} [params] extra parameters specific to the okx api endpoint
|
|
5752
5784
|
* @returns {object} a list of [borrow rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure}
|
|
5753
5785
|
*/
|
|
@@ -5787,6 +5819,7 @@ class okx extends okx$1 {
|
|
|
5787
5819
|
* @method
|
|
5788
5820
|
* @name okx#fetchBorrowRate
|
|
5789
5821
|
* @description fetch the rate of interest to borrow a currency for margin trading
|
|
5822
|
+
* @see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-interest-rate
|
|
5790
5823
|
* @param {string} code unified currency code
|
|
5791
5824
|
* @param {object} [params] extra parameters specific to the okx api endpoint
|
|
5792
5825
|
* @returns {object} a [borrow rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure}
|
|
@@ -5880,6 +5913,7 @@ class okx extends okx$1 {
|
|
|
5880
5913
|
* @method
|
|
5881
5914
|
* @name okx#fetchBorrowRateHistories
|
|
5882
5915
|
* @description retrieves a history of a multiple currencies borrow interest rate at specific time slots, returns all currencies if no symbols passed, default is undefined
|
|
5916
|
+
* @see https://www.okx.com/docs-v5/en/#financial-product-savings-get-public-borrow-history-public
|
|
5883
5917
|
* @param {string[]|undefined} codes list of unified currency codes, default is undefined
|
|
5884
5918
|
* @param {int} [since] timestamp in ms of the earliest borrowRate, default is undefined
|
|
5885
5919
|
* @param {int} [limit] max number of borrow rate prices to return, default is undefined
|
|
@@ -5922,6 +5956,7 @@ class okx extends okx$1 {
|
|
|
5922
5956
|
* @method
|
|
5923
5957
|
* @name okx#fetchBorrowRateHistory
|
|
5924
5958
|
* @description retrieves a history of a currencies borrow interest rate at specific time slots
|
|
5959
|
+
* @see https://www.okx.com/docs-v5/en/#financial-product-savings-get-public-borrow-history-public
|
|
5925
5960
|
* @param {string} code unified currency code
|
|
5926
5961
|
* @param {int} [since] timestamp for the earliest borrow rate
|
|
5927
5962
|
* @param {int} [limit] the maximum number of [borrow rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure} to retrieve
|
|
@@ -6013,6 +6048,7 @@ class okx extends okx$1 {
|
|
|
6013
6048
|
* @method
|
|
6014
6049
|
* @name okx#reduceMargin
|
|
6015
6050
|
* @description remove margin from a position
|
|
6051
|
+
* @see https://www.okx.com/docs-v5/en/#trading-account-rest-api-increase-decrease-margin
|
|
6016
6052
|
* @param {string} symbol unified market symbol
|
|
6017
6053
|
* @param {float} amount the amount of margin to remove
|
|
6018
6054
|
* @param {object} [params] extra parameters specific to the okx api endpoint
|
|
@@ -6025,6 +6061,7 @@ class okx extends okx$1 {
|
|
|
6025
6061
|
* @method
|
|
6026
6062
|
* @name okx#addMargin
|
|
6027
6063
|
* @description add margin
|
|
6064
|
+
* @see https://www.okx.com/docs-v5/en/#trading-account-rest-api-increase-decrease-margin
|
|
6028
6065
|
* @param {string} symbol unified market symbol
|
|
6029
6066
|
* @param {float} amount amount of margin to add
|
|
6030
6067
|
* @param {object} [params] extra parameters specific to the okx api endpoint
|
|
@@ -8,6 +8,11 @@ var sha256 = require('../static_dependencies/noble-hashes/sha256.js');
|
|
|
8
8
|
|
|
9
9
|
// ---------------------------------------------------------------------------
|
|
10
10
|
// ---------------------------------------------------------------------------
|
|
11
|
+
/**
|
|
12
|
+
* @class bitget
|
|
13
|
+
* @extends Exchange
|
|
14
|
+
* @description watching delivery future markets is not yet implemented (perpertual future / swap is implemented)
|
|
15
|
+
*/
|
|
11
16
|
class bitget extends bitget$1 {
|
|
12
17
|
describe() {
|
|
13
18
|
return this.deepExtend(super.describe(), {
|
|
@@ -80,10 +85,10 @@ class bitget extends bitget$1 {
|
|
|
80
85
|
}
|
|
81
86
|
else {
|
|
82
87
|
if (!sandboxMode) {
|
|
83
|
-
return market['id'].replace('_UMCBL', '');
|
|
88
|
+
return market['id'].replace('_UMCBL', '').replace('_DMCBL', '').replace('_CMCBL', '');
|
|
84
89
|
}
|
|
85
90
|
else {
|
|
86
|
-
return market['id'].replace('_SUMCBL', '');
|
|
91
|
+
return market['id'].replace('_SUMCBL', '').replace('_SDMCBL', '').replace('_SCMCBL', '');
|
|
87
92
|
}
|
|
88
93
|
}
|
|
89
94
|
}
|
|
@@ -95,15 +100,24 @@ class bitget extends bitget$1 {
|
|
|
95
100
|
const sandboxMode = this.safeValue(this.options, 'sandboxMode', false);
|
|
96
101
|
let marketId = this.safeString(arg, 'instId');
|
|
97
102
|
if (instType === 'sp') {
|
|
98
|
-
marketId
|
|
103
|
+
marketId = marketId + '_SPBL';
|
|
99
104
|
}
|
|
100
105
|
else {
|
|
101
|
-
|
|
102
|
-
|
|
106
|
+
let extension = sandboxMode ? '_S' : '_';
|
|
107
|
+
const splitByUSDT = marketId.split('USDT');
|
|
108
|
+
const splitByPERP = marketId.split('PERP');
|
|
109
|
+
const splitByUSDTLength = splitByUSDT.length;
|
|
110
|
+
const splitByPERPLength = splitByPERP.length;
|
|
111
|
+
if (splitByUSDTLength > 1) {
|
|
112
|
+
extension += 'UMCBL';
|
|
113
|
+
}
|
|
114
|
+
else if (splitByPERPLength > 1) {
|
|
115
|
+
extension += 'CMCBL';
|
|
103
116
|
}
|
|
104
117
|
else {
|
|
105
|
-
|
|
118
|
+
extension += 'DMCBL';
|
|
106
119
|
}
|
|
120
|
+
marketId = marketId + extension;
|
|
107
121
|
}
|
|
108
122
|
return marketId;
|
|
109
123
|
}
|
|
@@ -606,6 +620,8 @@ class bitget extends bitget$1 {
|
|
|
606
620
|
* @method
|
|
607
621
|
* @name bitget#watchTrades
|
|
608
622
|
* @description get the list of most recent trades for a particular symbol
|
|
623
|
+
* @see https://bitgetlimited.github.io/apidoc/en/spot/#trades-channel
|
|
624
|
+
* @see https://bitgetlimited.github.io/apidoc/en/mix/#trades-channel
|
|
609
625
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
610
626
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
611
627
|
* @param {int} [limit] the maximum amount of trades to fetch
|
package/dist/cjs/src/whitebit.js
CHANGED
|
@@ -853,7 +853,7 @@ class whitebit extends whitebit$1 {
|
|
|
853
853
|
// ]
|
|
854
854
|
// }
|
|
855
855
|
//
|
|
856
|
-
const timestamp = this.
|
|
856
|
+
const timestamp = this.parseToInt(Precise["default"].stringMul(this.safeString(response, 'timestamp'), '1000'));
|
|
857
857
|
return this.parseOrderBook(response, symbol, timestamp);
|
|
858
858
|
}
|
|
859
859
|
async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
|
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 { Market, Trade, Fee, Ticker, OrderBook, Order, Transaction, Tickers, Currency, Balance, DepositAddress, WithdrawalResponse, DepositAddressResponse, OHLCV, Balances, PartialBalances, Dictionary, MinMax, Position } from './src/base/types.js';
|
|
6
6
|
import { BaseError, ExchangeError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, NotSupported, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, AuthenticationError, AddressPending, NoChange } from './src/base/errors.js';
|
|
7
|
-
declare const version = "4.1.
|
|
7
|
+
declare const version = "4.1.4";
|
|
8
8
|
import ace from './src/ace.js';
|
|
9
9
|
import alpaca from './src/alpaca.js';
|
|
10
10
|
import ascendex from './src/ascendex.js';
|
package/js/ccxt.js
CHANGED
|
@@ -38,7 +38,7 @@ import * as errors from './src/base/errors.js';
|
|
|
38
38
|
import { BaseError, ExchangeError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, NotSupported, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, AuthenticationError, AddressPending, NoChange } from './src/base/errors.js';
|
|
39
39
|
//-----------------------------------------------------------------------------
|
|
40
40
|
// this is updated by vss.js when building
|
|
41
|
-
const version = '4.1.
|
|
41
|
+
const version = '4.1.5';
|
|
42
42
|
Exchange.ccxtVersion = version;
|
|
43
43
|
//-----------------------------------------------------------------------------
|
|
44
44
|
import ace from './src/ace.js';
|
|
@@ -5,6 +5,40 @@ interface Exchange {
|
|
|
5
5
|
xreserveGetFee(params?: {}): Promise<implicitReturnType>;
|
|
6
6
|
xreserveGetDelegatedTransactions(params?: {}): Promise<implicitReturnType>;
|
|
7
7
|
xreservePostDelegateTransfer(params?: {}): Promise<implicitReturnType>;
|
|
8
|
+
v4PrivateGetMe(params?: {}): Promise<implicitReturnType>;
|
|
9
|
+
v4PrivateGetGetBalance(params?: {}): Promise<implicitReturnType>;
|
|
10
|
+
v4PrivateGetActive(params?: {}): Promise<implicitReturnType>;
|
|
11
|
+
v4PrivateGetOrderHistory(params?: {}): Promise<implicitReturnType>;
|
|
12
|
+
v4PrivateGetOrderPrivateIdTrades(params?: {}): Promise<implicitReturnType>;
|
|
13
|
+
v4PrivateGetOrderDetailsIdWithTradesWithTrades(params?: {}): Promise<implicitReturnType>;
|
|
14
|
+
v4PrivateGetTradeHistory(params?: {}): Promise<implicitReturnType>;
|
|
15
|
+
v4PrivateGetTransactionHash(params?: {}): Promise<implicitReturnType>;
|
|
16
|
+
v4PrivateGetDepositPreRequest(params?: {}): Promise<implicitReturnType>;
|
|
17
|
+
v4PrivateGetDepositCryptoAddress(params?: {}): Promise<implicitReturnType>;
|
|
18
|
+
v4PrivateGetDepositCryptoGetMerchantAddress(params?: {}): Promise<implicitReturnType>;
|
|
19
|
+
v4PrivateGetDepositHistory(params?: {}): Promise<implicitReturnType>;
|
|
20
|
+
v4PrivateGetDepositDetailsDepositId(params?: {}): Promise<implicitReturnType>;
|
|
21
|
+
v4PrivateGetWithdrawPreRequest(params?: {}): Promise<implicitReturnType>;
|
|
22
|
+
v4PrivateGetWithdrawHistory(params?: {}): Promise<implicitReturnType>;
|
|
23
|
+
v4PrivateGetWithdrawDetailsWithdrawId(params?: {}): Promise<implicitReturnType>;
|
|
24
|
+
v4PrivateGetKunaCodeId(params?: {}): Promise<implicitReturnType>;
|
|
25
|
+
v4PrivateGetKunaCodeCodeCheck(params?: {}): Promise<implicitReturnType>;
|
|
26
|
+
v4PrivateGetKunaCodeIssuedByMe(params?: {}): Promise<implicitReturnType>;
|
|
27
|
+
v4PrivateGetKunaCodeRedeemedByMe(params?: {}): Promise<implicitReturnType>;
|
|
28
|
+
v4PrivatePostOrderCreate(params?: {}): Promise<implicitReturnType>;
|
|
29
|
+
v4PrivatePostOrderCancel(params?: {}): Promise<implicitReturnType>;
|
|
30
|
+
v4PrivatePostOrderCancelMulti(params?: {}): Promise<implicitReturnType>;
|
|
31
|
+
v4PrivatePostDepositCryptoGenerateAddress(params?: {}): Promise<implicitReturnType>;
|
|
32
|
+
v4PrivatePostDepositCryptoGenerateMerchantAddress(params?: {}): Promise<implicitReturnType>;
|
|
33
|
+
v4PrivatePostWithdrawCreate(params?: {}): Promise<implicitReturnType>;
|
|
34
|
+
v4PrivatePostKunaCode(params?: {}): Promise<implicitReturnType>;
|
|
35
|
+
v4PrivatePutKunaCodeRedeem(params?: {}): Promise<implicitReturnType>;
|
|
36
|
+
v4PublicGetTimestamp(params?: {}): Promise<implicitReturnType>;
|
|
37
|
+
v4PublicGetFees(params?: {}): Promise<implicitReturnType>;
|
|
38
|
+
v4PublicGetCurrenciesTypeType(params?: {}): Promise<implicitReturnType>;
|
|
39
|
+
v4PublicGetMarketsGetAll(params?: {}): Promise<implicitReturnType>;
|
|
40
|
+
v4PublicGetMarketsTickersPairsPairs(params?: {}): Promise<implicitReturnType>;
|
|
41
|
+
v4PublicGetOrderBookPairs(params?: {}): Promise<implicitReturnType>;
|
|
8
42
|
v3PublicGetTimestamp(params?: {}): Promise<implicitReturnType>;
|
|
9
43
|
v3PublicGetCurrencies(params?: {}): Promise<implicitReturnType>;
|
|
10
44
|
v3PublicGetMarkets(params?: {}): Promise<implicitReturnType>;
|
package/js/src/base/Exchange.js
CHANGED
|
@@ -1674,6 +1674,9 @@ export default class Exchange {
|
|
|
1674
1674
|
if (!tradesAreParsed) {
|
|
1675
1675
|
trades = this.parseTrades(rawTrades, market);
|
|
1676
1676
|
}
|
|
1677
|
+
else {
|
|
1678
|
+
trades = rawTrades;
|
|
1679
|
+
}
|
|
1677
1680
|
this.number = oldNumber;
|
|
1678
1681
|
let tradesLength = 0;
|
|
1679
1682
|
const isArray = Array.isArray(trades);
|
package/js/src/coinex.js
CHANGED
package/js/src/coinsph.js
CHANGED
|
@@ -543,7 +543,6 @@ export default class coinsph extends Exchange {
|
|
|
543
543
|
const quoteId = this.safeString(market, 'quoteAsset');
|
|
544
544
|
const base = this.safeCurrencyCode(baseId);
|
|
545
545
|
const quote = this.safeCurrencyCode(quoteId);
|
|
546
|
-
const isActive = this.safeString(market, 'status') === 'TRADING';
|
|
547
546
|
const limits = this.indexBy(this.safeValue(market, 'filters'), 'filterType');
|
|
548
547
|
const amountLimits = this.safeValue(limits, 'LOT_SIZE', {});
|
|
549
548
|
const priceLimits = this.safeValue(limits, 'PRICE_FILTER', {});
|
|
@@ -563,7 +562,7 @@ export default class coinsph extends Exchange {
|
|
|
563
562
|
'swap': false,
|
|
564
563
|
'future': false,
|
|
565
564
|
'option': false,
|
|
566
|
-
'active':
|
|
565
|
+
'active': this.safeStringLower(market, 'status') === 'trading',
|
|
567
566
|
'contract': false,
|
|
568
567
|
'linear': undefined,
|
|
569
568
|
'inverse': undefined,
|
package/js/src/idex.js
CHANGED
|
@@ -1519,7 +1519,7 @@ export default class idex extends Exchange {
|
|
|
1519
1519
|
//
|
|
1520
1520
|
// { serverTime: '1655258263236' }
|
|
1521
1521
|
//
|
|
1522
|
-
return this.
|
|
1522
|
+
return this.safeInteger(response, 'serverTime');
|
|
1523
1523
|
}
|
|
1524
1524
|
async fetchWithdrawal(id, code = undefined, params = {}) {
|
|
1525
1525
|
/**
|