@0xmonaco/types 0.8.15 → 0.8.16

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.
@@ -348,22 +348,30 @@ export interface PortfolioChartResponse {
348
348
  * Returned by the /api/v1/accounts/me/portfolio endpoint.
349
349
  */
350
350
  export interface PortfolioStats {
351
- /** Realized profit and loss (sum of CREDIT minus DEBIT from TRADE ledger entries) */
351
+ /**
352
+ * Realized PnL over the period on an average-cost basis: gains/losses are
353
+ * booked only when a position is reduced or closed, net of fees, across spot
354
+ * and perps (including funding). Excludes unrealized PnL on open positions.
355
+ */
352
356
  pnl: string;
353
357
  /** Total trading volume (sum of quoteVolume from trades) */
354
358
  volume: string;
355
- /** Maximum peak-to-trough drawdown on running PnL */
356
- maxDrawdown: string;
359
+ /** Maximum peak-to-trough drawdown on running PnL. Null when there are no closed trades in the period. */
360
+ maxDrawdown: string | null;
357
361
  /** Total number of orders placed */
358
362
  totalOrders: number;
359
363
  /** Total number of trades executed */
360
364
  totalTrades: number;
361
365
  /** Total fees paid */
362
366
  feesPaid: string;
363
- /** Ratio of profitable trades to total trades */
364
- winLossRatio: string;
365
- /** Total equity in USDC terms (sum of all spot balances) */
367
+ /** Ratio of profitable trades to total trades. Null when there are no closed trades in the period. */
368
+ winLossRatio: number | null;
369
+ /** Total equity in USDC terms (spot balances plus perps account equity) */
366
370
  totalEquity: string;
371
+ /** Spot account equity in USDC terms */
372
+ spotEquity: string;
373
+ /** Perpetuals (margin) account equity in USDC terms */
374
+ perpsEquity: string;
367
375
  }
368
376
  /**
369
377
  * User profile information returned by the /api/v1/accounts/me endpoint.
@@ -3650,7 +3650,7 @@ export interface components {
3650
3650
  */
3651
3651
  feesPaid?: string | null;
3652
3652
  /**
3653
- * @description Profit and loss (CREDIT - DEBIT from trade ledger entries)
3653
+ * @description Realized PnL over the period, average-cost basis: gains/losses booked only when a position is reduced or closed, net of fees. Covers spot and perps (including funding). Excludes unrealized PnL on open positions.
3654
3654
  * @example -0.01
3655
3655
  */
3656
3656
  pnl?: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xmonaco/types",
3
- "version": "0.8.15",
3
+ "version": "0.8.16",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,7 +20,7 @@
20
20
  "lint": "biome lint ."
21
21
  },
22
22
  "dependencies": {
23
- "@0xmonaco/contracts": "0.8.15",
23
+ "@0xmonaco/contracts": "0.8.16",
24
24
  "zod": "^4.1.12"
25
25
  },
26
26
  "peerDependencies": {