@0xmonaco/types 1.1.2-develop.3a25169 → 1.1.5-develop.129b2c6
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/README.md +1 -1
- package/dist/analytics/builders.d.ts +131 -0
- package/dist/analytics/builders.js +11 -0
- package/dist/analytics/index.d.ts +151 -0
- package/dist/analytics/index.js +27 -0
- package/dist/analytics/wallets.d.ts +193 -0
- package/dist/analytics/wallets.js +16 -0
- package/dist/applications/requests.d.ts +5 -5
- package/dist/buildercodes/index.d.ts +13 -11
- package/dist/buildercodes/responses.d.ts +1 -0
- package/dist/buildercodes/responses.js +10 -0
- package/dist/fees/responses.js +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/margin-accounts/index.d.ts +7 -2
- package/dist/market/index.d.ts +33 -0
- package/dist/profile/index.d.ts +10 -0
- package/dist/rfq/index.d.ts +44 -0
- package/dist/rfq/index.js +10 -0
- package/dist/rfq/responses.d.ts +282 -0
- package/dist/rfq/responses.js +196 -0
- package/dist/sdk/index.d.ts +25 -2
- package/dist/trading/index.d.ts +19 -4
- package/dist/trading/orders.d.ts +12 -1
- package/dist/trading/responses.d.ts +27 -2
- package/dist/validation/index.d.ts +1 -0
- package/dist/validation/index.js +1 -0
- package/dist/validation/margin-accounts.d.ts +2 -2
- package/dist/validation/margin-accounts.js +5 -5
- package/dist/validation/market.d.ts +7 -0
- package/dist/validation/market.js +4 -0
- package/dist/validation/rfq.d.ts +109 -0
- package/dist/validation/rfq.js +120 -0
- package/dist/validation/trading.d.ts +24 -0
- package/dist/validation/trading.js +55 -42
- package/dist/websocket/base.d.ts +47 -11
- package/dist/websocket/client.d.ts +51 -4
- package/dist/websocket/depth.d.ts +142 -0
- package/dist/websocket/depth.js +13 -0
- package/dist/websocket/events/index.d.ts +2 -0
- package/dist/websocket/events/index.js +2 -0
- package/dist/websocket/events/orderbook-events.d.ts +41 -1
- package/dist/websocket/events/rfq-events.d.ts +145 -0
- package/dist/websocket/events/rfq-events.js +15 -0
- package/dist/websocket/events/rfq-trade-events.d.ts +28 -0
- package/dist/websocket/events/rfq-trade-events.js +6 -0
- package/dist/websocket/events/trade-events.d.ts +53 -0
- package/dist/websocket/index.d.ts +1 -0
- package/dist/websocket/index.js +1 -0
- package/dist/websocket/snapshots.d.ts +23 -1
- package/dist/wire/operations.d.ts +1 -1
- package/dist/wire/operations.js +28 -0
- package/dist/wire/schema.d.ts +5465 -2050
- package/package.json +2 -2
package/dist/fees/responses.js
CHANGED
|
@@ -107,7 +107,7 @@ export const GetMyFeeTierParamsSchema = z.object({
|
|
|
107
107
|
export const FeeTierScheduleRowSchema = z.object({
|
|
108
108
|
/** Tier level, 1 (lowest volume) through 6 (highest) */
|
|
109
109
|
tierLevel: z.number().int(),
|
|
110
|
-
/**
|
|
110
|
+
/** Minimum weighted 14-day volume for this tier, in quote/USD units */
|
|
111
111
|
minVolumeThreshold: z.string(),
|
|
112
112
|
/** Maker fee in human basis points; negative is a rebate */
|
|
113
113
|
makerFeeBps: z.string(),
|
|
@@ -118,7 +118,7 @@ export const FeeTierScheduleRowSchema = z.object({
|
|
|
118
118
|
* Zod schema for the "my fee tier" response
|
|
119
119
|
*/
|
|
120
120
|
export const GetMyFeeTierResponseSchema = z.object({
|
|
121
|
-
/** Caller's resolved tier (1–6) from
|
|
121
|
+
/** Caller's resolved tier (1–6) from their wallet's recorded weighted 14-day volume */
|
|
122
122
|
currentTierLevel: z.number().int(),
|
|
123
123
|
/** Caller's weighted 14-day volume (perp + 2.5× spot), summed across every application the wallet trades through */
|
|
124
124
|
weightedVolume14d: z.string(),
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* This package provides TypeScript types for the Monaco protocol.
|
|
5
5
|
* It includes SDK types, vault types, trading types, contract types, and common types.
|
|
6
6
|
*/
|
|
7
|
+
export * from "./analytics";
|
|
7
8
|
export * from "./api";
|
|
8
9
|
export * from "./applications";
|
|
9
10
|
export * from "./auth";
|
|
@@ -21,6 +22,7 @@ export * from "./portfolio";
|
|
|
21
22
|
export * from "./positions";
|
|
22
23
|
export * from "./profile";
|
|
23
24
|
export * from "./pulse";
|
|
25
|
+
export * from "./rfq";
|
|
24
26
|
export * from "./sdk";
|
|
25
27
|
export * from "./sub-accounts";
|
|
26
28
|
export * from "./sweeper";
|
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
|
-
|
|
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
|
-
|
|
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 {
|
package/dist/market/index.d.ts
CHANGED
|
@@ -689,6 +689,10 @@ export interface LiquidationHistoryEvent {
|
|
|
689
689
|
/** Position size × event-time mark price, in quote-asset units. */
|
|
690
690
|
markNotional: string;
|
|
691
691
|
quoteAssetSymbol: string;
|
|
692
|
+
/** The position's liquidation (trigger) price captured with the event, in quote units per base unit. */
|
|
693
|
+
liquidationPrice: string;
|
|
694
|
+
/** Liquidation penalty charged on the event, in quote-asset units; null when none was charged. */
|
|
695
|
+
liquidationFee?: string | null;
|
|
692
696
|
}
|
|
693
697
|
export interface ListLiquidationEventsResponse {
|
|
694
698
|
tradingPairId: string;
|
|
@@ -697,6 +701,27 @@ export interface ListLiquidationEventsResponse {
|
|
|
697
701
|
pageSize: number;
|
|
698
702
|
nextPageToken: string;
|
|
699
703
|
}
|
|
704
|
+
/** Query for {@link MarketAPI.listAllLiquidationEvents}: the per-pair listing's window and cursor. */
|
|
705
|
+
export type ListAllLiquidationEventsParams = ListLiquidationEventsParams;
|
|
706
|
+
export interface ListAllLiquidationEventsResponse {
|
|
707
|
+
/** Events across every market, newest first; each carries its tradingPairId. */
|
|
708
|
+
events: LiquidationHistoryEvent[];
|
|
709
|
+
pageSize: number;
|
|
710
|
+
/** Cursor for the next page; empty when the walk is finished. */
|
|
711
|
+
nextPageToken: string;
|
|
712
|
+
}
|
|
713
|
+
/** One asset's insurance fund. Scale the balance with the asset's decimals from the trading pairs listing. */
|
|
714
|
+
export interface InsuranceFund {
|
|
715
|
+
assetId: string;
|
|
716
|
+
/** Balance available to cover bad debt, in raw asset units (the asset's smallest unit). */
|
|
717
|
+
availableBalanceRaw: string;
|
|
718
|
+
/** When the balance last changed (ISO 8601). */
|
|
719
|
+
updatedAt: string;
|
|
720
|
+
}
|
|
721
|
+
export interface ListInsuranceFundsResponse {
|
|
722
|
+
/** Every insurance fund, one per asset. */
|
|
723
|
+
funds: InsuranceFund[];
|
|
724
|
+
}
|
|
700
725
|
export type LiquidationMetricsInterval = "1m" | "5m" | "1h";
|
|
701
726
|
export interface GetLiquidationMetricsParams {
|
|
702
727
|
interval: LiquidationMetricsInterval;
|
|
@@ -813,4 +838,12 @@ export interface MarketAPI extends BaseAPI {
|
|
|
813
838
|
listLiquidationEvents(tradingPairId: string, params?: ListLiquidationEventsParams): Promise<ListLiquidationEventsResponse>;
|
|
814
839
|
/** Fetch bounded UTC-aligned long/short liquidation totals by side. */
|
|
815
840
|
getLiquidationMetrics(tradingPairId: string, params: GetLiquidationMetricsParams): Promise<LiquidationMetrics>;
|
|
841
|
+
/**
|
|
842
|
+
* Fetch liquidation events across every market, newest first, with the same
|
|
843
|
+
* window and keyset cursor as listLiquidationEvents. Public; each client IP
|
|
844
|
+
* has a read budget.
|
|
845
|
+
*/
|
|
846
|
+
listAllLiquidationEvents(params?: ListAllLiquidationEventsParams): Promise<ListAllLiquidationEventsResponse>;
|
|
847
|
+
/** Fetch every insurance fund's current balance, one per asset. Public; each client IP has a read budget. */
|
|
848
|
+
listInsuranceFunds(): Promise<ListInsuranceFundsResponse>;
|
|
816
849
|
}
|
package/dist/profile/index.d.ts
CHANGED
|
@@ -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
|
|
@@ -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,282 @@
|
|
|
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
|
+
monacoFeeCbps: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
133
|
+
maxBuilderFeeCbps: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
134
|
+
estimatedNet: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
135
|
+
}, z.core.$strip>;
|
|
136
|
+
/**
|
|
137
|
+
* Authoritative RFQ status. A taker sees `view` and `outcome`; a maker sees
|
|
138
|
+
* its own latest quote and, once selected, its own selection.
|
|
139
|
+
*/
|
|
140
|
+
export declare const RfqStatusSchema: z.ZodObject<{
|
|
141
|
+
terms: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
142
|
+
rfqId: z.ZodString;
|
|
143
|
+
tradingPairId: z.ZodString;
|
|
144
|
+
product: z.ZodOptional<z.ZodNullable<z.ZodType<"PERPETUAL" | "SPOT" | (string & {}), unknown, z.core.$ZodTypeInternals<"PERPETUAL" | "SPOT" | (string & {}), unknown>>>>;
|
|
145
|
+
quantity: z.ZodString;
|
|
146
|
+
createdAtMs: z.ZodNumber;
|
|
147
|
+
deadlineAtMs: z.ZodNumber;
|
|
148
|
+
side: z.ZodOptional<z.ZodNullable<z.ZodType<"BUY" | "SELL" | (string & {}), unknown, z.core.$ZodTypeInternals<"BUY" | "SELL" | (string & {}), unknown>>>>;
|
|
149
|
+
quoteSide: z.ZodOptional<z.ZodNullable<z.ZodType<"ASK" | "BID" | (string & {}), unknown, z.core.$ZodTypeInternals<"ASK" | "BID" | (string & {}), unknown>>>>;
|
|
150
|
+
leverage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
151
|
+
marginMode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
152
|
+
}, z.core.$strip>>>;
|
|
153
|
+
state: z.ZodType<RfqState | (string & {}), unknown, z.core.$ZodTypeInternals<RfqState | (string & {}), unknown>>;
|
|
154
|
+
stateVersion: z.ZodNumber;
|
|
155
|
+
acceptedSide: z.ZodOptional<z.ZodNullable<z.ZodType<"BUY" | "SELL" | (string & {}), unknown, z.core.$ZodTypeInternals<"BUY" | "SELL" | (string & {}), unknown>>>>;
|
|
156
|
+
lastLookDeadlineAtMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
157
|
+
view: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
158
|
+
viewVersion: z.ZodNumber;
|
|
159
|
+
bid: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
160
|
+
vwap: z.ZodString;
|
|
161
|
+
availableQuantity: z.ZodString;
|
|
162
|
+
grossVwap: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
163
|
+
estimatedMonacoFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
164
|
+
estimatedBuilderFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
165
|
+
estimatedTotalFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
166
|
+
}, z.core.$strip>>>;
|
|
167
|
+
ask: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
168
|
+
vwap: z.ZodString;
|
|
169
|
+
availableQuantity: z.ZodString;
|
|
170
|
+
grossVwap: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
171
|
+
estimatedMonacoFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
172
|
+
estimatedBuilderFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
173
|
+
estimatedTotalFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
174
|
+
}, z.core.$strip>>>;
|
|
175
|
+
asOfMs: z.ZodNumber;
|
|
176
|
+
monacoFeeCbps: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
177
|
+
builderFeeCbps: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
178
|
+
}, z.core.$strip>>>;
|
|
179
|
+
ownQuote: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
180
|
+
rfqId: z.ZodString;
|
|
181
|
+
quoteId: z.ZodString;
|
|
182
|
+
version: z.ZodNumber;
|
|
183
|
+
bid: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
184
|
+
price: z.ZodString;
|
|
185
|
+
capacity: z.ZodString;
|
|
186
|
+
}, z.core.$strip>>>;
|
|
187
|
+
ask: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
188
|
+
price: z.ZodString;
|
|
189
|
+
capacity: z.ZodString;
|
|
190
|
+
}, z.core.$strip>>>;
|
|
191
|
+
issuedAtMs: z.ZodNumber;
|
|
192
|
+
validUntilMs: z.ZodNumber;
|
|
193
|
+
leverage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
194
|
+
marginMode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
195
|
+
refusedSides: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
196
|
+
side: z.ZodType<"ASK" | "BID" | (string & {}), unknown, z.core.$ZodTypeInternals<"ASK" | "BID" | (string & {}), unknown>>;
|
|
197
|
+
code: z.ZodString;
|
|
198
|
+
reason: z.ZodString;
|
|
199
|
+
}, z.core.$strip>>>>;
|
|
200
|
+
}, z.core.$strip>>>;
|
|
201
|
+
ownSelection: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
202
|
+
acceptanceId: z.ZodString;
|
|
203
|
+
takerSide: z.ZodOptional<z.ZodNullable<z.ZodType<"BUY" | "SELL" | (string & {}), unknown, z.core.$ZodTypeInternals<"BUY" | "SELL" | (string & {}), unknown>>>>;
|
|
204
|
+
quoteId: z.ZodString;
|
|
205
|
+
quoteVersion: z.ZodNumber;
|
|
206
|
+
quantity: z.ZodString;
|
|
207
|
+
frozenTerms: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
208
|
+
price: z.ZodString;
|
|
209
|
+
capacity: z.ZodString;
|
|
210
|
+
}, z.core.$strip>>>;
|
|
211
|
+
lastLookDeadlineAtMs: z.ZodNumber;
|
|
212
|
+
monacoFeeCbps: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
213
|
+
maxBuilderFeeCbps: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
214
|
+
estimatedNet: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
215
|
+
}, z.core.$strip>>>;
|
|
216
|
+
ownLatestVersion: z.ZodNumber;
|
|
217
|
+
ownQuoteWithdrawn: z.ZodBoolean;
|
|
218
|
+
outcome: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
219
|
+
executedQuantity: z.ZodString;
|
|
220
|
+
unfilledQuantity: z.ZodString;
|
|
221
|
+
vwap: z.ZodString;
|
|
222
|
+
fills: z.ZodArray<z.ZodObject<{
|
|
223
|
+
executionId: z.ZodString;
|
|
224
|
+
price: z.ZodString;
|
|
225
|
+
quantity: z.ZodString;
|
|
226
|
+
fee: z.ZodString;
|
|
227
|
+
monacoFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
228
|
+
builderFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
229
|
+
}, z.core.$strip>>;
|
|
230
|
+
}, z.core.$strip>>>;
|
|
231
|
+
durableSequence: z.ZodNumber;
|
|
232
|
+
}, z.core.$strip>;
|
|
233
|
+
/** A market RFQ is offered on. */
|
|
234
|
+
export declare const RfqMarketCapabilitySchema: z.ZodObject<{
|
|
235
|
+
tradingPairId: z.ZodString;
|
|
236
|
+
product: z.ZodOptional<z.ZodNullable<z.ZodType<"PERPETUAL" | "SPOT" | (string & {}), unknown, z.core.$ZodTypeInternals<"PERPETUAL" | "SPOT" | (string & {}), unknown>>>>;
|
|
237
|
+
minQuantity: z.ZodString;
|
|
238
|
+
maxQuantity: z.ZodString;
|
|
239
|
+
}, z.core.$strip>;
|
|
240
|
+
/** Your RFQ limits and the markets RFQ is offered on. */
|
|
241
|
+
export declare const GetRfqCapabilitiesResponseSchema: z.ZodObject<{
|
|
242
|
+
protocolVersion: z.ZodNumber;
|
|
243
|
+
enabled: z.ZodBoolean;
|
|
244
|
+
markets: z.ZodArray<z.ZodObject<{
|
|
245
|
+
tradingPairId: z.ZodString;
|
|
246
|
+
product: z.ZodOptional<z.ZodNullable<z.ZodType<"PERPETUAL" | "SPOT" | (string & {}), unknown, z.core.$ZodTypeInternals<"PERPETUAL" | "SPOT" | (string & {}), unknown>>>>;
|
|
247
|
+
minQuantity: z.ZodString;
|
|
248
|
+
maxQuantity: z.ZodString;
|
|
249
|
+
}, z.core.$strip>>;
|
|
250
|
+
requestWindowMs: z.ZodNumber;
|
|
251
|
+
minQuoteValidityMs: z.ZodNumber;
|
|
252
|
+
maxQuoteValidityMs: z.ZodNumber;
|
|
253
|
+
lastLookMs: z.ZodNumber;
|
|
254
|
+
maxNewRfqs: z.ZodNumber;
|
|
255
|
+
quotaWindowMs: z.ZodNumber;
|
|
256
|
+
quotaRemaining: z.ZodNumber;
|
|
257
|
+
quotaRetryAfterMs: z.ZodNumber;
|
|
258
|
+
}, z.core.$strip>;
|
|
259
|
+
/** A withdrawn quote: the withdrawal's version. */
|
|
260
|
+
export declare const WithdrawRfqQuoteResponseSchema: z.ZodObject<{
|
|
261
|
+
rfqId: z.ZodString;
|
|
262
|
+
version: z.ZodNumber;
|
|
263
|
+
}, z.core.$strip>;
|
|
264
|
+
/** A recorded last-look answer. */
|
|
265
|
+
export declare const RespondRfqLastLookResponseSchema: z.ZodObject<{
|
|
266
|
+
acceptanceId: z.ZodString;
|
|
267
|
+
response: z.ZodOptional<z.ZodNullable<z.ZodType<"IMPROVE" | "REJECT" | (string & {}), unknown, z.core.$ZodTypeInternals<"IMPROVE" | "REJECT" | (string & {}), unknown>>>>;
|
|
268
|
+
recordedAtMs: z.ZodNumber;
|
|
269
|
+
}, z.core.$strip>;
|
|
270
|
+
export type RfqRequestTerms = z.infer<typeof RfqRequestTermsSchema>;
|
|
271
|
+
export type RfqSideView = z.infer<typeof RfqSideViewSchema>;
|
|
272
|
+
export type RfqView = z.infer<typeof RfqViewSchema>;
|
|
273
|
+
export type RfqFill = z.infer<typeof RfqFillSchema>;
|
|
274
|
+
export type RfqOutcome = z.infer<typeof RfqOutcomeSchema>;
|
|
275
|
+
export type RfqQuoteVersion = z.infer<typeof RfqQuoteVersionSchema>;
|
|
276
|
+
export type RfqRefusedSide = z.infer<typeof RfqRefusedSideSchema>;
|
|
277
|
+
export type RfqMakerSelection = z.infer<typeof RfqMakerSelectionSchema>;
|
|
278
|
+
export type RfqStatus = z.infer<typeof RfqStatusSchema>;
|
|
279
|
+
export type RfqMarketCapability = z.infer<typeof RfqMarketCapabilitySchema>;
|
|
280
|
+
export type GetRfqCapabilitiesResponse = z.infer<typeof GetRfqCapabilitiesResponseSchema>;
|
|
281
|
+
export type WithdrawRfqQuoteResponse = z.infer<typeof WithdrawRfqQuoteResponseSchema>;
|
|
282
|
+
export type RespondRfqLastLookResponse = z.infer<typeof RespondRfqLastLookResponseSchema>;
|