@0xmonaco/types 1.1.8 → 1.1.9
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/margin-accounts/index.d.ts +9 -4
- package/dist/market/index.d.ts +7 -3
- package/dist/rfq/index.d.ts +12 -1
- package/dist/rfq/responses.d.ts +142 -0
- package/dist/rfq/responses.js +7 -0
- package/dist/validation/rfq.d.ts +5 -0
- package/dist/validation/rfq.js +7 -0
- package/dist/wire/operations.d.ts +1 -1
- package/dist/wire/operations.js +1 -0
- package/dist/wire/schema.d.ts +90 -11
- package/package.json +2 -2
|
@@ -593,7 +593,7 @@ export interface CloseMarginSubAccountResponse {
|
|
|
593
593
|
/** Collateral moved to the default margin account. */
|
|
594
594
|
amount: string;
|
|
595
595
|
}
|
|
596
|
-
/** One side of a collateral transfer: the spot wallet,
|
|
596
|
+
/** One side of a collateral transfer: the spot wallet, a margin account, or one of its risk buckets. */
|
|
597
597
|
export type CollateralTransferEndpoint = {
|
|
598
598
|
wallet: true;
|
|
599
599
|
marginAccountId?: never;
|
|
@@ -604,9 +604,11 @@ export type CollateralTransferEndpoint = {
|
|
|
604
604
|
riskBucketId?: string;
|
|
605
605
|
};
|
|
606
606
|
/**
|
|
607
|
-
* Move collateral between
|
|
608
|
-
*
|
|
609
|
-
*
|
|
607
|
+
* Move collateral between any two of the caller's places: the spot wallet, a
|
|
608
|
+
* margin account, a risk bucket. A route that crosses accounts or the wallet
|
|
609
|
+
* runs up to three moves in one step, and a refused request moves nothing. The
|
|
610
|
+
* wallet is reached through the default margin account. A route to or from the
|
|
611
|
+
* wallet or a risk bucket refuses a copy-trading sub-account.
|
|
610
612
|
*/
|
|
611
613
|
export interface TransferMarginCollateralRequest {
|
|
612
614
|
asset: string;
|
|
@@ -628,6 +630,9 @@ export interface TransferMarginCollateralResponse {
|
|
|
628
630
|
fromMarginAccountId?: string;
|
|
629
631
|
toMarginAccountId?: string;
|
|
630
632
|
toRiskBucketId?: string;
|
|
633
|
+
fromRiskBucketId?: string;
|
|
634
|
+
/** Whether funding the risk bucket credited its sole open position's margin. Absent when the destination is not a risk bucket. */
|
|
635
|
+
positionMarginCredited?: boolean;
|
|
631
636
|
}
|
|
632
637
|
export interface MarginAccountsAPI extends BaseAPI {
|
|
633
638
|
/**
|
package/dist/market/index.d.ts
CHANGED
|
@@ -273,8 +273,8 @@ export interface ScreenerItem {
|
|
|
273
273
|
/**
|
|
274
274
|
* Estimated rate for the in-progress funding window (decimal fraction per
|
|
275
275
|
* window), the same value as `getFundingState().estimatedNextFundingRate`.
|
|
276
|
-
* A window that ends with too few accepted samples settles at the
|
|
277
|
-
* settled rate
|
|
276
|
+
* A window that ends with too few accepted samples settles at zero, so the
|
|
277
|
+
* settled rate can differ.
|
|
278
278
|
* Null for spot pairs and margin pairs whose current window has no samples yet
|
|
279
279
|
*/
|
|
280
280
|
estimatedNextFundingRate: string | null;
|
|
@@ -524,7 +524,11 @@ export interface FundingRecord {
|
|
|
524
524
|
windowClosedAt: string;
|
|
525
525
|
/** Settlement time (ISO 8601); the sort key for `listAllFundingHistory`. */
|
|
526
526
|
settledAt: string;
|
|
527
|
-
/**
|
|
527
|
+
/**
|
|
528
|
+
* True when the window held too few accepted samples and settled at zero
|
|
529
|
+
* (sparse-sample rule). Windows settled before 0XM-3728 carried the last
|
|
530
|
+
* settled rate instead.
|
|
531
|
+
*/
|
|
528
532
|
carried?: boolean;
|
|
529
533
|
}
|
|
530
534
|
export interface ListFundingHistoryParams {
|
package/dist/rfq/index.d.ts
CHANGED
|
@@ -9,7 +9,12 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import type { BaseAPI } from "../api";
|
|
11
11
|
import type { AcceptRfqParams, CancelRfqParams, CreateRfqParams, RespondRfqLastLookParams, UpsertRfqQuoteParams, WithdrawRfqQuoteParams } from "../validation/rfq";
|
|
12
|
-
import type { GetRfqCapabilitiesResponse, RespondRfqLastLookResponse, RfqQuoteVersion, RfqStatus, WithdrawRfqQuoteResponse } from "./responses";
|
|
12
|
+
import type { GetRfqCapabilitiesResponse, ListRfqsResponse, RespondRfqLastLookResponse, RfqQuoteVersion, RfqStatus, WithdrawRfqQuoteResponse } from "./responses";
|
|
13
|
+
/** `listRfqs` paging: up to 100 per page (default 50), and the previous page's token. */
|
|
14
|
+
export interface ListRfqsParams {
|
|
15
|
+
pageSize?: number;
|
|
16
|
+
pageToken?: string;
|
|
17
|
+
}
|
|
13
18
|
/**
|
|
14
19
|
* RFQ API.
|
|
15
20
|
*
|
|
@@ -30,6 +35,12 @@ export interface RfqAPI extends BaseAPI {
|
|
|
30
35
|
* and, once selected, `ownSelection` for last look.
|
|
31
36
|
*/
|
|
32
37
|
getRfq(rfqId: string): Promise<RfqStatus>;
|
|
38
|
+
/**
|
|
39
|
+
* Your RFQs as the taker, newest first, in every state (those that filled
|
|
40
|
+
* nothing included). Each is as `getRfq` gives it, without the live `view`.
|
|
41
|
+
* Follow `nextPageToken` until it is empty.
|
|
42
|
+
*/
|
|
43
|
+
listRfqs(params?: ListRfqsParams): Promise<ListRfqsResponse>;
|
|
33
44
|
/** Accept one side of the view you last saw (`view.viewVersion`). Binding. */
|
|
34
45
|
acceptRfq(rfqId: string, params: AcceptRfqParams): Promise<RfqStatus>;
|
|
35
46
|
/** Cancel an RFQ you have not accepted, before its deadline. */
|
package/dist/rfq/responses.d.ts
CHANGED
|
@@ -336,6 +336,147 @@ export declare const RfqStatusSchema: z.ZodObject<{
|
|
|
336
336
|
bookFullSize: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
337
337
|
}, z.core.$strip>>>;
|
|
338
338
|
}, z.core.$strip>;
|
|
339
|
+
/** A page of your RFQs as the taker, newest first. */
|
|
340
|
+
export declare const ListRfqsResponseSchema: z.ZodObject<{
|
|
341
|
+
rfqs: z.ZodArray<z.ZodObject<{
|
|
342
|
+
terms: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
343
|
+
rfqId: z.ZodString;
|
|
344
|
+
tradingPairId: z.ZodString;
|
|
345
|
+
product: z.ZodOptional<z.ZodNullable<z.ZodType<"PERPETUAL" | "SPOT" | (string & {}), unknown, z.core.$ZodTypeInternals<"PERPETUAL" | "SPOT" | (string & {}), unknown>>>>;
|
|
346
|
+
quantity: z.ZodString;
|
|
347
|
+
createdAtMs: z.ZodNumber;
|
|
348
|
+
deadlineAtMs: z.ZodNumber;
|
|
349
|
+
side: z.ZodOptional<z.ZodNullable<z.ZodType<"BUY" | "SELL" | (string & {}), unknown, z.core.$ZodTypeInternals<"BUY" | "SELL" | (string & {}), unknown>>>>;
|
|
350
|
+
quoteSide: z.ZodOptional<z.ZodNullable<z.ZodType<"ASK" | "BID" | (string & {}), unknown, z.core.$ZodTypeInternals<"ASK" | "BID" | (string & {}), unknown>>>>;
|
|
351
|
+
leverage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
352
|
+
marginMode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
353
|
+
}, z.core.$strip>>>;
|
|
354
|
+
state: z.ZodType<RfqState | (string & {}), unknown, z.core.$ZodTypeInternals<RfqState | (string & {}), unknown>>;
|
|
355
|
+
stateVersion: z.ZodNumber;
|
|
356
|
+
acceptedSide: z.ZodOptional<z.ZodNullable<z.ZodType<"BUY" | "SELL" | (string & {}), unknown, z.core.$ZodTypeInternals<"BUY" | "SELL" | (string & {}), unknown>>>>;
|
|
357
|
+
lastLookDeadlineAtMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
358
|
+
view: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
359
|
+
viewVersion: z.ZodNumber;
|
|
360
|
+
bid: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
361
|
+
vwap: z.ZodString;
|
|
362
|
+
availableQuantity: z.ZodString;
|
|
363
|
+
grossVwap: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
364
|
+
estimatedMonacoFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
365
|
+
estimatedBuilderFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
366
|
+
estimatedTotalFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
367
|
+
book: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
368
|
+
vwap: z.ZodString;
|
|
369
|
+
grossVwap: z.ZodString;
|
|
370
|
+
asOfMs: z.ZodNumber;
|
|
371
|
+
levels: z.ZodNumber;
|
|
372
|
+
}, z.core.$strip>>>;
|
|
373
|
+
}, z.core.$strip>>>;
|
|
374
|
+
ask: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
375
|
+
vwap: z.ZodString;
|
|
376
|
+
availableQuantity: z.ZodString;
|
|
377
|
+
grossVwap: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
378
|
+
estimatedMonacoFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
379
|
+
estimatedBuilderFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
380
|
+
estimatedTotalFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
381
|
+
book: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
382
|
+
vwap: z.ZodString;
|
|
383
|
+
grossVwap: z.ZodString;
|
|
384
|
+
asOfMs: z.ZodNumber;
|
|
385
|
+
levels: z.ZodNumber;
|
|
386
|
+
}, z.core.$strip>>>;
|
|
387
|
+
}, z.core.$strip>>>;
|
|
388
|
+
asOfMs: z.ZodNumber;
|
|
389
|
+
monacoFeeCbps: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
390
|
+
builderFeeCbps: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
391
|
+
}, z.core.$strip>>>;
|
|
392
|
+
ownQuote: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
393
|
+
rfqId: z.ZodString;
|
|
394
|
+
quoteId: z.ZodString;
|
|
395
|
+
version: z.ZodNumber;
|
|
396
|
+
bid: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
397
|
+
price: z.ZodString;
|
|
398
|
+
capacity: z.ZodString;
|
|
399
|
+
}, z.core.$strip>>>;
|
|
400
|
+
ask: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
401
|
+
price: z.ZodString;
|
|
402
|
+
capacity: z.ZodString;
|
|
403
|
+
}, z.core.$strip>>>;
|
|
404
|
+
issuedAtMs: z.ZodNumber;
|
|
405
|
+
validUntilMs: z.ZodNumber;
|
|
406
|
+
leverage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
407
|
+
marginMode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
408
|
+
refusedSides: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
409
|
+
side: z.ZodType<"ASK" | "BID" | (string & {}), unknown, z.core.$ZodTypeInternals<"ASK" | "BID" | (string & {}), unknown>>;
|
|
410
|
+
code: z.ZodString;
|
|
411
|
+
reason: z.ZodString;
|
|
412
|
+
}, z.core.$strip>>>>;
|
|
413
|
+
}, z.core.$strip>>>;
|
|
414
|
+
ownSelection: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
415
|
+
acceptanceId: z.ZodString;
|
|
416
|
+
takerSide: z.ZodOptional<z.ZodNullable<z.ZodType<"BUY" | "SELL" | (string & {}), unknown, z.core.$ZodTypeInternals<"BUY" | "SELL" | (string & {}), unknown>>>>;
|
|
417
|
+
quoteId: z.ZodString;
|
|
418
|
+
quoteVersion: z.ZodNumber;
|
|
419
|
+
quantity: z.ZodString;
|
|
420
|
+
frozenTerms: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
421
|
+
price: z.ZodString;
|
|
422
|
+
capacity: z.ZodString;
|
|
423
|
+
}, z.core.$strip>>>;
|
|
424
|
+
lastLookDeadlineAtMs: z.ZodNumber;
|
|
425
|
+
monacoFeeCbps: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
426
|
+
maxBuilderFeeCbps: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
427
|
+
estimatedNet: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
428
|
+
}, z.core.$strip>>>;
|
|
429
|
+
ownLatestVersion: z.ZodNumber;
|
|
430
|
+
ownQuoteWithdrawn: z.ZodBoolean;
|
|
431
|
+
outcome: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
432
|
+
executedQuantity: z.ZodString;
|
|
433
|
+
unfilledQuantity: z.ZodString;
|
|
434
|
+
vwap: z.ZodString;
|
|
435
|
+
fills: z.ZodArray<z.ZodObject<{
|
|
436
|
+
executionId: z.ZodString;
|
|
437
|
+
price: z.ZodString;
|
|
438
|
+
quantity: z.ZodString;
|
|
439
|
+
fee: z.ZodString;
|
|
440
|
+
monacoFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
441
|
+
builderFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
442
|
+
}, z.core.$strip>>;
|
|
443
|
+
allInVwap: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
444
|
+
bookAtFill: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
445
|
+
vwap: z.ZodString;
|
|
446
|
+
grossVwap: z.ZodString;
|
|
447
|
+
asOfMs: z.ZodNumber;
|
|
448
|
+
levels: z.ZodNumber;
|
|
449
|
+
}, z.core.$strip>>>;
|
|
450
|
+
bookAtFillFullSize: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
451
|
+
}, z.core.$strip>>>;
|
|
452
|
+
durableSequence: z.ZodNumber;
|
|
453
|
+
ownFills: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
454
|
+
executionId: z.ZodString;
|
|
455
|
+
price: z.ZodString;
|
|
456
|
+
quantity: z.ZodString;
|
|
457
|
+
fee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
458
|
+
monacoFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
459
|
+
builderFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
460
|
+
}, z.core.$strip>>>>;
|
|
461
|
+
acceptance: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
462
|
+
viewVersion: z.ZodNumber;
|
|
463
|
+
acceptedAtMs: z.ZodNumber;
|
|
464
|
+
vwap: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
465
|
+
grossVwap: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
466
|
+
availableQuantity: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
467
|
+
monacoFeeCbps: z.ZodNumber;
|
|
468
|
+
builderFeeCbps: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
469
|
+
book: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
470
|
+
vwap: z.ZodString;
|
|
471
|
+
grossVwap: z.ZodString;
|
|
472
|
+
asOfMs: z.ZodNumber;
|
|
473
|
+
levels: z.ZodNumber;
|
|
474
|
+
}, z.core.$strip>>>;
|
|
475
|
+
bookFullSize: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
476
|
+
}, z.core.$strip>>>;
|
|
477
|
+
}, z.core.$strip>>;
|
|
478
|
+
nextPageToken: z.ZodString;
|
|
479
|
+
}, z.core.$strip>;
|
|
339
480
|
/** A market RFQ is offered on. */
|
|
340
481
|
export declare const RfqMarketCapabilitySchema: z.ZodObject<{
|
|
341
482
|
tradingPairId: z.ZodString;
|
|
@@ -385,6 +526,7 @@ export type RfqQuoteVersion = z.infer<typeof RfqQuoteVersionSchema>;
|
|
|
385
526
|
export type RfqRefusedSide = z.infer<typeof RfqRefusedSideSchema>;
|
|
386
527
|
export type RfqMakerSelection = z.infer<typeof RfqMakerSelectionSchema>;
|
|
387
528
|
export type RfqStatus = z.infer<typeof RfqStatusSchema>;
|
|
529
|
+
export type ListRfqsResponse = z.infer<typeof ListRfqsResponseSchema>;
|
|
388
530
|
export type RfqMarketCapability = z.infer<typeof RfqMarketCapabilitySchema>;
|
|
389
531
|
export type GetRfqCapabilitiesResponse = z.infer<typeof GetRfqCapabilitiesResponseSchema>;
|
|
390
532
|
export type WithdrawRfqQuoteResponse = z.infer<typeof WithdrawRfqQuoteResponseSchema>;
|
package/dist/rfq/responses.js
CHANGED
|
@@ -233,6 +233,13 @@ export const RfqStatusSchema = z.object({
|
|
|
233
233
|
/** Taker only: what your view showed when you accepted. */
|
|
234
234
|
acceptance: RfqAcceptanceRecordSchema.nullish(),
|
|
235
235
|
});
|
|
236
|
+
/** A page of your RFQs as the taker, newest first. */
|
|
237
|
+
export const ListRfqsResponseSchema = z.object({
|
|
238
|
+
/** Each as `getRfq` gives it to the taker, without the live `view`. */
|
|
239
|
+
rfqs: z.array(RfqStatusSchema),
|
|
240
|
+
/** Pass as `pageToken` for the next page; empty once there are no more. */
|
|
241
|
+
nextPageToken: z.string(),
|
|
242
|
+
});
|
|
236
243
|
/** A market RFQ is offered on. */
|
|
237
244
|
export const RfqMarketCapabilitySchema = z.object({
|
|
238
245
|
tradingPairId: z.string(),
|
package/dist/validation/rfq.d.ts
CHANGED
|
@@ -62,6 +62,11 @@ export declare const CancelRfqSchema: z.ZodObject<{
|
|
|
62
62
|
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
63
63
|
}, z.core.$strict>;
|
|
64
64
|
/** Params for placing or replacing a quote: a bid, an ask or both. */
|
|
65
|
+
/** `listRfqs` paging: 1 to 100 per page, and the previous page's token. */
|
|
66
|
+
export declare const ListRfqsSchema: z.ZodObject<{
|
|
67
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
68
|
+
pageToken: z.ZodOptional<z.ZodString>;
|
|
69
|
+
}, z.core.$strict>;
|
|
65
70
|
export declare const UpsertRfqQuoteSchema: z.ZodObject<{
|
|
66
71
|
expectedVersion: z.ZodNumber;
|
|
67
72
|
bid: z.ZodOptional<z.ZodObject<{
|
package/dist/validation/rfq.js
CHANGED
|
@@ -70,6 +70,13 @@ export const CancelRfqSchema = z
|
|
|
70
70
|
})
|
|
71
71
|
.strict();
|
|
72
72
|
/** Params for placing or replacing a quote: a bid, an ask or both. */
|
|
73
|
+
/** `listRfqs` paging: 1 to 100 per page, and the previous page's token. */
|
|
74
|
+
export const ListRfqsSchema = z
|
|
75
|
+
.object({
|
|
76
|
+
pageSize: z.number().int().min(1).max(100).optional(),
|
|
77
|
+
pageToken: z.string().min(1).optional(),
|
|
78
|
+
})
|
|
79
|
+
.strict();
|
|
73
80
|
export const UpsertRfqQuoteSchema = z
|
|
74
81
|
.object({
|
|
75
82
|
/** Your current version for this RFQ (`ownLatestVersion`); 0 for your first quote. */
|
|
@@ -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 ["accept_rfq", "add_follow_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_all_after", "cancel_conditional_order", "cancel_order", "cancel_rfq", "cancel_twap_order", "check_trader_code_availability", "claim_buildercode_rewards", "claim_managed_market_lease", "clear_trader_code", "close_all_copy_positions", "close_follow_positions", "close_position", "close_sub_account", "create_challenge", "create_delegated_session", "create_order", "create_rfq", "create_sub_account", "create_sub_account_limit", "create_twap_order", "delete_sub_account_limit", "get_application_config", "get_application_stats", "get_available_collateral", "get_builder", "get_builder_series", "get_builder_totals", "get_buildercode_payout_summary", "get_buildercode_rewards_balance", "get_buildercodes_config", "get_candles", "get_conditional_order", "get_faucet_info", "get_fee_schedule", "get_follow", "get_funding_state", "get_index_price", "get_lead_trader", "get_liquidation_metrics", "get_margin_account_movements", "get_margin_account_pnl", "get_margin_account_summary", "get_mark_price", "get_market_metadata", "get_market_stats", "get_my_fee_tier", "get_my_lead_trader", "get_my_referral_downline", "get_my_referral_position", "get_my_referral_tree", "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_protocol_series", "get_protocol_totals", "get_pulse", "get_region_status", "get_rewards_balance", "get_rfq", "get_rfq_capabilities", "get_screener", "get_self_trade_prevention_default", "get_sub_account_limits", "get_sweeper_chains", "get_sweeper_deposit_status", "get_token_custody", "get_trade_by_id", "get_trade_flow", "get_trader_code_info", "get_trader_metrics", "get_trades", "get_trading_pair_by_id", "get_treasury_net_fees", "get_twap_order", "get_twap_order_tca", "get_user_balance_by_asset", "get_user_balances", "get_user_movements", "get_user_profile", "get_user_trades", "get_wallet_summary", "get_withdrawal", "health_check", "initiate_withdrawal", "list_all_funding_history", "list_all_liquidation_events", "list_application_balances", "list_application_movements", "list_application_orders", "list_application_users", "list_builder_fee_changes", "list_builder_leaderboard", "list_buildercode_payouts", "list_builders", "list_conditional_orders", "list_delegated_agent_owners", "list_delegated_agents", "list_follow_leader_positions", "list_funding_history", "list_funding_payments", "list_insurance_funds", "list_invite_codes", "list_lead_trader_closed_trades", "list_lead_trader_open_positions", "list_lead_traders", "list_liquidation_events", "list_managed_market_assignments", "list_margin_accounts", "list_market_volumes", "list_my_followers", "list_my_follows", "list_pending_withdrawals", "list_position_history", "list_positions", "list_sub_accounts_with_balances", "list_sweeper_deposits", "list_token_custody", "list_trades", "list_trading_pairs", "list_twap_order_slices", "list_twap_orders", "list_vault_deposits", "list_vault_withdrawals", "list_wallet_leaderboard", "list_wallet_liquidations", "mint_tokens", "preview_follow", "refresh_managed_market_quotes", "refresh_session", "register_deposit_address", "replace_order", "request_invite_codes", "respond_rfq_last_look", "revoke_delegated_agent", "revoke_session", "set_builder_fee", "set_self_trade_prevention_default", "set_trader_code", "simulate_fees", "simulate_order_risk", "simulate_parent_margin_order_risk", "simulate_risk_bucket_order_risk", "stop_follow", "transfer_collateral", "transfer_collateral_from_margin_account", "transfer_collateral_from_parent_margin_account", "transfer_collateral_from_sub_account", "transfer_collateral_to_margin_account", "transfer_collateral_to_parent_margin_account", "transfer_collateral_to_risk_bucket", "transfer_collateral_to_sub_account", "transfer_rewards", "update_sub_account_limit", "upsert_delegated_agent", "upsert_follow", "upsert_lead_trader", "upsert_rfq_quote", "verify_signature", "withdraw_rfq_quote"];
|
|
13
|
+
export declare const OPERATION_IDS: readonly ["accept_rfq", "add_follow_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_all_after", "cancel_conditional_order", "cancel_order", "cancel_rfq", "cancel_twap_order", "check_trader_code_availability", "claim_buildercode_rewards", "claim_managed_market_lease", "clear_trader_code", "close_all_copy_positions", "close_follow_positions", "close_position", "close_sub_account", "create_challenge", "create_delegated_session", "create_order", "create_rfq", "create_sub_account", "create_sub_account_limit", "create_twap_order", "delete_sub_account_limit", "get_application_config", "get_application_stats", "get_available_collateral", "get_builder", "get_builder_series", "get_builder_totals", "get_buildercode_payout_summary", "get_buildercode_rewards_balance", "get_buildercodes_config", "get_candles", "get_conditional_order", "get_faucet_info", "get_fee_schedule", "get_follow", "get_funding_state", "get_index_price", "get_lead_trader", "get_liquidation_metrics", "get_margin_account_movements", "get_margin_account_pnl", "get_margin_account_summary", "get_mark_price", "get_market_metadata", "get_market_stats", "get_my_fee_tier", "get_my_lead_trader", "get_my_referral_downline", "get_my_referral_position", "get_my_referral_tree", "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_protocol_series", "get_protocol_totals", "get_pulse", "get_region_status", "get_rewards_balance", "get_rfq", "get_rfq_capabilities", "get_screener", "get_self_trade_prevention_default", "get_sub_account_limits", "get_sweeper_chains", "get_sweeper_deposit_status", "get_token_custody", "get_trade_by_id", "get_trade_flow", "get_trader_code_info", "get_trader_metrics", "get_trades", "get_trading_pair_by_id", "get_treasury_net_fees", "get_twap_order", "get_twap_order_tca", "get_user_balance_by_asset", "get_user_balances", "get_user_movements", "get_user_profile", "get_user_trades", "get_wallet_summary", "get_withdrawal", "health_check", "initiate_withdrawal", "list_all_funding_history", "list_all_liquidation_events", "list_application_balances", "list_application_movements", "list_application_orders", "list_application_users", "list_builder_fee_changes", "list_builder_leaderboard", "list_buildercode_payouts", "list_builders", "list_conditional_orders", "list_delegated_agent_owners", "list_delegated_agents", "list_follow_leader_positions", "list_funding_history", "list_funding_payments", "list_insurance_funds", "list_invite_codes", "list_lead_trader_closed_trades", "list_lead_trader_open_positions", "list_lead_traders", "list_liquidation_events", "list_managed_market_assignments", "list_margin_accounts", "list_market_volumes", "list_my_followers", "list_my_follows", "list_pending_withdrawals", "list_position_history", "list_positions", "list_rfqs", "list_sub_accounts_with_balances", "list_sweeper_deposits", "list_token_custody", "list_trades", "list_trading_pairs", "list_twap_order_slices", "list_twap_orders", "list_vault_deposits", "list_vault_withdrawals", "list_wallet_leaderboard", "list_wallet_liquidations", "mint_tokens", "preview_follow", "refresh_managed_market_quotes", "refresh_session", "register_deposit_address", "replace_order", "request_invite_codes", "respond_rfq_last_look", "revoke_delegated_agent", "revoke_session", "set_builder_fee", "set_self_trade_prevention_default", "set_trader_code", "simulate_fees", "simulate_order_risk", "simulate_parent_margin_order_risk", "simulate_risk_bucket_order_risk", "stop_follow", "transfer_collateral", "transfer_collateral_from_margin_account", "transfer_collateral_from_parent_margin_account", "transfer_collateral_from_sub_account", "transfer_collateral_to_margin_account", "transfer_collateral_to_parent_margin_account", "transfer_collateral_to_risk_bucket", "transfer_collateral_to_sub_account", "transfer_rewards", "update_sub_account_limit", "upsert_delegated_agent", "upsert_follow", "upsert_lead_trader", "upsert_rfq_quote", "verify_signature", "withdraw_rfq_quote"];
|
|
14
14
|
/** Union of every OpenAPI operationId in the spec. */
|
|
15
15
|
export type OperationId = (typeof OPERATION_IDS)[number];
|
package/dist/wire/operations.js
CHANGED
package/dist/wire/schema.d.ts
CHANGED
|
@@ -2229,12 +2229,18 @@ export interface paths {
|
|
|
2229
2229
|
get?: never;
|
|
2230
2230
|
put?: never;
|
|
2231
2231
|
/**
|
|
2232
|
-
* @description Move collateral between
|
|
2233
|
-
*
|
|
2234
|
-
* account (optionally one of its risk buckets).
|
|
2235
|
-
* the
|
|
2236
|
-
*
|
|
2237
|
-
*
|
|
2232
|
+
* @description Move collateral between any two of the caller's places: the spot wallet, a
|
|
2233
|
+
* margin account, a risk bucket. `from` and `to` each name the wallet or a
|
|
2234
|
+
* margin account (optionally one of its risk buckets). A route that crosses
|
|
2235
|
+
* accounts or the wallet runs up to three moves in one step: out of the risk
|
|
2236
|
+
* bucket, across to the other account, into the destination. The wallet is
|
|
2237
|
+
* reached through the default margin account. A refused request moves nothing.
|
|
2238
|
+
* A route to or from the wallet or a risk bucket refuses a copy-trading
|
|
2239
|
+
* sub-account. If the service fails partway, the request answers
|
|
2240
|
+
* COLLATERAL_TRANSFER_STOPPED_PARTWAY (HTTP 409 / gRPC ALREADY_EXISTS) naming
|
|
2241
|
+
* the margin account that holds the amount: move it from there rather than
|
|
2242
|
+
* retrying, and re-read the wallet balance. The older transfer routes keep
|
|
2243
|
+
* working unchanged.
|
|
2238
2244
|
*/
|
|
2239
2245
|
post: operations["transfer_collateral"];
|
|
2240
2246
|
delete?: never;
|
|
@@ -3533,7 +3539,15 @@ export interface paths {
|
|
|
3533
3539
|
path?: never;
|
|
3534
3540
|
cookie?: never;
|
|
3535
3541
|
};
|
|
3536
|
-
|
|
3542
|
+
/**
|
|
3543
|
+
* List your RFQs
|
|
3544
|
+
* @description List your RFQs.
|
|
3545
|
+
*
|
|
3546
|
+
* The caller's own RFQs as the taker, newest first, in every state, those
|
|
3547
|
+
* that filled nothing included. Each carries what GetRfq gives the taker
|
|
3548
|
+
* except the live view: read GetRfq for that.
|
|
3549
|
+
*/
|
|
3550
|
+
get: operations["list_rfqs"];
|
|
3537
3551
|
put?: never;
|
|
3538
3552
|
/**
|
|
3539
3553
|
* Request quotes
|
|
@@ -6653,8 +6667,8 @@ export interface components {
|
|
|
6653
6667
|
settledAt?: string | null;
|
|
6654
6668
|
/**
|
|
6655
6669
|
* @description True when the window held fewer than the minimum accepted samples and
|
|
6656
|
-
* settled at
|
|
6657
|
-
*
|
|
6670
|
+
* settled at zero instead of a freshly computed average. (Windows settled
|
|
6671
|
+
* before this rule carried the last settled rate instead.)
|
|
6658
6672
|
*/
|
|
6659
6673
|
carried?: boolean | null;
|
|
6660
6674
|
};
|
|
@@ -7065,7 +7079,7 @@ export interface components {
|
|
|
7065
7079
|
*/
|
|
7066
7080
|
currentFundingRate?: string | null;
|
|
7067
7081
|
/**
|
|
7068
|
-
* @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. A window that ends with too few accepted samples settles at
|
|
7082
|
+
* @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. A window that ends with too few accepted samples settles at zero instead, so the settled rate can differ from this estimate
|
|
7069
7083
|
* @example 0.00012
|
|
7070
7084
|
*/
|
|
7071
7085
|
estimatedNextFundingRate?: string | null;
|
|
@@ -9738,6 +9752,12 @@ export interface components {
|
|
|
9738
9752
|
*/
|
|
9739
9753
|
totalCapped?: boolean | null;
|
|
9740
9754
|
};
|
|
9755
|
+
ListRfqsResponse: {
|
|
9756
|
+
/** @description Newest first. Each is the taker's status as GetRfq gives it, without the live view */
|
|
9757
|
+
rfqs?: components["schemas"]["RfqStatus"][] | null;
|
|
9758
|
+
/** @description Pass as pageToken for the next page; empty once there are no more */
|
|
9759
|
+
nextPageToken?: string | null;
|
|
9760
|
+
};
|
|
9741
9761
|
ListSubAccountsResponse: {
|
|
9742
9762
|
subAccounts?: components["schemas"]["SubAccount"][] | null;
|
|
9743
9763
|
/**
|
|
@@ -12026,7 +12046,7 @@ export interface components {
|
|
|
12026
12046
|
*/
|
|
12027
12047
|
openInterestNotionalAvg7d?: string | null;
|
|
12028
12048
|
/**
|
|
12029
|
-
* @description Estimated rate for the in-progress funding window, the same value as getFundingState / getPerpMarketSummary estimatedNextFundingRate (a decimal fraction per funding window). An estimate refreshed on each accepted premium sample, not a real-time stream. A window that ends with too few accepted samples settles at
|
|
12049
|
+
* @description Estimated rate for the in-progress funding window, the same value as getFundingState / getPerpMarketSummary estimatedNextFundingRate (a decimal fraction per funding window). An estimate refreshed on each accepted premium sample, not a real-time stream. A window that ends with too few accepted samples settles at zero instead, so the settled rate can differ from this estimate. Null for spot pairs and margin pairs whose current window has no samples yet
|
|
12030
12050
|
* @example 0.00012
|
|
12031
12051
|
*/
|
|
12032
12052
|
estimatedNextFundingRate?: string | null;
|
|
@@ -13113,6 +13133,13 @@ export interface components {
|
|
|
13113
13133
|
toMarginAccountId?: string | null;
|
|
13114
13134
|
/** @description The destination risk bucket, when the destination is one. */
|
|
13115
13135
|
toRiskBucketId?: string | null;
|
|
13136
|
+
/** @description The source risk bucket, when the source is one. */
|
|
13137
|
+
fromRiskBucketId?: string | null;
|
|
13138
|
+
/**
|
|
13139
|
+
* @description Whether funding the destination risk bucket credited its sole open
|
|
13140
|
+
* position's margin. Absent when the destination is not a risk bucket.
|
|
13141
|
+
*/
|
|
13142
|
+
positionMarginCredited?: boolean | null;
|
|
13116
13143
|
};
|
|
13117
13144
|
TransferCollateralToMarginAccountRequest: {
|
|
13118
13145
|
/** @description Parent margin account UUID that receives collateral. */
|
|
@@ -22150,6 +22177,58 @@ export interface operations {
|
|
|
22150
22177
|
};
|
|
22151
22178
|
};
|
|
22152
22179
|
};
|
|
22180
|
+
list_rfqs: {
|
|
22181
|
+
parameters: {
|
|
22182
|
+
query?: {
|
|
22183
|
+
/** @description RFQs per page, 1 to 100 (default 50) */
|
|
22184
|
+
pageSize?: number;
|
|
22185
|
+
pageToken?: string;
|
|
22186
|
+
};
|
|
22187
|
+
header?: never;
|
|
22188
|
+
path?: never;
|
|
22189
|
+
cookie?: never;
|
|
22190
|
+
};
|
|
22191
|
+
requestBody?: never;
|
|
22192
|
+
responses: {
|
|
22193
|
+
/** @description OK */
|
|
22194
|
+
200: {
|
|
22195
|
+
headers: {
|
|
22196
|
+
[name: string]: unknown;
|
|
22197
|
+
};
|
|
22198
|
+
content: {
|
|
22199
|
+
"application/json": components["schemas"]["ListRfqsResponse"];
|
|
22200
|
+
};
|
|
22201
|
+
};
|
|
22202
|
+
/** @description Invalid page size or malformed page token */
|
|
22203
|
+
400: {
|
|
22204
|
+
headers: {
|
|
22205
|
+
[name: string]: unknown;
|
|
22206
|
+
};
|
|
22207
|
+
content?: never;
|
|
22208
|
+
};
|
|
22209
|
+
/** @description Authentication required */
|
|
22210
|
+
401: {
|
|
22211
|
+
headers: {
|
|
22212
|
+
[name: string]: unknown;
|
|
22213
|
+
};
|
|
22214
|
+
content?: never;
|
|
22215
|
+
};
|
|
22216
|
+
/** @description RFQ is not enabled for this account (RFQ_DISABLED) */
|
|
22217
|
+
403: {
|
|
22218
|
+
headers: {
|
|
22219
|
+
[name: string]: unknown;
|
|
22220
|
+
};
|
|
22221
|
+
content?: never;
|
|
22222
|
+
};
|
|
22223
|
+
/** @description RFQ service unavailable; retry */
|
|
22224
|
+
503: {
|
|
22225
|
+
headers: {
|
|
22226
|
+
[name: string]: unknown;
|
|
22227
|
+
};
|
|
22228
|
+
content?: never;
|
|
22229
|
+
};
|
|
22230
|
+
};
|
|
22231
|
+
};
|
|
22153
22232
|
create_rfq: {
|
|
22154
22233
|
parameters: {
|
|
22155
22234
|
query?: never;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xmonaco/types",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"homepage": "https://docs.0xmonaco.com/sdk/typescript",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"lint": "biome lint ."
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@0xmonaco/contracts": "1.1.
|
|
19
|
+
"@0xmonaco/contracts": "1.1.9",
|
|
20
20
|
"zod": "^4.6.7"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|