@0xmonaco/types 1.0.26-develop.aeb6d5b → 1.0.28

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/dist/index.d.ts CHANGED
@@ -17,7 +17,6 @@ export * from "./pitpass";
17
17
  export * from "./portfolio";
18
18
  export * from "./positions";
19
19
  export * from "./profile";
20
- export * from "./pulse";
21
20
  export * from "./sdk";
22
21
  export * from "./sub-accounts";
23
22
  export * from "./trading";
package/dist/index.js CHANGED
@@ -18,7 +18,6 @@ export * from "./pitpass";
18
18
  export * from "./portfolio";
19
19
  export * from "./positions";
20
20
  export * from "./profile";
21
- export * from "./pulse";
22
21
  export * from "./sdk";
23
22
  export * from "./sub-accounts";
24
23
  export * from "./trading";
@@ -213,17 +213,6 @@ export interface ScreenerItem {
213
213
  totalQuoteVolumeLtd: string;
214
214
  /** Life-to-date cumulative number of trades since inception (0 if no trades yet) */
215
215
  totalTradeCountLtd: number;
216
- /**
217
- * Latest settled funding rate as a decimal fraction per funding window (the
218
- * capped settled value); null for spot pairs and margin pairs with no
219
- * settled funding window yet
220
- */
221
- latestFundingRate: string | null;
222
- /**
223
- * Close time of the latest settled funding window (ms since epoch, as string);
224
- * null for spot pairs and margin pairs with no settled funding window yet
225
- */
226
- lastFundingTime: string | null;
227
216
  }
228
217
  /**
229
218
  * Paginated screener response, sorted by quoteVolume24h desc (nulls last)
@@ -355,16 +344,12 @@ export interface FundingRecord {
355
344
  tradingPairId: string;
356
345
  fundingRate: string;
357
346
  cumulativeFundingPerUnit?: string;
358
- /** True when the window settled at the carried last rate (sparse-sample rule). */
359
- carried?: boolean;
360
347
  }
361
348
  export interface ListFundingHistoryParams {
362
349
  startTime?: string;
363
350
  endTime?: string;
364
351
  page?: number;
365
352
  pageSize?: number;
366
- /** Sort direction for epoch: "ASC" or "DESC" (default DESC). */
367
- orderBy?: "ASC" | "DESC";
368
353
  }
369
354
  export interface ListFundingHistoryResponse {
370
355
  records: FundingRecord[];
@@ -372,20 +357,6 @@ export interface ListFundingHistoryResponse {
372
357
  page: number;
373
358
  pageSize: number;
374
359
  }
375
- export interface ListAllFundingHistoryParams {
376
- startTime?: string;
377
- endTime?: string;
378
- page?: number;
379
- pageSize?: number;
380
- /** Sort direction for settledAt (default DESC). */
381
- orderBy?: "ASC" | "DESC";
382
- }
383
- export interface ListAllFundingHistoryResponse {
384
- records: FundingRecord[];
385
- total: number;
386
- page: number;
387
- pageSize: number;
388
- }
389
360
  export interface OpenInterest {
390
361
  tradingPairId: string;
391
362
  openInterest?: string;
@@ -460,14 +431,5 @@ export interface MarketAPI extends BaseAPI {
460
431
  getIndexPrice(tradingPairId: string): Promise<IndexPrice>;
461
432
  getFundingState(tradingPairId: string): Promise<FundingState>;
462
433
  listFundingHistory(tradingPairId: string, params?: ListFundingHistoryParams): Promise<ListFundingHistoryResponse>;
463
- /**
464
- * Fetch settled funding history across every market in one call, so clients
465
- * don't have to fan out one listFundingHistory request per trading pair.
466
- * Each record carries its tradingPairId; sorted by settledAt (default DESC).
467
- * @param params - Optional time bounds (ms-epoch strings, inclusive on
468
- * settledAt), pagination, and orderBy (ASC or DESC)
469
- * @returns Promise resolving to the paginated all-markets funding history
470
- */
471
- listAllFundingHistory(params?: ListAllFundingHistoryParams): Promise<ListAllFundingHistoryResponse>;
472
434
  getOpenInterest(tradingPairId: string): Promise<OpenInterest>;
473
435
  }
@@ -77,17 +77,10 @@ export interface PortfolioRealizedTotals {
77
77
  netRealizedPnl: string;
78
78
  }
79
79
  export interface PortfolioClosedTradeStats {
80
- /** Fill-based: closing fills in the window (partial fills each counted). */
81
80
  count: number;
82
- /**
83
- * Position-level: each position (one flat -> open -> flat round-trip) is
84
- * classified once by its net realized PnL after all fees.
85
- */
86
81
  winners: number;
87
82
  losers: number;
88
83
  breakEven: number;
89
- /** Total classified positions (= winners + losers + breakEven). */
90
- positions: number;
91
84
  winRatePct?: string;
92
85
  }
93
86
  export interface PortfolioBestDay {
@@ -10,23 +10,12 @@ export interface Position {
10
10
  marginMode?: MarginMode;
11
11
  tradingPairId: string;
12
12
  side: PositionSide;
13
- /**
14
- * Open rows: current absolute position quantity. Terminal rows
15
- * (CLOSED/LIQUIDATED/EXPIRED): total quantity closed over the position's
16
- * life, summed from its reducing executions when available.
17
- */
18
13
  size: string;
19
14
  entryPrice: string;
20
15
  markPrice: string;
21
16
  indexPrice?: string;
22
17
  unrealizedPnl: string;
23
18
  realizedPnl: string;
24
- /**
25
- * Open rows: current isolated collateral for this position's risk bucket.
26
- * Terminal rows: total initial margin allocated across the position's
27
- * reducing executions when available — the margin basis for lifetime
28
- * realized return.
29
- */
30
19
  isolatedMargin: string;
31
20
  leverage?: string;
32
21
  /**
@@ -50,16 +39,6 @@ export interface Position {
50
39
  liquidationPrice: string;
51
40
  status: PositionStatus;
52
41
  updatedAt: string;
53
- /**
54
- * Lifetime realized PnL net of trading fees and funding. Terminal rows
55
- * only; absent when the position's reducing executions are unavailable.
56
- */
57
- netRealizedPnl?: string;
58
- /**
59
- * Lifetime realized return on the total allocated initial margin, as a
60
- * percentage. Terminal rows only; absent when unavailable.
61
- */
62
- realizedRoe?: string;
63
42
  }
64
43
  export interface ListPositionsParams {
65
44
  marginAccountId?: string;
@@ -427,12 +427,7 @@ export interface PortfolioStats {
427
427
  totalTrades: number;
428
428
  /** Total fees paid */
429
429
  feesPaid: string;
430
- /**
431
- * Position-level win rate: winning positions over winning + losing positions
432
- * (break-even excluded). Each position (one flat→open→flat round-trip) is
433
- * classified once by its net realized PnL after all fees, not per fill. Null
434
- * when the period has no closed positions.
435
- */
430
+ /** Ratio of profitable trades to total trades. Null when there are no closed trades in the period. */
436
431
  winLossRatio: number | null;
437
432
  /** Total equity in USDC terms (spot balances plus perps account equity) */
438
433
  totalEquity: string;
@@ -10,7 +10,6 @@ import type { PitpassAPI } from "../pitpass";
10
10
  import type { PortfolioAPI } from "../portfolio";
11
11
  import type { PositionsAPI } from "../positions";
12
12
  import type { ProfileAPI } from "../profile";
13
- import type { PulseAPI } from "../pulse";
14
13
  import type { SubAccountsAPI } from "../sub-accounts";
15
14
  import type { TradingAPI, TradingMode } from "../trading";
16
15
  import type { VaultAPI } from "../vault";
@@ -102,8 +101,6 @@ export interface MonacoSDK {
102
101
  whitelist: WhitelistAPI;
103
102
  /** Profile operations API */
104
103
  profile: ProfileAPI;
105
- /** Public market-pulse news feed API (cached, hourly-refreshed) */
106
- pulse: PulseAPI;
107
104
  /** Orderbook REST API for fetching orderbook snapshots */
108
105
  orderbook: {
109
106
  getOrderbook: (tradingPairId: string, options?: {
@@ -38,7 +38,9 @@ export interface TradingAPI extends BaseAPI {
38
38
  positionSide?: PositionSide;
39
39
  leverage?: string;
40
40
  reduceOnly?: boolean;
41
+ /** @deprecated Entry-attached TP/SL is rejected; use position TP/SL. */
41
42
  takeProfit?: ParentTpSlLegParams;
43
+ /** @deprecated Entry-attached TP/SL is rejected; use position TP/SL. */
42
44
  stopLoss?: ParentTpSlLegParams;
43
45
  }): Promise<CreateOrderResponse>;
44
46
  /**
@@ -63,7 +65,9 @@ export interface TradingAPI extends BaseAPI {
63
65
  positionSide?: PositionSide;
64
66
  leverage?: string;
65
67
  reduceOnly?: boolean;
68
+ /** @deprecated Entry-attached TP/SL is rejected; use position TP/SL. */
66
69
  takeProfit?: ParentTpSlLegParams;
70
+ /** @deprecated Entry-attached TP/SL is rejected; use position TP/SL. */
67
71
  stopLoss?: ParentTpSlLegParams;
68
72
  }): Promise<CreateOrderResponse>;
69
73
  /**
@@ -38,6 +38,8 @@ export interface MatchResult {
38
38
  } | null;
39
39
  }
40
40
  /**
41
+ * @deprecated Entry-attached TP/SL is rejected. Use position-associated TP/SL.
42
+ *
41
43
  * Parent TP/SL follows the parent order quantity and becomes active once the
42
44
  * parent order creates or extends a position.
43
45
  */
@@ -141,12 +141,8 @@ export const PlaceLimitOrderSchema = z
141
141
  message: "leverage is required for normal MARGIN orders",
142
142
  path: ["options", "leverage"],
143
143
  })
144
- .refine((data) => !hasParentTpSl(data.options) || data.options?.tradingMode === "MARGIN", {
145
- message: "takeProfit/stopLoss are only supported for MARGIN orders",
146
- path: ["options"],
147
- })
148
- .refine((data) => !hasParentTpSl(data.options) || data.options?.reduceOnly !== true, {
149
- message: "takeProfit/stopLoss cannot be attached to reduce-only orders",
144
+ .refine((data) => !hasParentTpSl(data.options), {
145
+ message: "Entry-attached TP/SL are no longer supported; create position TP/SL after the position opens",
150
146
  path: ["options"],
151
147
  })
152
148
  .refine((data) => data.options?.riskBucketCollateral === undefined || data.options?.tradingMode === "MARGIN", {
@@ -214,12 +210,8 @@ export const PlaceMarketOrderSchema = z
214
210
  message: "leverage is required for normal MARGIN orders",
215
211
  path: ["options", "leverage"],
216
212
  })
217
- .refine((data) => !hasParentTpSl(data.options) || data.options?.tradingMode === "MARGIN", {
218
- message: "takeProfit/stopLoss are only supported for MARGIN orders",
219
- path: ["options"],
220
- })
221
- .refine((data) => !hasParentTpSl(data.options) || data.options?.reduceOnly !== true, {
222
- message: "takeProfit/stopLoss cannot be attached to reduce-only orders",
213
+ .refine((data) => !hasParentTpSl(data.options), {
214
+ message: "Entry-attached TP/SL are no longer supported; create position TP/SL after the position opens",
223
215
  path: ["options"],
224
216
  })
225
217
  .refine((data) => data.options?.riskBucketCollateral === undefined || data.options?.tradingMode === "MARGIN", {
@@ -10,6 +10,6 @@
10
10
  * hand-written SDK surface. CI regenerates it and fails on a diff, identical to
11
11
  * the `schema.ts` wire-types tripwire (MON-1476), so it can never go stale.
12
12
  */
13
- export declare const OPERATION_IDS: readonly ["add_position_margin", "attach_position_tp_sl", "batch_cancel_all", "batch_cancel_all_by_pair", "batch_cancel_orders", "batch_close_all_positions", "batch_create_orders", "batch_replace_orders", "cancel_conditional_order", "cancel_order", "close_position", "create_challenge", "create_delegated_session", "create_order", "create_sub_account_limit", "delete_sub_account_limit", "get_application_config", "get_application_stats", "get_available_collateral", "get_candles", "get_conditional_order", "get_faucet_info", "get_funding_state", "get_index_price", "get_margin_account_movements", "get_margin_account_summary", "get_mark_price", "get_market_metadata", "get_market_stats", "get_my_fee_tier", "get_my_trader_code", "get_open_interest", "get_order_by_id", "get_orderbook_snapshot", "get_orders", "get_parent_margin_account_movements", "get_parent_margin_account_summary", "get_perp_market_config", "get_perp_market_summary", "get_portfolio_assets", "get_portfolio_chart", "get_portfolio_margin", "get_portfolio_performance", "get_portfolio_realized_pnl", "get_portfolio_stats", "get_portfolio_summary", "get_position", "get_position_pnl_history", "get_position_risk", "get_pulse", "get_rewards_balance", "get_screener", "get_sub_account_limits", "get_trade_by_id", "get_trader_code_info", "get_trades", "get_trading_pair_by_id", "get_user_balance_by_asset", "get_user_balances", "get_user_movements", "get_user_profile", "get_user_trades", "get_withdrawal", "health_check", "initiate_withdrawal", "list_all_funding_history", "list_application_balances", "list_application_movements", "list_application_orders", "list_application_users", "list_conditional_orders", "list_delegated_agent_owners", "list_delegated_agents", "list_funding_history", "list_funding_payments", "list_margin_accounts", "list_pending_withdrawals", "list_position_history", "list_positions", "list_sub_accounts_with_balances", "list_trading_pairs", "mint_tokens", "reduce_position_margin", "refresh_session", "replace_order", "revoke_delegated_agent", "revoke_session", "simulate_fees", "simulate_order_risk", "simulate_parent_margin_order_risk", "simulate_risk_bucket_order_risk", "submit_whitelist", "transfer_collateral_from_margin_account", "transfer_collateral_from_parent_margin_account", "transfer_collateral_to_margin_account", "transfer_collateral_to_parent_margin_account", "transfer_collateral_to_risk_bucket", "transfer_rewards", "update_sub_account_limit", "upsert_delegated_agent", "verify_signature"];
13
+ export declare const OPERATION_IDS: readonly ["add_position_margin", "attach_position_tp_sl", "batch_cancel_all", "batch_cancel_all_by_pair", "batch_cancel_orders", "batch_close_all_positions", "batch_create_orders", "batch_replace_orders", "cancel_conditional_order", "cancel_order", "close_position", "create_challenge", "create_delegated_session", "create_order", "create_sub_account_limit", "delete_sub_account_limit", "get_application_config", "get_application_stats", "get_available_collateral", "get_candles", "get_conditional_order", "get_faucet_info", "get_funding_state", "get_index_price", "get_margin_account_movements", "get_margin_account_summary", "get_mark_price", "get_market_metadata", "get_market_stats", "get_my_fee_tier", "get_my_trader_code", "get_open_interest", "get_order_by_id", "get_orderbook_snapshot", "get_orders", "get_parent_margin_account_movements", "get_parent_margin_account_summary", "get_perp_market_config", "get_perp_market_summary", "get_portfolio_assets", "get_portfolio_chart", "get_portfolio_margin", "get_portfolio_performance", "get_portfolio_realized_pnl", "get_portfolio_stats", "get_portfolio_summary", "get_position", "get_position_pnl_history", "get_position_risk", "get_rewards_balance", "get_screener", "get_sub_account_limits", "get_trade_by_id", "get_trader_code_info", "get_trades", "get_trading_pair_by_id", "get_user_balance_by_asset", "get_user_balances", "get_user_movements", "get_user_profile", "get_user_trades", "get_withdrawal", "health_check", "initiate_withdrawal", "list_application_balances", "list_application_movements", "list_application_orders", "list_application_users", "list_conditional_orders", "list_delegated_agent_owners", "list_delegated_agents", "list_funding_history", "list_funding_payments", "list_margin_accounts", "list_pending_withdrawals", "list_position_history", "list_positions", "list_sub_accounts_with_balances", "list_trading_pairs", "mint_tokens", "reduce_position_margin", "refresh_session", "replace_order", "revoke_delegated_agent", "revoke_session", "simulate_fees", "simulate_order_risk", "simulate_parent_margin_order_risk", "simulate_risk_bucket_order_risk", "submit_whitelist", "transfer_collateral_from_margin_account", "transfer_collateral_from_parent_margin_account", "transfer_collateral_to_margin_account", "transfer_collateral_to_parent_margin_account", "transfer_collateral_to_risk_bucket", "transfer_rewards", "update_sub_account_limit", "upsert_delegated_agent", "verify_signature"];
14
14
  /** Union of every OpenAPI operationId in the spec. */
15
15
  export type OperationId = (typeof OPERATION_IDS)[number];
@@ -60,7 +60,6 @@ export const OPERATION_IDS = [
60
60
  "get_position",
61
61
  "get_position_pnl_history",
62
62
  "get_position_risk",
63
- "get_pulse",
64
63
  "get_rewards_balance",
65
64
  "get_screener",
66
65
  "get_sub_account_limits",
@@ -76,7 +75,6 @@ export const OPERATION_IDS = [
76
75
  "get_withdrawal",
77
76
  "health_check",
78
77
  "initiate_withdrawal",
79
- "list_all_funding_history",
80
78
  "list_application_balances",
81
79
  "list_application_movements",
82
80
  "list_application_orders",
@@ -1052,26 +1052,6 @@ export interface paths {
1052
1052
  patch?: never;
1053
1053
  trace?: never;
1054
1054
  };
1055
- "/api/v1/market/funding/history": {
1056
- parameters: {
1057
- query?: never;
1058
- header?: never;
1059
- path?: never;
1060
- cookie?: never;
1061
- };
1062
- /**
1063
- * @description Historical funding settlements across all perp markets in one call, so
1064
- * clients don't have to fan out one request per trading pair.
1065
- */
1066
- get: operations["list_all_funding_history"];
1067
- put?: never;
1068
- post?: never;
1069
- delete?: never;
1070
- options?: never;
1071
- head?: never;
1072
- patch?: never;
1073
- trace?: never;
1074
- };
1075
1055
  "/api/v1/market/pairs": {
1076
1056
  parameters: {
1077
1057
  query?: never;
@@ -1874,33 +1854,6 @@ export interface paths {
1874
1854
  patch?: never;
1875
1855
  trace?: never;
1876
1856
  };
1877
- "/api/v1/pulse": {
1878
- parameters: {
1879
- query?: never;
1880
- header?: never;
1881
- path?: never;
1882
- cookie?: never;
1883
- };
1884
- /**
1885
- * Get the market pulse news feed
1886
- * @description Get the market pulse news feed.
1887
- *
1888
- * Returns the latest cached snapshot of AI-synthesized, per-asset news
1889
- * headlines with sentiment tags, refreshed hourly from the upstream
1890
- * pipeline by a background poller. The request path never calls the
1891
- * upstream. Public endpoint — no authentication required. Responses carry
1892
- * an ETag (the snapshot's generatedAt); clients may send If-None-Match to
1893
- * receive 304 when unchanged.
1894
- */
1895
- get: operations["get_pulse"];
1896
- put?: never;
1897
- post?: never;
1898
- delete?: never;
1899
- options?: never;
1900
- head?: never;
1901
- patch?: never;
1902
- trace?: never;
1903
- };
1904
1857
  "/api/v1/trades/by-id/{tradeId}": {
1905
1858
  parameters: {
1906
1859
  query?: never;
@@ -3317,48 +3270,19 @@ export interface components {
3317
3270
  */
3318
3271
  createdAt?: string | null;
3319
3272
  };
3320
- /**
3321
- * @description One settled funding window. Windows are fixed and epoch-aligned (hourly);
3322
- * a boundary the engine was down for is skipped, never settled retroactively,
3323
- * so consecutive records can legitimately be more than one interval apart.
3324
- */
3325
3273
  FundingRecord: {
3326
3274
  /** Format: uuid */
3327
3275
  tradingPairId?: string | null;
3328
3276
  epoch?: string | null;
3329
- /**
3330
- * @description Final settled rate for the window as a decimal-string fraction per
3331
- * funding interval (e.g. "0.0001" = 0.01%). The ±max-rate cap is applied
3332
- * once to the window average at settlement; this is the capped value that
3333
- * payments used.
3334
- */
3335
3277
  fundingRate?: string | null;
3336
- /**
3337
- * @description Quote currency charged per unit of base position for this window:
3338
- * funding_rate x reference_price. Positive means longs paid shorts.
3339
- */
3340
3278
  fundingDeltaPerUnit?: string | null;
3341
- /**
3342
- * @description Running sum of funding_delta_per_unit across all settled windows;
3343
- * position payments settle against deltas of this value.
3344
- */
3345
3279
  cumulativeFundingPerUnit?: string | null;
3346
- /**
3347
- * @description Mark price at the window boundary — the payment basis for every
3348
- * position settled in this window.
3349
- */
3350
3280
  referencePrice?: string | null;
3351
3281
  /** Format: uint32 */
3352
3282
  sampleCount?: number | null;
3353
3283
  windowStartedAt?: string | null;
3354
3284
  windowClosedAt?: string | null;
3355
3285
  settledAt?: string | null;
3356
- /**
3357
- * @description True when the window held fewer than the minimum accepted samples and
3358
- * settled at the carried last settled rate (zero if no rate was ever
3359
- * settled) instead of a freshly computed average.
3360
- */
3361
- carried?: boolean | null;
3362
3286
  };
3363
3287
  GetAppStatsResponse: {
3364
3288
  /**
@@ -3535,31 +3459,11 @@ export interface components {
3535
3459
  GetFundingStateResponse: {
3536
3460
  /** Format: uuid */
3537
3461
  tradingPairId?: string | null;
3538
- /**
3539
- * @description Most recently SETTLED funding rate as a decimal-string fraction per funding interval; "0" when nothing has settled yet
3540
- * @example 0.0001
3541
- */
3542
3462
  currentFundingRate?: string | null;
3543
- /**
3544
- * @description Implied rate for the in-progress window. An estimate refreshed on each accepted premium sample (roughly every sample interval plus persistence lag), not a real-time stream; absent when the window has no samples
3545
- * @example 0.00012
3546
- */
3547
3463
  estimatedNextFundingRate?: string | null;
3548
- /**
3549
- * @description Scheduled end of the current funding window (ms epoch string). An estimate, not a guarantee: settlement lands at or shortly after this boundary when the market is alive, and boundaries that pass while the engine is down are skipped, never settled retroactively
3550
- * @example 1754006400000
3551
- */
3552
3464
  nextFundingTime?: string | null;
3553
- /**
3554
- * Format: uint32
3555
- * @description Length of a funding window in seconds, inferred from settlement history and market configuration
3556
- * @example 3600
3557
- */
3465
+ /** Format: uint32 */
3558
3466
  fundingIntervalSeconds?: number | null;
3559
- /**
3560
- * @description Close of the most recently settled window (ms epoch string); absent before the first settlement
3561
- * @example 1754002800000
3562
- */
3563
3467
  lastFundingTime?: string | null;
3564
3468
  updatedAt?: string | null;
3565
3469
  };
@@ -4210,7 +4114,7 @@ export interface components {
4210
4114
  perpsEquity?: string | null;
4211
4115
  /**
4212
4116
  * Format: double
4213
- * @description Position-level win rate: winning positions over winning + losing positions (break-even excluded). Each position (one flat->open->flat round-trip) is classified once by its net realized PnL after all fees, not per fill. Null when the period has no closed positions.
4117
+ * @description Ratio of profitable trades to total trades
4214
4118
  * @example 0.65
4215
4119
  */
4216
4120
  winLossRatio?: number | null;
@@ -4259,23 +4163,13 @@ export interface components {
4259
4163
  /** Format: uuid */
4260
4164
  tradingPairId?: string | null;
4261
4165
  side?: string | null;
4262
- /**
4263
- * @description Open rows: current absolute position quantity. Terminal rows
4264
- * (CLOSED/LIQUIDATED/EXPIRED): total quantity closed over the position's
4265
- * life, summed from its reducing executions when available.
4266
- */
4267
4166
  size?: string | null;
4268
4167
  entryPrice?: string | null;
4269
4168
  markPrice?: string | null;
4270
4169
  indexPrice?: string | null;
4271
4170
  unrealizedPnl?: string | null;
4272
4171
  realizedPnl?: string | null;
4273
- /**
4274
- * @description Open rows: current isolated collateral for this position's risk bucket.
4275
- * Terminal rows: total initial margin allocated across the position's
4276
- * reducing executions when available — the margin basis for lifetime
4277
- * realized return.
4278
- */
4172
+ /** @description Current isolated collateral for this position's margin-account bucket. */
4279
4173
  isolatedMargin?: string | null;
4280
4174
  leverage?: string | null;
4281
4175
  /**
@@ -4302,21 +4196,6 @@ export interface components {
4302
4196
  updatedAt?: string | null;
4303
4197
  riskBucketId?: string | null;
4304
4198
  marginMode?: string | null;
4305
- /**
4306
- * @description Lifetime realized PnL net of trading fees and funding. Terminal rows
4307
- * only; absent when the position's reducing executions are unavailable.
4308
- */
4309
- netRealizedPnl?: string | null;
4310
- /**
4311
- * @description Lifetime realized return on the total allocated initial margin, as a
4312
- * percentage, computed from NET realized PnL (after trading fees and
4313
- * funding). The denominator is initial margin only: fees and funding are
4314
- * costs rather than posted collateral, and funding is signed, so folding it
4315
- * into the denominator could drive it to zero or negative. Terminal rows
4316
- * only; absent when unavailable, including when the position's reducing
4317
- * executions do not account for its whole lifetime.
4318
- */
4319
- realizedRoe?: string | null;
4320
4199
  };
4321
4200
  GetPositionRiskResponse: {
4322
4201
  positionId?: string | null;
@@ -4405,26 +4284,6 @@ export interface components {
4405
4284
  */
4406
4285
  applicationMakerFeeBps?: number | null;
4407
4286
  };
4408
- GetPulseResponse: {
4409
- /**
4410
- * @description When this snapshot was produced upstream, ISO-8601 UTC; also serves as the response ETag value
4411
- * @example 2026-07-22T15:17:14Z
4412
- */
4413
- generatedAt?: string | null;
4414
- /**
4415
- * @description Asset universe this snapshot was synthesized against
4416
- * @example [
4417
- * "BTC",
4418
- * "ETH",
4419
- * "SOL",
4420
- * "SEI",
4421
- * "HYPE"
4422
- * ]
4423
- */
4424
- watchlist?: string[] | null;
4425
- /** @description Pulse items, pre-sorted: watchlist order first, MARKET last, most-recent-first within each asset. Items with unverified figures are removed server-side. */
4426
- items?: components["schemas"]["PulseItem"][] | null;
4427
- };
4428
4287
  GetRewardsBalanceResponse: {
4429
4288
  /** @description One entry per reward token that has a non-zero available balance. */
4430
4289
  balances?: components["schemas"]["RewardsBalanceEntry"][] | null;
@@ -4704,15 +4563,6 @@ export interface components {
4704
4563
  */
4705
4564
  balanceId?: string | null;
4706
4565
  };
4707
- ListAllFundingHistoryResponse: {
4708
- records?: components["schemas"]["FundingRecord"][] | null;
4709
- /** Format: uint32 */
4710
- total?: number | null;
4711
- /** Format: uint32 */
4712
- page?: number | null;
4713
- /** Format: uint32 */
4714
- pageSize?: number | null;
4715
- };
4716
4566
  ListAppBalancesResponse: {
4717
4567
  balances?: components["schemas"]["ApplicationBalance"][] | null;
4718
4568
  /**
@@ -5283,23 +5133,12 @@ export interface components {
5283
5133
  date?: string | null;
5284
5134
  netRealizedPnl?: string | null;
5285
5135
  };
5286
- /**
5287
- * @description Win rate is position-level: winners/losers/break_even and win_rate_pct count
5288
- * each position (one flat -> open -> flat round-trip) once, classified by its
5289
- * net realized PnL after all fees. `count` stays fill-based (each partial
5290
- * closing fill is counted).
5291
- */
5292
5136
  PortfolioClosedTradeStats: {
5293
5137
  count?: string | null;
5294
5138
  winners?: string | null;
5295
5139
  losers?: string | null;
5296
5140
  breakEven?: string | null;
5297
5141
  winRatePct?: string | null;
5298
- /**
5299
- * @description Total classified positions (= winners + losers + break_even): the
5300
- * position-level denominator, distinct from the fill-based `count`.
5301
- */
5302
- positions?: string | null;
5303
5142
  };
5304
5143
  PortfolioMarginPositionCounts: {
5305
5144
  total?: string | null;
@@ -5419,23 +5258,13 @@ export interface components {
5419
5258
  /** Format: uuid */
5420
5259
  tradingPairId?: string | null;
5421
5260
  side?: string | null;
5422
- /**
5423
- * @description Open rows: current absolute position quantity. Terminal rows
5424
- * (CLOSED/LIQUIDATED/EXPIRED): total quantity closed over the position's
5425
- * life, summed from its reducing executions when available.
5426
- */
5427
5261
  size?: string | null;
5428
5262
  entryPrice?: string | null;
5429
5263
  markPrice?: string | null;
5430
5264
  indexPrice?: string | null;
5431
5265
  unrealizedPnl?: string | null;
5432
5266
  realizedPnl?: string | null;
5433
- /**
5434
- * @description Open rows: current isolated collateral for this position's risk bucket.
5435
- * Terminal rows: total initial margin allocated across the position's
5436
- * reducing executions when available — the margin basis for lifetime
5437
- * realized return.
5438
- */
5267
+ /** @description Current isolated collateral for this position's margin-account bucket. */
5439
5268
  isolatedMargin?: string | null;
5440
5269
  leverage?: string | null;
5441
5270
  /**
@@ -5462,21 +5291,6 @@ export interface components {
5462
5291
  updatedAt?: string | null;
5463
5292
  riskBucketId?: string | null;
5464
5293
  marginMode?: string | null;
5465
- /**
5466
- * @description Lifetime realized PnL net of trading fees and funding. Terminal rows
5467
- * only; absent when the position's reducing executions are unavailable.
5468
- */
5469
- netRealizedPnl?: string | null;
5470
- /**
5471
- * @description Lifetime realized return on the total allocated initial margin, as a
5472
- * percentage, computed from NET realized PnL (after trading fees and
5473
- * funding). The denominator is initial margin only: fees and funding are
5474
- * costs rather than posted collateral, and funding is signed, so folding it
5475
- * into the denominator could drive it to zero or negative. Terminal rows
5476
- * only; absent when unavailable, including when the position's reducing
5477
- * executions do not account for its whole lifetime.
5478
- */
5479
- realizedRoe?: string | null;
5480
5294
  };
5481
5295
  PositionHistoryEvent: {
5482
5296
  id?: string | null;
@@ -5630,58 +5444,6 @@ export interface components {
5630
5444
  */
5631
5445
  tradingMode?: string | null;
5632
5446
  };
5633
- PulseItem: {
5634
- /**
5635
- * @description Watchlist ticker (e.g. "BTC") or "MARKET" for a cross-asset story
5636
- * @example SEI
5637
- */
5638
- asset?: string | null;
5639
- /**
5640
- * @description Sentiment tag: "Bullish", "Neutral", or "Bearish"
5641
- * @example Bullish
5642
- */
5643
- sentiment?: string | null;
5644
- /**
5645
- * @description Synthesized 1-2 sentence summary, at most 240 characters
5646
- * @example SEI gained 4% amid ecosystem growth.
5647
- */
5648
- summary?: string | null;
5649
- /**
5650
- * @description Timestamp of the most recent source in the cluster, ISO-8601; render relative time client-side
5651
- * @example 2026-07-21T02:15:19
5652
- */
5653
- updatedAt?: string | null;
5654
- /** @description Provenance for the item, for attribution links */
5655
- sources?: components["schemas"]["PulseSource"][] | null;
5656
- };
5657
- PulseSource: {
5658
- /**
5659
- * @description Source article or post URL
5660
- * @example https://coinmarketcap.com/top-stories/6a5f0c340787ae5558351f0f/
5661
- */
5662
- url?: string | null;
5663
- /**
5664
- * @description Source author or publication name
5665
- * @example CoinMarketCap
5666
- */
5667
- author?: string | null;
5668
- /**
5669
- * @description Source channel: "twitter" or "news"
5670
- * @example news
5671
- */
5672
- source?: string | null;
5673
- /**
5674
- * @description Source publication time, ISO-8601
5675
- * @example 2026-07-21T02:15:19
5676
- */
5677
- createdAt?: string | null;
5678
- /**
5679
- * Format: uint32
5680
- * @description Relevance score, 1 (low) to 5 (high)
5681
- * @example 4
5682
- */
5683
- relevance?: number | null;
5684
- };
5685
5447
  ReducePositionMarginRequest: {
5686
5448
  amount?: string | null;
5687
5449
  };
@@ -5863,16 +5625,6 @@ export interface components {
5863
5625
  * @example 482931
5864
5626
  */
5865
5627
  totalTradeCountLtd?: string | null;
5866
- /**
5867
- * @description Latest settled funding rate as a decimal fraction per funding window (the capped settled value); null for spot pairs and margin pairs with no settled funding window yet
5868
- * @example 0.000125
5869
- */
5870
- latestFundingRate?: string | null;
5871
- /**
5872
- * @description Close time of the latest settled funding window (ms since epoch); null for spot pairs and margin pairs with no settled funding window yet
5873
- * @example 1745308800000
5874
- */
5875
- lastFundingTime?: string | null;
5876
5628
  };
5877
5629
  /** @description One UTC-day bucket in a pair's 7-day snapshot. */
5878
5630
  ScreenerSnapshotPoint: {
@@ -8968,37 +8720,6 @@ export interface operations {
8968
8720
  };
8969
8721
  };
8970
8722
  };
8971
- list_all_funding_history: {
8972
- parameters: {
8973
- query?: {
8974
- /** @description Start time as Unix timestamp (milliseconds) */
8975
- startTime?: number;
8976
- /** @description End time as Unix timestamp (milliseconds) */
8977
- endTime?: number;
8978
- /** @description Page number (1-indexed) */
8979
- page?: number;
8980
- /** @description Items per page (max 100) */
8981
- pageSize?: number;
8982
- /** @description Sort direction for settledAt */
8983
- orderBy?: "ASC" | "DESC";
8984
- };
8985
- header?: never;
8986
- path?: never;
8987
- cookie?: never;
8988
- };
8989
- requestBody?: never;
8990
- responses: {
8991
- /** @description OK */
8992
- 200: {
8993
- headers: {
8994
- [name: string]: unknown;
8995
- };
8996
- content: {
8997
- "application/json": components["schemas"]["ListAllFundingHistoryResponse"];
8998
- };
8999
- };
9000
- };
9001
- };
9002
8723
  list_trading_pairs: {
9003
8724
  parameters: {
9004
8725
  query?: {
@@ -9168,8 +8889,6 @@ export interface operations {
9168
8889
  page?: number;
9169
8890
  /** @description Items per page (max 100) */
9170
8891
  pageSize?: number;
9171
- /** @description Sort direction for createdAt */
9172
- orderBy?: "ASC" | "DESC";
9173
8892
  };
9174
8893
  header?: never;
9175
8894
  path: {
@@ -10526,33 +10245,6 @@ export interface operations {
10526
10245
  };
10527
10246
  };
10528
10247
  };
10529
- get_pulse: {
10530
- parameters: {
10531
- query?: never;
10532
- header?: never;
10533
- path?: never;
10534
- cookie?: never;
10535
- };
10536
- requestBody?: never;
10537
- responses: {
10538
- /** @description OK */
10539
- 200: {
10540
- headers: {
10541
- [name: string]: unknown;
10542
- };
10543
- content: {
10544
- "application/json": components["schemas"]["GetPulseResponse"];
10545
- };
10546
- };
10547
- /** @description Pulse feed not yet available */
10548
- 503: {
10549
- headers: {
10550
- [name: string]: unknown;
10551
- };
10552
- content?: never;
10553
- };
10554
- };
10555
- };
10556
10248
  get_trade_by_id: {
10557
10249
  parameters: {
10558
10250
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xmonaco/types",
3
- "version": "1.0.26-develop.aeb6d5b",
3
+ "version": "1.0.28",
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": "1.0.26-develop.aeb6d5b",
23
+ "@0xmonaco/contracts": "1.0.28",
24
24
  "zod": "^4.1.12"
25
25
  },
26
26
  "peerDependencies": {
@@ -1,61 +0,0 @@
1
- /**
2
- * Pulse Types
3
- *
4
- * Types for the public market-pulse news feed: AI-synthesized, per-asset
5
- * headlines served from the backend's hourly-refreshed cache.
6
- *
7
- * NOTE: This endpoint is **public (unauthenticated)** and ETag-cacheable.
8
- * It returns 503 while the backend cache is cold.
9
- */
10
- import type { BaseAPI } from "../api";
11
- /** Provenance for one pulse item, for attribution links. */
12
- export interface PulseSource {
13
- /** Source article or post URL. */
14
- url: string;
15
- /** Source author or publication name. */
16
- author: string;
17
- /** Source channel: "twitter" or "news". */
18
- source: string;
19
- /** Source publication time, ISO-8601. */
20
- createdAt: string;
21
- /** Relevance score, 1 (low) to 5 (high). */
22
- relevance: number;
23
- }
24
- /** One synthesized market-pulse headline. */
25
- export interface PulseItem {
26
- /** Watchlist ticker (e.g. "BTC") or "MARKET" for a cross-asset story. */
27
- asset: string;
28
- /** Sentiment tag: "Bullish", "Neutral", or "Bearish". */
29
- sentiment: string;
30
- /** Synthesized 1-2 sentence summary (at most 240 characters). */
31
- summary: string;
32
- /** Timestamp of the most recent source; render relative time client-side. */
33
- updatedAt: string;
34
- /** Provenance for the item. */
35
- sources: PulseSource[];
36
- }
37
- /** The latest pulse snapshot. */
38
- export interface GetPulseResponse {
39
- /** When this snapshot was produced upstream (ISO-8601 UTC); also the ETag value. */
40
- generatedAt: string;
41
- /** Asset universe the snapshot was synthesized against. */
42
- watchlist: string[];
43
- /** Pulse items, pre-sorted (watchlist order, MARKET last, newest first per asset). */
44
- items: PulseItem[];
45
- }
46
- /**
47
- * Pulse API interface. The endpoint is public (no auth required).
48
- */
49
- export interface PulseAPI extends BaseAPI {
50
- /**
51
- * Get the latest market pulse news feed snapshot.
52
- *
53
- * Public/unauthenticated; served from the backend cache (refreshed hourly).
54
- * Items whose figures could not be verified upstream are removed
55
- * server-side before caching.
56
- *
57
- * @returns Promise resolving to the latest snapshot
58
- * @throws 503 while the backend cache is cold
59
- */
60
- getPulse(): Promise<GetPulseResponse>;
61
- }
@@ -1,9 +0,0 @@
1
- /**
2
- * Pulse Types
3
- *
4
- * Types for the public market-pulse news feed: AI-synthesized, per-asset
5
- * headlines served from the backend's hourly-refreshed cache.
6
- *
7
- * NOTE: This endpoint is **public (unauthenticated)** and ETag-cacheable.
8
- * It returns 503 while the backend cache is cold.
9
- */