@0xmonaco/types 0.8.14 → 0.8.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/applications/requests.d.ts +15 -15
- package/dist/applications/responses.d.ts +52 -52
- package/dist/delegated-agents/index.d.ts +21 -21
- package/dist/faucet/index.d.ts +4 -4
- package/dist/fees/index.d.ts +4 -4
- package/dist/fees/responses.d.ts +17 -17
- package/dist/fees/responses.js +20 -20
- package/dist/margin-accounts/index.d.ts +42 -42
- package/dist/market/index.d.ts +122 -123
- package/dist/positions/index.d.ts +51 -51
- package/dist/profile/index.d.ts +98 -90
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sub-accounts/index.d.ts +19 -19
- package/dist/trading/index.d.ts +2 -2
- package/dist/trading/orders.d.ts +20 -20
- package/dist/trading/responses.d.ts +74 -74
- package/dist/validation/margin-accounts.d.ts +5 -5
- package/dist/validation/margin-accounts.js +3 -3
- package/dist/validation/market.d.ts +1 -1
- package/dist/validation/market.js +1 -1
- package/dist/validation/positions.d.ts +7 -7
- package/dist/validation/positions.js +6 -6
- package/dist/validation/profile.d.ts +10 -10
- package/dist/validation/profile.js +10 -10
- package/dist/validation/trading.d.ts +9 -9
- package/dist/validation/trading.js +9 -9
- package/dist/whitelist/index.d.ts +4 -4
- package/dist/wire/operations.d.ts +1 -1
- package/dist/wire/operations.js +1 -0
- package/dist/wire/schema.d.ts +941 -821
- package/dist/withdrawals/index.d.ts +58 -5
- package/package.json +2 -2
|
@@ -26,10 +26,10 @@ export const TransactionTypeSchema = z.enum(["DEPOSIT", "WITHDRAWAL", "TRADE", "
|
|
|
26
26
|
*/
|
|
27
27
|
export const GetUserMovementsSchema = z.object({
|
|
28
28
|
page: z.number().int("Page must be an integer").min(1, "Page must be at least 1").optional(),
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
pageSize: z.number().int("Page size must be an integer").min(1, "Page size must be at least 1").max(100, "Page size cannot exceed 100").optional(),
|
|
30
|
+
entryType: LedgerEntryTypeSchema.optional(),
|
|
31
|
+
transactionType: TransactionTypeSchema.optional(),
|
|
32
|
+
assetId: UUIDSchema.optional(),
|
|
33
33
|
});
|
|
34
34
|
/**
|
|
35
35
|
* Get User Trades validation schema
|
|
@@ -39,13 +39,13 @@ export const GetUserMovementsSchema = z.object({
|
|
|
39
39
|
*/
|
|
40
40
|
export const GetUserTradesSchema = z.object({
|
|
41
41
|
page: z.number().int("Page must be an integer").min(1, "Page must be at least 1").optional(),
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
pageSize: z.number().int("Page size must be an integer").min(1, "Page size must be at least 1").max(100, "Page size cannot exceed 100").optional(),
|
|
43
|
+
tradingPairId: UUIDSchema.optional(),
|
|
44
44
|
});
|
|
45
45
|
export const ListFundingPaymentsSchema = z.object({
|
|
46
46
|
page: z.number().int("Page must be an integer").min(1, "Page must be at least 1").optional(),
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
pageSize: z.number().int("Page size must be an integer").min(1, "Page size must be at least 1").max(100, "Page size cannot exceed 100").optional(),
|
|
48
|
+
tradingPairId: UUIDSchema.optional(),
|
|
49
|
+
positionId: UUIDSchema.optional(),
|
|
50
|
+
marginAccountId: UUIDSchema.optional(),
|
|
51
51
|
});
|
|
@@ -226,9 +226,9 @@ export declare const ReplaceOrderSchema: z.ZodObject<{
|
|
|
226
226
|
* Validates parameters for fetching paginated orders.
|
|
227
227
|
* Matches the getPaginatedOrders method signature which accepts:
|
|
228
228
|
* - status: OrderStatus (optional filter)
|
|
229
|
-
* -
|
|
229
|
+
* - tradingPairId: trading pair UUID (optional filter)
|
|
230
230
|
* - page: number (default: 1)
|
|
231
|
-
* -
|
|
231
|
+
* - pageSize: number (default: 10, max: 100)
|
|
232
232
|
*/
|
|
233
233
|
export declare const GetPaginatedOrdersSchema: z.ZodObject<{
|
|
234
234
|
status: z.ZodOptional<z.ZodEnum<{
|
|
@@ -241,14 +241,14 @@ export declare const GetPaginatedOrdersSchema: z.ZodObject<{
|
|
|
241
241
|
REJECTED: "REJECTED";
|
|
242
242
|
EXPIRED: "EXPIRED";
|
|
243
243
|
}>>;
|
|
244
|
-
|
|
245
|
-
|
|
244
|
+
tradingPairId: z.ZodOptional<z.ZodUUID>;
|
|
245
|
+
tradingMode: z.ZodOptional<z.ZodEnum<{
|
|
246
246
|
SPOT: "SPOT";
|
|
247
247
|
MARGIN: "MARGIN";
|
|
248
248
|
}>>;
|
|
249
|
-
|
|
249
|
+
marginAccountId: z.ZodOptional<z.ZodUUID>;
|
|
250
250
|
page: z.ZodOptional<z.ZodNumber>;
|
|
251
|
-
|
|
251
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
252
252
|
}, z.core.$strip>;
|
|
253
253
|
export declare const ConditionalOrderConditionTypeSchema: z.ZodEnum<{
|
|
254
254
|
STOP_LOSS: "STOP_LOSS";
|
|
@@ -274,8 +274,8 @@ export declare const CancelConditionalOrderSchema: z.ZodObject<{
|
|
|
274
274
|
conditionalOrderId: z.ZodUUID;
|
|
275
275
|
}, z.core.$strip>;
|
|
276
276
|
export declare const ListConditionalOrdersSchema: z.ZodObject<{
|
|
277
|
-
|
|
278
|
-
|
|
277
|
+
marginAccountId: z.ZodOptional<z.ZodUUID>;
|
|
278
|
+
tradingPairId: z.ZodOptional<z.ZodUUID>;
|
|
279
279
|
state: z.ZodOptional<z.ZodEnum<{
|
|
280
280
|
CANCELLED: "CANCELLED";
|
|
281
281
|
EXPIRED: "EXPIRED";
|
|
@@ -286,7 +286,7 @@ export declare const ListConditionalOrdersSchema: z.ZodObject<{
|
|
|
286
286
|
FAILED: "FAILED";
|
|
287
287
|
}>>;
|
|
288
288
|
page: z.ZodOptional<z.ZodNumber>;
|
|
289
|
-
|
|
289
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
290
290
|
}, z.core.$strip>;
|
|
291
291
|
/**
|
|
292
292
|
* Single batch create order item validation schema
|
|
@@ -244,17 +244,17 @@ export const ReplaceOrderSchema = z.object({
|
|
|
244
244
|
* Validates parameters for fetching paginated orders.
|
|
245
245
|
* Matches the getPaginatedOrders method signature which accepts:
|
|
246
246
|
* - status: OrderStatus (optional filter)
|
|
247
|
-
* -
|
|
247
|
+
* - tradingPairId: trading pair UUID (optional filter)
|
|
248
248
|
* - page: number (default: 1)
|
|
249
|
-
* -
|
|
249
|
+
* - pageSize: number (default: 10, max: 100)
|
|
250
250
|
*/
|
|
251
251
|
export const GetPaginatedOrdersSchema = z.object({
|
|
252
252
|
status: z.enum(ORDER_STATUS_VALUES).optional(),
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
253
|
+
tradingPairId: UUIDSchema.optional(),
|
|
254
|
+
tradingMode: TradingModeSchema.optional(),
|
|
255
|
+
marginAccountId: UUIDSchema.optional(),
|
|
256
256
|
page: z.number().int().min(1, "Page must be at least 1").optional(),
|
|
257
|
-
|
|
257
|
+
pageSize: z.number().int().min(1, "Page size must be at least 1").max(100, "Page size cannot exceed 100").optional(),
|
|
258
258
|
});
|
|
259
259
|
export const ConditionalOrderConditionTypeSchema = z.enum(["STOP_LOSS", "TAKE_PROFIT"], {
|
|
260
260
|
message: 'conditionType must be "STOP_LOSS" or "TAKE_PROFIT"',
|
|
@@ -272,11 +272,11 @@ export const CancelConditionalOrderSchema = z.object({
|
|
|
272
272
|
conditionalOrderId: UUIDSchema,
|
|
273
273
|
});
|
|
274
274
|
export const ListConditionalOrdersSchema = z.object({
|
|
275
|
-
|
|
276
|
-
|
|
275
|
+
marginAccountId: UUIDSchema.optional(),
|
|
276
|
+
tradingPairId: UUIDSchema.optional(),
|
|
277
277
|
state: ConditionalOrderStateSchema.optional(),
|
|
278
278
|
page: z.number().int().min(1, "Page must be at least 1").optional(),
|
|
279
|
-
|
|
279
|
+
pageSize: z.number().int().min(1, "Page size must be at least 1").max(100, "Page size cannot exceed 100").optional(),
|
|
280
280
|
});
|
|
281
281
|
/**
|
|
282
282
|
* Single batch create order item validation schema
|
|
@@ -12,20 +12,20 @@ import type { BaseAPI } from "../api";
|
|
|
12
12
|
/** Body for a whitelist application. */
|
|
13
13
|
export interface SubmitWhitelistRequest {
|
|
14
14
|
/** Applicant wallet address (0x-prefixed, 40 hex chars) */
|
|
15
|
-
|
|
15
|
+
walletAddress: string;
|
|
16
16
|
/** Applicant email address */
|
|
17
17
|
email: string;
|
|
18
18
|
/** Applicant Twitter/X username (1-15 chars) */
|
|
19
|
-
|
|
19
|
+
twitterUsername?: string;
|
|
20
20
|
/** Applicant Telegram username (5-32 chars) */
|
|
21
|
-
|
|
21
|
+
telegramUsername?: string;
|
|
22
22
|
}
|
|
23
23
|
/** Response to a whitelist application. */
|
|
24
24
|
export interface SubmitWhitelistResponse {
|
|
25
25
|
/** Human-readable status message */
|
|
26
26
|
message: string;
|
|
27
27
|
/** Created user UUID (pending approval) */
|
|
28
|
-
|
|
28
|
+
userId: string | null;
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
31
|
* Whitelist API interface. The submit endpoint is public (no auth required).
|
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
* hand-written SDK surface. CI regenerates it and fails on a diff, identical to
|
|
11
11
|
* the `schema.ts` wire-types tripwire (MON-1476), so it can never go stale.
|
|
12
12
|
*/
|
|
13
|
-
export declare const OPERATION_IDS: readonly ["add_position_margin", "attach_position_tp_sl", "authenticate_backend", "batch_cancel_all", "batch_cancel_all_by_pair", "batch_cancel_orders", "batch_close_all_positions", "batch_create_orders", "batch_replace_orders", "cancel_conditional_order", "cancel_order", "close_position", "create_challenge", "create_delegated_session", "create_order", "create_sub_account_limit", "delete_sub_account_limit", "get_application_config", "get_application_stats", "get_available_collateral", "get_candles", "get_funding_state", "get_index_price", "get_margin_account_movements", "get_margin_account_summary", "get_mark_price", "get_market_metadata", "get_market_stats", "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_chart", "get_portfolio_stats", "get_position", "get_position_risk", "get_screener", "get_sub_account_limits", "get_trade_by_id", "get_trades", "get_trading_pair_by_id", "get_user_balance_by_asset", "get_user_balances", "get_user_movements", "get_user_profile", "get_user_trades", "get_withdrawal", "health_check", "initiate_withdrawal", "list_application_balances", "list_application_movements", "list_application_orders", "list_application_users", "list_conditional_orders", "list_delegated_agent_owners", "list_delegated_agents", "list_funding_history", "list_funding_payments", "list_margin_accounts", "list_position_history", "list_positions", "list_sub_accounts_with_balances", "list_trading_pairs", "mint_tokens", "reduce_position_margin", "refresh_session", "replace_order", "revoke_delegated_agent", "revoke_session", "simulate_fees", "simulate_order_risk", "simulate_parent_margin_order_risk", "simulate_risk_bucket_order_risk", "submit_whitelist", "transfer_collateral_from_margin_account", "transfer_collateral_from_parent_margin_account", "transfer_collateral_to_margin_account", "transfer_collateral_to_parent_margin_account", "transfer_collateral_to_risk_bucket", "update_sub_account_limit", "upsert_delegated_agent", "verify_signature"];
|
|
13
|
+
export declare const OPERATION_IDS: readonly ["add_position_margin", "attach_position_tp_sl", "authenticate_backend", "batch_cancel_all", "batch_cancel_all_by_pair", "batch_cancel_orders", "batch_close_all_positions", "batch_create_orders", "batch_replace_orders", "cancel_conditional_order", "cancel_order", "close_position", "create_challenge", "create_delegated_session", "create_order", "create_sub_account_limit", "delete_sub_account_limit", "get_application_config", "get_application_stats", "get_available_collateral", "get_candles", "get_funding_state", "get_index_price", "get_margin_account_movements", "get_margin_account_summary", "get_mark_price", "get_market_metadata", "get_market_stats", "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_chart", "get_portfolio_stats", "get_position", "get_position_risk", "get_screener", "get_sub_account_limits", "get_trade_by_id", "get_trades", "get_trading_pair_by_id", "get_user_balance_by_asset", "get_user_balances", "get_user_movements", "get_user_profile", "get_user_trades", "get_withdrawal", "health_check", "initiate_withdrawal", "list_application_balances", "list_application_movements", "list_application_orders", "list_application_users", "list_conditional_orders", "list_delegated_agent_owners", "list_delegated_agents", "list_funding_history", "list_funding_payments", "list_margin_accounts", "list_pending_withdrawals", "list_position_history", "list_positions", "list_sub_accounts_with_balances", "list_trading_pairs", "mint_tokens", "reduce_position_margin", "refresh_session", "replace_order", "revoke_delegated_agent", "revoke_session", "simulate_fees", "simulate_order_risk", "simulate_parent_margin_order_risk", "simulate_risk_bucket_order_risk", "submit_whitelist", "transfer_collateral_from_margin_account", "transfer_collateral_from_parent_margin_account", "transfer_collateral_to_margin_account", "transfer_collateral_to_parent_margin_account", "transfer_collateral_to_risk_bucket", "update_sub_account_limit", "upsert_delegated_agent", "verify_signature"];
|
|
14
14
|
/** Union of every OpenAPI operationId in the spec. */
|
|
15
15
|
export type OperationId = (typeof OPERATION_IDS)[number];
|
package/dist/wire/operations.js
CHANGED