ccxt 4.3.18 → 4.3.20
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 +7 -5
- package/dist/cjs/ccxt.js +6 -1
- package/dist/cjs/src/abstract/woofipro.js +9 -0
- package/dist/cjs/src/ascendex.js +3 -4
- package/dist/cjs/src/base/Exchange.js +45 -2
- package/dist/cjs/src/base/functions/crypto.js +10 -3
- package/dist/cjs/src/base/functions/encode.js +6 -3
- package/dist/cjs/src/base/functions/number.js +8 -5
- package/dist/cjs/src/base/functions/rsa.js +5 -5
- package/dist/cjs/src/bigone.js +1 -1
- package/dist/cjs/src/bitfinex.js +25 -1
- package/dist/cjs/src/bitfinex2.js +59 -51
- package/dist/cjs/src/bitget.js +4 -5
- package/dist/cjs/src/bitmart.js +3 -3
- package/dist/cjs/src/bitstamp.js +1 -3
- package/dist/cjs/src/bybit.js +39 -9
- package/dist/cjs/src/coinex.js +360 -560
- package/dist/cjs/src/coinlist.js +1 -2
- package/dist/cjs/src/deribit.js +1 -1
- package/dist/cjs/src/hollaex.js +3 -3
- package/dist/cjs/src/indodax.js +1 -1
- package/dist/cjs/src/latoken.js +1 -1
- package/dist/cjs/src/mexc.js +1 -1
- package/dist/cjs/src/novadax.js +0 -1
- package/dist/cjs/src/okx.js +17 -0
- package/dist/cjs/src/phemex.js +17 -6
- package/dist/cjs/src/poloniex.js +1 -2
- package/dist/cjs/src/pro/bitget.js +136 -192
- package/dist/cjs/src/pro/coinbaseinternational.js +9 -1
- package/dist/cjs/src/pro/htx.js +12 -7
- package/dist/cjs/src/pro/okx.js +85 -0
- package/dist/cjs/src/pro/woofipro.js +1263 -0
- package/dist/cjs/src/wavesexchange.js +2 -2
- package/dist/cjs/src/woo.js +17 -3
- package/dist/cjs/src/woofipro.js +2698 -0
- package/js/ccxt.d.ts +8 -2
- package/js/ccxt.js +6 -2
- package/js/src/abstract/bitget.d.ts +3 -0
- package/js/src/abstract/bybit.d.ts +1 -0
- package/js/src/abstract/okx.d.ts +1 -0
- package/js/src/abstract/woofipro.d.ts +122 -0
- package/js/src/abstract/woofipro.js +11 -0
- package/js/src/ace.d.ts +2 -2
- package/js/src/ascendex.d.ts +5 -15
- package/js/src/ascendex.js +3 -4
- package/js/src/base/Exchange.d.ts +26 -17
- package/js/src/base/Exchange.js +45 -2
- package/js/src/base/functions/crypto.d.ts +1 -1
- package/js/src/base/functions/crypto.js +10 -3
- package/js/src/base/functions/encode.d.ts +1 -1
- package/js/src/base/functions/encode.js +6 -3
- package/js/src/base/functions/number.d.ts +1 -1
- package/js/src/base/functions/number.js +8 -5
- package/js/src/base/functions/rsa.js +6 -6
- package/js/src/base/types.d.ts +4 -0
- package/js/src/bigone.d.ts +4 -14
- package/js/src/bigone.js +1 -1
- package/js/src/binance.d.ts +13 -71
- package/js/src/binancecoinm.d.ts +2 -22
- package/js/src/binanceusdm.d.ts +2 -22
- package/js/src/bingx.d.ts +4 -14
- package/js/src/bit2c.d.ts +2 -2
- package/js/src/bitbank.d.ts +2 -2
- package/js/src/bitbns.d.ts +2 -2
- package/js/src/bitfinex.d.ts +6 -16
- package/js/src/bitfinex.js +25 -1
- package/js/src/bitfinex2.d.ts +6 -16
- package/js/src/bitfinex2.js +59 -51
- package/js/src/bitflyer.d.ts +2 -2
- package/js/src/bitget.d.ts +7 -17
- package/js/src/bitget.js +4 -5
- package/js/src/bithumb.d.ts +3 -3
- package/js/src/bitmart.d.ts +5 -14
- package/js/src/bitmart.js +3 -3
- package/js/src/bitmex.d.ts +4 -4
- package/js/src/bitopro.d.ts +2 -2
- package/js/src/bitrue.d.ts +5 -5
- package/js/src/bitso.d.ts +2 -2
- package/js/src/bitstamp.d.ts +3 -3
- package/js/src/bitstamp.js +1 -3
- package/js/src/bitteam.d.ts +2 -2
- package/js/src/bitvavo.d.ts +5 -5
- package/js/src/bl3p.d.ts +2 -2
- package/js/src/blockchaincom.d.ts +2 -2
- package/js/src/blofin.d.ts +4 -14
- package/js/src/btcalpha.d.ts +2 -2
- package/js/src/btcbox.d.ts +2 -2
- package/js/src/btcmarkets.d.ts +2 -2
- package/js/src/btcturk.d.ts +2 -2
- package/js/src/bybit.d.ts +9 -56
- package/js/src/bybit.js +39 -9
- package/js/src/cex.d.ts +2 -2
- package/js/src/coinbase.d.ts +4 -4
- package/js/src/coinbasepro.d.ts +3 -3
- package/js/src/coincheck.d.ts +2 -2
- package/js/src/coinex.d.ts +7 -17
- package/js/src/coinex.js +360 -560
- package/js/src/coinlist.d.ts +5 -15
- package/js/src/coinlist.js +1 -2
- package/js/src/coinmate.d.ts +2 -2
- package/js/src/coinmetro.d.ts +3 -3
- package/js/src/coinone.d.ts +2 -2
- package/js/src/coinsph.d.ts +2 -2
- package/js/src/coinspot.d.ts +2 -2
- package/js/src/cryptocom.d.ts +2 -2
- package/js/src/currencycom.d.ts +3 -3
- package/js/src/delta.d.ts +5 -43
- package/js/src/deribit.d.ts +7 -55
- package/js/src/deribit.js +1 -1
- package/js/src/digifinex.d.ts +5 -15
- package/js/src/exmo.d.ts +2 -2
- package/js/src/gate.d.ts +6 -54
- package/js/src/gemini.d.ts +2 -2
- package/js/src/hitbtc.d.ts +4 -14
- package/js/src/hollaex.d.ts +3 -3
- package/js/src/hollaex.js +3 -3
- package/js/src/htx.d.ts +4 -14
- package/js/src/huobijp.d.ts +4 -4
- package/js/src/hyperliquid.d.ts +1 -1
- package/js/src/idex.d.ts +3 -3
- package/js/src/independentreserve.d.ts +2 -2
- package/js/src/indodax.d.ts +2 -2
- package/js/src/indodax.js +1 -1
- package/js/src/kraken.d.ts +4 -14
- package/js/src/krakenfutures.d.ts +4 -14
- package/js/src/kucoin.d.ts +5 -15
- package/js/src/kucoinfutures.d.ts +4 -14
- package/js/src/kuna.d.ts +2 -2
- package/js/src/latoken.d.ts +5 -15
- package/js/src/latoken.js +1 -1
- package/js/src/lbank.d.ts +2 -2
- package/js/src/luno.d.ts +2 -2
- package/js/src/lykke.d.ts +2 -2
- package/js/src/mercado.d.ts +2 -2
- package/js/src/mexc.d.ts +8 -28
- package/js/src/mexc.js +1 -1
- package/js/src/ndax.d.ts +2 -2
- package/js/src/novadax.d.ts +4 -15
- package/js/src/novadax.js +0 -1
- package/js/src/okcoin.d.ts +4 -14
- package/js/src/okx.d.ts +10 -68
- package/js/src/okx.js +17 -0
- package/js/src/onetrading.d.ts +2 -2
- package/js/src/paymium.d.ts +4 -14
- package/js/src/phemex.d.ts +5 -15
- package/js/src/phemex.js +17 -6
- package/js/src/poloniex.d.ts +3 -13
- package/js/src/poloniex.js +1 -2
- package/js/src/poloniexfutures.d.ts +2 -2
- package/js/src/pro/bitget.js +137 -193
- package/js/src/pro/coinbaseinternational.d.ts +3 -3
- package/js/src/pro/coinbaseinternational.js +9 -1
- package/js/src/pro/htx.js +12 -7
- package/js/src/pro/okx.d.ts +4 -1
- package/js/src/pro/okx.js +85 -0
- package/js/src/pro/woofipro.d.ts +47 -0
- package/js/src/pro/woofipro.js +1264 -0
- package/js/src/probit.d.ts +3 -3
- package/js/src/timex.d.ts +2 -2
- package/js/src/tokocrypto.d.ts +3 -3
- package/js/src/upbit.d.ts +2 -2
- package/js/src/wavesexchange.d.ts +3 -3
- package/js/src/wavesexchange.js +2 -2
- package/js/src/wazirx.d.ts +2 -2
- package/js/src/whitebit.d.ts +3 -13
- package/js/src/woo.d.ts +7 -17
- package/js/src/woo.js +17 -3
- package/js/src/woofipro.d.ts +131 -0
- package/js/src/woofipro.js +2699 -0
- package/js/src/yobit.d.ts +2 -2
- package/js/src/zaif.d.ts +2 -2
- package/js/src/zonda.d.ts +4 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# CCXT – CryptoCurrency eXchange Trading Library
|
|
2
2
|
|
|
3
|
-
[](https://travis-ci.com/ccxt/ccxt) [](https://npmjs.com/package/ccxt) [](https://pypi.python.org/pypi/ccxt) [](https://www.npmjs.com/package/ccxt) [](https://discord.gg/ccxt) [](https://travis-ci.com/ccxt/ccxt) [](https://npmjs.com/package/ccxt) [](https://pypi.python.org/pypi/ccxt) [](https://www.npmjs.com/package/ccxt) [](https://discord.gg/ccxt) [](https://github.com/ccxt/ccxt/wiki/Exchange-Markets) [](https://twitter.com/ccxt_official)
|
|
4
4
|
|
|
5
5
|
A JavaScript / Python / PHP / C# library for cryptocurrency trading and e-commerce with support for many bitcoin/ether/altcoin exchange markets and merchant APIs.
|
|
6
6
|
|
|
@@ -52,10 +52,11 @@ Current feature list:
|
|
|
52
52
|
| [](https://m.mexc.com/auth/signup?inviteCode=1FQ1G) | mexc | [MEXC Global](https://m.mexc.com/auth/signup?inviteCode=1FQ1G) | [](https://mexcdevelop.github.io/apidocs/) | [](https://github.com/ccxt/ccxt/wiki/Certification) | [](https://ccxt.pro) | |
|
|
53
53
|
| [](https://www.okx.com/join/CCXT2023) | okx | [OKX](https://www.okx.com/join/CCXT2023) | [](https://www.okx.com/docs-v5/en/) | [](https://github.com/ccxt/ccxt/wiki/Certification) | [](https://ccxt.pro) | [](https://www.okx.com/join/CCXT2023) |
|
|
54
54
|
| [](https://x.woo.org/register?ref=YWOWC96B) | woo | [WOO X](https://x.woo.org/register?ref=YWOWC96B) | [](https://docs.woo.org/) | [](https://github.com/ccxt/ccxt/wiki/Certification) | [](https://ccxt.pro) | [](https://x.woo.org/register?ref=YWOWC96B) |
|
|
55
|
+
| [](https://dex.woo.org/en/trade?ref=CCXT) | woofipro | [WOOFI PRO](https://dex.woo.org/en/trade?ref=CCXT) | [](https://orderly.network/docs/build-on-evm/building-on-evm) | [](https://github.com/ccxt/ccxt/wiki/Certification) | [](https://ccxt.pro) | [](https://dex.woo.org/en/trade?ref=CCXT) |
|
|
55
56
|
|
|
56
57
|
## Supported Cryptocurrency Exchanges
|
|
57
58
|
|
|
58
|
-
The CCXT library currently supports the following
|
|
59
|
+
The CCXT library currently supports the following 98 cryptocurrency exchange markets and trading APIs:
|
|
59
60
|
|
|
60
61
|
| logo | id | name | ver | certified | pro |
|
|
61
62
|
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|-------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------:|-----------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|
|
|
@@ -153,6 +154,7 @@ The CCXT library currently supports the following 97 cryptocurrency exchange mar
|
|
|
153
154
|
| [](https://wazirx.com/invite/k7rrnks5) | wazirx | [WazirX](https://wazirx.com/invite/k7rrnks5) | [](https://docs.wazirx.com/#public-rest-api-for-wazirx) | | [](https://ccxt.pro) |
|
|
154
155
|
| [](https://whitebit.com/referral/d9bdf40e-28f2-4b52-b2f9-cd1415d82963) | whitebit | [WhiteBit](https://whitebit.com/referral/d9bdf40e-28f2-4b52-b2f9-cd1415d82963) | [](https://github.com/whitebit-exchange/api-docs) | | [](https://ccxt.pro) |
|
|
155
156
|
| [](https://x.woo.org/register?ref=YWOWC96B) | woo | [WOO X](https://x.woo.org/register?ref=YWOWC96B) | [](https://docs.woo.org/) | [](https://github.com/ccxt/ccxt/wiki/Certification) | [](https://ccxt.pro) |
|
|
157
|
+
| [](https://dex.woo.org/en/trade?ref=CCXT) | woofipro | [WOOFI PRO](https://dex.woo.org/en/trade?ref=CCXT) | [](https://orderly.network/docs/build-on-evm/building-on-evm) | [](https://github.com/ccxt/ccxt/wiki/Certification) | [](https://ccxt.pro) |
|
|
156
158
|
| [](https://www.yobit.net) | yobit | [YoBit](https://www.yobit.net) | [](https://www.yobit.net/en/api/) | | |
|
|
157
159
|
| [](https://zaif.jp) | zaif | [Zaif](https://zaif.jp) | [](https://techbureau-api-document.readthedocs.io/ja/latest/index.html) | | |
|
|
158
160
|
| [](https://auth.zondaglobal.com/ref/jHlbB4mIkdS1) | zonda | [Zonda](https://auth.zondaglobal.com/ref/jHlbB4mIkdS1) | [](https://docs.zondacrypto.exchange/) | | |
|
|
@@ -213,13 +215,13 @@ console.log(version, Object.keys(exchanges));
|
|
|
213
215
|
|
|
214
216
|
All-in-one browser bundle (dependencies included), served from a CDN of your choice:
|
|
215
217
|
|
|
216
|
-
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.3.
|
|
217
|
-
* unpkg: https://unpkg.com/ccxt@4.3.
|
|
218
|
+
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.3.20/dist/ccxt.browser.js
|
|
219
|
+
* unpkg: https://unpkg.com/ccxt@4.3.20/dist/ccxt.browser.js
|
|
218
220
|
|
|
219
221
|
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.
|
|
220
222
|
|
|
221
223
|
```HTML
|
|
222
|
-
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.3.
|
|
224
|
+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.3.20/dist/ccxt.browser.js"></script>
|
|
223
225
|
```
|
|
224
226
|
|
|
225
227
|
Creates a global `ccxt` object:
|
package/dist/cjs/ccxt.js
CHANGED
|
@@ -112,6 +112,7 @@ var wavesexchange = require('./src/wavesexchange.js');
|
|
|
112
112
|
var wazirx = require('./src/wazirx.js');
|
|
113
113
|
var whitebit = require('./src/whitebit.js');
|
|
114
114
|
var woo = require('./src/woo.js');
|
|
115
|
+
var woofipro = require('./src/woofipro.js');
|
|
115
116
|
var yobit = require('./src/yobit.js');
|
|
116
117
|
var zaif = require('./src/zaif.js');
|
|
117
118
|
var zonda = require('./src/zonda.js');
|
|
@@ -179,10 +180,11 @@ var upbit$1 = require('./src/pro/upbit.js');
|
|
|
179
180
|
var wazirx$1 = require('./src/pro/wazirx.js');
|
|
180
181
|
var whitebit$1 = require('./src/pro/whitebit.js');
|
|
181
182
|
var woo$1 = require('./src/pro/woo.js');
|
|
183
|
+
var woofipro$1 = require('./src/pro/woofipro.js');
|
|
182
184
|
|
|
183
185
|
//-----------------------------------------------------------------------------
|
|
184
186
|
// this is updated by vss.js when building
|
|
185
|
-
const version = '4.3.
|
|
187
|
+
const version = '4.3.20';
|
|
186
188
|
Exchange["default"].ccxtVersion = version;
|
|
187
189
|
const exchanges = {
|
|
188
190
|
'ace': ace,
|
|
@@ -285,6 +287,7 @@ const exchanges = {
|
|
|
285
287
|
'wazirx': wazirx,
|
|
286
288
|
'whitebit': whitebit,
|
|
287
289
|
'woo': woo,
|
|
290
|
+
'woofipro': woofipro,
|
|
288
291
|
'yobit': yobit,
|
|
289
292
|
'zaif': zaif,
|
|
290
293
|
'zonda': zonda,
|
|
@@ -354,6 +357,7 @@ const pro = {
|
|
|
354
357
|
'wazirx': wazirx$1,
|
|
355
358
|
'whitebit': whitebit$1,
|
|
356
359
|
'woo': woo$1,
|
|
360
|
+
'woofipro': woofipro$1,
|
|
357
361
|
};
|
|
358
362
|
pro.exchanges = Object.keys(pro);
|
|
359
363
|
pro['Exchange'] = Exchange["default"]; // now the same for rest and ts
|
|
@@ -502,6 +506,7 @@ exports.wavesexchange = wavesexchange;
|
|
|
502
506
|
exports.wazirx = wazirx;
|
|
503
507
|
exports.whitebit = whitebit;
|
|
504
508
|
exports.woo = woo;
|
|
509
|
+
exports.woofipro = woofipro;
|
|
505
510
|
exports.yobit = yobit;
|
|
506
511
|
exports.zaif = zaif;
|
|
507
512
|
exports.zonda = zonda;
|
package/dist/cjs/src/ascendex.js
CHANGED
|
@@ -3162,7 +3162,6 @@ class ascendex extends ascendex$1 {
|
|
|
3162
3162
|
const account = this.safeValue(this.accounts, 0, {});
|
|
3163
3163
|
const accountGroup = this.safeString(account, 'id');
|
|
3164
3164
|
const currency = this.currency(code);
|
|
3165
|
-
amount = this.currencyToPrecision(code, amount);
|
|
3166
3165
|
const accountsByType = this.safeValue(this.options, 'accountsByType', {});
|
|
3167
3166
|
const fromId = this.safeString(accountsByType, fromAccount, fromAccount);
|
|
3168
3167
|
const toId = this.safeString(accountsByType, toAccount, toAccount);
|
|
@@ -3171,7 +3170,7 @@ class ascendex extends ascendex$1 {
|
|
|
3171
3170
|
}
|
|
3172
3171
|
const request = {
|
|
3173
3172
|
'account-group': accountGroup,
|
|
3174
|
-
'amount': amount,
|
|
3173
|
+
'amount': this.currencyToPrecision(code, amount),
|
|
3175
3174
|
'asset': currency['id'],
|
|
3176
3175
|
'fromAccount': fromId,
|
|
3177
3176
|
'toAccount': toId,
|
|
@@ -3195,7 +3194,7 @@ class ascendex extends ascendex$1 {
|
|
|
3195
3194
|
//
|
|
3196
3195
|
// { "code": "0" }
|
|
3197
3196
|
//
|
|
3198
|
-
const status = this.
|
|
3197
|
+
const status = this.safeString(transfer, 'code');
|
|
3199
3198
|
const currencyCode = this.safeCurrencyCode(undefined, currency);
|
|
3200
3199
|
return {
|
|
3201
3200
|
'info': transfer,
|
|
@@ -3210,7 +3209,7 @@ class ascendex extends ascendex$1 {
|
|
|
3210
3209
|
};
|
|
3211
3210
|
}
|
|
3212
3211
|
parseTransferStatus(status) {
|
|
3213
|
-
if (status === 0) {
|
|
3212
|
+
if (status === '0') {
|
|
3214
3213
|
return 'ok';
|
|
3215
3214
|
}
|
|
3216
3215
|
return 'failed';
|
|
@@ -44,7 +44,7 @@ function _interopNamespace(e) {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
// ----------------------------------------------------------------------------
|
|
47
|
-
const { isNode, deepExtend, extend, clone, flatten, unique, indexBy, sortBy, sortBy2, safeFloat2, groupBy, aggregate, uuid, unCamelCase, precisionFromString, Throttler, capitalize, now, decimalToPrecision, safeValue, safeValue2, safeString, safeString2, seconds, milliseconds, binaryToBase16, numberToBE, base16ToBinary, iso8601, omit, isJsonEncodedObject, safeInteger, sum, omitZero, implodeParams, extractParams, json, merge, binaryConcat, hash, ecdsa, arrayConcat, encode, urlencode, hmac, numberToString, parseTimeframe, safeInteger2, safeStringLower, parse8601, yyyymmdd, safeStringUpper, safeTimestamp, binaryConcatArray, uuidv1, numberToLE, ymdhms, stringToBase64, decode, uuid22, safeIntegerProduct2, safeIntegerProduct, safeStringLower2, yymmdd, base58ToBinary, binaryToBase58, safeTimestamp2, rawencode, keysort, inArray, isEmpty, ordered, filterBy, uuid16, safeFloat, base64ToBinary, safeStringUpper2, urlencodeWithArrayRepeat, microseconds, binaryToBase64, strip, toArray, safeFloatN, safeIntegerN, safeIntegerProductN, safeTimestampN, safeValueN, safeStringN, safeStringLowerN, safeStringUpperN, urlencodeNested, parseDate, ymd, base64ToString, crc32, packb, TRUNCATE, ROUND, DECIMAL_PLACES, NO_PADDING, TICK_SIZE, SIGNIFICANT_DIGITS } = functions;
|
|
47
|
+
const { isNode, deepExtend, extend, clone, flatten, unique, indexBy, sortBy, sortBy2, safeFloat2, groupBy, aggregate, uuid, unCamelCase, precisionFromString, Throttler, capitalize, now, decimalToPrecision, safeValue, safeValue2, safeString, safeString2, seconds, milliseconds, binaryToBase16, numberToBE, base16ToBinary, iso8601, omit, isJsonEncodedObject, safeInteger, sum, omitZero, implodeParams, extractParams, json, merge, binaryConcat, hash, ecdsa, arrayConcat, encode, urlencode, hmac, numberToString, parseTimeframe, safeInteger2, safeStringLower, parse8601, yyyymmdd, safeStringUpper, safeTimestamp, binaryConcatArray, uuidv1, numberToLE, ymdhms, stringToBase64, decode, uuid22, safeIntegerProduct2, safeIntegerProduct, safeStringLower2, yymmdd, base58ToBinary, binaryToBase58, safeTimestamp2, rawencode, keysort, inArray, isEmpty, ordered, filterBy, uuid16, safeFloat, base64ToBinary, safeStringUpper2, urlencodeWithArrayRepeat, microseconds, binaryToBase64, strip, toArray, safeFloatN, safeIntegerN, safeIntegerProductN, safeTimestampN, safeValueN, safeStringN, safeStringLowerN, safeStringUpperN, urlencodeNested, urlencodeBase64, parseDate, ymd, base64ToString, crc32, packb, TRUNCATE, ROUND, DECIMAL_PLACES, NO_PADDING, TICK_SIZE, SIGNIFICANT_DIGITS } = functions;
|
|
48
48
|
// ----------------------------------------------------------------------------
|
|
49
49
|
/**
|
|
50
50
|
* @class Exchange
|
|
@@ -83,6 +83,7 @@ class Exchange {
|
|
|
83
83
|
this.balance = {};
|
|
84
84
|
this.orderbooks = {};
|
|
85
85
|
this.tickers = {};
|
|
86
|
+
this.fundingRates = {};
|
|
86
87
|
this.bidsasks = {};
|
|
87
88
|
this.orders = undefined;
|
|
88
89
|
this.triggerOrders = undefined;
|
|
@@ -232,6 +233,7 @@ class Exchange {
|
|
|
232
233
|
this.base64ToString = base64ToString;
|
|
233
234
|
this.crc32 = crc32;
|
|
234
235
|
this.packb = packb;
|
|
236
|
+
this.urlencodeBase64 = urlencodeBase64;
|
|
235
237
|
this.httpProxyAgentModule = undefined;
|
|
236
238
|
this.httpsProxyAgentModule = undefined;
|
|
237
239
|
this.socksProxyAgentModule = undefined;
|
|
@@ -586,6 +588,7 @@ class Exchange {
|
|
|
586
588
|
'apiKey': true,
|
|
587
589
|
'secret': true,
|
|
588
590
|
'uid': false,
|
|
591
|
+
'accountId': false,
|
|
589
592
|
'login': false,
|
|
590
593
|
'password': false,
|
|
591
594
|
'twofa': false,
|
|
@@ -2158,6 +2161,13 @@ class Exchange {
|
|
|
2158
2161
|
const res = this.parseToNumeric((value % 1));
|
|
2159
2162
|
return res === 0;
|
|
2160
2163
|
}
|
|
2164
|
+
safeIntegerOmitZero(obj, key, defaultValue = undefined) {
|
|
2165
|
+
const timestamp = this.safeInteger(obj, key, defaultValue);
|
|
2166
|
+
if (timestamp === undefined || timestamp === 0) {
|
|
2167
|
+
return undefined;
|
|
2168
|
+
}
|
|
2169
|
+
return timestamp;
|
|
2170
|
+
}
|
|
2161
2171
|
afterConstruct() {
|
|
2162
2172
|
this.createNetworksByIdObject();
|
|
2163
2173
|
}
|
|
@@ -5246,6 +5256,7 @@ class Exchange {
|
|
|
5246
5256
|
//
|
|
5247
5257
|
// the value of tickers is either a dict or a list
|
|
5248
5258
|
//
|
|
5259
|
+
//
|
|
5249
5260
|
// dict
|
|
5250
5261
|
//
|
|
5251
5262
|
// {
|
|
@@ -5340,13 +5351,17 @@ class Exchange {
|
|
|
5340
5351
|
}
|
|
5341
5352
|
return result;
|
|
5342
5353
|
}
|
|
5343
|
-
|
|
5354
|
+
handleTriggerAndParams(params) {
|
|
5344
5355
|
const isTrigger = this.safeBool2(params, 'trigger', 'stop');
|
|
5345
5356
|
if (isTrigger) {
|
|
5346
5357
|
params = this.omit(params, ['trigger', 'stop']);
|
|
5347
5358
|
}
|
|
5348
5359
|
return [isTrigger, params];
|
|
5349
5360
|
}
|
|
5361
|
+
isTriggerOrder(params) {
|
|
5362
|
+
// for backwards compatibility
|
|
5363
|
+
return this.handleTriggerAndParams(params);
|
|
5364
|
+
}
|
|
5350
5365
|
isPostOnly(isMarketOrder, exchangeSpecificParam, params = {}) {
|
|
5351
5366
|
/**
|
|
5352
5367
|
* @ignore
|
|
@@ -5933,6 +5948,9 @@ class Exchange {
|
|
|
5933
5948
|
if (method === 'fetchAccounts') {
|
|
5934
5949
|
response = await this[method](params);
|
|
5935
5950
|
}
|
|
5951
|
+
else if (method === 'getLeverageTiersPaginated') {
|
|
5952
|
+
response = await this[method](symbol, params);
|
|
5953
|
+
}
|
|
5936
5954
|
else {
|
|
5937
5955
|
response = await this[method](symbol, since, maxEntriesPerRequest, params);
|
|
5938
5956
|
}
|
|
@@ -6298,6 +6316,31 @@ class Exchange {
|
|
|
6298
6316
|
}
|
|
6299
6317
|
return marginModifications;
|
|
6300
6318
|
}
|
|
6319
|
+
async fetchTransfer(id, code = undefined, params = {}) {
|
|
6320
|
+
/**
|
|
6321
|
+
* @method
|
|
6322
|
+
* @name exchange#fetchTransfer
|
|
6323
|
+
* @description fetches a transfer
|
|
6324
|
+
* @param {string} id transfer id
|
|
6325
|
+
* @param {[string]} code unified currency code
|
|
6326
|
+
* @param {object} params extra parameters specific to the exchange api endpoint
|
|
6327
|
+
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
6328
|
+
*/
|
|
6329
|
+
throw new errors.NotSupported(this.id + ' fetchTransfer () is not supported yet');
|
|
6330
|
+
}
|
|
6331
|
+
async fetchTransfers(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
6332
|
+
/**
|
|
6333
|
+
* @method
|
|
6334
|
+
* @name exchange#fetchTransfer
|
|
6335
|
+
* @description fetches a transfer
|
|
6336
|
+
* @param {string} id transfer id
|
|
6337
|
+
* @param {int} [since] timestamp in ms of the earliest transfer to fetch
|
|
6338
|
+
* @param {int} [limit] the maximum amount of transfers to fetch
|
|
6339
|
+
* @param {object} params extra parameters specific to the exchange api endpoint
|
|
6340
|
+
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
6341
|
+
*/
|
|
6342
|
+
throw new errors.NotSupported(this.id + ' fetchTransfers () is not supported yet');
|
|
6343
|
+
}
|
|
6301
6344
|
}
|
|
6302
6345
|
|
|
6303
6346
|
exports.Exchange = Exchange;
|
|
@@ -91,9 +91,16 @@ function axolotl(request, secret, curve) {
|
|
|
91
91
|
return index.base58.encode(signature);
|
|
92
92
|
}
|
|
93
93
|
function eddsa(request, secret, curve) {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
let privateKey = undefined;
|
|
95
|
+
if (secret.length === 32) {
|
|
96
|
+
// ed25519 secret is 32 bytes
|
|
97
|
+
privateKey = secret;
|
|
98
|
+
}
|
|
99
|
+
else if (typeof secret === 'string') {
|
|
100
|
+
// secret is the base64 pem encoded key
|
|
101
|
+
// we get the last 32 bytes
|
|
102
|
+
privateKey = new Uint8Array(base64.Base64.unarmor(secret).slice(16));
|
|
103
|
+
}
|
|
97
104
|
const signature = curve.sign(request, privateKey);
|
|
98
105
|
return index.base64.encode(signature);
|
|
99
106
|
}
|
|
@@ -15,9 +15,12 @@ const json = (data, params = undefined) => JSON.stringify(data), isJsonEncodedOb
|
|
|
15
15
|
, urlencodeWithArrayRepeat = (object) => index$1.stringify(object, { arrayFormat: 'repeat' }), rawencode = (object) => index$1.stringify(object, { encode: false }), encode = index.utf8.decode // lol
|
|
16
16
|
, decode = index.utf8.encode
|
|
17
17
|
// Url-safe-base64 without equals signs, with + replaced by - and slashes replaced by underscores
|
|
18
|
-
, urlencodeBase64 = (
|
|
19
|
-
|
|
20
|
-
.replace(
|
|
18
|
+
, urlencodeBase64 = (payload) => {
|
|
19
|
+
const payload64 = (typeof payload === 'string') ? stringToBase64(payload) : binaryToBase64(payload);
|
|
20
|
+
return payload64.replace(/[=]+$/, '')
|
|
21
|
+
.replace(/\+/g, '-')
|
|
22
|
+
.replace(/\//g, '_');
|
|
23
|
+
}, numberToLE = (n, padding) => utils.numberToBytesLE(BigInt(n), padding), numberToBE = (n, padding) => utils.numberToBytesBE(BigInt(n), padding);
|
|
21
24
|
function packb(req) {
|
|
22
25
|
return msgpack.serialize(req);
|
|
23
26
|
}
|
|
@@ -96,6 +96,9 @@ function precisionFromString(str) {
|
|
|
96
96
|
}
|
|
97
97
|
/* ------------------------------------------------------------------------ */
|
|
98
98
|
const decimalToPrecision = (x, roundingMode, numPrecisionDigits, countingMode = DECIMAL_PLACES, paddingMode = NO_PADDING) => {
|
|
99
|
+
return _decimalToPrecision(x, roundingMode, numPrecisionDigits, countingMode, paddingMode);
|
|
100
|
+
};
|
|
101
|
+
const _decimalToPrecision = (x, roundingMode, numPrecisionDigits, countingMode = DECIMAL_PLACES, paddingMode = NO_PADDING) => {
|
|
99
102
|
if (countingMode === TICK_SIZE) {
|
|
100
103
|
if (typeof numPrecisionDigits === 'string') {
|
|
101
104
|
numPrecisionDigits = parseFloat(numPrecisionDigits);
|
|
@@ -107,7 +110,7 @@ const decimalToPrecision = (x, roundingMode, numPrecisionDigits, countingMode =
|
|
|
107
110
|
if (numPrecisionDigits < 0) {
|
|
108
111
|
const toNearest = Math.pow(10, -numPrecisionDigits);
|
|
109
112
|
if (roundingMode === ROUND) {
|
|
110
|
-
return (toNearest *
|
|
113
|
+
return (toNearest * _decimalToPrecision(x / toNearest, roundingMode, 0, countingMode, paddingMode)).toString();
|
|
111
114
|
}
|
|
112
115
|
if (roundingMode === TRUNCATE) {
|
|
113
116
|
return (x - (x % toNearest)).toString();
|
|
@@ -115,12 +118,12 @@ const decimalToPrecision = (x, roundingMode, numPrecisionDigits, countingMode =
|
|
|
115
118
|
}
|
|
116
119
|
/* handle tick size */
|
|
117
120
|
if (countingMode === TICK_SIZE) {
|
|
118
|
-
const precisionDigitsString =
|
|
121
|
+
const precisionDigitsString = _decimalToPrecision(numPrecisionDigits, ROUND, 22, DECIMAL_PLACES, NO_PADDING);
|
|
119
122
|
const newNumPrecisionDigits = precisionFromString(precisionDigitsString);
|
|
120
123
|
let missing = x % numPrecisionDigits;
|
|
121
124
|
// See: https://github.com/ccxt/ccxt/pull/6486
|
|
122
|
-
missing = Number(
|
|
123
|
-
const fpError =
|
|
125
|
+
missing = Number(_decimalToPrecision(missing, ROUND, 8, DECIMAL_PLACES, NO_PADDING));
|
|
126
|
+
const fpError = _decimalToPrecision(missing / numPrecisionDigits, ROUND, Math.max(newNumPrecisionDigits, 8), DECIMAL_PLACES, NO_PADDING);
|
|
124
127
|
if (precisionFromString(fpError) !== 0) {
|
|
125
128
|
if (roundingMode === ROUND) {
|
|
126
129
|
if (x > 0) {
|
|
@@ -144,7 +147,7 @@ const decimalToPrecision = (x, roundingMode, numPrecisionDigits, countingMode =
|
|
|
144
147
|
x = x - missing;
|
|
145
148
|
}
|
|
146
149
|
}
|
|
147
|
-
return
|
|
150
|
+
return _decimalToPrecision(x, ROUND, newNumPrecisionDigits, DECIMAL_PLACES, paddingMode);
|
|
148
151
|
}
|
|
149
152
|
/* Convert to a string (if needed), skip leading minus sign (if any) */
|
|
150
153
|
const str = numberToString(x);
|
|
@@ -25,22 +25,22 @@ function jwt(request, secret, hash, isRSA = false, opts = {}) {
|
|
|
25
25
|
request['iat'] = header['iat'];
|
|
26
26
|
delete header['iat'];
|
|
27
27
|
}
|
|
28
|
-
const encodedHeader = encode.urlencodeBase64(
|
|
29
|
-
const encodedData = encode.urlencodeBase64(
|
|
28
|
+
const encodedHeader = encode.urlencodeBase64(JSON.stringify(header));
|
|
29
|
+
const encodedData = encode.urlencodeBase64(JSON.stringify(request));
|
|
30
30
|
const token = [encodedHeader, encodedData].join('.');
|
|
31
31
|
const algoType = alg.slice(0, 2);
|
|
32
32
|
let signature = undefined;
|
|
33
33
|
if (algoType === 'HS') {
|
|
34
|
-
signature = encode.urlencodeBase64(crypto.hmac(token, secret, hash, '
|
|
34
|
+
signature = encode.urlencodeBase64(crypto.hmac(token, secret, hash, 'binary'));
|
|
35
35
|
}
|
|
36
36
|
else if (isRSA || algoType === 'RS') {
|
|
37
|
-
signature = encode.urlencodeBase64(rsa(token, index.utf8.encode(secret), hash));
|
|
37
|
+
signature = encode.urlencodeBase64(encode.base64ToBinary(rsa(token, index.utf8.encode(secret), hash)));
|
|
38
38
|
}
|
|
39
39
|
else if (algoType === 'ES') {
|
|
40
40
|
const signedHash = crypto.ecdsa(token, index.utf8.encode(secret), p256.P256, hash);
|
|
41
41
|
const r = signedHash.r.padStart(64, '0');
|
|
42
42
|
const s = signedHash.s.padStart(64, '0');
|
|
43
|
-
signature = encode.urlencodeBase64(encode.
|
|
43
|
+
signature = encode.urlencodeBase64(encode.base16ToBinary(r + s));
|
|
44
44
|
}
|
|
45
45
|
return [token, signature].join('.');
|
|
46
46
|
}
|
package/dist/cjs/src/bigone.js
CHANGED
package/dist/cjs/src/bitfinex.js
CHANGED
|
@@ -860,7 +860,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
860
860
|
const response = await this.publicGetTickers(params);
|
|
861
861
|
const result = {};
|
|
862
862
|
for (let i = 0; i < response.length; i++) {
|
|
863
|
-
const ticker = this.parseTicker(response[i]);
|
|
863
|
+
const ticker = this.parseTicker({ 'result': response[i] });
|
|
864
864
|
const symbol = ticker['symbol'];
|
|
865
865
|
result[symbol] = ticker;
|
|
866
866
|
}
|
|
@@ -882,9 +882,33 @@ class bitfinex extends bitfinex$1 {
|
|
|
882
882
|
'symbol': market['id'],
|
|
883
883
|
};
|
|
884
884
|
const ticker = await this.publicGetPubtickerSymbol(this.extend(request, params));
|
|
885
|
+
//
|
|
886
|
+
// {
|
|
887
|
+
// mid: '63560.5',
|
|
888
|
+
// bid: '63560.0',
|
|
889
|
+
// ask: '63561.0',
|
|
890
|
+
// last_price: '63547.0',
|
|
891
|
+
// low: '62812.0',
|
|
892
|
+
// high: '64480.0',
|
|
893
|
+
// volume: '517.25634977',
|
|
894
|
+
// timestamp: '1715102384.9849467'
|
|
895
|
+
// }
|
|
896
|
+
//
|
|
885
897
|
return this.parseTicker(ticker, market);
|
|
886
898
|
}
|
|
887
899
|
parseTicker(ticker, market = undefined) {
|
|
900
|
+
//
|
|
901
|
+
// {
|
|
902
|
+
// mid: '63560.5',
|
|
903
|
+
// bid: '63560.0',
|
|
904
|
+
// ask: '63561.0',
|
|
905
|
+
// last_price: '63547.0',
|
|
906
|
+
// low: '62812.0',
|
|
907
|
+
// high: '64480.0',
|
|
908
|
+
// volume: '517.25634977',
|
|
909
|
+
// timestamp: '1715102384.9849467'
|
|
910
|
+
// }
|
|
911
|
+
//
|
|
888
912
|
const timestamp = this.safeTimestamp(ticker, 'timestamp');
|
|
889
913
|
const marketId = this.safeString(ticker, 'pair');
|
|
890
914
|
market = this.safeMarket(marketId, market);
|
|
@@ -946,7 +946,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
946
946
|
this.throwExactlyMatchedException(this.exceptions['exact'], message, this.id + ' ' + message);
|
|
947
947
|
throw new errors.ExchangeError(this.id + ' ' + message);
|
|
948
948
|
}
|
|
949
|
-
return this.parseTransfer(response, currency);
|
|
949
|
+
return this.parseTransfer({ 'result': response }, currency);
|
|
950
950
|
}
|
|
951
951
|
parseTransfer(transfer, currency = undefined) {
|
|
952
952
|
//
|
|
@@ -972,12 +972,13 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
972
972
|
// "1.0 Tether USDt transfered from Exchange to Margin"
|
|
973
973
|
// ]
|
|
974
974
|
//
|
|
975
|
-
const
|
|
976
|
-
const
|
|
975
|
+
const result = this.safeList(transfer, 'result');
|
|
976
|
+
const timestamp = this.safeInteger(result, 0);
|
|
977
|
+
const info = this.safeValue(result, 4);
|
|
977
978
|
const fromAccount = this.safeString(info, 1);
|
|
978
979
|
const toAccount = this.safeString(info, 2);
|
|
979
980
|
const currencyId = this.safeString(info, 5);
|
|
980
|
-
const status = this.safeString(
|
|
981
|
+
const status = this.safeString(result, 6);
|
|
981
982
|
return {
|
|
982
983
|
'id': undefined,
|
|
983
984
|
'timestamp': timestamp,
|
|
@@ -987,7 +988,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
987
988
|
'currency': this.safeCurrencyCode(currencyId, currency),
|
|
988
989
|
'fromAccount': fromAccount,
|
|
989
990
|
'toAccount': toAccount,
|
|
990
|
-
'info':
|
|
991
|
+
'info': result,
|
|
991
992
|
};
|
|
992
993
|
}
|
|
993
994
|
parseTransferStatus(status) {
|
|
@@ -1073,67 +1074,73 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
1073
1074
|
//
|
|
1074
1075
|
// on trading pairs (ex. tBTCUSD)
|
|
1075
1076
|
//
|
|
1076
|
-
//
|
|
1077
|
-
//
|
|
1078
|
-
//
|
|
1079
|
-
//
|
|
1080
|
-
//
|
|
1081
|
-
//
|
|
1082
|
-
//
|
|
1083
|
-
//
|
|
1084
|
-
//
|
|
1085
|
-
//
|
|
1086
|
-
//
|
|
1087
|
-
//
|
|
1088
|
-
//
|
|
1077
|
+
// {
|
|
1078
|
+
// 'result': [
|
|
1079
|
+
// SYMBOL,
|
|
1080
|
+
// BID,
|
|
1081
|
+
// BID_SIZE,
|
|
1082
|
+
// ASK,
|
|
1083
|
+
// ASK_SIZE,
|
|
1084
|
+
// DAILY_CHANGE,
|
|
1085
|
+
// DAILY_CHANGE_RELATIVE,
|
|
1086
|
+
// LAST_PRICE,
|
|
1087
|
+
// VOLUME,
|
|
1088
|
+
// HIGH,
|
|
1089
|
+
// LOW
|
|
1090
|
+
// ]
|
|
1091
|
+
// }
|
|
1092
|
+
//
|
|
1089
1093
|
//
|
|
1090
1094
|
// on funding currencies (ex. fUSD)
|
|
1091
1095
|
//
|
|
1092
|
-
//
|
|
1093
|
-
//
|
|
1094
|
-
//
|
|
1095
|
-
//
|
|
1096
|
-
//
|
|
1097
|
-
//
|
|
1098
|
-
//
|
|
1099
|
-
//
|
|
1100
|
-
//
|
|
1101
|
-
//
|
|
1102
|
-
//
|
|
1103
|
-
//
|
|
1104
|
-
//
|
|
1105
|
-
//
|
|
1106
|
-
//
|
|
1107
|
-
//
|
|
1108
|
-
//
|
|
1109
|
-
//
|
|
1110
|
-
//
|
|
1096
|
+
// {
|
|
1097
|
+
// 'result': [
|
|
1098
|
+
// SYMBOL,
|
|
1099
|
+
// FRR,
|
|
1100
|
+
// BID,
|
|
1101
|
+
// BID_PERIOD,
|
|
1102
|
+
// BID_SIZE,
|
|
1103
|
+
// ASK,
|
|
1104
|
+
// ASK_PERIOD,
|
|
1105
|
+
// ASK_SIZE,
|
|
1106
|
+
// DAILY_CHANGE,
|
|
1107
|
+
// DAILY_CHANGE_RELATIVE,
|
|
1108
|
+
// LAST_PRICE,
|
|
1109
|
+
// VOLUME,
|
|
1110
|
+
// HIGH,
|
|
1111
|
+
// LOW,
|
|
1112
|
+
// _PLACEHOLDER,
|
|
1113
|
+
// _PLACEHOLDER,
|
|
1114
|
+
// FRR_AMOUNT_AVAILABLE
|
|
1115
|
+
// ]
|
|
1116
|
+
// }
|
|
1111
1117
|
//
|
|
1118
|
+
const result = this.safeList(ticker, 'result');
|
|
1112
1119
|
const symbol = this.safeSymbol(undefined, market);
|
|
1113
|
-
const length =
|
|
1114
|
-
const last = this.safeString(
|
|
1115
|
-
const percentage = this.safeString(
|
|
1120
|
+
const length = result.length;
|
|
1121
|
+
const last = this.safeString(result, length - 4);
|
|
1122
|
+
const percentage = this.safeString(result, length - 5);
|
|
1116
1123
|
return this.safeTicker({
|
|
1117
1124
|
'symbol': symbol,
|
|
1118
1125
|
'timestamp': undefined,
|
|
1119
1126
|
'datetime': undefined,
|
|
1120
|
-
'high': this.safeString(
|
|
1121
|
-
'low': this.safeString(
|
|
1122
|
-
'bid': this.safeString(
|
|
1123
|
-
'bidVolume': this.safeString(
|
|
1124
|
-
'ask': this.safeString(
|
|
1125
|
-
'askVolume': this.safeString(
|
|
1127
|
+
'high': this.safeString(result, length - 2),
|
|
1128
|
+
'low': this.safeString(result, length - 1),
|
|
1129
|
+
'bid': this.safeString(result, length - 10),
|
|
1130
|
+
'bidVolume': this.safeString(result, length - 9),
|
|
1131
|
+
'ask': this.safeString(result, length - 8),
|
|
1132
|
+
'askVolume': this.safeString(result, length - 7),
|
|
1126
1133
|
'vwap': undefined,
|
|
1127
1134
|
'open': undefined,
|
|
1128
1135
|
'close': last,
|
|
1129
1136
|
'last': last,
|
|
1130
1137
|
'previousClose': undefined,
|
|
1131
|
-
'change': this.safeString(
|
|
1138
|
+
'change': this.safeString(result, length - 6),
|
|
1132
1139
|
'percentage': Precise["default"].stringMul(percentage, '100'),
|
|
1133
1140
|
'average': undefined,
|
|
1134
|
-
'baseVolume': this.safeString(
|
|
1141
|
+
'baseVolume': this.safeString(result, length - 3),
|
|
1135
1142
|
'quoteVolume': undefined,
|
|
1136
|
-
'info':
|
|
1143
|
+
'info': result,
|
|
1137
1144
|
}, market);
|
|
1138
1145
|
}
|
|
1139
1146
|
async fetchTickers(symbols = undefined, params = {}) {
|
|
@@ -1202,7 +1209,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
1202
1209
|
const marketId = this.safeString(ticker, 0);
|
|
1203
1210
|
const market = this.safeMarket(marketId);
|
|
1204
1211
|
const symbol = market['symbol'];
|
|
1205
|
-
result[symbol] = this.parseTicker(ticker, market);
|
|
1212
|
+
result[symbol] = this.parseTicker({ 'result': ticker }, market);
|
|
1206
1213
|
}
|
|
1207
1214
|
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
1208
1215
|
}
|
|
@@ -1222,7 +1229,8 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
1222
1229
|
'symbol': market['id'],
|
|
1223
1230
|
};
|
|
1224
1231
|
const ticker = await this.publicGetTickerSymbol(this.extend(request, params));
|
|
1225
|
-
|
|
1232
|
+
const result = { 'result': ticker };
|
|
1233
|
+
return this.parseTicker(result, market);
|
|
1226
1234
|
}
|
|
1227
1235
|
parseTrade(trade, market = undefined) {
|
|
1228
1236
|
//
|
package/dist/cjs/src/bitget.js
CHANGED
|
@@ -310,6 +310,9 @@ class bitget extends bitget$1 {
|
|
|
310
310
|
'v2/spot/account/subaccount-assets': 2,
|
|
311
311
|
'v2/spot/account/bills': 2,
|
|
312
312
|
'v2/spot/account/transferRecords': 1,
|
|
313
|
+
'v2/account/funding-assets': 2,
|
|
314
|
+
'v2/account/bot-assets': 2,
|
|
315
|
+
'v2/account/all-account-balance': 20,
|
|
313
316
|
'v2/spot/wallet/deposit-address': 2,
|
|
314
317
|
'v2/spot/wallet/deposit-records': 2,
|
|
315
318
|
'v2/spot/wallet/withdrawal-records': 2,
|
|
@@ -2632,11 +2635,7 @@ class bitget extends bitget$1 {
|
|
|
2632
2635
|
//
|
|
2633
2636
|
const marketId = this.safeString(ticker, 'symbol');
|
|
2634
2637
|
const close = this.safeString(ticker, 'lastPr');
|
|
2635
|
-
const
|
|
2636
|
-
let timestamp = undefined;
|
|
2637
|
-
if (timestampString !== undefined) {
|
|
2638
|
-
timestamp = this.parseToInt(timestampString);
|
|
2639
|
-
}
|
|
2638
|
+
const timestamp = this.safeIntegerOmitZero(ticker, 'ts'); // exchange bitget provided 0
|
|
2640
2639
|
const change = this.safeString(ticker, 'change24h');
|
|
2641
2640
|
const open24 = this.safeString(ticker, 'open24');
|
|
2642
2641
|
const open = this.safeString(ticker, 'open');
|