@0xmonaco/types 1.1.2 → 1.1.5-prerelease.de852e2

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 (54) hide show
  1. package/README.md +1 -1
  2. package/dist/analytics/builders.d.ts +120 -0
  3. package/dist/analytics/builders.js +11 -0
  4. package/dist/analytics/index.d.ts +131 -0
  5. package/dist/analytics/index.js +22 -0
  6. package/dist/analytics/wallets.d.ts +193 -0
  7. package/dist/analytics/wallets.js +16 -0
  8. package/dist/applications/requests.d.ts +5 -5
  9. package/dist/buildercodes/index.d.ts +13 -11
  10. package/dist/buildercodes/responses.d.ts +1 -0
  11. package/dist/buildercodes/responses.js +10 -0
  12. package/dist/fees/responses.js +2 -2
  13. package/dist/index.d.ts +2 -0
  14. package/dist/index.js +2 -0
  15. package/dist/margin-accounts/index.d.ts +7 -2
  16. package/dist/market/index.d.ts +51 -2
  17. package/dist/profile/index.d.ts +25 -2
  18. package/dist/rfq/index.d.ts +44 -0
  19. package/dist/rfq/index.js +10 -0
  20. package/dist/rfq/responses.d.ts +276 -0
  21. package/dist/rfq/responses.js +182 -0
  22. package/dist/sdk/index.d.ts +25 -2
  23. package/dist/trading/index.d.ts +19 -4
  24. package/dist/trading/orders.d.ts +12 -1
  25. package/dist/trading/responses.d.ts +27 -2
  26. package/dist/validation/index.d.ts +1 -0
  27. package/dist/validation/index.js +1 -0
  28. package/dist/validation/margin-accounts.d.ts +2 -2
  29. package/dist/validation/margin-accounts.js +5 -5
  30. package/dist/validation/market.d.ts +7 -0
  31. package/dist/validation/market.js +4 -0
  32. package/dist/validation/rfq.d.ts +109 -0
  33. package/dist/validation/rfq.js +120 -0
  34. package/dist/validation/trading.d.ts +24 -0
  35. package/dist/validation/trading.js +55 -42
  36. package/dist/websocket/base.d.ts +47 -11
  37. package/dist/websocket/client.d.ts +51 -4
  38. package/dist/websocket/depth.d.ts +142 -0
  39. package/dist/websocket/depth.js +13 -0
  40. package/dist/websocket/events/index.d.ts +2 -0
  41. package/dist/websocket/events/index.js +2 -0
  42. package/dist/websocket/events/orderbook-events.d.ts +41 -1
  43. package/dist/websocket/events/rfq-events.d.ts +116 -0
  44. package/dist/websocket/events/rfq-events.js +15 -0
  45. package/dist/websocket/events/rfq-trade-events.d.ts +28 -0
  46. package/dist/websocket/events/rfq-trade-events.js +6 -0
  47. package/dist/websocket/events/trade-events.d.ts +53 -0
  48. package/dist/websocket/index.d.ts +1 -0
  49. package/dist/websocket/index.js +1 -0
  50. package/dist/websocket/snapshots.d.ts +23 -1
  51. package/dist/wire/operations.d.ts +1 -1
  52. package/dist/wire/operations.js +28 -0
  53. package/dist/wire/schema.d.ts +5372 -2040
  54. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -5,6 +5,7 @@
5
5
  * It includes SDK types, vault types, trading types, contract types, and common types.
6
6
  */
7
7
  // Export everything from all modules
8
+ export * from "./analytics";
8
9
  export * from "./api";
9
10
  export * from "./applications";
10
11
  export * from "./auth";
@@ -22,6 +23,7 @@ export * from "./portfolio";
22
23
  export * from "./positions";
23
24
  export * from "./profile";
24
25
  export * from "./pulse";
26
+ export * from "./rfq";
25
27
  export * from "./sdk";
26
28
  export * from "./sub-accounts";
27
29
  export * from "./sweeper";
@@ -223,6 +223,7 @@ export interface TransferCollateralRequest {
223
223
  asset: string;
224
224
  amount: string;
225
225
  tradingPairId?: string;
226
+ /** Names the margin account by its sub-account key, like `marginAccountId` (`default` is the default account). */
226
227
  strategyKey?: string;
227
228
  /**
228
229
  * Risk bucket mode. Defaults to ISOLATED, which is selected by
@@ -263,6 +264,7 @@ export interface TransferCollateralToIsolatedRiskBucketRequest extends TransferC
263
264
  /** The margin account whose bucket is funded: omit for the default account, or name an open sub-account. */
264
265
  marginAccountId?: string;
265
266
  tradingPairId: string;
267
+ /** Names the margin account by its sub-account key, like `marginAccountId` (`default` is the default account). */
266
268
  strategyKey?: string;
267
269
  selectedTradingPairIds?: never;
268
270
  /**
@@ -303,7 +305,8 @@ export interface TransferCollateralToCrossRiskBucketRequest extends TransferColl
303
305
  */
304
306
  selectedTradingPairIds?: never;
305
307
  tradingPairId?: never;
306
- strategyKey?: never;
308
+ /** Names the margin account by its sub-account key, like `marginAccountId` (`default` is the default account). */
309
+ strategyKey?: string;
307
310
  /** Cross risk is pooled at bucket equity — there is no per-position margin; an explicit `true` is rejected. */
308
311
  applyToPositionMargin?: never;
309
312
  }
@@ -424,6 +427,7 @@ export type SimulateIsolatedRiskBucketOrderRiskRequest = SimulateOrderRiskReques
424
427
  marginMode?: "ISOLATED";
425
428
  /** The margin account previewed: omit for the default account, or name an open sub-account. */
426
429
  marginAccountId?: string;
430
+ /** Names the margin account by its sub-account key, like `marginAccountId` (`default` is the default account). */
427
431
  strategyKey?: string;
428
432
  selectedTradingPairIds?: never;
429
433
  };
@@ -446,7 +450,8 @@ export type SimulateCrossRiskBucketOrderRiskRequest = SimulateOrderRiskRequest &
446
450
  * compile time that it does nothing.
447
451
  */
448
452
  selectedTradingPairIds?: never;
449
- strategyKey?: never;
453
+ /** Names the margin account by its sub-account key, like `marginAccountId` (`default` is the default account). */
454
+ strategyKey?: string;
450
455
  };
451
456
  export type SimulateRiskBucketOrderRiskRequest = SimulateIsolatedRiskBucketOrderRiskRequest | SimulateCrossRiskBucketOrderRiskRequest;
452
457
  export interface SimulateOrderRiskResponse {
@@ -54,9 +54,25 @@ export interface TradingPair {
54
54
  * `CROSS_MARGIN_NOT_ALLOWED`; open the position with `marginMode: "ISOLATED"`.
55
55
  */
56
56
  isolatedOnly: boolean;
57
- /** Maker fee in basis points */
57
+ /**
58
+ * Flat pair-level maker fee in basis points (negative = rebate).
59
+ *
60
+ * @deprecated Not the rate an order is charged: fees are tiered per account.
61
+ * Use `fees.getFeeSchedule(tradingPairId)` for the pair's tier schedule,
62
+ * `fees.getMyFeeTier({ tradingPairId })` for your own rate, and
63
+ * `placementMakerFeeBps` on an order for the rate it was placed at. This
64
+ * field will be removed in a later release.
65
+ */
58
66
  makerFeeBps: number;
59
- /** Taker fee in basis points */
67
+ /**
68
+ * Flat pair-level taker fee in basis points.
69
+ *
70
+ * @deprecated Not the rate an order is charged: fees are tiered per account.
71
+ * Use `fees.getFeeSchedule(tradingPairId)` for the pair's tier schedule,
72
+ * `fees.getMyFeeTier({ tradingPairId })` for your own rate, and
73
+ * `placementTakerFeeBps` on an order for the rate it was placed at. This
74
+ * field will be removed in a later release.
75
+ */
60
76
  takerFeeBps: number;
61
77
  /** Minimum order size */
62
78
  minOrderSize: string;
@@ -693,6 +709,10 @@ export interface LiquidationHistoryEvent {
693
709
  /** Position size × event-time mark price, in quote-asset units. */
694
710
  markNotional: string;
695
711
  quoteAssetSymbol: string;
712
+ /** The position's liquidation (trigger) price captured with the event, in quote units per base unit. */
713
+ liquidationPrice: string;
714
+ /** Liquidation penalty charged on the event, in quote-asset units; null when none was charged. */
715
+ liquidationFee?: string | null;
696
716
  }
697
717
  export interface ListLiquidationEventsResponse {
698
718
  tradingPairId: string;
@@ -701,6 +721,27 @@ export interface ListLiquidationEventsResponse {
701
721
  pageSize: number;
702
722
  nextPageToken: string;
703
723
  }
724
+ /** Query for {@link MarketAPI.listAllLiquidationEvents}: the per-pair listing's window and cursor. */
725
+ export type ListAllLiquidationEventsParams = ListLiquidationEventsParams;
726
+ export interface ListAllLiquidationEventsResponse {
727
+ /** Events across every market, newest first; each carries its tradingPairId. */
728
+ events: LiquidationHistoryEvent[];
729
+ pageSize: number;
730
+ /** Cursor for the next page; empty when the walk is finished. */
731
+ nextPageToken: string;
732
+ }
733
+ /** One asset's insurance fund. Scale the balance with the asset's decimals from the trading pairs listing. */
734
+ export interface InsuranceFund {
735
+ assetId: string;
736
+ /** Balance available to cover bad debt, in raw asset units (the asset's smallest unit). */
737
+ availableBalanceRaw: string;
738
+ /** When the balance last changed (ISO 8601). */
739
+ updatedAt: string;
740
+ }
741
+ export interface ListInsuranceFundsResponse {
742
+ /** Every insurance fund, one per asset. */
743
+ funds: InsuranceFund[];
744
+ }
704
745
  export type LiquidationMetricsInterval = "1m" | "5m" | "1h";
705
746
  export interface GetLiquidationMetricsParams {
706
747
  interval: LiquidationMetricsInterval;
@@ -817,4 +858,12 @@ export interface MarketAPI extends BaseAPI {
817
858
  listLiquidationEvents(tradingPairId: string, params?: ListLiquidationEventsParams): Promise<ListLiquidationEventsResponse>;
818
859
  /** Fetch bounded UTC-aligned long/short liquidation totals by side. */
819
860
  getLiquidationMetrics(tradingPairId: string, params: GetLiquidationMetricsParams): Promise<LiquidationMetrics>;
861
+ /**
862
+ * Fetch liquidation events across every market, newest first, with the same
863
+ * window and keyset cursor as listLiquidationEvents. Public; each client IP
864
+ * has a read budget.
865
+ */
866
+ listAllLiquidationEvents(params?: ListAllLiquidationEventsParams): Promise<ListAllLiquidationEventsResponse>;
867
+ /** Fetch every insurance fund's current balance, one per asset. Public; each client IP has a read budget. */
868
+ listInsuranceFunds(): Promise<ListInsuranceFundsResponse>;
820
869
  }
@@ -326,6 +326,16 @@ export interface UserTrade {
326
326
  liquidityRole: "MAKER" | "TAKER";
327
327
  /** Timestamp when the trade was executed (RFC 3339). Absent when none is recorded. */
328
328
  executedAt?: string;
329
+ /**
330
+ * The RFQ (block trade) this user's own order filled in. Absent on an
331
+ * order-book fill. Read the RFQ with `rfq.getRfq`.
332
+ */
333
+ rfqId?: string;
334
+ /**
335
+ * Set on a maker's RFQ fill only: the internal engine id of the quote
336
+ * version the maker's order rested for. Not the public `quoteId`.
337
+ */
338
+ rfqQuoteId?: string;
329
339
  }
330
340
  /**
331
341
  * Query parameters for getting user trades
@@ -602,9 +612,22 @@ export interface UserProfile {
602
612
  accountType: string;
603
613
  /** Whether the user can withdraw funds */
604
614
  canWithdraw: boolean;
605
- /** Taker fee rate in basis points */
615
+ /**
616
+ * Flat taker fee in basis points, echoed from a trading pair.
617
+ *
618
+ * @deprecated Not the rate you are charged: fees are tiered per account. Use
619
+ * `fees.getMyFeeTier({ tradingPairId })` for your own rate. This field will
620
+ * be removed in a later release.
621
+ */
606
622
  takerFeeBps: number;
607
- /** Maker fee rate in basis points */
623
+ /**
624
+ * Flat maker fee in basis points (negative = rebate), echoed from a trading
625
+ * pair.
626
+ *
627
+ * @deprecated Not the rate you are charged: fees are tiered per account. Use
628
+ * `fees.getMyFeeTier({ tradingPairId })` for your own rate. This field will
629
+ * be removed in a later release.
630
+ */
608
631
  makerFeeBps: number;
609
632
  /** Account creation timestamp (ISO string) */
610
633
  createdAt: string;
@@ -0,0 +1,44 @@
1
+ /**
2
+ * RFQ (block trading) Types
3
+ *
4
+ * A taker requests quotes for a size; makers quote privately; the taker
5
+ * accepts one side of the best allocation, and each selected maker then has a
6
+ * short last look (reject or improve; silence executes). Available only to
7
+ * accounts RFQ is enabled for: other callers get `403` with code
8
+ * `RFQ_DISABLED`.
9
+ */
10
+ import type { BaseAPI } from "../api";
11
+ import type { AcceptRfqParams, CancelRfqParams, CreateRfqParams, RespondRfqLastLookParams, UpsertRfqQuoteParams, WithdrawRfqQuoteParams } from "../validation/rfq";
12
+ import type { GetRfqCapabilitiesResponse, RespondRfqLastLookResponse, RfqQuoteVersion, RfqStatus, WithdrawRfqQuoteResponse } from "./responses";
13
+ /**
14
+ * RFQ API.
15
+ *
16
+ * Every call is signed and acts for the session's account. Every write takes
17
+ * an `idempotencyKey` (generated when omitted): a retry with the same key and
18
+ * body returns the first result, and the SDK resends a write whose outcome is
19
+ * unknown with the same key. Maker writes (quote, withdraw, last look) are
20
+ * stored with the request exactly as signed.
21
+ */
22
+ export interface RfqAPI extends BaseAPI {
23
+ /** Your RFQ limits and the markets RFQ is offered on. */
24
+ getCapabilities(): Promise<GetRfqCapabilitiesResponse>;
25
+ /** Request quotes for up to `quantity`. Omit `side` for a two-way RFQ. Delegated agents cannot. */
26
+ createRfq(params: CreateRfqParams): Promise<RfqStatus>;
27
+ /**
28
+ * An RFQ's authoritative status. As taker: the current `view` and, once
29
+ * executed, the `outcome`. As maker: your latest quote, `ownLatestVersion`
30
+ * and, once selected, `ownSelection` for last look.
31
+ */
32
+ getRfq(rfqId: string): Promise<RfqStatus>;
33
+ /** Accept one side of the view you last saw (`view.viewVersion`). Binding. */
34
+ acceptRfq(rfqId: string, params: AcceptRfqParams): Promise<RfqStatus>;
35
+ /** Cancel an RFQ you have not accepted, before its deadline. */
36
+ cancelRfq(rfqId: string, params?: CancelRfqParams): Promise<RfqStatus>;
37
+ /** As maker: place or replace your quote (a bid, an ask or both), naming your current version. */
38
+ upsertQuote(rfqId: string, params: UpsertRfqQuoteParams): Promise<RfqQuoteVersion>;
39
+ /** As maker: withdraw your current quote, naming your current version. */
40
+ withdrawQuote(rfqId: string, params: WithdrawRfqQuoteParams): Promise<WithdrawRfqQuoteResponse>;
41
+ /** As a selected maker: reject, or improve your frozen terms, before the last-look deadline. */
42
+ respondLastLook(rfqId: string, params: RespondRfqLastLookParams): Promise<RespondRfqLastLookResponse>;
43
+ }
44
+ export * from "./responses";
@@ -0,0 +1,10 @@
1
+ /**
2
+ * RFQ (block trading) Types
3
+ *
4
+ * A taker requests quotes for a size; makers quote privately; the taker
5
+ * accepts one side of the best allocation, and each selected maker then has a
6
+ * short last look (reject or improve; silence executes). Available only to
7
+ * accounts RFQ is enabled for: other callers get `403` with code
8
+ * `RFQ_DISABLED`.
9
+ */
10
+ export * from "./responses";
@@ -0,0 +1,276 @@
1
+ /**
2
+ * RFQ (block trading) response types.
3
+ *
4
+ * Zod schemas for every RFQ REST/gRPC response, with the inferred TypeScript
5
+ * types. The REST API returns camelCase JSON; an optional field the server has
6
+ * no value for may arrive as `null` or be absent, so optional fields are typed
7
+ * `T | null | undefined` (`.nullish()`). Prices, quantities and fees are exact
8
+ * decimal strings; versions and `*Ms` times are JSON numbers (times are Unix
9
+ * milliseconds).
10
+ *
11
+ * Label fields (states, sides, products) are typed `Union | (string & {})`:
12
+ * the unions name the values the server sends today, and the schemas accept
13
+ * any string so a value added server-side later does not fail parsing.
14
+ */
15
+ import { z } from "zod";
16
+ /** An RFQ's lifecycle state. */
17
+ export type RfqState = "COLLECTING" | "LAST_LOOK" | "RISK_CLEARING" | "CONFIRMED" | "SETTLED" | "CANCELLED" | "EXPIRED" | "REJECTED";
18
+ /** A quote's price (quote units per base unit) and capacity (base units). */
19
+ export declare const RfqQuoteTermsResponseSchema: z.ZodObject<{
20
+ price: z.ZodString;
21
+ capacity: z.ZodString;
22
+ }, z.core.$strip>;
23
+ /** The request as created. */
24
+ export declare const RfqRequestTermsSchema: z.ZodObject<{
25
+ rfqId: z.ZodString;
26
+ tradingPairId: z.ZodString;
27
+ product: z.ZodOptional<z.ZodNullable<z.ZodType<"PERPETUAL" | "SPOT" | (string & {}), unknown, z.core.$ZodTypeInternals<"PERPETUAL" | "SPOT" | (string & {}), unknown>>>>;
28
+ quantity: z.ZodString;
29
+ createdAtMs: z.ZodNumber;
30
+ deadlineAtMs: z.ZodNumber;
31
+ side: z.ZodOptional<z.ZodNullable<z.ZodType<"BUY" | "SELL" | (string & {}), unknown, z.core.$ZodTypeInternals<"BUY" | "SELL" | (string & {}), unknown>>>>;
32
+ quoteSide: z.ZodOptional<z.ZodNullable<z.ZodType<"ASK" | "BID" | (string & {}), unknown, z.core.$ZodTypeInternals<"ASK" | "BID" | (string & {}), unknown>>>>;
33
+ leverage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
34
+ marginMode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
35
+ }, z.core.$strip>;
36
+ /** One side of the taker's view: the allocation that would fill the quantity. */
37
+ export declare const RfqSideViewSchema: z.ZodObject<{
38
+ vwap: z.ZodString;
39
+ availableQuantity: z.ZodString;
40
+ grossVwap: z.ZodOptional<z.ZodNullable<z.ZodString>>;
41
+ estimatedMonacoFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
42
+ estimatedBuilderFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
43
+ estimatedTotalFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
44
+ }, z.core.$strip>;
45
+ /** The taker's current view of the quotes. */
46
+ export declare const RfqViewSchema: z.ZodObject<{
47
+ viewVersion: z.ZodNumber;
48
+ bid: z.ZodOptional<z.ZodNullable<z.ZodObject<{
49
+ vwap: z.ZodString;
50
+ availableQuantity: z.ZodString;
51
+ grossVwap: z.ZodOptional<z.ZodNullable<z.ZodString>>;
52
+ estimatedMonacoFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
53
+ estimatedBuilderFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
54
+ estimatedTotalFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
55
+ }, z.core.$strip>>>;
56
+ ask: z.ZodOptional<z.ZodNullable<z.ZodObject<{
57
+ vwap: z.ZodString;
58
+ availableQuantity: z.ZodString;
59
+ grossVwap: z.ZodOptional<z.ZodNullable<z.ZodString>>;
60
+ estimatedMonacoFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
61
+ estimatedBuilderFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
62
+ estimatedTotalFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
63
+ }, z.core.$strip>>>;
64
+ asOfMs: z.ZodNumber;
65
+ monacoFeeCbps: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
66
+ builderFeeCbps: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
67
+ }, z.core.$strip>;
68
+ /** One fill of an executed RFQ. */
69
+ export declare const RfqFillSchema: z.ZodObject<{
70
+ executionId: z.ZodString;
71
+ price: z.ZodString;
72
+ quantity: z.ZodString;
73
+ fee: z.ZodString;
74
+ monacoFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
75
+ builderFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
76
+ }, z.core.$strip>;
77
+ /** What an accepted RFQ executed. */
78
+ export declare const RfqOutcomeSchema: z.ZodObject<{
79
+ executedQuantity: z.ZodString;
80
+ unfilledQuantity: z.ZodString;
81
+ vwap: z.ZodString;
82
+ fills: z.ZodArray<z.ZodObject<{
83
+ executionId: z.ZodString;
84
+ price: z.ZodString;
85
+ quantity: z.ZodString;
86
+ fee: z.ZodString;
87
+ monacoFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
88
+ builderFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
89
+ }, z.core.$strip>>;
90
+ }, z.core.$strip>;
91
+ /** A quoted side the venue refused; nothing is reserved for it. */
92
+ export declare const RfqRefusedSideSchema: z.ZodObject<{
93
+ side: z.ZodType<"ASK" | "BID" | (string & {}), unknown, z.core.$ZodTypeInternals<"ASK" | "BID" | (string & {}), unknown>>;
94
+ code: z.ZodString;
95
+ reason: z.ZodString;
96
+ }, z.core.$strip>;
97
+ /** A quote version as its maker sees it. */
98
+ export declare const RfqQuoteVersionSchema: z.ZodObject<{
99
+ rfqId: z.ZodString;
100
+ quoteId: z.ZodString;
101
+ version: z.ZodNumber;
102
+ bid: z.ZodOptional<z.ZodNullable<z.ZodObject<{
103
+ price: z.ZodString;
104
+ capacity: z.ZodString;
105
+ }, z.core.$strip>>>;
106
+ ask: z.ZodOptional<z.ZodNullable<z.ZodObject<{
107
+ price: z.ZodString;
108
+ capacity: z.ZodString;
109
+ }, z.core.$strip>>>;
110
+ issuedAtMs: z.ZodNumber;
111
+ validUntilMs: z.ZodNumber;
112
+ leverage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
113
+ marginMode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
114
+ refusedSides: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
115
+ side: z.ZodType<"ASK" | "BID" | (string & {}), unknown, z.core.$ZodTypeInternals<"ASK" | "BID" | (string & {}), unknown>>;
116
+ code: z.ZodString;
117
+ reason: z.ZodString;
118
+ }, z.core.$strip>>>>;
119
+ }, z.core.$strip>;
120
+ /** A selected maker's own part of an acceptance, for answering last look. */
121
+ export declare const RfqMakerSelectionSchema: z.ZodObject<{
122
+ acceptanceId: z.ZodString;
123
+ takerSide: z.ZodOptional<z.ZodNullable<z.ZodType<"BUY" | "SELL" | (string & {}), unknown, z.core.$ZodTypeInternals<"BUY" | "SELL" | (string & {}), unknown>>>>;
124
+ quoteId: z.ZodString;
125
+ quoteVersion: z.ZodNumber;
126
+ quantity: z.ZodString;
127
+ frozenTerms: z.ZodOptional<z.ZodNullable<z.ZodObject<{
128
+ price: z.ZodString;
129
+ capacity: z.ZodString;
130
+ }, z.core.$strip>>>;
131
+ lastLookDeadlineAtMs: z.ZodNumber;
132
+ }, z.core.$strip>;
133
+ /**
134
+ * Authoritative RFQ status. A taker sees `view` and `outcome`; a maker sees
135
+ * its own latest quote and, once selected, its own selection.
136
+ */
137
+ export declare const RfqStatusSchema: z.ZodObject<{
138
+ terms: z.ZodOptional<z.ZodNullable<z.ZodObject<{
139
+ rfqId: z.ZodString;
140
+ tradingPairId: z.ZodString;
141
+ product: z.ZodOptional<z.ZodNullable<z.ZodType<"PERPETUAL" | "SPOT" | (string & {}), unknown, z.core.$ZodTypeInternals<"PERPETUAL" | "SPOT" | (string & {}), unknown>>>>;
142
+ quantity: z.ZodString;
143
+ createdAtMs: z.ZodNumber;
144
+ deadlineAtMs: z.ZodNumber;
145
+ side: z.ZodOptional<z.ZodNullable<z.ZodType<"BUY" | "SELL" | (string & {}), unknown, z.core.$ZodTypeInternals<"BUY" | "SELL" | (string & {}), unknown>>>>;
146
+ quoteSide: z.ZodOptional<z.ZodNullable<z.ZodType<"ASK" | "BID" | (string & {}), unknown, z.core.$ZodTypeInternals<"ASK" | "BID" | (string & {}), unknown>>>>;
147
+ leverage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
148
+ marginMode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
149
+ }, z.core.$strip>>>;
150
+ state: z.ZodType<RfqState | (string & {}), unknown, z.core.$ZodTypeInternals<RfqState | (string & {}), unknown>>;
151
+ stateVersion: z.ZodNumber;
152
+ acceptedSide: z.ZodOptional<z.ZodNullable<z.ZodType<"BUY" | "SELL" | (string & {}), unknown, z.core.$ZodTypeInternals<"BUY" | "SELL" | (string & {}), unknown>>>>;
153
+ lastLookDeadlineAtMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
154
+ view: z.ZodOptional<z.ZodNullable<z.ZodObject<{
155
+ viewVersion: z.ZodNumber;
156
+ bid: z.ZodOptional<z.ZodNullable<z.ZodObject<{
157
+ vwap: z.ZodString;
158
+ availableQuantity: z.ZodString;
159
+ grossVwap: z.ZodOptional<z.ZodNullable<z.ZodString>>;
160
+ estimatedMonacoFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
161
+ estimatedBuilderFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
162
+ estimatedTotalFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
163
+ }, z.core.$strip>>>;
164
+ ask: z.ZodOptional<z.ZodNullable<z.ZodObject<{
165
+ vwap: z.ZodString;
166
+ availableQuantity: z.ZodString;
167
+ grossVwap: z.ZodOptional<z.ZodNullable<z.ZodString>>;
168
+ estimatedMonacoFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
169
+ estimatedBuilderFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
170
+ estimatedTotalFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
171
+ }, z.core.$strip>>>;
172
+ asOfMs: z.ZodNumber;
173
+ monacoFeeCbps: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
174
+ builderFeeCbps: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
175
+ }, z.core.$strip>>>;
176
+ ownQuote: z.ZodOptional<z.ZodNullable<z.ZodObject<{
177
+ rfqId: z.ZodString;
178
+ quoteId: z.ZodString;
179
+ version: z.ZodNumber;
180
+ bid: z.ZodOptional<z.ZodNullable<z.ZodObject<{
181
+ price: z.ZodString;
182
+ capacity: z.ZodString;
183
+ }, z.core.$strip>>>;
184
+ ask: z.ZodOptional<z.ZodNullable<z.ZodObject<{
185
+ price: z.ZodString;
186
+ capacity: z.ZodString;
187
+ }, z.core.$strip>>>;
188
+ issuedAtMs: z.ZodNumber;
189
+ validUntilMs: z.ZodNumber;
190
+ leverage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
191
+ marginMode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
192
+ refusedSides: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
193
+ side: z.ZodType<"ASK" | "BID" | (string & {}), unknown, z.core.$ZodTypeInternals<"ASK" | "BID" | (string & {}), unknown>>;
194
+ code: z.ZodString;
195
+ reason: z.ZodString;
196
+ }, z.core.$strip>>>>;
197
+ }, z.core.$strip>>>;
198
+ ownSelection: z.ZodOptional<z.ZodNullable<z.ZodObject<{
199
+ acceptanceId: z.ZodString;
200
+ takerSide: z.ZodOptional<z.ZodNullable<z.ZodType<"BUY" | "SELL" | (string & {}), unknown, z.core.$ZodTypeInternals<"BUY" | "SELL" | (string & {}), unknown>>>>;
201
+ quoteId: z.ZodString;
202
+ quoteVersion: z.ZodNumber;
203
+ quantity: z.ZodString;
204
+ frozenTerms: z.ZodOptional<z.ZodNullable<z.ZodObject<{
205
+ price: z.ZodString;
206
+ capacity: z.ZodString;
207
+ }, z.core.$strip>>>;
208
+ lastLookDeadlineAtMs: z.ZodNumber;
209
+ }, z.core.$strip>>>;
210
+ ownLatestVersion: z.ZodNumber;
211
+ ownQuoteWithdrawn: z.ZodBoolean;
212
+ outcome: z.ZodOptional<z.ZodNullable<z.ZodObject<{
213
+ executedQuantity: z.ZodString;
214
+ unfilledQuantity: z.ZodString;
215
+ vwap: z.ZodString;
216
+ fills: z.ZodArray<z.ZodObject<{
217
+ executionId: z.ZodString;
218
+ price: z.ZodString;
219
+ quantity: z.ZodString;
220
+ fee: z.ZodString;
221
+ monacoFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
222
+ builderFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
223
+ }, z.core.$strip>>;
224
+ }, z.core.$strip>>>;
225
+ durableSequence: z.ZodNumber;
226
+ }, z.core.$strip>;
227
+ /** A market RFQ is offered on. */
228
+ export declare const RfqMarketCapabilitySchema: z.ZodObject<{
229
+ tradingPairId: z.ZodString;
230
+ product: z.ZodOptional<z.ZodNullable<z.ZodType<"PERPETUAL" | "SPOT" | (string & {}), unknown, z.core.$ZodTypeInternals<"PERPETUAL" | "SPOT" | (string & {}), unknown>>>>;
231
+ minQuantity: z.ZodString;
232
+ maxQuantity: z.ZodString;
233
+ }, z.core.$strip>;
234
+ /** Your RFQ limits and the markets RFQ is offered on. */
235
+ export declare const GetRfqCapabilitiesResponseSchema: z.ZodObject<{
236
+ protocolVersion: z.ZodNumber;
237
+ enabled: z.ZodBoolean;
238
+ markets: z.ZodArray<z.ZodObject<{
239
+ tradingPairId: z.ZodString;
240
+ product: z.ZodOptional<z.ZodNullable<z.ZodType<"PERPETUAL" | "SPOT" | (string & {}), unknown, z.core.$ZodTypeInternals<"PERPETUAL" | "SPOT" | (string & {}), unknown>>>>;
241
+ minQuantity: z.ZodString;
242
+ maxQuantity: z.ZodString;
243
+ }, z.core.$strip>>;
244
+ requestWindowMs: z.ZodNumber;
245
+ minQuoteValidityMs: z.ZodNumber;
246
+ maxQuoteValidityMs: z.ZodNumber;
247
+ lastLookMs: z.ZodNumber;
248
+ maxNewRfqs: z.ZodNumber;
249
+ quotaWindowMs: z.ZodNumber;
250
+ quotaRemaining: z.ZodNumber;
251
+ quotaRetryAfterMs: z.ZodNumber;
252
+ }, z.core.$strip>;
253
+ /** A withdrawn quote: the withdrawal's version. */
254
+ export declare const WithdrawRfqQuoteResponseSchema: z.ZodObject<{
255
+ rfqId: z.ZodString;
256
+ version: z.ZodNumber;
257
+ }, z.core.$strip>;
258
+ /** A recorded last-look answer. */
259
+ export declare const RespondRfqLastLookResponseSchema: z.ZodObject<{
260
+ acceptanceId: z.ZodString;
261
+ response: z.ZodOptional<z.ZodNullable<z.ZodType<"IMPROVE" | "REJECT" | (string & {}), unknown, z.core.$ZodTypeInternals<"IMPROVE" | "REJECT" | (string & {}), unknown>>>>;
262
+ recordedAtMs: z.ZodNumber;
263
+ }, z.core.$strip>;
264
+ export type RfqRequestTerms = z.infer<typeof RfqRequestTermsSchema>;
265
+ export type RfqSideView = z.infer<typeof RfqSideViewSchema>;
266
+ export type RfqView = z.infer<typeof RfqViewSchema>;
267
+ export type RfqFill = z.infer<typeof RfqFillSchema>;
268
+ export type RfqOutcome = z.infer<typeof RfqOutcomeSchema>;
269
+ export type RfqQuoteVersion = z.infer<typeof RfqQuoteVersionSchema>;
270
+ export type RfqRefusedSide = z.infer<typeof RfqRefusedSideSchema>;
271
+ export type RfqMakerSelection = z.infer<typeof RfqMakerSelectionSchema>;
272
+ export type RfqStatus = z.infer<typeof RfqStatusSchema>;
273
+ export type RfqMarketCapability = z.infer<typeof RfqMarketCapabilitySchema>;
274
+ export type GetRfqCapabilitiesResponse = z.infer<typeof GetRfqCapabilitiesResponseSchema>;
275
+ export type WithdrawRfqQuoteResponse = z.infer<typeof WithdrawRfqQuoteResponseSchema>;
276
+ export type RespondRfqLastLookResponse = z.infer<typeof RespondRfqLastLookResponseSchema>;