ccxt 4.4.28 → 4.4.30

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 (62) hide show
  1. package/README.md +3 -3
  2. package/dist/ccxt.browser.min.js +3 -3
  3. package/dist/cjs/ccxt.js +1 -1
  4. package/dist/cjs/src/alpaca.js +59 -7
  5. package/dist/cjs/src/base/Exchange.js +3 -0
  6. package/dist/cjs/src/binance.js +9 -0
  7. package/dist/cjs/src/bitbns.js +12 -12
  8. package/dist/cjs/src/bitfinex.js +9 -9
  9. package/dist/cjs/src/bitget.js +99 -6
  10. package/dist/cjs/src/bitmart.js +53 -53
  11. package/dist/cjs/src/bitopro.js +21 -21
  12. package/dist/cjs/src/bitrue.js +28 -28
  13. package/dist/cjs/src/bitvavo.js +4 -0
  14. package/dist/cjs/src/bybit.js +51 -646
  15. package/dist/cjs/src/coincatch.js +24 -4
  16. package/dist/cjs/src/deribit.js +7 -3
  17. package/dist/cjs/src/hyperliquid.js +108 -4
  18. package/dist/cjs/src/lbank.js +7 -1
  19. package/dist/cjs/src/pro/bitvavo.js +2 -1
  20. package/dist/cjs/src/pro/blofin.js +2 -1
  21. package/dist/cjs/src/pro/mexc.js +198 -30
  22. package/dist/cjs/src/vertex.js +51 -6
  23. package/examples/README.md +0 -2
  24. package/examples/js/cli.js +7 -0
  25. package/js/ccxt.d.ts +1 -1
  26. package/js/ccxt.js +1 -1
  27. package/js/src/abstract/alpaca.d.ts +1 -0
  28. package/js/src/abstract/binance.d.ts +9 -0
  29. package/js/src/abstract/binancecoinm.d.ts +9 -0
  30. package/js/src/abstract/binanceus.d.ts +9 -0
  31. package/js/src/abstract/binanceusdm.d.ts +9 -0
  32. package/js/src/abstract/bybit.d.ts +0 -13
  33. package/js/src/alpaca.d.ts +2 -0
  34. package/js/src/alpaca.js +59 -7
  35. package/js/src/base/Exchange.d.ts +1 -0
  36. package/js/src/base/Exchange.js +3 -0
  37. package/js/src/binance.js +9 -0
  38. package/js/src/bitbns.js +12 -12
  39. package/js/src/bitfinex.js +9 -9
  40. package/js/src/bitfinex2.d.ts +1 -1
  41. package/js/src/bitget.d.ts +2 -1
  42. package/js/src/bitget.js +99 -6
  43. package/js/src/bitmart.d.ts +1 -1
  44. package/js/src/bitmart.js +53 -53
  45. package/js/src/bitopro.js +21 -21
  46. package/js/src/bitrue.js +28 -28
  47. package/js/src/bitvavo.js +4 -0
  48. package/js/src/bybit.d.ts +0 -8
  49. package/js/src/bybit.js +51 -646
  50. package/js/src/coincatch.d.ts +1 -1
  51. package/js/src/coincatch.js +24 -4
  52. package/js/src/deribit.js +7 -3
  53. package/js/src/hyperliquid.d.ts +3 -1
  54. package/js/src/hyperliquid.js +108 -4
  55. package/js/src/lbank.js +7 -1
  56. package/js/src/pro/bitvavo.js +2 -1
  57. package/js/src/pro/blofin.js +2 -1
  58. package/js/src/pro/mexc.js +198 -30
  59. package/js/src/vertex.d.ts +4 -2
  60. package/js/src/vertex.js +51 -6
  61. package/js/src/whitebit.d.ts +1 -1
  62. package/package.json +1 -1
package/js/src/vertex.js CHANGED
@@ -2895,13 +2895,58 @@ export default class vertex extends Exchange {
2895
2895
  };
2896
2896
  const response = await this.v1GatewayPostExecute(this.extend(request, params));
2897
2897
  //
2898
- // {
2899
- // "status": "success",
2900
- // "signature": {signature},
2901
- // "request_type": "execute_withdraw_collateral"
2902
- // }
2898
+ // {
2899
+ // "status": "success",
2900
+ // "signature": {signature},
2901
+ // "request_type": "execute_withdraw_collateral"
2902
+ // }
2903
2903
  //
2904
- return response;
2904
+ const transaction = this.parseTransaction(response, currency);
2905
+ return this.extend(transaction, {
2906
+ 'amount': amount,
2907
+ 'address': address,
2908
+ });
2909
+ }
2910
+ parseTransaction(transaction, currency = undefined) {
2911
+ //
2912
+ // {
2913
+ // "status": "success",
2914
+ // "signature": {signature},
2915
+ // "request_type": "execute_withdraw_collateral"
2916
+ // }
2917
+ //
2918
+ let code = undefined;
2919
+ if (currency !== undefined) {
2920
+ code = currency['code'];
2921
+ }
2922
+ return {
2923
+ 'info': transaction,
2924
+ 'id': undefined,
2925
+ 'txid': undefined,
2926
+ 'timestamp': undefined,
2927
+ 'datetime': undefined,
2928
+ 'addressFrom': undefined,
2929
+ 'address': undefined,
2930
+ 'addressTo': undefined,
2931
+ 'tagFrom': undefined,
2932
+ 'tag': undefined,
2933
+ 'tagTo': undefined,
2934
+ 'type': 'withdrawal',
2935
+ 'amount': undefined,
2936
+ 'currency': code,
2937
+ 'status': this.parseTransactionStatus(this.safeString(transaction, 'status')),
2938
+ 'updated': undefined,
2939
+ 'network': undefined,
2940
+ 'comment': undefined,
2941
+ 'internal': undefined,
2942
+ 'fee': undefined,
2943
+ };
2944
+ }
2945
+ parseTransactionStatus(status) {
2946
+ const statuses = {
2947
+ 'success': 'ok',
2948
+ };
2949
+ return this.safeString(statuses, status, status);
2905
2950
  }
2906
2951
  handlePublicAddress(methodName, params) {
2907
2952
  let userAux = undefined;
@@ -52,7 +52,7 @@ export default class whitebit extends Exchange {
52
52
  setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<any>;
53
53
  transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
54
54
  parseTransfer(transfer: Dict, currency?: Currency): TransferEntry;
55
- withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<any>;
55
+ withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
56
56
  parseTransaction(transaction: Dict, currency?: Currency): Transaction;
57
57
  parseTransactionStatus(status: Str): string;
58
58
  fetchDeposit(id: string, code?: Str, params?: {}): Promise<Transaction>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccxt",
3
- "version": "4.4.28",
3
+ "version": "4.4.30",
4
4
  "description": "A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges",
5
5
  "unpkg": "dist/ccxt.browser.min.js",
6
6
  "type": "module",