@0xmonaco/types 0.5.6 → 0.5.7
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 +6 -6
- package/dist/profile/index.d.ts +32 -1
- package/dist/profile/index.d.ts.map +1 -1
- package/dist/sdk/index.d.ts +4 -7
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/network.d.ts +2 -7
- package/dist/sdk/network.d.ts.map +1 -1
- package/dist/trading/index.d.ts +16 -2
- package/dist/trading/index.d.ts.map +1 -1
- package/dist/trading/responses.d.ts +109 -2
- package/dist/trading/responses.d.ts.map +1 -1
- package/dist/validation/common.d.ts +1 -1
- package/dist/validation/common.d.ts.map +1 -1
- package/dist/validation/common.js.map +1 -1
- package/dist/validation/index.d.ts +1 -0
- package/dist/validation/index.d.ts.map +1 -1
- package/dist/validation/index.js +1 -0
- package/dist/validation/index.js.map +1 -1
- package/dist/validation/market.d.ts +5 -5
- package/dist/validation/profile.d.ts +72 -0
- package/dist/validation/profile.d.ts.map +1 -0
- package/dist/validation/profile.js +41 -0
- package/dist/validation/profile.js.map +1 -0
- package/dist/validation/trading.d.ts +115 -27
- package/dist/validation/trading.d.ts.map +1 -1
- package/dist/validation/trading.js +78 -24
- package/dist/validation/trading.js.map +1 -1
- package/dist/validation/vault.d.ts +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,9 +21,9 @@ import { MonacoSDK, SDKConfig } from "@0xmonaco/types";
|
|
|
21
21
|
|
|
22
22
|
// SDK configuration
|
|
23
23
|
interface SDKConfig {
|
|
24
|
-
walletClient
|
|
25
|
-
network
|
|
26
|
-
|
|
24
|
+
walletClient?: WalletClient; // Wallet client for signing operations
|
|
25
|
+
network: Network; // Network preset: "local", "development", "staging", or "mainnet"
|
|
26
|
+
seiRpcUrl: string; // RPC URL for Sei blockchain interactions
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
// Main SDK interface
|
|
@@ -294,11 +294,11 @@ Types for network configuration:
|
|
|
294
294
|
```typescript
|
|
295
295
|
import { Network, NetworkEndpoints } from "@0xmonaco/types";
|
|
296
296
|
|
|
297
|
-
type Network = "mainnet" | "
|
|
297
|
+
type Network = "mainnet" | "development" | "staging" | "local";
|
|
298
298
|
|
|
299
299
|
interface NetworkEndpoints {
|
|
300
300
|
rpcUrl: string;
|
|
301
|
-
|
|
301
|
+
apiUrl: string;
|
|
302
302
|
}
|
|
303
303
|
```
|
|
304
304
|
|
|
@@ -308,7 +308,7 @@ interface NetworkEndpoints {
|
|
|
308
308
|
|
|
309
309
|
- `MonacoSDK`: Main SDK interface with all API modules
|
|
310
310
|
- `SDKConfig`: Configuration options for the Monaco SDK
|
|
311
|
-
- `Network`: Network type ("mainnet" | "
|
|
311
|
+
- `Network`: Network type ("mainnet" | "development" | "staging" | "local")
|
|
312
312
|
- `AuthState`: Authentication state information
|
|
313
313
|
|
|
314
314
|
### Vault Types
|
package/dist/profile/index.d.ts
CHANGED
|
@@ -77,6 +77,23 @@ export interface LedgerMovement {
|
|
|
77
77
|
/** Transaction timestamp */
|
|
78
78
|
created_at: string | null;
|
|
79
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* Ledger entry type for filtering movements.
|
|
82
|
+
* Describes the direction/nature of the balance change.
|
|
83
|
+
*/
|
|
84
|
+
export type LedgerEntryType = "CREDIT" | "DEBIT" | "LOCK" | "UNLOCK" | "FEE";
|
|
85
|
+
/**
|
|
86
|
+
* Transaction type for filtering movements.
|
|
87
|
+
* Describes the reason/source of the movement.
|
|
88
|
+
*/
|
|
89
|
+
export type TransactionType = "DEPOSIT" | "WITHDRAWAL" | "TRADE" | "FEE" | "FUNDING" | "LIQUIDATION" | "INTEREST" | "REWARD";
|
|
90
|
+
/**
|
|
91
|
+
* Data source for movements queries.
|
|
92
|
+
* - `hot_storage`: From Redis cache (real-time, fast) — default
|
|
93
|
+
* - `cold_storage`: From PostgreSQL (historical, paginated)
|
|
94
|
+
* - `both`: Combined from both sources
|
|
95
|
+
*/
|
|
96
|
+
export type MovementsDataSource = "hot_storage" | "cold_storage" | "both";
|
|
80
97
|
/**
|
|
81
98
|
* Query parameters for getting user movements
|
|
82
99
|
*/
|
|
@@ -85,6 +102,14 @@ export interface GetUserMovementsParams {
|
|
|
85
102
|
page?: number;
|
|
86
103
|
/** Number of items per page (max 100) */
|
|
87
104
|
limit?: number;
|
|
105
|
+
/** Filter by entry type (CREDIT, DEBIT, LOCK, UNLOCK, FEE) */
|
|
106
|
+
entry_type?: LedgerEntryType;
|
|
107
|
+
/** Filter by transaction type (DEPOSIT, WITHDRAWAL, TRADE, FEE, FUNDING, LIQUIDATION, INTEREST, REWARD) */
|
|
108
|
+
transaction_type?: TransactionType;
|
|
109
|
+
/** Filter by asset ID (UUID) */
|
|
110
|
+
asset_id?: string;
|
|
111
|
+
/** Data source: "hot_storage" (fast, real-time), "cold_storage" (historical), or "both" (hybrid). Default: "hot_storage" */
|
|
112
|
+
source?: MovementsDataSource;
|
|
88
113
|
}
|
|
89
114
|
/**
|
|
90
115
|
* Query parameters for getting user balances
|
|
@@ -115,6 +140,8 @@ export interface GetPaginatedUserMovementsResponse {
|
|
|
115
140
|
total_count: number;
|
|
116
141
|
/** Total number of pages */
|
|
117
142
|
total_pages: number;
|
|
143
|
+
/** Data source used for this response */
|
|
144
|
+
source?: MovementsDataSource;
|
|
118
145
|
}
|
|
119
146
|
/**
|
|
120
147
|
* Response from getting user balances
|
|
@@ -222,9 +249,13 @@ export interface ProfileAPI extends BaseAPI {
|
|
|
222
249
|
* Fetches the user's transaction history from the /api/v1/accounts/movements endpoint.
|
|
223
250
|
* Requires a valid access token to be set.
|
|
224
251
|
*
|
|
225
|
-
* @param params - Optional query parameters for pagination
|
|
252
|
+
* @param params - Optional query parameters for pagination and filtering
|
|
226
253
|
* @param params.page - Page number (starts from 1)
|
|
227
254
|
* @param params.limit - Number of items per page (max 100)
|
|
255
|
+
* @param params.entry_type - Filter by entry type (CREDIT, DEBIT, LOCK, UNLOCK, FEE)
|
|
256
|
+
* @param params.transaction_type - Filter by transaction type (DEPOSIT, WITHDRAWAL, TRADE, FEE, FUNDING, LIQUIDATION, INTEREST, REWARD)
|
|
257
|
+
* @param params.asset_id - Filter by asset ID (UUID)
|
|
258
|
+
* @param params.source - Data source: "hot_storage", "cold_storage", or "both" (default: "hot_storage")
|
|
228
259
|
* @returns Promise resolving to paginated movements response
|
|
229
260
|
*/
|
|
230
261
|
getPaginatedUserMovements(params?: GetUserMovementsParams): Promise<GetPaginatedUserMovementsResponse>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/profile/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEjF;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,0BAA0B;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,oBAAoB;IACpB,IAAI,EAAE,SAAS,GAAG,YAAY,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC;IAC/D,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,MAAM,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,qCAAqC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sBAAsB;IACtB,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,CAAC;IACpD,2CAA2C;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,iCAAiC;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,oCAAoC;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,6DAA6D;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W,SAAQ,OAAO;IACzC;;;;;;;OAOG;IACH,UAAU,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;IAEnC;;;;;;;;;;;;;;OAcG;IACH,yBAAyB,CAAC,MAAM,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,iCAAiC,CAAC,CAAC;IAEvG;;;;;;;;;;OAUG;IACH,eAAe,CAAC,MAAM,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAElF;;;;;;;;OAQG;IACH,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;CACnE"}
|
package/dist/sdk/index.d.ts
CHANGED
|
@@ -17,22 +17,19 @@ export interface SDKConfig {
|
|
|
17
17
|
/** Wallet client for signing operations (optional - can be set later via setWalletClient) */
|
|
18
18
|
walletClient?: WalletClient;
|
|
19
19
|
/**
|
|
20
|
-
* Network to use
|
|
20
|
+
* Network to use. Must be one of the preset networks: "local", "development", "staging", "mainnet".
|
|
21
21
|
*
|
|
22
|
-
*
|
|
22
|
+
* Each network maps to a default API URL:
|
|
23
23
|
* - "local": http://localhost:8080
|
|
24
24
|
* - "development": https://develop.apimonaco.xyz
|
|
25
25
|
* - "staging": https://staging.apimonaco.xyz
|
|
26
26
|
* - "mainnet": https://api.monaco.xyz
|
|
27
27
|
*
|
|
28
|
-
*
|
|
29
|
-
* Note: Custom API URLs always use the testnet chain (Sei testnet). Only the "mainnet" preset uses the mainnet chain.
|
|
28
|
+
* Only "mainnet" uses the Sei mainnet chain. All other networks use Sei testnet.
|
|
30
29
|
*/
|
|
31
30
|
network: Network;
|
|
32
|
-
/** RPC URL for Sei blockchain interactions
|
|
31
|
+
/** RPC URL for Sei blockchain interactions */
|
|
33
32
|
seiRpcUrl: string;
|
|
34
|
-
/** Websocket URL for Monaco */
|
|
35
|
-
wsUrl: string;
|
|
36
33
|
}
|
|
37
34
|
/**
|
|
38
35
|
* Core SDK interface providing access to all Monaco functionality.
|
package/dist/sdk/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAC3E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,sBAAsB,EAAE,UAAU,EAAE,UAAU,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACpJ,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,6FAA6F;IAC7F,YAAY,CAAC,EAAE,YAAY,CAAC;IAE5B
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAC3E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,KAAK,EAAE,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C;IAExG,mFAAmF;IACnF,eAAe,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAElD,iFAAiF;IACjF,YAAY,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;CAC1C;AAGD,YAAY,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC"}
|
package/dist/sdk/network.d.ts
CHANGED
|
@@ -6,18 +6,13 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* Supported network types for the Monaco SDK.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
* or a custom API URL string that will be used directly.
|
|
11
|
-
*
|
|
12
|
-
* Preset API URLs:
|
|
9
|
+
* Must be one of the preset networks:
|
|
13
10
|
* - "local": http://localhost:8080
|
|
14
11
|
* - "development": https://develop.apimonaco.xyz
|
|
15
12
|
* - "staging": https://staging.apimonaco.xyz
|
|
16
13
|
* - "mainnet": https://api.monaco.xyz
|
|
17
|
-
*
|
|
18
|
-
* Custom API URL example: "https://my-custom-api.com"
|
|
19
14
|
*/
|
|
20
|
-
export type Network = "mainnet" | "development" | "staging" | "local"
|
|
15
|
+
export type Network = "mainnet" | "development" | "staging" | "local";
|
|
21
16
|
/**
|
|
22
17
|
* Network endpoint configuration for the Monaco SDK.
|
|
23
18
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../src/sdk/network.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH
|
|
1
|
+
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../src/sdk/network.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;GAQG;AACH,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,GAAG,OAAO,CAAC;AAEtE;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
package/dist/trading/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { BaseAPI } from "../api/index";
|
|
7
7
|
import type { OrderSide, TimeInForce, TradingMode } from "./orders";
|
|
8
|
-
import type { BatchCancelOrdersResponse, CancelOrderResponse, CreateOrderResponse, GetOrderResponse, GetPaginatedOrdersParams, GetPaginatedOrdersResponse, ReplaceOrderResponse } from "./responses";
|
|
8
|
+
import type { BatchCancelOrdersResponse, BatchCreateOrderParams, BatchCreateOrdersResponse, BatchReplaceOrderParams, BatchReplaceOrdersResponse, CancelOrderResponse, CreateOrderResponse, GetOrderResponse, GetPaginatedOrdersParams, GetPaginatedOrdersResponse, ReplaceOrderResponse } from "./responses";
|
|
9
9
|
/**
|
|
10
10
|
* Trading API interface.
|
|
11
11
|
* Provides methods for placing and managing orders.
|
|
@@ -78,6 +78,20 @@ export interface TradingAPI extends BaseAPI {
|
|
|
78
78
|
quantity?: string;
|
|
79
79
|
useMasterBalance?: boolean;
|
|
80
80
|
}): Promise<ReplaceOrderResponse>;
|
|
81
|
+
/**
|
|
82
|
+
* Batch creates multiple orders in a single request.
|
|
83
|
+
* Each order is validated and processed through the matching engine.
|
|
84
|
+
* @param orders - Array of order parameters to create
|
|
85
|
+
* @returns Promise resolving to the batch creation result
|
|
86
|
+
*/
|
|
87
|
+
batchCreate(orders: BatchCreateOrderParams[]): Promise<BatchCreateOrdersResponse>;
|
|
88
|
+
/**
|
|
89
|
+
* Batch replaces multiple orders in a single request.
|
|
90
|
+
* Each order is canceled and re-created with new parameters.
|
|
91
|
+
* @param orders - Array of order replacement parameters
|
|
92
|
+
* @returns Promise resolving to the batch replacement result
|
|
93
|
+
*/
|
|
94
|
+
batchReplace(orders: BatchReplaceOrderParams[]): Promise<BatchReplaceOrdersResponse>;
|
|
81
95
|
/**
|
|
82
96
|
* Gets paginated orders based on query parameters.
|
|
83
97
|
* @param params - Query parameters for filtering orders
|
|
@@ -96,5 +110,5 @@ export interface TradingAPI extends BaseAPI {
|
|
|
96
110
|
getOrder(orderId: string): Promise<GetOrderResponse>;
|
|
97
111
|
}
|
|
98
112
|
export type { Order, OrderRole, OrderSide, OrderStatus, OrderType, TimeInForce, TradingMode, } from "./orders";
|
|
99
|
-
export type { BatchCancelError, BatchCancelOrdersResponse, BatchCancelResult, CancelOrderResponse, CreateOrderResponse, GetOrderResponse, GetPaginatedOrdersParams, GetPaginatedOrdersResponse, MatchResult, ReplaceOrderResponse, UpdatedFields, } from "./responses";
|
|
113
|
+
export type { BatchCancelError, BatchCancelOrdersResponse, BatchCancelResult, BatchCreateOrderParams, BatchCreateOrdersResponse, BatchCreateResult, BatchError, BatchReplaceOrderParams, BatchReplaceOrdersResponse, BatchReplaceResult, CancelOrderResponse, CreateOrderResponse, GetOrderResponse, GetPaginatedOrdersParams, GetPaginatedOrdersResponse, MatchResult, ReplaceOrderResponse, UpdatedFields, } from "./responses";
|
|
100
114
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/trading/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACpE,OAAO,KAAK,EACV,yBAAyB,EACzB,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,0BAA0B,EAC1B,oBAAoB,EACrB,MAAM,aAAa,CAAC;AAErB;;;;GAIG;AACH,MAAM,WAAW,UAAW,SAAQ,OAAO;IACzC;;;;;;;;;;OAUG;IACH,eAAe,CACb,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,SAAS,EACf,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE;QACR,WAAW,CAAC,EAAE,WAAW,CA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AiB,EACjB,UAAU,EACV,uBAAuB,EACvB,0BAA0B,EAC1B,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,0BAA0B,EAC1B,WAAW,EACX,oBAAoB,EACpB,aAAa,GACd,MAAM,aAAa,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Response types for trading operations.
|
|
5
5
|
*/
|
|
6
|
-
import type { Order, OrderStatus } from "./orders";
|
|
6
|
+
import type { Order, OrderSide, OrderStatus, OrderType, TimeInForce, TradingMode } from "./orders";
|
|
7
7
|
/**
|
|
8
8
|
* Match result information for order execution.
|
|
9
9
|
* Contains detailed information about trades, fills, and execution quality.
|
|
@@ -96,7 +96,7 @@ export interface UpdatedFields {
|
|
|
96
96
|
export interface GetPaginatedOrdersParams {
|
|
97
97
|
/** Filter by order status */
|
|
98
98
|
status?: OrderStatus;
|
|
99
|
-
/** Filter by trading pair */
|
|
99
|
+
/** Filter by trading pair UUID */
|
|
100
100
|
trading_pair?: string;
|
|
101
101
|
/** Page number for pagination (default: 1) */
|
|
102
102
|
page?: number;
|
|
@@ -169,4 +169,111 @@ export interface BatchCancelOrdersResponse {
|
|
|
169
169
|
/** Individual results for each order */
|
|
170
170
|
results: BatchCancelResult[];
|
|
171
171
|
}
|
|
172
|
+
/**
|
|
173
|
+
* Error details for a failed batch operation on a single order
|
|
174
|
+
*/
|
|
175
|
+
export interface BatchError {
|
|
176
|
+
/** Error code */
|
|
177
|
+
code: string;
|
|
178
|
+
/** Error message */
|
|
179
|
+
message: string;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Result of a batch create operation for a single order
|
|
183
|
+
*/
|
|
184
|
+
export interface BatchCreateResult {
|
|
185
|
+
/** Order identifier (empty string if creation failed before ID assignment) */
|
|
186
|
+
order_id: string;
|
|
187
|
+
/** Whether the order was successfully created */
|
|
188
|
+
success: boolean;
|
|
189
|
+
/** Match result information if the order was processed */
|
|
190
|
+
match_result?: MatchResult;
|
|
191
|
+
/** Error details if the creation failed */
|
|
192
|
+
error?: BatchError;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Response from batch creating orders
|
|
196
|
+
*/
|
|
197
|
+
export interface BatchCreateOrdersResponse {
|
|
198
|
+
/** Overall operation success */
|
|
199
|
+
success: boolean;
|
|
200
|
+
/** Total number of orders requested to create */
|
|
201
|
+
total_requested: number;
|
|
202
|
+
/** Total number of orders successfully created */
|
|
203
|
+
total_succeeded: number;
|
|
204
|
+
/** Total number of orders that failed to create */
|
|
205
|
+
total_failed: number;
|
|
206
|
+
/** Individual results for each order */
|
|
207
|
+
results: BatchCreateResult[];
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Result of a batch replace operation for a single order
|
|
211
|
+
*/
|
|
212
|
+
export interface BatchReplaceResult {
|
|
213
|
+
/** Original order identifier */
|
|
214
|
+
original_order_id: string;
|
|
215
|
+
/** Whether the order was successfully replaced */
|
|
216
|
+
success: boolean;
|
|
217
|
+
/** New order identifier (if successful) */
|
|
218
|
+
new_order_id?: string;
|
|
219
|
+
/** Fields that were updated (if successful) */
|
|
220
|
+
updated_fields?: UpdatedFields;
|
|
221
|
+
/** Match result information if the new order was processed */
|
|
222
|
+
match_result?: MatchResult;
|
|
223
|
+
/** Error details if the replacement failed */
|
|
224
|
+
error?: BatchError;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Response from batch replacing orders
|
|
228
|
+
*/
|
|
229
|
+
export interface BatchReplaceOrdersResponse {
|
|
230
|
+
/** Overall operation success */
|
|
231
|
+
success: boolean;
|
|
232
|
+
/** Total number of orders requested to replace */
|
|
233
|
+
total_requested: number;
|
|
234
|
+
/** Total number of orders successfully replaced */
|
|
235
|
+
total_succeeded: number;
|
|
236
|
+
/** Total number of orders that failed to replace */
|
|
237
|
+
total_failed: number;
|
|
238
|
+
/** Individual results for each order */
|
|
239
|
+
results: BatchReplaceResult[];
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Parameters for a single order in a batch create request
|
|
243
|
+
*/
|
|
244
|
+
export interface BatchCreateOrderParams {
|
|
245
|
+
/** Trading pair UUID */
|
|
246
|
+
tradingPairId: string;
|
|
247
|
+
/** Order type: "LIMIT" or "MARKET" */
|
|
248
|
+
orderType: OrderType;
|
|
249
|
+
/** Order side: "BUY" or "SELL" */
|
|
250
|
+
side: OrderSide;
|
|
251
|
+
/** Order price (required for LIMIT orders) */
|
|
252
|
+
price?: string;
|
|
253
|
+
/** Order quantity */
|
|
254
|
+
quantity: string;
|
|
255
|
+
/** Trading mode (defaults to "SPOT") */
|
|
256
|
+
tradingMode?: Extract<TradingMode, "SPOT">;
|
|
257
|
+
/** Maximum slippage for market orders as decimal (e.g., 0.01 for 1%) */
|
|
258
|
+
slippageTolerance?: number;
|
|
259
|
+
/** For sub-accounts: use master's balance */
|
|
260
|
+
useMasterBalance?: boolean;
|
|
261
|
+
/** Custom expiration date for GTC orders (ISO 8601 format) */
|
|
262
|
+
expirationDate?: string;
|
|
263
|
+
/** Time in force: "GTC", "IOC", or "FOK" */
|
|
264
|
+
timeInForce?: Extract<TimeInForce, "GTC" | "IOC" | "FOK">;
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Parameters for a single order in a batch replace request
|
|
268
|
+
*/
|
|
269
|
+
export interface BatchReplaceOrderParams {
|
|
270
|
+
/** Order ID to replace */
|
|
271
|
+
orderId: string;
|
|
272
|
+
/** New order price (optional) */
|
|
273
|
+
price?: string;
|
|
274
|
+
/** New order quantity (optional) */
|
|
275
|
+
quantity?: string;
|
|
276
|
+
/** For sub-accounts: use master's balance (optional) */
|
|
277
|
+
useMasterBalance?: boolean;
|
|
278
|
+
}
|
|
172
279
|
//# sourceMappingURL=responses.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["../../src/trading/responses.ts"],"names":[],"mappings":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AE,MAAM,CAAC;IACxB,4CAA4C;IAC5C,WAAW,CAAC,EAAE,OAAO,CAAC,WAAW,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC,CAAC;CAC3D;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,0BAA0B;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wDAAwD;IACxD,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B"}
|
|
@@ -58,7 +58,7 @@ export declare class ValidationError extends Error {
|
|
|
58
58
|
* Array of Zod validation issues containing detailed error information.
|
|
59
59
|
* Each issue includes the field path, error code, and message.
|
|
60
60
|
*/
|
|
61
|
-
readonly issues: z.ZodIssue[];
|
|
61
|
+
readonly issues: z.core.$ZodIssue[];
|
|
62
62
|
/**
|
|
63
63
|
* Creates a new ValidationError from a Zod validation error.
|
|
64
64
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/validation/common.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,qBAAa,eAAgB,SAAQ,KAAK;IACxC;;;OAGG;IACH,SAAgB,MAAM,EAAE,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/validation/common.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,qBAAa,eAAgB,SAAQ,KAAK;IACxC;;;OAGG;IACH,SAAgB,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;IAE3C;;;;;;;;;;;;;;;OAeG;gBACS,QAAQ,EAAE,CAAC,CAAC,QAAQ;IAWhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoCG;IACH,SAAS,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;CAQpC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,GAAG,CAAC,CAQpE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/validation/common.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,MAAM,OAAO,eAAgB,SAAQ,KAAK;IACxC;;;OAGG;IACa,MAAM,
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/validation/common.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,MAAM,OAAO,eAAgB,SAAQ,KAAK;IACxC;;;OAGG;IACa,MAAM,CAAqB;IAE3C;;;;;;;;;;;;;;;OAeG;IACH,YAAY,QAAoB;QAC9B,MAAM,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;YAC7C,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAClC,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,E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1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validation/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,cAAc,aAAa,CAAC;AAE5B,cAAc,aAAa,CAAC;AAE5B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
|
package/dist/validation/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/validation/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,8BAA8B;AAC9B,cAAc,aAAa,CAAC;AAE5B,cAAc,aAAa,CAAC;AAC5B,iCAAiC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/validation/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,8BAA8B;AAC9B,cAAc,aAAa,CAAC;AAE5B,cAAc,aAAa,CAAC;AAC5B,iCAAiC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
|
|
@@ -72,7 +72,7 @@ export declare const TimestampSchema: z.ZodNumber;
|
|
|
72
72
|
* ```
|
|
73
73
|
*/
|
|
74
74
|
export declare const GetCandlesticksSchema: z.ZodObject<{
|
|
75
|
-
tradingPairId: z.
|
|
75
|
+
tradingPairId: z.ZodUUID;
|
|
76
76
|
interval: z.ZodEnum<{
|
|
77
77
|
"1m": "1m";
|
|
78
78
|
"5m": "5m";
|
|
@@ -156,7 +156,7 @@ export declare const CandlestickLimitSchema: z.ZodOptional<z.ZodNumber>;
|
|
|
156
156
|
* ```
|
|
157
157
|
*/
|
|
158
158
|
export declare const GetCandlesticksByPairIdSchema: z.ZodObject<{
|
|
159
|
-
tradingPairId: z.
|
|
159
|
+
tradingPairId: z.ZodUUID;
|
|
160
160
|
interval: z.ZodEnum<{
|
|
161
161
|
"1m": "1m";
|
|
162
162
|
"5m": "5m";
|
|
@@ -176,7 +176,7 @@ export declare const GetCandlesticksByPairIdSchema: z.ZodObject<{
|
|
|
176
176
|
* @deprecated Use GetCandlesticksByPairIdSchema instead. Symbol-based lookups are no longer supported.
|
|
177
177
|
*/
|
|
178
178
|
export declare const GetCandlesticksBySymbolSchema: z.ZodObject<{
|
|
179
|
-
tradingPairId: z.
|
|
179
|
+
tradingPairId: z.ZodUUID;
|
|
180
180
|
interval: z.ZodEnum<{
|
|
181
181
|
"1m": "1m";
|
|
182
182
|
"5m": "5m";
|
|
@@ -196,7 +196,7 @@ export declare const GetCandlesticksBySymbolSchema: z.ZodObject<{
|
|
|
196
196
|
* Get Trading Pair validation schema
|
|
197
197
|
*/
|
|
198
198
|
export declare const GetTradingPairSchema: z.ZodObject<{
|
|
199
|
-
tradingPairId: z.
|
|
199
|
+
tradingPairId: z.ZodUUID;
|
|
200
200
|
}, z.core.$strip>;
|
|
201
201
|
/**
|
|
202
202
|
* Search Trading Pairs validation schema
|
|
@@ -210,6 +210,6 @@ export declare const SearchTradingPairsSchema: z.ZodObject<{
|
|
|
210
210
|
* Get Market Metadata validation schema
|
|
211
211
|
*/
|
|
212
212
|
export declare const GetMarketMetadataSchema: z.ZodObject<{
|
|
213
|
-
tradingPairId: z.
|
|
213
|
+
tradingPairId: z.ZodUUID;
|
|
214
214
|
}, z.core.$strip>;
|
|
215
215
|
//# sourceMappingURL=market.d.ts.map
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Profile API Validation Schemas
|
|
3
|
+
*
|
|
4
|
+
* Zod schemas for validating profile API inputs before making requests.
|
|
5
|
+
* Provides clear, actionable error messages for invalid parameters.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
/**
|
|
9
|
+
* Ledger entry type validation
|
|
10
|
+
*/
|
|
11
|
+
export declare const LedgerEntryTypeSchema: z.ZodEnum<{
|
|
12
|
+
CREDIT: "CREDIT";
|
|
13
|
+
DEBIT: "DEBIT";
|
|
14
|
+
LOCK: "LOCK";
|
|
15
|
+
UNLOCK: "UNLOCK";
|
|
16
|
+
FEE: "FEE";
|
|
17
|
+
}>;
|
|
18
|
+
/**
|
|
19
|
+
* Transaction type validation
|
|
20
|
+
*/
|
|
21
|
+
export declare const TransactionTypeSchema: z.ZodEnum<{
|
|
22
|
+
FEE: "FEE";
|
|
23
|
+
DEPOSIT: "DEPOSIT";
|
|
24
|
+
WITHDRAWAL: "WITHDRAWAL";
|
|
25
|
+
TRADE: "TRADE";
|
|
26
|
+
FUNDING: "FUNDING";
|
|
27
|
+
LIQUIDATION: "LIQUIDATION";
|
|
28
|
+
INTEREST: "INTEREST";
|
|
29
|
+
REWARD: "REWARD";
|
|
30
|
+
}>;
|
|
31
|
+
/**
|
|
32
|
+
* Movements data source validation
|
|
33
|
+
*/
|
|
34
|
+
export declare const MovementsDataSourceSchema: z.ZodEnum<{
|
|
35
|
+
hot_storage: "hot_storage";
|
|
36
|
+
cold_storage: "cold_storage";
|
|
37
|
+
both: "both";
|
|
38
|
+
}>;
|
|
39
|
+
/**
|
|
40
|
+
* Get User Movements validation schema
|
|
41
|
+
*
|
|
42
|
+
* Validates parameters for fetching paginated user movements.
|
|
43
|
+
* All fields are optional — an empty object or undefined is valid.
|
|
44
|
+
*/
|
|
45
|
+
export declare const GetUserMovementsSchema: z.ZodObject<{
|
|
46
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
47
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
48
|
+
entry_type: z.ZodOptional<z.ZodEnum<{
|
|
49
|
+
CREDIT: "CREDIT";
|
|
50
|
+
DEBIT: "DEBIT";
|
|
51
|
+
LOCK: "LOCK";
|
|
52
|
+
UNLOCK: "UNLOCK";
|
|
53
|
+
FEE: "FEE";
|
|
54
|
+
}>>;
|
|
55
|
+
transaction_type: z.ZodOptional<z.ZodEnum<{
|
|
56
|
+
FEE: "FEE";
|
|
57
|
+
DEPOSIT: "DEPOSIT";
|
|
58
|
+
WITHDRAWAL: "WITHDRAWAL";
|
|
59
|
+
TRADE: "TRADE";
|
|
60
|
+
FUNDING: "FUNDING";
|
|
61
|
+
LIQUIDATION: "LIQUIDATION";
|
|
62
|
+
INTEREST: "INTEREST";
|
|
63
|
+
REWARD: "REWARD";
|
|
64
|
+
}>>;
|
|
65
|
+
asset_id: z.ZodOptional<z.ZodUUID>;
|
|
66
|
+
source: z.ZodOptional<z.ZodEnum<{
|
|
67
|
+
hot_storage: "hot_storage";
|
|
68
|
+
cold_storage: "cold_storage";
|
|
69
|
+
both: "both";
|
|
70
|
+
}>>;
|
|
71
|
+
}, z.core.$strip>;
|
|
72
|
+
//# sourceMappingURL=profile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../src/validation/profile.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;EAEhC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;EAEhC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;EAEpC,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;iBAOjC,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Profile API Validation Schemas
|
|
3
|
+
*
|
|
4
|
+
* Zod schemas for validating profile API inputs before making requests.
|
|
5
|
+
* Provides clear, actionable error messages for invalid parameters.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
import { UUIDSchema } from "./trading.js";
|
|
9
|
+
/**
|
|
10
|
+
* Ledger entry type validation
|
|
11
|
+
*/
|
|
12
|
+
export const LedgerEntryTypeSchema = z.enum(["CREDIT", "DEBIT", "LOCK", "UNLOCK", "FEE"], {
|
|
13
|
+
message: 'Entry type must be "CREDIT", "DEBIT", "LOCK", "UNLOCK", or "FEE"',
|
|
14
|
+
});
|
|
15
|
+
/**
|
|
16
|
+
* Transaction type validation
|
|
17
|
+
*/
|
|
18
|
+
export const TransactionTypeSchema = z.enum(["DEPOSIT", "WITHDRAWAL", "TRADE", "FEE", "FUNDING", "LIQUIDATION", "INTEREST", "REWARD"], {
|
|
19
|
+
message: 'Transaction type must be "DEPOSIT", "WITHDRAWAL", "TRADE", "FEE", "FUNDING", "LIQUIDATION", "INTEREST", or "REWARD"',
|
|
20
|
+
});
|
|
21
|
+
/**
|
|
22
|
+
* Movements data source validation
|
|
23
|
+
*/
|
|
24
|
+
export const MovementsDataSourceSchema = z.enum(["hot_storage", "cold_storage", "both"], {
|
|
25
|
+
message: 'Data source must be "hot_storage", "cold_storage", or "both"',
|
|
26
|
+
});
|
|
27
|
+
/**
|
|
28
|
+
* Get User Movements validation schema
|
|
29
|
+
*
|
|
30
|
+
* Validates parameters for fetching paginated user movements.
|
|
31
|
+
* All fields are optional — an empty object or undefined is valid.
|
|
32
|
+
*/
|
|
33
|
+
export const GetUserMovementsSchema = z.object({
|
|
34
|
+
page: z.number().int("Page must be an integer").min(1, "Page must be at least 1").optional(),
|
|
35
|
+
limit: z.number().int("Limit must be an integer").min(1, "Limit must be at least 1").max(100, "Limit cannot exceed 100").optional(),
|
|
36
|
+
entry_type: LedgerEntryTypeSchema.optional(),
|
|
37
|
+
transaction_type: TransactionTypeSchema.optional(),
|
|
38
|
+
asset_id: UUIDSchema.optional(),
|
|
39
|
+
source: MovementsDataSourceSchema.optional(),
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=profile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.js","sourceRoot":"","sources":["../../src/validation/profile.ts"],"names":[],"mappings":"AAAA;;;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,EAAE;IAC/B,MAAM,EAAE,yBAAyB,CAAC,QAAQ,EAAE;CAC7C,CAAC,CAAC"}
|
|
@@ -31,18 +31,14 @@ export declare const TimeInForceSchema: z.ZodEnum<{
|
|
|
31
31
|
* Positive decimal string validation (for quantities and prices)
|
|
32
32
|
*/
|
|
33
33
|
export declare const PositiveDecimalStringSchema: z.ZodString;
|
|
34
|
-
/**
|
|
35
|
-
* Non-negative decimal string validation (allows 0)
|
|
36
|
-
*/
|
|
37
|
-
export declare const NonNegativeDecimalStringSchema: z.ZodString;
|
|
38
34
|
/**
|
|
39
35
|
* UUID validation
|
|
40
36
|
*/
|
|
41
|
-
export declare const UUIDSchema: z.
|
|
37
|
+
export declare const UUIDSchema: z.ZodUUID;
|
|
42
38
|
/**
|
|
43
39
|
* ISO 8601 date string validation
|
|
44
40
|
*/
|
|
45
|
-
export declare const ISO8601DateSchema: z.
|
|
41
|
+
export declare const ISO8601DateSchema: z.ZodISODateTime;
|
|
46
42
|
/**
|
|
47
43
|
* Slippage tolerance validation (0 to 1, where 0.01 = 1%)
|
|
48
44
|
*/
|
|
@@ -51,7 +47,7 @@ export declare const SlippageToleranceSchema: z.ZodOptional<z.ZodNumber>;
|
|
|
51
47
|
* Place Limit Order validation schema
|
|
52
48
|
*/
|
|
53
49
|
export declare const PlaceLimitOrderSchema: z.ZodObject<{
|
|
54
|
-
tradingPairId: z.
|
|
50
|
+
tradingPairId: z.ZodUUID;
|
|
55
51
|
side: z.ZodEnum<{
|
|
56
52
|
BUY: "BUY";
|
|
57
53
|
SELL: "SELL";
|
|
@@ -64,7 +60,7 @@ export declare const PlaceLimitOrderSchema: z.ZodObject<{
|
|
|
64
60
|
MARGIN: "MARGIN";
|
|
65
61
|
}>>;
|
|
66
62
|
useMasterBalance: z.ZodOptional<z.ZodBoolean>;
|
|
67
|
-
expirationDate: z.ZodOptional<z.
|
|
63
|
+
expirationDate: z.ZodOptional<z.ZodISODateTime>;
|
|
68
64
|
timeInForce: z.ZodOptional<z.ZodEnum<{
|
|
69
65
|
GTC: "GTC";
|
|
70
66
|
IOC: "IOC";
|
|
@@ -76,7 +72,7 @@ export declare const PlaceLimitOrderSchema: z.ZodObject<{
|
|
|
76
72
|
* Place Market Order validation schema
|
|
77
73
|
*/
|
|
78
74
|
export declare const PlaceMarketOrderSchema: z.ZodObject<{
|
|
79
|
-
tradingPairId: z.
|
|
75
|
+
tradingPairId: z.ZodUUID;
|
|
80
76
|
side: z.ZodEnum<{
|
|
81
77
|
BUY: "BUY";
|
|
82
78
|
SELL: "SELL";
|
|
@@ -99,7 +95,7 @@ export declare const PlaceMarketOrderSchema: z.ZodObject<{
|
|
|
99
95
|
* Cancel Order validation schema
|
|
100
96
|
*/
|
|
101
97
|
export declare const CancelOrderSchema: z.ZodObject<{
|
|
102
|
-
orderId: z.
|
|
98
|
+
orderId: z.ZodUUID;
|
|
103
99
|
}, z.core.$strip>;
|
|
104
100
|
/**
|
|
105
101
|
* Replace Order validation schema
|
|
@@ -110,7 +106,7 @@ export declare const CancelOrderSchema: z.ZodObject<{
|
|
|
110
106
|
* - newOrder: { price?: string, quantity?: string, useMasterBalance?: boolean }
|
|
111
107
|
*/
|
|
112
108
|
export declare const ReplaceOrderSchema: z.ZodObject<{
|
|
113
|
-
orderId: z.
|
|
109
|
+
orderId: z.ZodUUID;
|
|
114
110
|
newOrder: z.ZodObject<{
|
|
115
111
|
price: z.ZodOptional<z.ZodString>;
|
|
116
112
|
quantity: z.ZodOptional<z.ZodString>;
|
|
@@ -121,26 +117,118 @@ export declare const ReplaceOrderSchema: z.ZodObject<{
|
|
|
121
117
|
* Get Paginated Orders validation schema
|
|
122
118
|
*
|
|
123
119
|
* Validates parameters for fetching paginated orders.
|
|
124
|
-
*
|
|
120
|
+
* Matches the getPaginatedOrders method signature which accepts:
|
|
121
|
+
* - status: OrderStatus (optional filter)
|
|
122
|
+
* - trading_pair: trading pair UUID (optional filter)
|
|
123
|
+
* - page: number (default: 1)
|
|
124
|
+
* - page_size: number (default: 10, max: 100)
|
|
125
125
|
*/
|
|
126
|
-
export declare const
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
126
|
+
export declare const GetPaginatedOrdersSchema: z.ZodObject<{
|
|
127
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
128
|
+
SUBMITTED: "SUBMITTED";
|
|
129
|
+
PARTIALLY_FILLED: "PARTIALLY_FILLED";
|
|
130
|
+
FILLED: "FILLED";
|
|
131
|
+
SETTLED: "SETTLED";
|
|
132
|
+
CANCELLED: "CANCELLED";
|
|
133
|
+
REJECTED: "REJECTED";
|
|
134
|
+
EXPIRED: "EXPIRED";
|
|
135
|
+
}>>;
|
|
136
|
+
trading_pair: z.ZodOptional<z.ZodUUID>;
|
|
137
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
138
|
+
page_size: z.ZodOptional<z.ZodNumber>;
|
|
139
|
+
}, z.core.$strip>;
|
|
140
|
+
/**
|
|
141
|
+
* Order type validation
|
|
142
|
+
*/
|
|
143
|
+
export declare const OrderTypeSchema: z.ZodEnum<{
|
|
144
|
+
LIMIT: "LIMIT";
|
|
145
|
+
MARKET: "MARKET";
|
|
146
|
+
}>;
|
|
147
|
+
/**
|
|
148
|
+
* Single batch create order item validation schema
|
|
149
|
+
*
|
|
150
|
+
* Validates each order in a batch create request.
|
|
151
|
+
* - LIMIT orders require a price
|
|
152
|
+
* - MARKET orders must not have a price
|
|
153
|
+
*/
|
|
154
|
+
export declare const BatchCreateOrderItemSchema: z.ZodObject<{
|
|
155
|
+
tradingPairId: z.ZodUUID;
|
|
156
|
+
orderType: z.ZodEnum<{
|
|
157
|
+
LIMIT: "LIMIT";
|
|
158
|
+
MARKET: "MARKET";
|
|
159
|
+
}>;
|
|
160
|
+
side: z.ZodEnum<{
|
|
161
|
+
BUY: "BUY";
|
|
162
|
+
SELL: "SELL";
|
|
163
|
+
}>;
|
|
164
|
+
price: z.ZodOptional<z.ZodString>;
|
|
165
|
+
quantity: z.ZodString;
|
|
166
|
+
tradingMode: z.ZodOptional<z.ZodEnum<{
|
|
167
|
+
SPOT: "SPOT";
|
|
168
|
+
}>>;
|
|
169
|
+
slippageTolerance: z.ZodOptional<z.ZodNumber>;
|
|
170
|
+
useMasterBalance: z.ZodOptional<z.ZodBoolean>;
|
|
171
|
+
expirationDate: z.ZodOptional<z.ZodISODateTime>;
|
|
172
|
+
timeInForce: z.ZodOptional<z.ZodEnum<{
|
|
173
|
+
GTC: "GTC";
|
|
174
|
+
IOC: "IOC";
|
|
175
|
+
FOK: "FOK";
|
|
176
|
+
}>>;
|
|
177
|
+
}, z.core.$strip>;
|
|
178
|
+
/**
|
|
179
|
+
* Batch Create Orders validation schema
|
|
180
|
+
*
|
|
181
|
+
* Validates the full array of orders for a batch create request.
|
|
182
|
+
*/
|
|
183
|
+
export declare const BatchCreateOrdersSchema: z.ZodObject<{
|
|
184
|
+
orders: z.ZodArray<z.ZodObject<{
|
|
185
|
+
tradingPairId: z.ZodUUID;
|
|
186
|
+
orderType: z.ZodEnum<{
|
|
187
|
+
LIMIT: "LIMIT";
|
|
188
|
+
MARKET: "MARKET";
|
|
189
|
+
}>;
|
|
190
|
+
side: z.ZodEnum<{
|
|
139
191
|
BUY: "BUY";
|
|
140
192
|
SELL: "SELL";
|
|
193
|
+
}>;
|
|
194
|
+
price: z.ZodOptional<z.ZodString>;
|
|
195
|
+
quantity: z.ZodString;
|
|
196
|
+
tradingMode: z.ZodOptional<z.ZodEnum<{
|
|
197
|
+
SPOT: "SPOT";
|
|
141
198
|
}>>;
|
|
142
|
-
|
|
143
|
-
|
|
199
|
+
slippageTolerance: z.ZodOptional<z.ZodNumber>;
|
|
200
|
+
useMasterBalance: z.ZodOptional<z.ZodBoolean>;
|
|
201
|
+
expirationDate: z.ZodOptional<z.ZodISODateTime>;
|
|
202
|
+
timeInForce: z.ZodOptional<z.ZodEnum<{
|
|
203
|
+
GTC: "GTC";
|
|
204
|
+
IOC: "IOC";
|
|
205
|
+
FOK: "FOK";
|
|
206
|
+
}>>;
|
|
207
|
+
}, z.core.$strip>>;
|
|
208
|
+
}, z.core.$strip>;
|
|
209
|
+
/**
|
|
210
|
+
* Single batch replace order item validation schema
|
|
211
|
+
*
|
|
212
|
+
* Validates each order in a batch replace request.
|
|
213
|
+
* At least one of price or quantity must be provided.
|
|
214
|
+
*/
|
|
215
|
+
export declare const BatchReplaceOrderItemSchema: z.ZodObject<{
|
|
216
|
+
orderId: z.ZodUUID;
|
|
217
|
+
price: z.ZodOptional<z.ZodString>;
|
|
218
|
+
quantity: z.ZodOptional<z.ZodString>;
|
|
219
|
+
useMasterBalance: z.ZodOptional<z.ZodBoolean>;
|
|
220
|
+
}, z.core.$strip>;
|
|
221
|
+
/**
|
|
222
|
+
* Batch Replace Orders validation schema
|
|
223
|
+
*
|
|
224
|
+
* Validates the full array of orders for a batch replace request.
|
|
225
|
+
*/
|
|
226
|
+
export declare const BatchReplaceOrdersSchema: z.ZodObject<{
|
|
227
|
+
orders: z.ZodArray<z.ZodObject<{
|
|
228
|
+
orderId: z.ZodUUID;
|
|
229
|
+
price: z.ZodOptional<z.ZodString>;
|
|
230
|
+
quantity: z.ZodOptional<z.ZodString>;
|
|
231
|
+
useMasterBalance: z.ZodOptional<z.ZodBoolean>;
|
|
144
232
|
}, z.core.$strip>>;
|
|
145
233
|
}, z.core.$strip>;
|
|
146
234
|
//# sourceMappingURL=trading.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trading.d.ts","sourceRoot":"","sources":["../../src/validation/trading.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,eAAe;;;EAE1B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;EAE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;;;GAKG;AACH,eAAO,MAAM,2BAA2B;;;;;iBASpC,CAAC;AAEL;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;;;;;;iBAEnC,CAAC"}
|
|
@@ -34,27 +34,16 @@ export const PositiveDecimalStringSchema = z
|
|
|
34
34
|
.refine((val) => Number.parseFloat(val) > 0, {
|
|
35
35
|
message: "Value must be greater than 0",
|
|
36
36
|
});
|
|
37
|
-
/**
|
|
38
|
-
* Non-negative decimal string validation (allows 0)
|
|
39
|
-
*/
|
|
40
|
-
export const NonNegativeDecimalStringSchema = z
|
|
41
|
-
.string()
|
|
42
|
-
.trim()
|
|
43
|
-
.min(1, "Value cannot be empty")
|
|
44
|
-
.regex(/^\d+(\.\d+)?$/, "Value must be a non-negative decimal number")
|
|
45
|
-
.refine((val) => Number.parseFloat(val) >= 0, {
|
|
46
|
-
message: "Value must be greater than or equal to 0",
|
|
47
|
-
});
|
|
48
37
|
/**
|
|
49
38
|
* UUID validation
|
|
50
39
|
*/
|
|
51
|
-
export const UUIDSchema = z.
|
|
40
|
+
export const UUIDSchema = z.uuid({
|
|
52
41
|
message: "Must be a valid UUID (e.g., '123e4567-e89b-12d3-a456-426614174000')",
|
|
53
42
|
});
|
|
54
43
|
/**
|
|
55
44
|
* ISO 8601 date string validation
|
|
56
45
|
*/
|
|
57
|
-
export const ISO8601DateSchema = z.
|
|
46
|
+
export const ISO8601DateSchema = z.iso.datetime({
|
|
58
47
|
message: "Must be a valid ISO 8601 date string (e.g., '2024-12-31T23:59:59Z')",
|
|
59
48
|
});
|
|
60
49
|
/**
|
|
@@ -123,17 +112,82 @@ export const ReplaceOrderSchema = z.object({
|
|
|
123
112
|
* Get Paginated Orders validation schema
|
|
124
113
|
*
|
|
125
114
|
* Validates parameters for fetching paginated orders.
|
|
126
|
-
*
|
|
115
|
+
* Matches the getPaginatedOrders method signature which accepts:
|
|
116
|
+
* - status: OrderStatus (optional filter)
|
|
117
|
+
* - trading_pair: trading pair UUID (optional filter)
|
|
118
|
+
* - page: number (default: 1)
|
|
119
|
+
* - page_size: number (default: 10, max: 100)
|
|
127
120
|
*/
|
|
128
|
-
export const
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
121
|
+
export const GetPaginatedOrdersSchema = z.object({
|
|
122
|
+
status: z.enum(["SUBMITTED", "PARTIALLY_FILLED", "FILLED", "SETTLED", "CANCELLED", "REJECTED", "EXPIRED"]).optional(),
|
|
123
|
+
trading_pair: UUIDSchema.optional(),
|
|
124
|
+
page: z.number().int().min(1, "Page must be at least 1").optional(),
|
|
125
|
+
page_size: z.number().int().min(1, "Page size must be at least 1").max(100, "Page size cannot exceed 100").optional(),
|
|
126
|
+
});
|
|
127
|
+
/**
|
|
128
|
+
* Order type validation
|
|
129
|
+
*/
|
|
130
|
+
export const OrderTypeSchema = z.enum(["LIMIT", "MARKET"], {
|
|
131
|
+
message: 'Order type must be "LIMIT" or "MARKET"',
|
|
132
|
+
});
|
|
133
|
+
/**
|
|
134
|
+
* Single batch create order item validation schema
|
|
135
|
+
*
|
|
136
|
+
* Validates each order in a batch create request.
|
|
137
|
+
* - LIMIT orders require a price
|
|
138
|
+
* - MARKET orders must not have a price
|
|
139
|
+
*/
|
|
140
|
+
export const BatchCreateOrderItemSchema = z
|
|
141
|
+
.object({
|
|
142
|
+
tradingPairId: UUIDSchema,
|
|
143
|
+
orderType: OrderTypeSchema,
|
|
144
|
+
side: OrderSideSchema,
|
|
145
|
+
price: PositiveDecimalStringSchema.optional(),
|
|
146
|
+
quantity: PositiveDecimalStringSchema,
|
|
147
|
+
tradingMode: z.enum(["SPOT"]).optional(),
|
|
148
|
+
slippageTolerance: SlippageToleranceSchema,
|
|
149
|
+
useMasterBalance: z.boolean().optional(),
|
|
150
|
+
expirationDate: ISO8601DateSchema.optional(),
|
|
151
|
+
timeInForce: TimeInForceSchema.optional(),
|
|
152
|
+
})
|
|
153
|
+
.refine((data) => data.orderType !== "LIMIT" || data.price !== undefined, {
|
|
154
|
+
message: "Price is required for LIMIT orders",
|
|
155
|
+
path: ["price"],
|
|
156
|
+
})
|
|
157
|
+
.refine((data) => data.orderType !== "MARKET" || data.price === undefined, {
|
|
158
|
+
message: "Price must not be provided for MARKET orders",
|
|
159
|
+
path: ["price"],
|
|
160
|
+
});
|
|
161
|
+
/**
|
|
162
|
+
* Batch Create Orders validation schema
|
|
163
|
+
*
|
|
164
|
+
* Validates the full array of orders for a batch create request.
|
|
165
|
+
*/
|
|
166
|
+
export const BatchCreateOrdersSchema = z.object({
|
|
167
|
+
orders: z.array(BatchCreateOrderItemSchema).min(1, "At least one order is required"),
|
|
168
|
+
});
|
|
169
|
+
/**
|
|
170
|
+
* Single batch replace order item validation schema
|
|
171
|
+
*
|
|
172
|
+
* Validates each order in a batch replace request.
|
|
173
|
+
* At least one of price or quantity must be provided.
|
|
174
|
+
*/
|
|
175
|
+
export const BatchReplaceOrderItemSchema = z
|
|
176
|
+
.object({
|
|
177
|
+
orderId: UUIDSchema,
|
|
178
|
+
price: PositiveDecimalStringSchema.optional(),
|
|
179
|
+
quantity: PositiveDecimalStringSchema.optional(),
|
|
180
|
+
useMasterBalance: z.boolean().optional(),
|
|
181
|
+
})
|
|
182
|
+
.refine((data) => data.price !== undefined || data.quantity !== undefined, {
|
|
183
|
+
message: "At least one of price or quantity must be provided",
|
|
184
|
+
});
|
|
185
|
+
/**
|
|
186
|
+
* Batch Replace Orders validation schema
|
|
187
|
+
*
|
|
188
|
+
* Validates the full array of orders for a batch replace request.
|
|
189
|
+
*/
|
|
190
|
+
export const BatchReplaceOrdersSchema = z.object({
|
|
191
|
+
orders: z.array(BatchReplaceOrderItemSchema).min(1, "At least one order is required"),
|
|
138
192
|
});
|
|
139
193
|
//# sourceMappingURL=trading.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trading.js","sourceRoot":"","sources":["../../src/validation/trading.ts"],"names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
|
|
33
33
|
* Approve Token validation schema
|
|
34
34
|
*/
|
|
35
35
|
export declare const ApproveTokenSchema: z.ZodObject<{
|
|
36
|
-
assetId: z.
|
|
36
|
+
assetId: z.ZodUUID;
|
|
37
37
|
amount: z.ZodUnion<readonly [z.ZodString, z.ZodBigInt]>;
|
|
38
38
|
autoWait: z.ZodOptional<z.ZodBoolean>;
|
|
39
39
|
}, z.core.$strip>;
|
|
@@ -41,7 +41,7 @@ export declare const ApproveTokenSchema: z.ZodObject<{
|
|
|
41
41
|
* Deposit validation schema
|
|
42
42
|
*/
|
|
43
43
|
export declare const DepositSchema: z.ZodObject<{
|
|
44
|
-
assetId: z.
|
|
44
|
+
assetId: z.ZodUUID;
|
|
45
45
|
amount: z.ZodUnion<readonly [z.ZodString, z.ZodBigInt]>;
|
|
46
46
|
autoWait: z.ZodOptional<z.ZodBoolean>;
|
|
47
47
|
}, z.core.$strip>;
|
|
@@ -49,7 +49,7 @@ export declare const DepositSchema: z.ZodObject<{
|
|
|
49
49
|
* Withdraw validation schema
|
|
50
50
|
*/
|
|
51
51
|
export declare const WithdrawSchema: z.ZodObject<{
|
|
52
|
-
assetId: z.
|
|
52
|
+
assetId: z.ZodUUID;
|
|
53
53
|
amount: z.ZodUnion<readonly [z.ZodString, z.ZodBigInt]>;
|
|
54
54
|
autoWait: z.ZodOptional<z.ZodBoolean>;
|
|
55
55
|
}, z.core.$strip>;
|
|
@@ -57,6 +57,6 @@ export declare const WithdrawSchema: z.ZodObject<{
|
|
|
57
57
|
* Get Balance validation schema
|
|
58
58
|
*/
|
|
59
59
|
export declare const GetBalanceSchema: z.ZodObject<{
|
|
60
|
-
assetId: z.
|
|
60
|
+
assetId: z.ZodUUID;
|
|
61
61
|
}, z.core.$strip>;
|
|
62
62
|
//# sourceMappingURL=vault.d.ts.map
|