@grvt/client 1.4.19 → 1.4.21

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/TDG/index.d.ts CHANGED
@@ -26,9 +26,7 @@ export declare class TDG {
26
26
  /**
27
27
  * @see https://api-docs.grvt.io/trading_api/#withdrawal
28
28
  */
29
- withdrawal(payload: IApiWithdrawalRequest, config?: AxiosRequestConfig): Promise<{
30
- acknowledgement: boolean;
31
- }>;
29
+ withdrawal(payload: IApiWithdrawalRequest, config?: AxiosRequestConfig): Promise<IAckResponse>;
32
30
  socializedLossStatus(config?: AxiosRequestConfig): Promise<IApiSocializedLossStatusResponse>;
33
31
  /**
34
32
  * @see https://api-docs.grvt.io/trading_api/#withdrawal-history
@@ -152,7 +152,8 @@ export declare enum EOrderRejectReason {
152
152
  DERISK_MUST_BE_IOC = "DERISK_MUST_BE_IOC",
153
153
  DERISK_MUST_BE_REDUCE_ONLY = "DERISK_MUST_BE_REDUCE_ONLY",
154
154
  DERISK_NOT_SUPPORTED = "DERISK_NOT_SUPPORTED",
155
- INVALID_ORDER_TYPE = "INVALID_ORDER_TYPE"
155
+ INVALID_ORDER_TYPE = "INVALID_ORDER_TYPE",
156
+ CURRENCY_NOT_DEFINED = "CURRENCY_NOT_DEFINED"
156
157
  }
157
158
  export declare enum EOrderStatus {
158
159
  PENDING = "PENDING",
@@ -973,6 +974,7 @@ export interface IApiVaultPerformanceTrend {
973
974
  start_interval?: string;
974
975
  end_interval?: string;
975
976
  trading_volume?: string;
977
+ realized_pnl?: string;
976
978
  }
977
979
  export interface IApiVaultRedeemCancelRequest {
978
980
  main_account_id?: string;
@@ -1514,6 +1516,7 @@ export interface ISnapSubAccountSummary {
1514
1516
  positions?: IPositionSummary[];
1515
1517
  is_vault?: boolean;
1516
1518
  vault_im_additions?: string;
1519
+ spot_balances?: ISpotBalance[];
1517
1520
  }
1518
1521
  export interface ISnapVaultSummary {
1519
1522
  event_time?: string;
@@ -1672,6 +1675,9 @@ export interface IUserVaultCategoryEventPayLoad {
1672
1675
  action?: string;
1673
1676
  num_bumps?: string;
1674
1677
  }
1678
+ export interface IVaultBurnLpTokenResults {
1679
+ vault_share_price?: string;
1680
+ }
1675
1681
  export interface IVaultInvestResults {
1676
1682
  token_index_price?: string;
1677
1683
  vault_total_equity?: string;
@@ -298,6 +298,8 @@ var EOrderRejectReason;
298
298
  EOrderRejectReason["DERISK_NOT_SUPPORTED"] = "DERISK_NOT_SUPPORTED";
299
299
  // the order type is invalid
300
300
  EOrderRejectReason["INVALID_ORDER_TYPE"] = "INVALID_ORDER_TYPE";
301
+ // the currency is not defined
302
+ EOrderRejectReason["CURRENCY_NOT_DEFINED"] = "CURRENCY_NOT_DEFINED";
301
303
  })(EOrderRejectReason || (exports.EOrderRejectReason = EOrderRejectReason = {}));
302
304
  var EOrderStatus;
303
305
  (function (EOrderStatus) {
@@ -110,7 +110,8 @@ exports.EOrderRejectReasonInt = Object.freeze({
110
110
  [data_interface_1.EOrderRejectReason.DERISK_MUST_BE_IOC]: 33,
111
111
  [data_interface_1.EOrderRejectReason.DERISK_MUST_BE_REDUCE_ONLY]: 34,
112
112
  [data_interface_1.EOrderRejectReason.DERISK_NOT_SUPPORTED]: 35,
113
- [data_interface_1.EOrderRejectReason.INVALID_ORDER_TYPE]: 36
113
+ [data_interface_1.EOrderRejectReason.INVALID_ORDER_TYPE]: 36,
114
+ [data_interface_1.EOrderRejectReason.CURRENCY_NOT_DEFINED]: 37
114
115
  });
115
116
  exports.EOrderStatusInt = Object.freeze({
116
117
  [data_interface_1.EOrderStatus.PENDING]: 1,
@@ -6,11 +6,13 @@ exports.API_VAULT_PERFORMANCE_TREND_MAP = Object.freeze({
6
6
  FULL_TO_LITE: {
7
7
  start_interval: 'si',
8
8
  end_interval: 'ei',
9
- trading_volume: 'tv'
9
+ trading_volume: 'tv',
10
+ realized_pnl: 'rp'
10
11
  },
11
12
  LITE_TO_FULL: {
12
13
  si: 'start_interval',
13
14
  ei: 'end_interval',
14
- tv: 'trading_volume'
15
+ tv: 'trading_volume',
16
+ rp: 'realized_pnl'
15
17
  }
16
18
  });
@@ -256,6 +256,7 @@ export * from './trigger_order_metadata';
256
256
  export * from './user_category_affinity_score';
257
257
  export * from './user_tracking_event';
258
258
  export * from './user_vault_category_event_pay_load';
259
+ export * from './vault_burn_lp_token_results';
259
260
  export * from './vault_invest_results';
260
261
  export * from './vault_investor_history';
261
262
  export * from './vault_investor_summary';
@@ -272,6 +272,7 @@ __exportStar(require("./trigger_order_metadata"), exports);
272
272
  __exportStar(require("./user_category_affinity_score"), exports);
273
273
  __exportStar(require("./user_tracking_event"), exports);
274
274
  __exportStar(require("./user_vault_category_event_pay_load"), exports);
275
+ __exportStar(require("./vault_burn_lp_token_results"), exports);
275
276
  __exportStar(require("./vault_invest_results"), exports);
276
277
  __exportStar(require("./vault_investor_history"), exports);
277
278
  __exportStar(require("./vault_investor_summary"), exports);
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SNAP_SUB_ACCOUNT_SUMMARY_MAP = void 0;
4
4
  const position_summary_1 = require("./position_summary");
5
+ const api_spot_balance_1 = require("./api_spot_balance");
5
6
  // Schema map for the 'SNAP_SUB_ACCOUNT_SUMMARY' struct.
6
7
  exports.SNAP_SUB_ACCOUNT_SUMMARY_MAP = Object.freeze({
7
8
  FULL_TO_LITE: {
@@ -12,7 +13,8 @@ exports.SNAP_SUB_ACCOUNT_SUMMARY_MAP = Object.freeze({
12
13
  unrealized_pnl: 'up',
13
14
  positions: ['p', [position_summary_1.POSITION_SUMMARY_MAP.FULL_TO_LITE]],
14
15
  is_vault: 'iv',
15
- vault_im_additions: 'vi'
16
+ vault_im_additions: 'vi',
17
+ spot_balances: ['sb', [api_spot_balance_1.SPOT_BALANCE_MAP.FULL_TO_LITE]]
16
18
  },
17
19
  LITE_TO_FULL: {
18
20
  et: 'event_time',
@@ -22,6 +24,7 @@ exports.SNAP_SUB_ACCOUNT_SUMMARY_MAP = Object.freeze({
22
24
  up: 'unrealized_pnl',
23
25
  p: ['positions', [position_summary_1.POSITION_SUMMARY_MAP.LITE_TO_FULL]],
24
26
  iv: 'is_vault',
25
- vi: 'vault_im_additions'
27
+ vi: 'vault_im_additions',
28
+ sb: ['spot_balances', [api_spot_balance_1.SPOT_BALANCE_MAP.LITE_TO_FULL]]
26
29
  }
27
30
  });
@@ -0,0 +1,2 @@
1
+ import { type SchemaPairMap } from './types';
2
+ export declare const VAULT_BURN_LP_TOKEN_RESULTS_MAP: SchemaPairMap;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VAULT_BURN_LP_TOKEN_RESULTS_MAP = void 0;
4
+ // Schema map for the 'VAULT_BURN_LP_TOKEN_RESULTS' struct.
5
+ exports.VAULT_BURN_LP_TOKEN_RESULTS_MAP = Object.freeze({
6
+ FULL_TO_LITE: {
7
+ vault_share_price: 'vs'
8
+ },
9
+ LITE_TO_FULL: {
10
+ vs: 'vault_share_price'
11
+ }
12
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grvt/client",
3
- "version": "1.4.19",
3
+ "version": "1.4.21",
4
4
  "description": "Node.js & JavaScript client for GRVT REST APIs & WebSockets",
5
5
  "repository": {
6
6
  "type": "git",