@0xmonaco/types 0.0.0-develop-20260412233650 → 0.0.0-develop-20260415185155
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/market/index.d.ts +7 -16
- package/dist/profile/index.d.ts +19 -17
- package/dist/sdk/index.d.ts +3 -3
- package/dist/trading/index.d.ts +1 -1
- package/dist/trading/orders.d.ts +1 -1
- package/dist/trading/responses.d.ts +1 -13
- package/dist/validation/market.d.ts +2 -2
- package/dist/validation/market.js +2 -2
- package/dist/validation/profile.d.ts +2 -2
- package/dist/validation/profile.js +2 -2
- package/dist/validation/trading.d.ts +2 -2
- package/dist/validation/trading.js +2 -2
- package/dist/websocket/events/orders-events.d.ts +2 -2
- package/package.json +2 -2
package/dist/market/index.d.ts
CHANGED
|
@@ -113,7 +113,7 @@ export interface GetTradingPairsParams {
|
|
|
113
113
|
/** Page number (starts from 1) */
|
|
114
114
|
page?: number;
|
|
115
115
|
/** Number of items per page (max 100) */
|
|
116
|
-
|
|
116
|
+
page_size?: number;
|
|
117
117
|
/** Filter by market type (SPOT, MARGIN) */
|
|
118
118
|
market_type?: string;
|
|
119
119
|
/** Filter by base token symbol */
|
|
@@ -124,35 +124,26 @@ export interface GetTradingPairsParams {
|
|
|
124
124
|
is_active?: boolean;
|
|
125
125
|
}
|
|
126
126
|
/**
|
|
127
|
-
*
|
|
127
|
+
* Response for listing trading pairs with pagination
|
|
128
128
|
*/
|
|
129
|
-
export interface
|
|
130
|
-
|
|
131
|
-
limit: number;
|
|
129
|
+
export interface GetTradingPairsResponse {
|
|
130
|
+
trading_pairs: TradingPair[];
|
|
132
131
|
page: number;
|
|
132
|
+
page_size: number;
|
|
133
133
|
total: number;
|
|
134
134
|
total_pages: number;
|
|
135
135
|
}
|
|
136
136
|
/**
|
|
137
|
-
*
|
|
138
|
-
*/
|
|
139
|
-
export interface GetTradingPairsResponse {
|
|
140
|
-
data: PaginatedTradingPairs;
|
|
141
|
-
success: boolean;
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* API response wrapper for single trading pair
|
|
137
|
+
* Response for a single trading pair
|
|
145
138
|
*/
|
|
146
139
|
export interface GetTradingPairResponse {
|
|
147
|
-
|
|
148
|
-
success: boolean;
|
|
140
|
+
trading_pair: TradingPair;
|
|
149
141
|
}
|
|
150
142
|
/**
|
|
151
143
|
* API response wrapper for single trading pair
|
|
152
144
|
*/
|
|
153
145
|
export interface GetCandlestickResponse {
|
|
154
146
|
data: Candlestick[];
|
|
155
|
-
success: boolean;
|
|
156
147
|
}
|
|
157
148
|
/**
|
|
158
149
|
* Market metadata with 24-hour statistics
|
package/dist/profile/index.d.ts
CHANGED
|
@@ -94,7 +94,7 @@ export interface GetUserMovementsParams {
|
|
|
94
94
|
/** Page number (starts from 1) */
|
|
95
95
|
page?: number;
|
|
96
96
|
/** Number of items per page (max 100) */
|
|
97
|
-
|
|
97
|
+
page_size?: number;
|
|
98
98
|
/** Filter by entry type (CREDIT, DEBIT, LOCK, UNLOCK, FEE) */
|
|
99
99
|
entry_type?: LedgerEntryType;
|
|
100
100
|
/** Filter by transaction type (DEPOSIT, WITHDRAWAL, TRADE, FEE, FUNDING, LIQUIDATION, INTEREST, REWARD) */
|
|
@@ -106,10 +106,10 @@ export interface GetUserMovementsParams {
|
|
|
106
106
|
* Query parameters for getting user balances
|
|
107
107
|
*/
|
|
108
108
|
export interface GetUserBalancesParams {
|
|
109
|
-
/**
|
|
110
|
-
|
|
111
|
-
/** Number of items
|
|
112
|
-
|
|
109
|
+
/** Page number (starts from 1) */
|
|
110
|
+
page?: number;
|
|
111
|
+
/** Number of items per page (max 100) */
|
|
112
|
+
page_size?: number;
|
|
113
113
|
}
|
|
114
114
|
/**
|
|
115
115
|
* Response from getting user movements
|
|
@@ -126,9 +126,9 @@ export interface GetPaginatedUserMovementsResponse {
|
|
|
126
126
|
/** Current page number */
|
|
127
127
|
page: number;
|
|
128
128
|
/** Items per page */
|
|
129
|
-
|
|
129
|
+
page_size: number;
|
|
130
130
|
/** Total number of movements in PostgreSQL */
|
|
131
|
-
|
|
131
|
+
total: number;
|
|
132
132
|
/** Total number of pages */
|
|
133
133
|
total_pages: number;
|
|
134
134
|
}
|
|
@@ -139,11 +139,13 @@ export interface GetUserBalancesResponse {
|
|
|
139
139
|
/** List of token balances for the user */
|
|
140
140
|
balances: AccountBalance[];
|
|
141
141
|
/** Total number of balances */
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
|
|
142
|
+
total: number;
|
|
143
|
+
/** Items per page */
|
|
144
|
+
page_size: number;
|
|
145
|
+
/** Current page number */
|
|
146
|
+
page: number;
|
|
147
|
+
/** Total number of pages */
|
|
148
|
+
total_pages: number;
|
|
147
149
|
}
|
|
148
150
|
/**
|
|
149
151
|
* Order information for recent orders.
|
|
@@ -152,8 +154,8 @@ export interface GetUserBalancesResponse {
|
|
|
152
154
|
export interface ProfileOrder {
|
|
153
155
|
/** Order identifier */
|
|
154
156
|
id: string;
|
|
155
|
-
/** Trading pair
|
|
156
|
-
|
|
157
|
+
/** Trading pair symbol (e.g., "ETH-USD") */
|
|
158
|
+
symbol: string;
|
|
157
159
|
/** Order side */
|
|
158
160
|
side: OrderSide;
|
|
159
161
|
/** Order type */
|
|
@@ -223,7 +225,7 @@ export interface GetUserTradesParams {
|
|
|
223
225
|
/** Page number (starts from 1) */
|
|
224
226
|
page?: number;
|
|
225
227
|
/** Number of items per page (max 100) */
|
|
226
|
-
|
|
228
|
+
page_size?: number;
|
|
227
229
|
/** Filter by trading pair ID (UUID) */
|
|
228
230
|
trading_pair_id?: string;
|
|
229
231
|
}
|
|
@@ -236,9 +238,9 @@ export interface GetUserTradesResponse {
|
|
|
236
238
|
/** Current page number */
|
|
237
239
|
page: number;
|
|
238
240
|
/** Items per page */
|
|
239
|
-
|
|
241
|
+
page_size: number;
|
|
240
242
|
/** Total number of trades */
|
|
241
|
-
|
|
243
|
+
total: number;
|
|
242
244
|
/** Total number of pages */
|
|
243
245
|
total_pages: number;
|
|
244
246
|
}
|
package/dist/sdk/index.d.ts
CHANGED
|
@@ -65,10 +65,10 @@ export interface MonacoSDK {
|
|
|
65
65
|
/** Trades REST API for fetching historical trades */
|
|
66
66
|
trades: {
|
|
67
67
|
getTrades: (tradingPairId: string, options?: {
|
|
68
|
-
/**
|
|
69
|
-
|
|
68
|
+
/** Page number (starts from 1, default: 1) */
|
|
69
|
+
page?: number;
|
|
70
70
|
/** Maximum number of records to return (default: 25, max: 100) */
|
|
71
|
-
|
|
71
|
+
page_size?: number;
|
|
72
72
|
}) => Promise<TradeEvent[]>;
|
|
73
73
|
};
|
|
74
74
|
/** WebSocket client for real-time data (orders, orderbook, ohlcv) */
|
package/dist/trading/index.d.ts
CHANGED
|
@@ -94,7 +94,7 @@ export interface TradingAPI extends BaseAPI {
|
|
|
94
94
|
* Gets paginated orders based on query parameters.
|
|
95
95
|
* @param params - Query parameters for filtering orders
|
|
96
96
|
* @param params.status - Filter by order status (optional)
|
|
97
|
-
* @param params.
|
|
97
|
+
* @param params.trading_pair_id - Filter by trading pair UUID (optional)
|
|
98
98
|
* @param params.page - Page number for pagination (optional)
|
|
99
99
|
* @param params.page_size - Number of orders per page (optional)
|
|
100
100
|
* @returns Promise resolving to the paginated orders result
|
package/dist/trading/orders.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export interface Order {
|
|
|
23
23
|
/** Order identifier (UUID) */
|
|
24
24
|
id: string;
|
|
25
25
|
/** Trading pair ID (UUID format, e.g., "456e7890-e12b-12d3-a456-426614174000") */
|
|
26
|
-
|
|
26
|
+
trading_pair_id: string;
|
|
27
27
|
/** Order side (BUY or SELL) */
|
|
28
28
|
side: OrderSide;
|
|
29
29
|
/** Order type - see OrderType for all supported types */
|
|
@@ -97,7 +97,7 @@ export interface GetPaginatedOrdersParams {
|
|
|
97
97
|
/** Filter by order status */
|
|
98
98
|
status?: OrderStatus;
|
|
99
99
|
/** Filter by trading pair UUID */
|
|
100
|
-
|
|
100
|
+
trading_pair_id?: string;
|
|
101
101
|
/** Page number for pagination (default: 1) */
|
|
102
102
|
page?: number;
|
|
103
103
|
/** Number of orders per page (default: 10, max: 100) */
|
|
@@ -147,8 +147,6 @@ export interface BatchCancelError {
|
|
|
147
147
|
export interface BatchCancelResult {
|
|
148
148
|
/** Order identifier */
|
|
149
149
|
order_id: string;
|
|
150
|
-
/** Whether the cancellation was successful */
|
|
151
|
-
success: boolean;
|
|
152
150
|
/** Timestamp when the order was canceled (ISO 8601 format) */
|
|
153
151
|
cancelled_at?: string;
|
|
154
152
|
/** Error details if the cancellation failed */
|
|
@@ -158,8 +156,6 @@ export interface BatchCancelResult {
|
|
|
158
156
|
* Response from batch cancelling orders
|
|
159
157
|
*/
|
|
160
158
|
export interface BatchCancelOrdersResponse {
|
|
161
|
-
/** Overall operation success */
|
|
162
|
-
success: boolean;
|
|
163
159
|
/** Total number of orders requested to cancel */
|
|
164
160
|
total_requested: number;
|
|
165
161
|
/** Total number of orders successfully canceled */
|
|
@@ -184,8 +180,6 @@ export interface BatchError {
|
|
|
184
180
|
export interface BatchCreateResult {
|
|
185
181
|
/** Order identifier (empty string if creation failed before ID assignment) */
|
|
186
182
|
order_id: string;
|
|
187
|
-
/** Whether the order was successfully created */
|
|
188
|
-
success: boolean;
|
|
189
183
|
/** Match result information if the order was processed */
|
|
190
184
|
match_result?: MatchResult;
|
|
191
185
|
/** Error details if the creation failed */
|
|
@@ -195,8 +189,6 @@ export interface BatchCreateResult {
|
|
|
195
189
|
* Response from batch creating orders
|
|
196
190
|
*/
|
|
197
191
|
export interface BatchCreateOrdersResponse {
|
|
198
|
-
/** Overall operation success */
|
|
199
|
-
success: boolean;
|
|
200
192
|
/** Total number of orders requested to create */
|
|
201
193
|
total_requested: number;
|
|
202
194
|
/** Total number of orders successfully created */
|
|
@@ -212,8 +204,6 @@ export interface BatchCreateOrdersResponse {
|
|
|
212
204
|
export interface BatchReplaceResult {
|
|
213
205
|
/** Original order identifier */
|
|
214
206
|
original_order_id: string;
|
|
215
|
-
/** Whether the order was successfully replaced */
|
|
216
|
-
success: boolean;
|
|
217
207
|
/** New order identifier (if successful) */
|
|
218
208
|
new_order_id?: string;
|
|
219
209
|
/** Fields that were updated (if successful) */
|
|
@@ -227,8 +217,6 @@ export interface BatchReplaceResult {
|
|
|
227
217
|
* Response from batch replacing orders
|
|
228
218
|
*/
|
|
229
219
|
export interface BatchReplaceOrdersResponse {
|
|
230
|
-
/** Overall operation success */
|
|
231
|
-
success: boolean;
|
|
232
220
|
/** Total number of orders requested to replace */
|
|
233
221
|
total_requested: number;
|
|
234
222
|
/** Total number of orders successfully replaced */
|
|
@@ -203,8 +203,8 @@ export declare const GetTradingPairSchema: z.ZodObject<{
|
|
|
203
203
|
*/
|
|
204
204
|
export declare const SearchTradingPairsSchema: z.ZodObject<{
|
|
205
205
|
query: z.ZodOptional<z.ZodString>;
|
|
206
|
-
|
|
207
|
-
|
|
206
|
+
page_size: z.ZodOptional<z.ZodNumber>;
|
|
207
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
208
208
|
}, z.core.$strip>;
|
|
209
209
|
/**
|
|
210
210
|
* Get Market Metadata validation schema
|
|
@@ -214,8 +214,8 @@ export const GetTradingPairSchema = z.object({
|
|
|
214
214
|
*/
|
|
215
215
|
export const SearchTradingPairsSchema = z.object({
|
|
216
216
|
query: z.string().min(1, "Search query cannot be empty").optional(),
|
|
217
|
-
|
|
218
|
-
|
|
217
|
+
page_size: z.number().int().min(1).max(100).optional(),
|
|
218
|
+
page: z.number().int().min(1).optional(),
|
|
219
219
|
});
|
|
220
220
|
/**
|
|
221
221
|
* Get Market Metadata validation schema
|
|
@@ -36,7 +36,7 @@ export declare const TransactionTypeSchema: z.ZodEnum<{
|
|
|
36
36
|
*/
|
|
37
37
|
export declare const GetUserMovementsSchema: z.ZodObject<{
|
|
38
38
|
page: z.ZodOptional<z.ZodNumber>;
|
|
39
|
-
|
|
39
|
+
page_size: z.ZodOptional<z.ZodNumber>;
|
|
40
40
|
entry_type: z.ZodOptional<z.ZodEnum<{
|
|
41
41
|
CREDIT: "CREDIT";
|
|
42
42
|
DEBIT: "DEBIT";
|
|
@@ -64,6 +64,6 @@ export declare const GetUserMovementsSchema: z.ZodObject<{
|
|
|
64
64
|
*/
|
|
65
65
|
export declare const GetUserTradesSchema: z.ZodObject<{
|
|
66
66
|
page: z.ZodOptional<z.ZodNumber>;
|
|
67
|
-
|
|
67
|
+
page_size: z.ZodOptional<z.ZodNumber>;
|
|
68
68
|
trading_pair_id: z.ZodOptional<z.ZodUUID>;
|
|
69
69
|
}, z.core.$strip>;
|
|
@@ -26,7 +26,7 @@ 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
|
-
|
|
29
|
+
page_size: 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
30
|
entry_type: LedgerEntryTypeSchema.optional(),
|
|
31
31
|
transaction_type: TransactionTypeSchema.optional(),
|
|
32
32
|
asset_id: UUIDSchema.optional(),
|
|
@@ -39,6 +39,6 @@ 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
|
-
|
|
42
|
+
page_size: 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
43
|
trading_pair_id: UUIDSchema.optional(),
|
|
44
44
|
});
|
|
@@ -114,7 +114,7 @@ export declare const ReplaceOrderSchema: z.ZodObject<{
|
|
|
114
114
|
* Validates parameters for fetching paginated orders.
|
|
115
115
|
* Matches the getPaginatedOrders method signature which accepts:
|
|
116
116
|
* - status: OrderStatus (optional filter)
|
|
117
|
-
* -
|
|
117
|
+
* - trading_pair_id: trading pair UUID (optional filter)
|
|
118
118
|
* - page: number (default: 1)
|
|
119
119
|
* - page_size: number (default: 10, max: 100)
|
|
120
120
|
*/
|
|
@@ -129,7 +129,7 @@ export declare const GetPaginatedOrdersSchema: z.ZodObject<{
|
|
|
129
129
|
REJECTED: "REJECTED";
|
|
130
130
|
EXPIRED: "EXPIRED";
|
|
131
131
|
}>>;
|
|
132
|
-
|
|
132
|
+
trading_pair_id: z.ZodOptional<z.ZodUUID>;
|
|
133
133
|
page: z.ZodOptional<z.ZodNumber>;
|
|
134
134
|
page_size: z.ZodOptional<z.ZodNumber>;
|
|
135
135
|
}, z.core.$strip>;
|
|
@@ -114,13 +114,13 @@ export const ReplaceOrderSchema = z.object({
|
|
|
114
114
|
* Validates parameters for fetching paginated orders.
|
|
115
115
|
* Matches the getPaginatedOrders method signature which accepts:
|
|
116
116
|
* - status: OrderStatus (optional filter)
|
|
117
|
-
* -
|
|
117
|
+
* - trading_pair_id: trading pair UUID (optional filter)
|
|
118
118
|
* - page: number (default: 1)
|
|
119
119
|
* - page_size: number (default: 10, max: 100)
|
|
120
120
|
*/
|
|
121
121
|
export const GetPaginatedOrdersSchema = z.object({
|
|
122
122
|
status: z.enum(ORDER_STATUS_VALUES).optional(),
|
|
123
|
-
|
|
123
|
+
trading_pair_id: UUIDSchema.optional(),
|
|
124
124
|
page: z.number().int().min(1, "Page must be at least 1").optional(),
|
|
125
125
|
page_size: z.number().int().min(1, "Page size must be at least 1").max(100, "Page size cannot exceed 100").optional(),
|
|
126
126
|
});
|
|
@@ -38,7 +38,7 @@ export interface CommonOrderEventData {
|
|
|
38
38
|
/** Application ID (UUID) - present in several events */
|
|
39
39
|
applicationId?: string;
|
|
40
40
|
/** Trading pair symbol (e.g., "BTC/USDC") */
|
|
41
|
-
|
|
41
|
+
symbol: string;
|
|
42
42
|
/** Trading mode (e.g., "SPOT", "MARGIN") */
|
|
43
43
|
tradingMode: TradingMode;
|
|
44
44
|
/** Order type - present in most events */
|
|
@@ -278,7 +278,7 @@ export interface BackendCommonOrderEventData {
|
|
|
278
278
|
/** Trading pair ID (UUID) */
|
|
279
279
|
trading_pair_id?: string;
|
|
280
280
|
/** Trading pair symbol (e.g., "BTC/USDC") */
|
|
281
|
-
|
|
281
|
+
symbol: string;
|
|
282
282
|
/** Trading mode (e.g., "Spot", "Margin") */
|
|
283
283
|
trading_mode: string;
|
|
284
284
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xmonaco/types",
|
|
3
|
-
"version": "0.0.0-develop-
|
|
3
|
+
"version": "0.0.0-develop-20260415185155",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"lint": "biome lint ."
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@0xmonaco/contracts": "0.0.0-develop-
|
|
23
|
+
"@0xmonaco/contracts": "0.0.0-develop-20260415185155",
|
|
24
24
|
"zod": "^4.1.12"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|