ccxt 4.2.60 → 4.2.62

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.
Files changed (160) hide show
  1. package/README.md +6 -5
  2. package/build.sh +1 -1
  3. package/dist/ccxt.browser.js +11280 -3407
  4. package/dist/ccxt.browser.min.js +7 -7
  5. package/dist/cjs/ccxt.js +4 -1
  6. package/dist/cjs/src/abstract/hyperliquid.js +9 -0
  7. package/dist/cjs/src/base/Exchange.js +22 -1
  8. package/dist/cjs/src/base/functions/encode.js +5 -0
  9. package/dist/cjs/src/base/functions.js +1 -0
  10. package/dist/cjs/src/bitfinex2.js +1 -1
  11. package/dist/cjs/src/bitget.js +74 -23
  12. package/dist/cjs/src/coinbase.js +108 -103
  13. package/dist/cjs/src/coinex.js +61 -1
  14. package/dist/cjs/src/hyperliquid.js +2035 -0
  15. package/dist/cjs/src/kraken.js +8 -2
  16. package/dist/cjs/src/krakenfutures.js +28 -0
  17. package/dist/cjs/src/kucoinfutures.js +2 -2
  18. package/dist/cjs/src/okx.js +1 -1
  19. package/dist/cjs/src/phemex.js +2 -2
  20. package/dist/cjs/src/pro/bingx.js +1 -0
  21. package/dist/cjs/src/static_dependencies/ethers/abi-coder.js +158 -0
  22. package/dist/cjs/src/static_dependencies/ethers/address/address.js +144 -0
  23. package/dist/cjs/src/static_dependencies/ethers/coders/abstract-coder.js +407 -0
  24. package/dist/cjs/src/static_dependencies/ethers/coders/address.js +45 -0
  25. package/dist/cjs/src/static_dependencies/ethers/coders/anonymous.js +28 -0
  26. package/dist/cjs/src/static_dependencies/ethers/coders/array.js +176 -0
  27. package/dist/cjs/src/static_dependencies/ethers/coders/boolean.js +27 -0
  28. package/dist/cjs/src/static_dependencies/ethers/coders/bytes.js +52 -0
  29. package/dist/cjs/src/static_dependencies/ethers/coders/fixed-bytes.js +45 -0
  30. package/dist/cjs/src/static_dependencies/ethers/coders/null.js +30 -0
  31. package/dist/cjs/src/static_dependencies/ethers/coders/number.js +60 -0
  32. package/dist/cjs/src/static_dependencies/ethers/coders/string.js +27 -0
  33. package/dist/cjs/src/static_dependencies/ethers/coders/tuple.js +68 -0
  34. package/dist/cjs/src/static_dependencies/ethers/fragments.js +614 -0
  35. package/dist/cjs/src/static_dependencies/ethers/hash/typed-data.js +492 -0
  36. package/dist/cjs/src/static_dependencies/ethers/index.js +35 -0
  37. package/dist/cjs/src/static_dependencies/ethers/interface.js +44 -0
  38. package/dist/cjs/src/static_dependencies/ethers/typed.js +618 -0
  39. package/dist/cjs/src/static_dependencies/ethers/utils/base58.js +20 -0
  40. package/dist/cjs/src/static_dependencies/ethers/utils/data.js +134 -0
  41. package/dist/cjs/src/static_dependencies/ethers/utils/errors.js +228 -0
  42. package/dist/cjs/src/static_dependencies/ethers/utils/events.js +13 -0
  43. package/dist/cjs/src/static_dependencies/ethers/utils/fixednumber.js +29 -0
  44. package/dist/cjs/src/static_dependencies/ethers/utils/index.js +53 -0
  45. package/dist/cjs/src/static_dependencies/ethers/utils/maths.js +231 -0
  46. package/dist/cjs/src/static_dependencies/ethers/utils/properties.js +47 -0
  47. package/dist/cjs/src/static_dependencies/ethers/utils/utf8.js +218 -0
  48. package/dist/cjs/src/static_dependencies/messagepack/msgpack.js +292 -0
  49. package/dist/cjs/src/tokocrypto.js +22 -2
  50. package/dist/cjs/src/wazirx.js +308 -3
  51. package/js/ccxt.d.ts +5 -2
  52. package/js/ccxt.js +4 -2
  53. package/js/src/abstract/coinbase.d.ts +3 -3
  54. package/js/src/abstract/hyperliquid.d.ts +9 -0
  55. package/js/src/abstract/hyperliquid.js +11 -0
  56. package/js/src/base/Exchange.d.ts +4 -0
  57. package/js/src/base/Exchange.js +13 -1
  58. package/js/src/base/functions/encode.d.ts +2 -1
  59. package/js/src/base/functions/encode.js +5 -1
  60. package/js/src/bitfinex2.js +1 -1
  61. package/js/src/bitget.js +74 -23
  62. package/js/src/coinbase.js +108 -103
  63. package/js/src/coinex.d.ts +3 -1
  64. package/js/src/coinex.js +61 -1
  65. package/js/src/hyperliquid.d.ts +83 -0
  66. package/js/src/hyperliquid.js +2036 -0
  67. package/js/src/kraken.js +8 -2
  68. package/js/src/krakenfutures.d.ts +2 -1
  69. package/js/src/krakenfutures.js +28 -0
  70. package/js/src/kucoinfutures.js +2 -2
  71. package/js/src/okx.js +1 -1
  72. package/js/src/phemex.js +2 -2
  73. package/js/src/pro/bingx.js +1 -0
  74. package/js/src/static_dependencies/ethers/abi-coder.d.ts +50 -0
  75. package/js/src/static_dependencies/ethers/abi-coder.js +148 -0
  76. package/js/src/static_dependencies/ethers/address/address.d.ts +55 -0
  77. package/js/src/static_dependencies/ethers/address/address.js +162 -0
  78. package/js/src/static_dependencies/ethers/address/checks.d.ts +80 -0
  79. package/js/src/static_dependencies/ethers/address/checks.js +119 -0
  80. package/js/src/static_dependencies/ethers/address/contract-address.d.ts +47 -0
  81. package/js/src/static_dependencies/ethers/address/contract-address.js +73 -0
  82. package/js/src/static_dependencies/ethers/address/index.d.ts +48 -0
  83. package/js/src/static_dependencies/ethers/address/index.js +24 -0
  84. package/js/src/static_dependencies/ethers/bytes32.d.ts +14 -0
  85. package/js/src/static_dependencies/ethers/bytes32.js +45 -0
  86. package/js/src/static_dependencies/ethers/coders/abstract-coder.d.ts +120 -0
  87. package/js/src/static_dependencies/ethers/coders/abstract-coder.js +424 -0
  88. package/js/src/static_dependencies/ethers/coders/address.d.ts +12 -0
  89. package/js/src/static_dependencies/ethers/coders/address.js +34 -0
  90. package/js/src/static_dependencies/ethers/coders/anonymous.d.ts +14 -0
  91. package/js/src/static_dependencies/ethers/coders/anonymous.js +27 -0
  92. package/js/src/static_dependencies/ethers/coders/array.d.ts +24 -0
  93. package/js/src/static_dependencies/ethers/coders/array.js +162 -0
  94. package/js/src/static_dependencies/ethers/coders/boolean.d.ts +12 -0
  95. package/js/src/static_dependencies/ethers/coders/boolean.js +26 -0
  96. package/js/src/static_dependencies/ethers/coders/bytes.d.ts +18 -0
  97. package/js/src/static_dependencies/ethers/coders/bytes.js +39 -0
  98. package/js/src/static_dependencies/ethers/coders/fixed-bytes.d.ts +14 -0
  99. package/js/src/static_dependencies/ethers/coders/fixed-bytes.js +32 -0
  100. package/js/src/static_dependencies/ethers/coders/null.d.ts +11 -0
  101. package/js/src/static_dependencies/ethers/coders/null.js +29 -0
  102. package/js/src/static_dependencies/ethers/coders/number.d.ts +15 -0
  103. package/js/src/static_dependencies/ethers/coders/number.js +48 -0
  104. package/js/src/static_dependencies/ethers/coders/string.d.ts +12 -0
  105. package/js/src/static_dependencies/ethers/coders/string.js +26 -0
  106. package/js/src/static_dependencies/ethers/coders/tuple.d.ts +15 -0
  107. package/js/src/static_dependencies/ethers/coders/tuple.js +67 -0
  108. package/js/src/static_dependencies/ethers/fragments.d.ts +458 -0
  109. package/js/src/static_dependencies/ethers/fragments.js +1252 -0
  110. package/js/src/static_dependencies/ethers/hash/index.d.ts +10 -0
  111. package/js/src/static_dependencies/ethers/hash/index.js +15 -0
  112. package/js/src/static_dependencies/ethers/hash/solidity.d.ts +30 -0
  113. package/js/src/static_dependencies/ethers/hash/solidity.js +107 -0
  114. package/js/src/static_dependencies/ethers/hash/typed-data.d.ts +144 -0
  115. package/js/src/static_dependencies/ethers/hash/typed-data.js +490 -0
  116. package/js/src/static_dependencies/ethers/index.d.ts +19 -0
  117. package/js/src/static_dependencies/ethers/index.js +22 -0
  118. package/js/src/static_dependencies/ethers/interface.d.ts +380 -0
  119. package/js/src/static_dependencies/ethers/interface.js +990 -0
  120. package/js/src/static_dependencies/ethers/typed.d.ts +569 -0
  121. package/js/src/static_dependencies/ethers/typed.js +608 -0
  122. package/js/src/static_dependencies/ethers/utils/base58.d.ts +22 -0
  123. package/js/src/static_dependencies/ethers/utils/base58.js +68 -0
  124. package/js/src/static_dependencies/ethers/utils/base64-browser.d.ts +3 -0
  125. package/js/src/static_dependencies/ethers/utils/base64-browser.js +24 -0
  126. package/js/src/static_dependencies/ethers/utils/base64.d.ts +39 -0
  127. package/js/src/static_dependencies/ethers/utils/base64.js +58 -0
  128. package/js/src/static_dependencies/ethers/utils/data.d.ts +92 -0
  129. package/js/src/static_dependencies/ethers/utils/data.js +175 -0
  130. package/js/src/static_dependencies/ethers/utils/errors.d.ts +509 -0
  131. package/js/src/static_dependencies/ethers/utils/errors.js +227 -0
  132. package/js/src/static_dependencies/ethers/utils/events.d.ts +76 -0
  133. package/js/src/static_dependencies/ethers/utils/events.js +52 -0
  134. package/js/src/static_dependencies/ethers/utils/fixednumber.d.ts +251 -0
  135. package/js/src/static_dependencies/ethers/utils/fixednumber.js +529 -0
  136. package/js/src/static_dependencies/ethers/utils/index.d.ts +30 -0
  137. package/js/src/static_dependencies/ethers/utils/index.js +38 -0
  138. package/js/src/static_dependencies/ethers/utils/maths.d.ts +65 -0
  139. package/js/src/static_dependencies/ethers/utils/maths.js +220 -0
  140. package/js/src/static_dependencies/ethers/utils/properties.d.ts +22 -0
  141. package/js/src/static_dependencies/ethers/utils/properties.js +59 -0
  142. package/js/src/static_dependencies/ethers/utils/rlp-decode.d.ts +5 -0
  143. package/js/src/static_dependencies/ethers/utils/rlp-decode.js +84 -0
  144. package/js/src/static_dependencies/ethers/utils/rlp-encode.d.ts +5 -0
  145. package/js/src/static_dependencies/ethers/utils/rlp-encode.js +54 -0
  146. package/js/src/static_dependencies/ethers/utils/rlp.d.ts +16 -0
  147. package/js/src/static_dependencies/ethers/utils/rlp.js +14 -0
  148. package/js/src/static_dependencies/ethers/utils/units.d.ts +23 -0
  149. package/js/src/static_dependencies/ethers/utils/units.js +88 -0
  150. package/js/src/static_dependencies/ethers/utils/utf8.d.ts +95 -0
  151. package/js/src/static_dependencies/ethers/utils/utf8.js +225 -0
  152. package/js/src/static_dependencies/ethers/utils/uuid.d.ts +7 -0
  153. package/js/src/static_dependencies/ethers/utils/uuid.js +35 -0
  154. package/js/src/static_dependencies/messagepack/msgpack.d.ts +2 -0
  155. package/js/src/static_dependencies/messagepack/msgpack.js +572 -0
  156. package/js/src/tokocrypto.js +22 -2
  157. package/js/src/wazirx.d.ts +12 -1
  158. package/js/src/wazirx.js +308 -3
  159. package/package.json +1 -1
  160. package/skip-tests.json +18 -0
package/js/src/wazirx.js CHANGED
@@ -47,8 +47,8 @@ export default class wazirx extends Exchange {
47
47
  'fetchClosedOrders': false,
48
48
  'fetchCrossBorrowRate': false,
49
49
  'fetchCrossBorrowRates': false,
50
- 'fetchCurrencies': false,
51
- 'fetchDepositAddress': false,
50
+ 'fetchCurrencies': true,
51
+ 'fetchDepositAddress': true,
52
52
  'fetchDepositAddressesByNetwork': false,
53
53
  'fetchDeposits': true,
54
54
  'fetchDepositsWithdrawals': false,
@@ -88,7 +88,7 @@ export default class wazirx extends Exchange {
88
88
  'fetchTransactionFees': false,
89
89
  'fetchTransactions': false,
90
90
  'fetchTransfers': false,
91
- 'fetchWithdrawals': false,
91
+ 'fetchWithdrawals': true,
92
92
  'reduceMargin': false,
93
93
  'repayCrossMargin': false,
94
94
  'repayIsolatedMargin': false,
@@ -182,6 +182,9 @@ export default class wazirx extends Exchange {
182
182
  'options': {
183
183
  // 'fetchTradesMethod': 'privateGetHistoricalTrades',
184
184
  'recvWindow': 10000,
185
+ 'networks': {
186
+ // You can get network from fetchCurrencies
187
+ },
185
188
  },
186
189
  });
187
190
  }
@@ -919,6 +922,308 @@ export default class wazirx extends Exchange {
919
922
  };
920
923
  return this.safeString(statuses, status, status);
921
924
  }
925
+ async fetchCurrencies(params = {}) {
926
+ /**
927
+ * @method
928
+ * @name wazirx#fetchCurrencies
929
+ * @description fetches all available currencies on an exchange
930
+ * @see https://docs.wazirx.com/#all-coins-39-information-user_data
931
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
932
+ * @returns {object} an associative dictionary of currencies
933
+ */
934
+ if (!this.checkRequiredCredentials(false)) {
935
+ return undefined;
936
+ }
937
+ const response = await this.privateGetCoins(params);
938
+ //
939
+ // [
940
+ // {
941
+ // "currency": "btc",
942
+ // "name": "Bitcoin",
943
+ // "networkList": [
944
+ // {
945
+ // "addressRegex": "^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$|^(bc1)[0-9A-Za-z]{39,59}$",
946
+ // "confirmations": 4,
947
+ // "depositDesc": {
948
+ // "description": ""
949
+ // },
950
+ // "depositDust": "0.00000001",
951
+ // "depositEnable": true,
952
+ // "disclaimer": "• \u003cb\u003eSend only using the Bitcoin network.\u003c/b\u003e Using any other network will result in loss of funds.\u003cbr/\u003e• \u003cb\u003eDeposit only BTC to this deposit address.\u003c/b\u003e Depositing any other asset will result in a loss of funds.\u003cbr/\u003e",
953
+ // "fullName": null,
954
+ // "hidden": {
955
+ // "deposit": false,
956
+ // "withdraw": false
957
+ // },
958
+ // "isDefault": true,
959
+ // "maxWithdrawAmount": "3",
960
+ // "minConfirm": 4,
961
+ // "minWithdrawAmount": "0.003",
962
+ // "name": "Bitcoin",
963
+ // "network": "btc",
964
+ // "order": 3,
965
+ // "precision": 8,
966
+ // "requestId": "6d67a13d-26f7-4941-9856-94eba4adfe78",
967
+ // "shortName": "BTC",
968
+ // "specialTip": "Please ensure to select \u003cb\u003eBitcoin\u003c/b\u003e network at sender's wallet.",
969
+ // "withdrawConsent": {
970
+ // "helpUrl": null,
971
+ // "message": "I confirm that this withdrawal of crypto assets is being done to my own wallet, as specified above. I authorize you to share travel rule information with the destination wallet service provider wherever applicable."
972
+ // },
973
+ // "withdrawDesc": {
974
+ // "description": ""
975
+ // },
976
+ // "withdrawEnable": true,
977
+ // "withdrawFee": "0.0015"
978
+ // }
979
+ // ],
980
+ // "rapidListed": false
981
+ // }
982
+ // ]
983
+ //
984
+ const result = {};
985
+ for (let i = 0; i < response.length; i++) {
986
+ const currency = response[i];
987
+ const currencyId = this.safeString(currency, 'currency');
988
+ const code = this.safeCurrencyCode(currencyId);
989
+ const name = this.safeString(currency, 'name');
990
+ const chains = this.safeList(currency, 'networkList', []);
991
+ const networks = {};
992
+ let minPrecision = undefined;
993
+ let minWithdrawFeeString = undefined;
994
+ let minWithdrawString = undefined;
995
+ let maxWithdrawString = undefined;
996
+ let minDepositString = undefined;
997
+ let deposit = false;
998
+ let withdraw = false;
999
+ for (let j = 0; j < chains.length; j++) {
1000
+ const chain = chains[j];
1001
+ const networkId = this.safeString(chain, 'network');
1002
+ const networkCode = this.networkIdToCode(networkId);
1003
+ const precision = this.parseNumber(this.parsePrecision(this.safeString(chain, 'precision')));
1004
+ minPrecision = (minPrecision === undefined) ? precision : Math.min(minPrecision, precision);
1005
+ const depositAllowed = this.safeBool(chain, 'depositEnable');
1006
+ deposit = (depositAllowed) ? depositAllowed : deposit;
1007
+ const withdrawAllowed = this.safeBool(chain, 'withdrawEnable');
1008
+ withdraw = (withdrawAllowed) ? withdrawAllowed : withdraw;
1009
+ const withdrawFeeString = this.safeString(chain, 'withdrawFee');
1010
+ if (withdrawFeeString !== undefined) {
1011
+ minWithdrawFeeString = (minWithdrawFeeString === undefined) ? withdrawFeeString : Precise.stringMin(withdrawFeeString, minWithdrawFeeString);
1012
+ }
1013
+ const minNetworkWithdrawString = this.safeString(chain, 'minWithdrawAmount');
1014
+ if (minNetworkWithdrawString !== undefined) {
1015
+ minWithdrawString = (minWithdrawString === undefined) ? minNetworkWithdrawString : Precise.stringMin(minNetworkWithdrawString, minWithdrawString);
1016
+ }
1017
+ const maxNetworkWithdrawString = this.safeString(chain, 'maxWithdrawAmount');
1018
+ if (maxNetworkWithdrawString !== undefined) {
1019
+ maxWithdrawString = (maxWithdrawString === undefined) ? maxNetworkWithdrawString : Precise.stringMin(maxNetworkWithdrawString, maxWithdrawString);
1020
+ }
1021
+ const minNetworkDepositString = this.safeString(chain, 'depositDust');
1022
+ if (minNetworkDepositString !== undefined) {
1023
+ minDepositString = (minDepositString === undefined) ? minNetworkDepositString : Precise.stringMin(minNetworkDepositString, minDepositString);
1024
+ }
1025
+ networks[networkCode] = {
1026
+ 'info': chain,
1027
+ 'id': networkId,
1028
+ 'network': networkCode,
1029
+ 'active': depositAllowed && withdrawAllowed,
1030
+ 'deposit': depositAllowed,
1031
+ 'withdraw': withdrawAllowed,
1032
+ 'fee': this.parseNumber(withdrawFeeString),
1033
+ 'precision': precision,
1034
+ 'limits': {
1035
+ 'withdraw': {
1036
+ 'min': this.parseNumber(minNetworkWithdrawString),
1037
+ 'max': this.parseNumber(maxNetworkWithdrawString),
1038
+ },
1039
+ 'deposit': {
1040
+ 'min': this.parseNumber(minNetworkDepositString),
1041
+ 'max': undefined,
1042
+ },
1043
+ },
1044
+ };
1045
+ }
1046
+ result[code] = {
1047
+ 'info': currency,
1048
+ 'code': code,
1049
+ 'id': currencyId,
1050
+ 'name': name,
1051
+ 'active': deposit && withdraw,
1052
+ 'deposit': deposit,
1053
+ 'withdraw': withdraw,
1054
+ 'fee': this.parseNumber(minWithdrawFeeString),
1055
+ 'precision': minPrecision,
1056
+ 'limits': {
1057
+ 'amount': {
1058
+ 'min': undefined,
1059
+ 'max': undefined,
1060
+ },
1061
+ 'withdraw': {
1062
+ 'min': this.parseNumber(minWithdrawString),
1063
+ 'max': this.parseNumber(maxWithdrawString),
1064
+ },
1065
+ 'deposit': {
1066
+ 'min': this.parseNumber(minDepositString),
1067
+ 'max': undefined,
1068
+ },
1069
+ },
1070
+ 'networks': networks,
1071
+ };
1072
+ }
1073
+ return result;
1074
+ }
1075
+ async fetchDepositAddress(code, params = {}) {
1076
+ /**
1077
+ * @method
1078
+ * @name wazirx#fetchDepositAddress
1079
+ * @description fetch the deposit address for a currency associated with this account
1080
+ * @see https://docs.wazirx.com/#deposit-address-supporting-network-user_data
1081
+ * @param {string} code unified currency code of the currency for the deposit address
1082
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1083
+ * @param {string} [params.network] unified network code, you can get network from fetchCurrencies
1084
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
1085
+ */
1086
+ await this.loadMarkets();
1087
+ const currency = this.currency(code);
1088
+ const networkCode = this.safeString(params, 'network');
1089
+ params = this.omit(params, 'network');
1090
+ if (networkCode === undefined) {
1091
+ throw new ArgumentsRequired(this.id + ' fetchDepositAddress() requires a network parameter');
1092
+ }
1093
+ const request = {
1094
+ 'coin': currency['id'],
1095
+ 'network': this.networkCodeToId(networkCode, code),
1096
+ };
1097
+ const response = await this.privateGetCryptoDepositsAddress(this.extend(request, params));
1098
+ //
1099
+ // {
1100
+ // "address": "bc1qrzpyzh69pfclpqy7c3yg8rkjsy49se7642v4q3",
1101
+ // "coin": "btc",
1102
+ // "url": "https: //live.blockcypher.com/btc/address/bc1qrzpyzh69pfclpqy7c3yg8rkjsy49se7642v4q3"
1103
+ // }
1104
+ //
1105
+ return {
1106
+ 'currency': code,
1107
+ 'address': this.safeString(response, 'address'),
1108
+ 'tag': undefined,
1109
+ 'network': this.networkCodeToId(networkCode, code),
1110
+ 'info': response,
1111
+ };
1112
+ }
1113
+ async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
1114
+ /**
1115
+ * @method
1116
+ * @name wazirx#fetchWithdrawals
1117
+ * @description fetch all withdrawals made from an account
1118
+ * @see https://docs.wazirx.com/#withdraw-history-supporting-network-user_data
1119
+ * @param {string} code unified currency code
1120
+ * @param {int} [since] the earliest time in ms to fetch withdrawals for
1121
+ * @param {int} [limit] the maximum number of withdrawals structures to retrieve
1122
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1123
+ * @param {int} [params.until] the latest time in ms to fetch entries for
1124
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
1125
+ */
1126
+ await this.loadMarkets();
1127
+ const request = {};
1128
+ let currency = undefined;
1129
+ if (code !== undefined) {
1130
+ currency = this.currency(code);
1131
+ request['coin'] = currency['id'];
1132
+ }
1133
+ if (limit !== undefined) {
1134
+ request['limit'] = limit;
1135
+ }
1136
+ const until = this.safeInteger(params, 'until');
1137
+ params = this.omit(params, ['until']);
1138
+ if (since !== undefined) {
1139
+ request['startTime'] = since;
1140
+ }
1141
+ if (until !== undefined) {
1142
+ request['endTime'] = until;
1143
+ }
1144
+ const response = await this.privateGetCryptoWithdraws(this.extend(request, params));
1145
+ //
1146
+ // [
1147
+ // {
1148
+ // "address": "0x94df8b352de7f46f64b01d3666bf6e936e44ce60",
1149
+ // "amount": "8.91000000",
1150
+ // "createdAt": "2019-10-12 09:12:02",
1151
+ // "lastUpdated": "2019-10-12 11:12:02",
1152
+ // "coin": "USDT",
1153
+ // "id": "b6ae22b3aa844210a7041aee7589627c",
1154
+ // "withdrawOrderId": "WITHDRAWtest123",
1155
+ // "network": "ETH",
1156
+ // "status": 1,
1157
+ // "transactionFee": "0.004",
1158
+ // "failureInfo":"The address is not valid. Please confirm with the recipient",
1159
+ // "txId": "0xb5ef8c13b968a406cc62a93a8bd80f9e9a906ef1b3fcf20a2e48573c17659268"
1160
+ // }
1161
+ // ]
1162
+ //
1163
+ return this.parseTransactions(response, currency, since, limit);
1164
+ }
1165
+ parseTransactionStatus(status) {
1166
+ const statuses = {
1167
+ '0': 'ok',
1168
+ '1': 'fail',
1169
+ '2': 'pending',
1170
+ '3': 'canceled',
1171
+ };
1172
+ return this.safeString(statuses, status, status);
1173
+ }
1174
+ parseTransaction(transaction, currency = undefined) {
1175
+ //
1176
+ // {
1177
+ // "address": "0x94df8b352de7f46f64b01d3666bf6e936e44ce60",
1178
+ // "amount": "8.91000000",
1179
+ // "createdAt": "2019-10-12 09:12:02",
1180
+ // "lastUpdated": "2019-10-12 11:12:02",
1181
+ // "coin": "USDT",
1182
+ // "id": "b6ae22b3aa844210a7041aee7589627c",
1183
+ // "withdrawOrderId": "WITHDRAWtest123",
1184
+ // "network": "ETH",
1185
+ // "status": 1,
1186
+ // "transactionFee": "0.004",
1187
+ // "failureInfo": "The address is not valid. Please confirm with the recipient",
1188
+ // "txId": "0xb5ef8c13b968a406cc62a93a8bd80f9e9a906ef1b3fcf20a2e48573c17659268"
1189
+ // }
1190
+ //
1191
+ const currencyId = this.safeString(transaction, 'coin');
1192
+ const code = this.safeCurrencyCode(currencyId, currency);
1193
+ const timestamp = this.parse8601(this.safeString(transaction, 'createdAt'));
1194
+ const updated = this.parse8601(this.safeString(transaction, 'lastUpdated'));
1195
+ const status = this.parseTransactionStatus(this.safeString(transaction, 'status'));
1196
+ const feeCost = this.safeNumber(transaction, 'transactionFee');
1197
+ let fee = undefined;
1198
+ if (feeCost !== undefined) {
1199
+ fee = {
1200
+ 'cost': feeCost,
1201
+ 'currency': code,
1202
+ };
1203
+ }
1204
+ return {
1205
+ 'info': transaction,
1206
+ 'id': this.safeString(transaction, 'id'),
1207
+ 'txid': this.safeString(transaction, 'txId'),
1208
+ 'timestamp': timestamp,
1209
+ 'datetime': this.iso8601(timestamp),
1210
+ 'network': this.networkIdToCode(this.safeString(transaction, 'network')),
1211
+ 'address': this.safeString(transaction, 'address'),
1212
+ 'addressTo': this.safeString(transaction, 'address'),
1213
+ 'addressFrom': undefined,
1214
+ 'tag': undefined,
1215
+ 'tagTo': undefined,
1216
+ 'tagFrom': undefined,
1217
+ 'type': 'withdrawal',
1218
+ 'amount': this.safeNumber(transaction, 'amount'),
1219
+ 'currency': code,
1220
+ 'status': status,
1221
+ 'updated': updated,
1222
+ 'fee': fee,
1223
+ 'internal': undefined,
1224
+ 'comment': undefined,
1225
+ };
1226
+ }
922
1227
  sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
923
1228
  let url = this.urls['api']['rest'] + '/' + path;
924
1229
  if (api === 'public') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccxt",
3
- "version": "4.2.60",
3
+ "version": "4.2.62",
4
4
  "description": "A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges",
5
5
  "unpkg": "dist/ccxt.browser.js",
6
6
  "type": "module",
package/skip-tests.json CHANGED
@@ -1603,6 +1603,8 @@
1603
1603
  "wazirx": {
1604
1604
  "skipWs": "timeouts",
1605
1605
  "skipMethods": {
1606
+ "loadMarkets": "private",
1607
+ "fetchCurrencies": "private",
1606
1608
  "fetchTickers": {
1607
1609
  "ask": "https://app.travis-ci.com/github/ccxt/ccxt/builds/269200021#L4048"
1608
1610
  }
@@ -1632,5 +1634,21 @@
1632
1634
  "withdraw": "not provided"
1633
1635
  }
1634
1636
  }
1637
+ },
1638
+ "hyperliquid": {
1639
+ "skipMethods": {
1640
+ "loadMarkets": {
1641
+ "currencyIdAndCode": "different"
1642
+ },
1643
+ "fetchTrades": "private",
1644
+ "fetchCurrencies": {
1645
+ "id": "skip",
1646
+ "precision": "skip",
1647
+ "networks": "not provided",
1648
+ "limits" : "not provided",
1649
+ "deposit": "not provided",
1650
+ "withdraw": "not provided"
1651
+ }
1652
+ }
1635
1653
  }
1636
1654
  }