@deriverse/kit 1.0.39 → 1.0.42
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/auto_buffer.d.ts +0 -2
- package/dist/auto_data.d.ts +0 -2
- package/dist/constants.d.ts +14 -0
- package/dist/constants.js +28 -0
- package/dist/engine/account-helpers.d.ts +59 -0
- package/dist/engine/account-helpers.js +177 -0
- package/dist/engine/account-helpers.test.d.ts +1 -0
- package/dist/engine/account-helpers.test.js +199 -0
- package/dist/engine/client-queries.d.ts +36 -0
- package/dist/engine/client-queries.js +498 -0
- package/dist/engine/client-queries.test.d.ts +1 -0
- package/dist/engine/client-queries.test.js +341 -0
- package/dist/engine/context-builders.d.ts +16 -0
- package/dist/engine/context-builders.js +158 -0
- package/dist/engine/context-builders.test.d.ts +1 -0
- package/dist/engine/context-builders.test.js +156 -0
- package/dist/engine/index.d.ts +101 -0
- package/dist/engine/index.js +745 -0
- package/dist/engine/index.test.d.ts +1 -0
- package/dist/engine/index.test.js +685 -0
- package/dist/engine/logs-decoder.d.ts +18 -0
- package/dist/engine/logs-decoder.js +525 -0
- package/dist/engine/logs-decoder.test.d.ts +1 -0
- package/dist/engine/logs-decoder.test.js +836 -0
- package/dist/engine/perp-instructions.d.ts +68 -0
- package/dist/engine/perp-instructions.js +497 -0
- package/dist/engine/perp-instructions.test.d.ts +1 -0
- package/dist/engine/perp-instructions.test.js +292 -0
- package/dist/engine/spot-instructions.d.ts +52 -0
- package/dist/engine/spot-instructions.js +399 -0
- package/dist/engine/spot-instructions.test.d.ts +1 -0
- package/dist/engine/spot-instructions.test.js +221 -0
- package/dist/engine/utils.d.ts +23 -0
- package/dist/engine/utils.js +332 -0
- package/dist/engine/utils.test.d.ts +1 -0
- package/dist/engine/utils.test.js +120 -0
- package/dist/index.d.ts +6 -247
- package/dist/index.js +14 -2923
- package/dist/instruction_models.d.ts +10 -9
- package/dist/instruction_models.js +88 -69
- package/dist/logs_models.d.ts +147 -5
- package/dist/logs_models.js +243 -13
- package/dist/structure_models.d.ts +104 -99
- package/dist/structure_models.js +152 -129
- package/dist/types/engine-args.d.ts +32 -0
- package/dist/types/engine-args.js +2 -0
- package/dist/types/enums.d.ts +43 -0
- package/dist/{types.js → types/enums.js} +3 -5
- package/dist/types/index.d.ts +8 -0
- package/dist/types/index.js +38 -0
- package/dist/types/log-message.d.ts +2 -0
- package/dist/types/log-message.js +2 -0
- package/dist/types/responses.d.ts +248 -0
- package/dist/types/responses.js +2 -0
- package/dist/types/schemas.d.ts +168 -0
- package/dist/types/schemas.js +239 -0
- package/dist/types/schemas.test.d.ts +1 -0
- package/dist/types/schemas.test.js +93 -0
- package/dist/utils.d.ts +0 -0
- package/dist/utils.js +1 -0
- package/package.json +26 -6
- package/dist/types.d.ts +0 -565
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import { Address } from '@solana/kit';
|
|
2
|
+
import { CommunityAccountHeaderModel, ClientCommunityAccountHeaderModel, ClientCommunityRecordModel, BaseCrncyRecordModel, InstrAccountHeaderModel, LineQuotesModel, OrderModel } from '../structure_models';
|
|
3
|
+
/**
|
|
4
|
+
* Contains data about orderbook line
|
|
5
|
+
* @property {number} px Price
|
|
6
|
+
* @property {number} qty Quantity
|
|
7
|
+
*/
|
|
8
|
+
export interface LinePx {
|
|
9
|
+
px: number;
|
|
10
|
+
qty: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Contains data about instrument
|
|
14
|
+
* @property {Address} address Instrument account address
|
|
15
|
+
* @property {InstrAccountHeaderModel} header Instrument account header
|
|
16
|
+
* @property {LineQuotesModel[]} spotBids Spot bids
|
|
17
|
+
* @property {LineQuotesModel[]} spotAsks Spot asks
|
|
18
|
+
* @property {LineQuotesModel[]} perpBids Perp bids
|
|
19
|
+
* @property {LineQuotesModel[]} perpAsks Perp bids
|
|
20
|
+
*/
|
|
21
|
+
export interface Instrument {
|
|
22
|
+
address: Address;
|
|
23
|
+
header: InstrAccountHeaderModel;
|
|
24
|
+
spotBids: LineQuotesModel[];
|
|
25
|
+
spotAsks: LineQuotesModel[];
|
|
26
|
+
perpBids: LineQuotesModel[];
|
|
27
|
+
perpAsks: LineQuotesModel[];
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Contains data about Token
|
|
31
|
+
* @property {Address} account Deriverse account that stores data about registered token
|
|
32
|
+
* @property {Address} mint Mint token address
|
|
33
|
+
* @property {Address} programAddress SPL token account in which tokens are stored
|
|
34
|
+
* @property {number} id Token ID
|
|
35
|
+
* @property {number} decimals Decimals
|
|
36
|
+
* @property {boolean} baseCrncy Ff this token is currency - true
|
|
37
|
+
* @property {boolean} pool If this token is options pool token - true
|
|
38
|
+
* @property {boolean} token2022 If this token is token 2022 - true
|
|
39
|
+
* @property {number} mainInstrId If If this token is options pool token refers to main instrument ID
|
|
40
|
+
*/
|
|
41
|
+
export interface Token {
|
|
42
|
+
account: Address;
|
|
43
|
+
mint: Address;
|
|
44
|
+
programAddress: Address;
|
|
45
|
+
id: number;
|
|
46
|
+
decimals: number;
|
|
47
|
+
baseCrncy: boolean;
|
|
48
|
+
pool: boolean;
|
|
49
|
+
token2022: boolean;
|
|
50
|
+
mainInstrId?: number;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Contains general data about client spot open orders in particular instrument
|
|
54
|
+
* @property {number} bidsCount Open bid orders count
|
|
55
|
+
* @property {number} asksCount Open ask orders count
|
|
56
|
+
* @property {number} bidsEntry Entrypoint in bid orders account
|
|
57
|
+
* @property {number} asksEntry Entrypoint in ask orders account
|
|
58
|
+
* @property {number} contextSlot Context slot of response
|
|
59
|
+
* @property {number} bidSlot Client open bid orders last update slot
|
|
60
|
+
* @property {number} askSlot Client open ask orders last update slot
|
|
61
|
+
* @property {number} tempAssetTokens Asset tokens available to withdraw from client instrument temporary account.
|
|
62
|
+
* It will be automatically transfer to main account during any active transaction with the instrument.
|
|
63
|
+
* @property {number} tempBaseCrncyTokens Base currency tokens available to withdraw from client instrument temporary account
|
|
64
|
+
* It will be automatically transfer to main account during any active transaction with the instrument.
|
|
65
|
+
*/
|
|
66
|
+
export interface GetClientSpotOrdersInfoResponse {
|
|
67
|
+
bidsCount: number;
|
|
68
|
+
asksCount: number;
|
|
69
|
+
bidsEntry: number;
|
|
70
|
+
asksEntry: number;
|
|
71
|
+
bidSlot: number;
|
|
72
|
+
askSlot: number;
|
|
73
|
+
contextSlot: number;
|
|
74
|
+
tempAssetTokens: number;
|
|
75
|
+
tempCrncyTokens: number;
|
|
76
|
+
inOrdersAssetTokens: number;
|
|
77
|
+
inOrdersCrncyTokens: number;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Contains general data about client perps in particular instrument
|
|
81
|
+
* @property {number} bidsCount Open bid orders count
|
|
82
|
+
* @property {number} asksCount Open ask orders count
|
|
83
|
+
* @property {number} bidsEntry Entrypoint in bid orders account
|
|
84
|
+
* @property {number} asksEntry Entrypoint in ask orders account
|
|
85
|
+
* @property {number} contextSlot Context slot of response
|
|
86
|
+
* @property {number} bidSlot Client open bid orders last update slot
|
|
87
|
+
* @property {number} askSlot Client open ask orders last update slot
|
|
88
|
+
* @property {number} perps Margin account perps balance
|
|
89
|
+
* @property {number} funds Margin account funds balance
|
|
90
|
+
* @property {number} inOrdersPerps Perps in orders
|
|
91
|
+
* @property {number} inOrdersFunds Funds in orders
|
|
92
|
+
* @property {number} fees Fees statistics
|
|
93
|
+
* @property {number} rebates Rebates statistics
|
|
94
|
+
* @property {number} fundingFunds Funding rate payments statistics
|
|
95
|
+
* @property {number} socLossFunds Socialized losses payments statistics
|
|
96
|
+
* @property {number} result Realized PnL statistics
|
|
97
|
+
* @property {number} cost Position cost
|
|
98
|
+
* @property {number} mask contains some imnformation. First byte - leverage level
|
|
99
|
+
*/
|
|
100
|
+
export interface GetClientPerpOrdersInfoResponse {
|
|
101
|
+
bidsCount: number;
|
|
102
|
+
asksCount: number;
|
|
103
|
+
bidsEntry: number;
|
|
104
|
+
asksEntry: number;
|
|
105
|
+
bidSlot: number;
|
|
106
|
+
askSlot: number;
|
|
107
|
+
contextSlot: number;
|
|
108
|
+
perps: number;
|
|
109
|
+
funds: number;
|
|
110
|
+
inOrdersPerps: number;
|
|
111
|
+
inOrdersFunds: number;
|
|
112
|
+
fees: number;
|
|
113
|
+
rebates: number;
|
|
114
|
+
socLossFunds: number;
|
|
115
|
+
fundingFunds: number;
|
|
116
|
+
lossCoverage: number;
|
|
117
|
+
result: number;
|
|
118
|
+
cost: number;
|
|
119
|
+
mask: number;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* @property {number} bidContextSlot Client spot bids data context slot
|
|
123
|
+
* @property {number} askContextSlot Client spot asks data context slot
|
|
124
|
+
* @property {OrderModel[]} bids List of client bid spot orders
|
|
125
|
+
* @property {OrderModel[]} asks List of client ask spot orders
|
|
126
|
+
*/
|
|
127
|
+
export interface GetClientSpotOrdersResponse {
|
|
128
|
+
contextSlot: number;
|
|
129
|
+
bids: OrderModel[];
|
|
130
|
+
asks: OrderModel[];
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* @property {number} bidContextSlot Client perp bids data context slot
|
|
134
|
+
* @property {number} askContextSlot Client perp asks data context slot
|
|
135
|
+
* @property {OrderModel[]} bids List of client bid perp orders
|
|
136
|
+
* @property {OrderModel[]} asks List of client ask perp orders
|
|
137
|
+
*/
|
|
138
|
+
export interface GetClientPerpOrdersResponse {
|
|
139
|
+
contextSlot: number;
|
|
140
|
+
bids: Array<OrderModel>;
|
|
141
|
+
asks: Array<OrderModel>;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Contains data about SPL tokens on main client account
|
|
145
|
+
* @property {number} tokenId Deriverse SPL token registered ID
|
|
146
|
+
* @property {number} amount Amount of SPL tokens on main client account
|
|
147
|
+
*/
|
|
148
|
+
export interface ClientTokenData {
|
|
149
|
+
tokenId: number;
|
|
150
|
+
amount: number;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Contains data about Deriverse internal spot LP tokens on main client account
|
|
154
|
+
* @property {number} instrId Instrument ID
|
|
155
|
+
* @property {number} amount Amount of Deriverse internal spot LP tokens on main client account
|
|
156
|
+
*/
|
|
157
|
+
export interface ClientLpData {
|
|
158
|
+
instrId: number;
|
|
159
|
+
amount: number;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Contains data about temporary instrument spot client account
|
|
163
|
+
* @property {number} instrId Instrument ID
|
|
164
|
+
* @property {number} clientId Temporary client ID
|
|
165
|
+
* @property {number} slot Temporary instrument client last update slot
|
|
166
|
+
*/
|
|
167
|
+
export interface ClientSpotData {
|
|
168
|
+
instrId: number;
|
|
169
|
+
clientId: number;
|
|
170
|
+
slot: number;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Contains data about temporary instrument perp client account
|
|
174
|
+
* @property {number} instrId Instrument ID
|
|
175
|
+
* @property {number} clientId Temporary client ID
|
|
176
|
+
* @property {number} slot Temporary instrument client last update slot
|
|
177
|
+
*/
|
|
178
|
+
export interface ClientPerpData {
|
|
179
|
+
instrId: number;
|
|
180
|
+
clientId: number;
|
|
181
|
+
slot: number;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Contains information about referal link
|
|
185
|
+
* @property {number} id Referal ID
|
|
186
|
+
* @property {number} expiration Expiration date of referal link
|
|
187
|
+
* @property {number} discount Fees discount
|
|
188
|
+
* @property {number} ratio Referal payments share in fees (minus rebates)
|
|
189
|
+
*/
|
|
190
|
+
export interface RefLink {
|
|
191
|
+
id: number;
|
|
192
|
+
expiration: number;
|
|
193
|
+
discount: number;
|
|
194
|
+
ratio: number;
|
|
195
|
+
}
|
|
196
|
+
export interface CommunityData {
|
|
197
|
+
header: CommunityAccountHeaderModel;
|
|
198
|
+
data: Map<number, BaseCrncyRecordModel>;
|
|
199
|
+
}
|
|
200
|
+
export interface ClientCommunityData {
|
|
201
|
+
header: ClientCommunityAccountHeaderModel;
|
|
202
|
+
data: Map<number, ClientCommunityRecordModel>;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Contains information about referal program
|
|
206
|
+
* @property {number} address Refferal Wallet
|
|
207
|
+
* @property {number} expiration Expiration date of referal program
|
|
208
|
+
* @property {number} clientId Referal client ID
|
|
209
|
+
* @property {number} discount Fees discount
|
|
210
|
+
* @property {number} ratio Referal payments share in fees (minus rebates)
|
|
211
|
+
*/
|
|
212
|
+
export interface ClientRefProgramData {
|
|
213
|
+
address: Address;
|
|
214
|
+
expiration: number;
|
|
215
|
+
clientId: number;
|
|
216
|
+
discount: number;
|
|
217
|
+
ratio: number;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Contains general client data
|
|
221
|
+
* @property {number} clientId Client ID
|
|
222
|
+
* @property {number} points Points for Drverse tokens airdrop
|
|
223
|
+
* @property {number} mask Contains some additioal data
|
|
224
|
+
* @property {number} slot Last update slot
|
|
225
|
+
* @property {number} spotTrades All-time active spot trades
|
|
226
|
+
* @property {number} lpTrades All-time lp trades
|
|
227
|
+
* @property {number} perpTrades All-time active perp trades
|
|
228
|
+
* @property {ClientTokenData[]} tokens Client tokens data
|
|
229
|
+
* @property {ClientLpData[]} lp Client data about Deriverse internal spot LP tokens
|
|
230
|
+
* @property {ClientSpotData[]} spot Client spot trading data
|
|
231
|
+
* @property {ClientPerpData[]} perp Client perp trading data
|
|
232
|
+
*/
|
|
233
|
+
export interface GetClientDataResponse {
|
|
234
|
+
clientId: number;
|
|
235
|
+
points: number;
|
|
236
|
+
mask: number;
|
|
237
|
+
slot: number;
|
|
238
|
+
spotTrades: number;
|
|
239
|
+
lpTrades: number;
|
|
240
|
+
perpTrades: number;
|
|
241
|
+
tokens: Map<number, ClientTokenData>;
|
|
242
|
+
lp: Map<number, ClientLpData>;
|
|
243
|
+
spot: Map<number, ClientSpotData>;
|
|
244
|
+
perp: Map<number, ClientPerpData>;
|
|
245
|
+
refProgram: ClientRefProgramData;
|
|
246
|
+
refLinks: RefLink[];
|
|
247
|
+
community: ClientCommunityData;
|
|
248
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Address, Commitment } from '@solana/kit';
|
|
3
|
+
declare const EngineArgsSchema: z.ZodObject<{
|
|
4
|
+
programId: z.ZodOptional<z.ZodCustom<Address, Address>>;
|
|
5
|
+
version: z.ZodOptional<z.ZodInt>;
|
|
6
|
+
commitment: z.ZodOptional<z.ZodCustom<Commitment, Commitment>>;
|
|
7
|
+
uiNumbers: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
declare const InstrIdSchema: z.ZodObject<{
|
|
10
|
+
instrId: z.ZodInt;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
declare const DepositArgsSchema: z.ZodObject<{
|
|
13
|
+
tokenId: z.ZodInt;
|
|
14
|
+
amount: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
refId: z.ZodOptional<z.ZodInt>;
|
|
16
|
+
refWallet: z.ZodOptional<z.ZodCustom<Address, Address>>;
|
|
17
|
+
all_funds: z.ZodOptional<z.ZodBoolean>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
declare const WithdrawArgsSchema: z.ZodObject<{
|
|
20
|
+
tokenId: z.ZodInt;
|
|
21
|
+
amount: z.ZodNumber;
|
|
22
|
+
spot: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
23
|
+
instrId: z.ZodInt;
|
|
24
|
+
}, z.core.$strip>>>;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
declare const NewSpotOrderArgsSchema: z.ZodObject<{
|
|
27
|
+
instrId: z.ZodInt;
|
|
28
|
+
price: z.ZodNumber;
|
|
29
|
+
qty: z.ZodNumber;
|
|
30
|
+
ioc: z.ZodOptional<z.ZodInt>;
|
|
31
|
+
orderType: z.ZodOptional<z.ZodInt>;
|
|
32
|
+
side: z.ZodInt;
|
|
33
|
+
edgePrice: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
declare const SpotQuotesReplaceArgsSchema: z.ZodObject<{
|
|
36
|
+
instrId: z.ZodInt;
|
|
37
|
+
orders: z.ZodArray<z.ZodObject<{
|
|
38
|
+
newPrice: z.ZodNumber;
|
|
39
|
+
newQty: z.ZodNumber;
|
|
40
|
+
oldId: z.ZodInt;
|
|
41
|
+
side: z.ZodInt;
|
|
42
|
+
}, z.core.$strip>>;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
declare const SwapArgsSchema: z.ZodObject<{
|
|
45
|
+
assetMint: z.ZodCustom<Address, Address>;
|
|
46
|
+
crncyMint: z.ZodCustom<Address, Address>;
|
|
47
|
+
amount: z.ZodNumber;
|
|
48
|
+
limitPrice: z.ZodNumber;
|
|
49
|
+
crncyInput: z.ZodBoolean;
|
|
50
|
+
refFeeRate: z.ZodNumber;
|
|
51
|
+
minAmountOut: z.ZodNumber;
|
|
52
|
+
feeTakerWallet: z.ZodOptional<z.ZodCustom<Address, Address>>;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
declare const SpotOrderCancelArgsSchema: z.ZodObject<{
|
|
55
|
+
instrId: z.ZodInt;
|
|
56
|
+
orderId: z.ZodInt;
|
|
57
|
+
side: z.ZodInt;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
declare const SpotMassCancelArgsSchema: z.ZodObject<{
|
|
60
|
+
instrId: z.ZodInt;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
declare const SpotLpArgsSchema: z.ZodObject<{
|
|
63
|
+
instrId: z.ZodInt;
|
|
64
|
+
side: z.ZodInt;
|
|
65
|
+
amount: z.ZodNumber;
|
|
66
|
+
minPrice: z.ZodOptional<z.ZodNumber>;
|
|
67
|
+
maxPrice: z.ZodOptional<z.ZodNumber>;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
declare const PerpDepositArgsSchema: z.ZodObject<{
|
|
70
|
+
instrId: z.ZodInt;
|
|
71
|
+
amount: z.ZodNumber;
|
|
72
|
+
}, z.core.$strip>;
|
|
73
|
+
declare const PerpBuySeatArgsSchema: z.ZodObject<{
|
|
74
|
+
instrId: z.ZodInt;
|
|
75
|
+
amount: z.ZodNumber;
|
|
76
|
+
slippage: z.ZodOptional<z.ZodNumber>;
|
|
77
|
+
}, z.core.$strip>;
|
|
78
|
+
declare const PerpSellSeatArgsSchema: z.ZodObject<{
|
|
79
|
+
instrId: z.ZodInt;
|
|
80
|
+
slippage: z.ZodOptional<z.ZodNumber>;
|
|
81
|
+
}, z.core.$strip>;
|
|
82
|
+
declare const NewPerpOrderArgsSchema: z.ZodObject<{
|
|
83
|
+
instrId: z.ZodInt;
|
|
84
|
+
ioc: z.ZodOptional<z.ZodInt>;
|
|
85
|
+
orderType: z.ZodOptional<z.ZodInt>;
|
|
86
|
+
qty: z.ZodNumber;
|
|
87
|
+
price: z.ZodNumber;
|
|
88
|
+
leverage: z.ZodOptional<z.ZodInt>;
|
|
89
|
+
side: z.ZodInt;
|
|
90
|
+
edgePrice: z.ZodOptional<z.ZodNumber>;
|
|
91
|
+
}, z.core.$strip>;
|
|
92
|
+
declare const PerpQuotesReplaceArgsSchema: z.ZodObject<{
|
|
93
|
+
instrId: z.ZodInt;
|
|
94
|
+
orders: z.ZodArray<z.ZodObject<{
|
|
95
|
+
newPrice: z.ZodNumber;
|
|
96
|
+
newQty: z.ZodNumber;
|
|
97
|
+
oldId: z.ZodInt;
|
|
98
|
+
side: z.ZodInt;
|
|
99
|
+
}, z.core.$strip>>;
|
|
100
|
+
}, z.core.$strip>;
|
|
101
|
+
declare const PerpOrderCancelArgsSchema: z.ZodObject<{
|
|
102
|
+
instrId: z.ZodInt;
|
|
103
|
+
orderId: z.ZodInt;
|
|
104
|
+
side: z.ZodInt;
|
|
105
|
+
}, z.core.$strip>;
|
|
106
|
+
declare const PerpMassCancelArgsSchema: z.ZodObject<{
|
|
107
|
+
instrId: z.ZodInt;
|
|
108
|
+
}, z.core.$strip>;
|
|
109
|
+
declare const PerpChangeLeverageArgsSchema: z.ZodObject<{
|
|
110
|
+
instrId: z.ZodInt;
|
|
111
|
+
leverage: z.ZodInt;
|
|
112
|
+
}, z.core.$strip>;
|
|
113
|
+
declare const PerpStatisticsResetArgsSchema: z.ZodObject<{
|
|
114
|
+
instrId: z.ZodInt;
|
|
115
|
+
}, z.core.$strip>;
|
|
116
|
+
declare const PerpForcedCloseArgsSchema: z.ZodObject<{
|
|
117
|
+
instrId: z.ZodInt;
|
|
118
|
+
clientPrimaryAccount: z.ZodCustom<Address, Address>;
|
|
119
|
+
}, z.core.$strip>;
|
|
120
|
+
declare const NewInstrumentArgsSchema: z.ZodObject<{
|
|
121
|
+
assetMint: z.ZodCustom<Address, Address>;
|
|
122
|
+
crncyMint: z.ZodCustom<Address, Address>;
|
|
123
|
+
newProgramAccountAddress: z.ZodOptional<z.ZodCustom<Address, Address>>;
|
|
124
|
+
initialPrice: z.ZodNumber;
|
|
125
|
+
}, z.core.$strip>;
|
|
126
|
+
declare const GetInstrIdArgsSchema: z.ZodObject<{
|
|
127
|
+
assetTokenId: z.ZodInt;
|
|
128
|
+
crncyTokenId: z.ZodInt;
|
|
129
|
+
}, z.core.$strip>;
|
|
130
|
+
declare const GetSpotContextArgsSchema: z.ZodObject<{
|
|
131
|
+
assetTokenId: z.ZodInt;
|
|
132
|
+
crncyTokenId: z.ZodInt;
|
|
133
|
+
}, z.core.$strip>;
|
|
134
|
+
declare const GetInstrAccountByTagArgsSchema: z.ZodObject<{
|
|
135
|
+
assetTokenId: z.ZodInt;
|
|
136
|
+
crncyTokenId: z.ZodInt;
|
|
137
|
+
tag: z.ZodInt;
|
|
138
|
+
}, z.core.$strip>;
|
|
139
|
+
declare const UpdateInstrDataArgsSchema: z.ZodObject<{
|
|
140
|
+
assetTokenId: z.ZodInt;
|
|
141
|
+
crncyTokenId: z.ZodInt;
|
|
142
|
+
}, z.core.$strip>;
|
|
143
|
+
declare const DistribDividendsArgsSchema: z.ZodObject<{
|
|
144
|
+
instruments: z.ZodArray<z.ZodInt>;
|
|
145
|
+
}, z.core.$strip>;
|
|
146
|
+
declare const GetClientSpotOrdersInfoArgsSchema: z.ZodObject<{
|
|
147
|
+
instrId: z.ZodInt;
|
|
148
|
+
clientId: z.ZodInt;
|
|
149
|
+
}, z.core.$strip>;
|
|
150
|
+
declare const GetClientPerpOrdersInfoArgsSchema: z.ZodObject<{
|
|
151
|
+
instrId: z.ZodInt;
|
|
152
|
+
clientId: z.ZodInt;
|
|
153
|
+
}, z.core.$strip>;
|
|
154
|
+
declare const GetClientSpotOrdersArgsSchema: z.ZodObject<{
|
|
155
|
+
instrId: z.ZodInt;
|
|
156
|
+
bidsCount: z.ZodInt;
|
|
157
|
+
asksCount: z.ZodInt;
|
|
158
|
+
bidsEntry: z.ZodInt;
|
|
159
|
+
asksEntry: z.ZodInt;
|
|
160
|
+
}, z.core.$strip>;
|
|
161
|
+
declare const GetClientPerpOrdersArgsSchema: z.ZodObject<{
|
|
162
|
+
instrId: z.ZodInt;
|
|
163
|
+
bidsCount: z.ZodInt;
|
|
164
|
+
asksCount: z.ZodInt;
|
|
165
|
+
bidsEntry: z.ZodInt;
|
|
166
|
+
asksEntry: z.ZodInt;
|
|
167
|
+
}, z.core.$strip>;
|
|
168
|
+
export { EngineArgsSchema, InstrIdSchema, DepositArgsSchema, WithdrawArgsSchema, NewSpotOrderArgsSchema, SpotQuotesReplaceArgsSchema, SwapArgsSchema, SpotOrderCancelArgsSchema, SpotMassCancelArgsSchema, SpotLpArgsSchema, PerpDepositArgsSchema, PerpBuySeatArgsSchema, PerpSellSeatArgsSchema, NewPerpOrderArgsSchema, PerpQuotesReplaceArgsSchema, PerpOrderCancelArgsSchema, PerpMassCancelArgsSchema, PerpChangeLeverageArgsSchema, PerpStatisticsResetArgsSchema, PerpForcedCloseArgsSchema, NewInstrumentArgsSchema, GetInstrIdArgsSchema, GetSpotContextArgsSchema, GetInstrAccountByTagArgsSchema, UpdateInstrDataArgsSchema, DistribDividendsArgsSchema, GetClientSpotOrdersInfoArgsSchema, GetClientPerpOrdersInfoArgsSchema, GetClientSpotOrdersArgsSchema, GetClientPerpOrdersArgsSchema, };
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetClientPerpOrdersArgsSchema = exports.GetClientSpotOrdersArgsSchema = exports.GetClientPerpOrdersInfoArgsSchema = exports.GetClientSpotOrdersInfoArgsSchema = exports.DistribDividendsArgsSchema = exports.UpdateInstrDataArgsSchema = exports.GetInstrAccountByTagArgsSchema = exports.GetSpotContextArgsSchema = exports.GetInstrIdArgsSchema = exports.NewInstrumentArgsSchema = exports.PerpForcedCloseArgsSchema = exports.PerpStatisticsResetArgsSchema = exports.PerpChangeLeverageArgsSchema = exports.PerpMassCancelArgsSchema = exports.PerpOrderCancelArgsSchema = exports.PerpQuotesReplaceArgsSchema = exports.NewPerpOrderArgsSchema = exports.PerpSellSeatArgsSchema = exports.PerpBuySeatArgsSchema = exports.PerpDepositArgsSchema = exports.SpotLpArgsSchema = exports.SpotMassCancelArgsSchema = exports.SpotOrderCancelArgsSchema = exports.SwapArgsSchema = exports.SpotQuotesReplaceArgsSchema = exports.NewSpotOrderArgsSchema = exports.WithdrawArgsSchema = exports.DepositArgsSchema = exports.InstrIdSchema = exports.EngineArgsSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../constants");
|
|
6
|
+
const nonNegativeInt = zod_1.z.int().nonnegative({ error: 'Must be a non-negative integer' });
|
|
7
|
+
const positiveNumber = zod_1.z.number().positive({ error: 'Must be a positive number' });
|
|
8
|
+
const side = zod_1.z.int().min(0).max(1, { error: 'Side must be 0 (Bid) or 1 (Ask)' });
|
|
9
|
+
const orderType = zod_1.z.int().min(0).max(1, { error: 'Order type must be 0 (Limit) or 1 (Market)' });
|
|
10
|
+
const iocFlag = zod_1.z.int().min(0).max(1, { error: 'IOC flag must be 0 (No) or 1 (Yes)' });
|
|
11
|
+
const solanaAddress = zod_1.z.custom((val) => typeof val === 'string', { error: 'Must be a valid Solana address' });
|
|
12
|
+
const commitment = zod_1.z.custom((val) => typeof val === 'string', {
|
|
13
|
+
error: 'Must be a valid commitment level',
|
|
14
|
+
});
|
|
15
|
+
const EngineArgsSchema = zod_1.z.object({
|
|
16
|
+
programId: solanaAddress.optional(),
|
|
17
|
+
version: nonNegativeInt.optional(),
|
|
18
|
+
commitment: commitment.optional(),
|
|
19
|
+
uiNumbers: zod_1.z.boolean().optional(),
|
|
20
|
+
});
|
|
21
|
+
exports.EngineArgsSchema = EngineArgsSchema;
|
|
22
|
+
const InstrIdSchema = zod_1.z.object({
|
|
23
|
+
instrId: nonNegativeInt.meta({ description: 'Instrument ID' }),
|
|
24
|
+
});
|
|
25
|
+
exports.InstrIdSchema = InstrIdSchema;
|
|
26
|
+
const DepositArgsSchema = zod_1.z.object({
|
|
27
|
+
tokenId: nonNegativeInt.meta({ description: 'Deriverse SPL token registered ID' }),
|
|
28
|
+
amount: positiveNumber.optional().meta({ description: 'Amount to deposit' }),
|
|
29
|
+
refId: nonNegativeInt.optional().meta({ description: 'Referal Link ID for new account. Zero means no ref link' }),
|
|
30
|
+
refWallet: solanaAddress.optional().meta({ description: 'Referal Wallet' }),
|
|
31
|
+
all_funds: zod_1.z.boolean().optional(),
|
|
32
|
+
});
|
|
33
|
+
exports.DepositArgsSchema = DepositArgsSchema;
|
|
34
|
+
const WithdrawArgsSchema = zod_1.z.object({
|
|
35
|
+
tokenId: nonNegativeInt.meta({ description: 'Deriverse token registered ID' }),
|
|
36
|
+
amount: positiveNumber.meta({ description: 'Amount to withdraw' }),
|
|
37
|
+
spot: zod_1.z
|
|
38
|
+
.array(InstrIdSchema)
|
|
39
|
+
.optional()
|
|
40
|
+
.meta({ description: 'List of instruments ID to withdraw from client temporary instrument accounts' }),
|
|
41
|
+
});
|
|
42
|
+
exports.WithdrawArgsSchema = WithdrawArgsSchema;
|
|
43
|
+
const NewSpotOrderArgsSchema = zod_1.z.object({
|
|
44
|
+
instrId: nonNegativeInt.meta({ description: 'Instrument ID' }),
|
|
45
|
+
price: positiveNumber.meta({ description: 'Order price' }),
|
|
46
|
+
qty: positiveNumber.meta({ description: 'Order quantity' }),
|
|
47
|
+
ioc: iocFlag
|
|
48
|
+
.optional()
|
|
49
|
+
.meta({ description: 'Immediate Or Cancel. If true no new open order after this instruction execution' }),
|
|
50
|
+
orderType: orderType.optional().meta({ description: '0 - Limit, 1 - Market' }),
|
|
51
|
+
side: side.meta({ description: '0 - Bid, 1 - Ask' }),
|
|
52
|
+
edgePrice: positiveNumber.optional(),
|
|
53
|
+
});
|
|
54
|
+
exports.NewSpotOrderArgsSchema = NewSpotOrderArgsSchema;
|
|
55
|
+
const QuoteOrderSchema = zod_1.z.object({
|
|
56
|
+
newPrice: zod_1.z
|
|
57
|
+
.number()
|
|
58
|
+
.nonnegative({ error: 'Price must be non-negative' })
|
|
59
|
+
.meta({ description: 'New order price' }),
|
|
60
|
+
newQty: zod_1.z
|
|
61
|
+
.number()
|
|
62
|
+
.nonnegative({ error: 'Quantity must be non-negative' })
|
|
63
|
+
.meta({ description: 'New order quantity' }),
|
|
64
|
+
oldId: nonNegativeInt.meta({ description: 'Old order ID to cancel, zero means no action' }),
|
|
65
|
+
side: side.meta({ description: '0 - Bid, 1 - Ask' }),
|
|
66
|
+
});
|
|
67
|
+
const SpotQuotesReplaceArgsSchema = zod_1.z.object({
|
|
68
|
+
instrId: nonNegativeInt.meta({ description: 'Instrument ID' }),
|
|
69
|
+
orders: zod_1.z.array(QuoteOrderSchema).min(1).max(12, { error: 'Exceeded orders limit of 12' }).meta({ description: 'Quote orders to place/replace' }),
|
|
70
|
+
});
|
|
71
|
+
exports.SpotQuotesReplaceArgsSchema = SpotQuotesReplaceArgsSchema;
|
|
72
|
+
const SwapArgsSchema = zod_1.z.object({
|
|
73
|
+
assetMint: solanaAddress.meta({ description: 'Asset Token Mint' }),
|
|
74
|
+
crncyMint: solanaAddress.meta({ description: 'Currency Token Mint' }),
|
|
75
|
+
amount: positiveNumber.meta({ description: 'Amount to swap' }),
|
|
76
|
+
limitPrice: positiveNumber.meta({ description: 'Limit price' }),
|
|
77
|
+
crncyInput: zod_1.z.boolean().meta({ description: 'Currency token as input token' }),
|
|
78
|
+
refFeeRate: zod_1.z
|
|
79
|
+
.number()
|
|
80
|
+
.min(0)
|
|
81
|
+
.max(constants_1.MAX_SWAP_FEE_RATE, { error: `Ref fee rate must be between 0 and ${constants_1.MAX_SWAP_FEE_RATE}` }),
|
|
82
|
+
minAmountOut: zod_1.z.number().min(0, { error: 'Min amount out must be at least 0' }),
|
|
83
|
+
feeTakerWallet: solanaAddress.optional().meta({ description: 'Fee taker wallet address' }),
|
|
84
|
+
});
|
|
85
|
+
exports.SwapArgsSchema = SwapArgsSchema;
|
|
86
|
+
const SpotOrderCancelArgsSchema = zod_1.z.object({
|
|
87
|
+
instrId: nonNegativeInt.meta({ description: 'Instrument ID' }),
|
|
88
|
+
orderId: nonNegativeInt.meta({ description: 'Order ID to cancel' }),
|
|
89
|
+
side: side.meta({ description: '0 - bid side, 1 - ask side' }),
|
|
90
|
+
});
|
|
91
|
+
exports.SpotOrderCancelArgsSchema = SpotOrderCancelArgsSchema;
|
|
92
|
+
const SpotMassCancelArgsSchema = zod_1.z.object({
|
|
93
|
+
instrId: nonNegativeInt.meta({ description: 'Instrument ID' }),
|
|
94
|
+
});
|
|
95
|
+
exports.SpotMassCancelArgsSchema = SpotMassCancelArgsSchema;
|
|
96
|
+
const SpotLpArgsSchema = zod_1.z.object({
|
|
97
|
+
instrId: nonNegativeInt.meta({ description: 'Instrument ID' }),
|
|
98
|
+
side: side,
|
|
99
|
+
amount: zod_1.z.number().meta({ description: 'Amount of tokens to trade. Negative value means selling' }),
|
|
100
|
+
minPrice: positiveNumber.optional(),
|
|
101
|
+
maxPrice: positiveNumber.optional(),
|
|
102
|
+
});
|
|
103
|
+
exports.SpotLpArgsSchema = SpotLpArgsSchema;
|
|
104
|
+
const PerpDepositArgsSchema = zod_1.z.object({
|
|
105
|
+
instrId: nonNegativeInt.meta({ description: 'Instrument ID' }),
|
|
106
|
+
amount: positiveNumber,
|
|
107
|
+
});
|
|
108
|
+
exports.PerpDepositArgsSchema = PerpDepositArgsSchema;
|
|
109
|
+
const PerpBuySeatArgsSchema = zod_1.z.object({
|
|
110
|
+
instrId: nonNegativeInt.meta({ description: 'Instrument ID' }),
|
|
111
|
+
amount: positiveNumber,
|
|
112
|
+
slippage: zod_1.z.number().min(0).max(1, { error: 'Slippage must be between 0 and 1' }).optional(),
|
|
113
|
+
});
|
|
114
|
+
exports.PerpBuySeatArgsSchema = PerpBuySeatArgsSchema;
|
|
115
|
+
const PerpSellSeatArgsSchema = zod_1.z.object({
|
|
116
|
+
instrId: nonNegativeInt.meta({ description: 'Instrument ID' }),
|
|
117
|
+
slippage: zod_1.z.number().min(0).max(1, { error: 'Slippage must be between 0 and 1' }).optional(),
|
|
118
|
+
});
|
|
119
|
+
exports.PerpSellSeatArgsSchema = PerpSellSeatArgsSchema;
|
|
120
|
+
const NewPerpOrderArgsSchema = zod_1.z.object({
|
|
121
|
+
instrId: nonNegativeInt.meta({ description: 'Instrument ID' }),
|
|
122
|
+
ioc: iocFlag
|
|
123
|
+
.optional()
|
|
124
|
+
.meta({ description: 'Immediate Or Cancel. If true no new open order after this instruction execution' }),
|
|
125
|
+
orderType: orderType.optional().meta({ description: '0 - Limit, 1 - Market' }),
|
|
126
|
+
qty: positiveNumber.meta({ description: 'Order quantity' }),
|
|
127
|
+
price: positiveNumber.meta({ description: 'Order price' }),
|
|
128
|
+
leverage: zod_1.z.int().min(1).max(100, { error: 'Leverage must be between 1 and 100' }).optional(),
|
|
129
|
+
side: side.meta({ description: '0 - Bid, 1 - Ask' }),
|
|
130
|
+
edgePrice: positiveNumber.optional(),
|
|
131
|
+
});
|
|
132
|
+
exports.NewPerpOrderArgsSchema = NewPerpOrderArgsSchema;
|
|
133
|
+
const PerpQuotesReplaceArgsSchema = zod_1.z.object({
|
|
134
|
+
instrId: nonNegativeInt.meta({ description: 'Instrument ID' }),
|
|
135
|
+
orders: zod_1.z.array(QuoteOrderSchema).min(1).max(12, { error: 'Exceeded orders limit of 12' }).meta({ description: 'Quote orders to place/replace' }),
|
|
136
|
+
});
|
|
137
|
+
exports.PerpQuotesReplaceArgsSchema = PerpQuotesReplaceArgsSchema;
|
|
138
|
+
const PerpOrderCancelArgsSchema = zod_1.z.object({
|
|
139
|
+
instrId: nonNegativeInt.meta({ description: 'Instrument ID' }),
|
|
140
|
+
orderId: nonNegativeInt.meta({ description: 'Order ID to cancel' }),
|
|
141
|
+
side: side.meta({ description: '0 - bid side, 1 - ask side' }),
|
|
142
|
+
});
|
|
143
|
+
exports.PerpOrderCancelArgsSchema = PerpOrderCancelArgsSchema;
|
|
144
|
+
const PerpMassCancelArgsSchema = zod_1.z.object({
|
|
145
|
+
instrId: nonNegativeInt.meta({ description: 'Instrument ID' }),
|
|
146
|
+
});
|
|
147
|
+
exports.PerpMassCancelArgsSchema = PerpMassCancelArgsSchema;
|
|
148
|
+
const PerpChangeLeverageArgsSchema = zod_1.z.object({
|
|
149
|
+
instrId: nonNegativeInt.meta({ description: 'Instrument ID' }),
|
|
150
|
+
leverage: zod_1.z.int().min(1).max(100, { error: 'Leverage must be between 1 and 100' }),
|
|
151
|
+
});
|
|
152
|
+
exports.PerpChangeLeverageArgsSchema = PerpChangeLeverageArgsSchema;
|
|
153
|
+
const PerpStatisticsResetArgsSchema = zod_1.z.object({
|
|
154
|
+
instrId: nonNegativeInt.meta({ description: 'Instrument ID' }),
|
|
155
|
+
});
|
|
156
|
+
exports.PerpStatisticsResetArgsSchema = PerpStatisticsResetArgsSchema;
|
|
157
|
+
const PerpForcedCloseArgsSchema = zod_1.z.object({
|
|
158
|
+
instrId: nonNegativeInt.meta({ description: 'Instrument ID' }),
|
|
159
|
+
clientPrimaryAccount: solanaAddress,
|
|
160
|
+
});
|
|
161
|
+
exports.PerpForcedCloseArgsSchema = PerpForcedCloseArgsSchema;
|
|
162
|
+
const NewInstrumentArgsSchema = zod_1.z.object({
|
|
163
|
+
assetMint: solanaAddress.meta({ description: 'Asset Token Mint' }),
|
|
164
|
+
crncyMint: solanaAddress.meta({ description: 'Currency Token Mint' }),
|
|
165
|
+
newProgramAccountAddress: solanaAddress.optional(),
|
|
166
|
+
initialPrice: positiveNumber,
|
|
167
|
+
});
|
|
168
|
+
exports.NewInstrumentArgsSchema = NewInstrumentArgsSchema;
|
|
169
|
+
const GetInstrIdArgsSchema = zod_1.z.object({
|
|
170
|
+
assetTokenId: nonNegativeInt.meta({ description: 'Asset Deriverse token registered ID' }),
|
|
171
|
+
crncyTokenId: nonNegativeInt.meta({ description: 'Base currency Deriverse token registered ID' }),
|
|
172
|
+
});
|
|
173
|
+
exports.GetInstrIdArgsSchema = GetInstrIdArgsSchema;
|
|
174
|
+
const GetSpotContextArgsSchema = zod_1.z.object({
|
|
175
|
+
assetTokenId: nonNegativeInt,
|
|
176
|
+
crncyTokenId: nonNegativeInt,
|
|
177
|
+
});
|
|
178
|
+
exports.GetSpotContextArgsSchema = GetSpotContextArgsSchema;
|
|
179
|
+
const GetInstrAccountByTagArgsSchema = zod_1.z.object({
|
|
180
|
+
assetTokenId: nonNegativeInt,
|
|
181
|
+
crncyTokenId: nonNegativeInt,
|
|
182
|
+
tag: nonNegativeInt,
|
|
183
|
+
});
|
|
184
|
+
exports.GetInstrAccountByTagArgsSchema = GetInstrAccountByTagArgsSchema;
|
|
185
|
+
const UpdateInstrDataArgsSchema = zod_1.z.object({
|
|
186
|
+
assetTokenId: nonNegativeInt,
|
|
187
|
+
crncyTokenId: nonNegativeInt,
|
|
188
|
+
});
|
|
189
|
+
exports.UpdateInstrDataArgsSchema = UpdateInstrDataArgsSchema;
|
|
190
|
+
const DistribDividendsArgsSchema = zod_1.z.object({
|
|
191
|
+
instruments: zod_1.z.array(nonNegativeInt).meta({ description: 'Instruments ID' }),
|
|
192
|
+
});
|
|
193
|
+
exports.DistribDividendsArgsSchema = DistribDividendsArgsSchema;
|
|
194
|
+
const GetClientSpotOrdersInfoArgsSchema = zod_1.z.object({
|
|
195
|
+
instrId: nonNegativeInt.meta({ description: 'Instrument ID' }),
|
|
196
|
+
clientId: nonNegativeInt.meta({
|
|
197
|
+
description: 'Temporary spot client ID. Use getClientData function to get this value',
|
|
198
|
+
}),
|
|
199
|
+
});
|
|
200
|
+
exports.GetClientSpotOrdersInfoArgsSchema = GetClientSpotOrdersInfoArgsSchema;
|
|
201
|
+
const GetClientPerpOrdersInfoArgsSchema = zod_1.z.object({
|
|
202
|
+
instrId: nonNegativeInt.meta({ description: 'Instrument ID' }),
|
|
203
|
+
clientId: nonNegativeInt.meta({
|
|
204
|
+
description: 'Temporary perp client ID. Use getClientData function to get this value',
|
|
205
|
+
}),
|
|
206
|
+
});
|
|
207
|
+
exports.GetClientPerpOrdersInfoArgsSchema = GetClientPerpOrdersInfoArgsSchema;
|
|
208
|
+
const GetClientSpotOrdersArgsSchema = zod_1.z.object({
|
|
209
|
+
instrId: nonNegativeInt.meta({ description: 'Instrument ID' }),
|
|
210
|
+
bidsCount: nonNegativeInt.meta({
|
|
211
|
+
description: 'Client spot bid orders count. Use getClientSpotOrdersInfo function to get this value',
|
|
212
|
+
}),
|
|
213
|
+
asksCount: nonNegativeInt.meta({
|
|
214
|
+
description: 'Client spot ask orders count. Use getClientSpotOrdersInfo function to get this value',
|
|
215
|
+
}),
|
|
216
|
+
bidsEntry: nonNegativeInt.meta({
|
|
217
|
+
description: 'Entrypoint in spot bid orders account. Use getClientSpotOrdersInfo function to get this value',
|
|
218
|
+
}),
|
|
219
|
+
asksEntry: nonNegativeInt.meta({
|
|
220
|
+
description: 'Entrypoint in spot ask orders account. Use getClientSpotOrdersInfo function to get this value',
|
|
221
|
+
}),
|
|
222
|
+
});
|
|
223
|
+
exports.GetClientSpotOrdersArgsSchema = GetClientSpotOrdersArgsSchema;
|
|
224
|
+
const GetClientPerpOrdersArgsSchema = zod_1.z.object({
|
|
225
|
+
instrId: nonNegativeInt.meta({ description: 'Instrument ID' }),
|
|
226
|
+
bidsCount: nonNegativeInt.meta({
|
|
227
|
+
description: 'Client perp bid orders count. Use getClientPerpOrdersInfo function to get this value',
|
|
228
|
+
}),
|
|
229
|
+
asksCount: nonNegativeInt.meta({
|
|
230
|
+
description: 'Client perp ask orders count. Use getClientPerpOrdersInfo function to get this value',
|
|
231
|
+
}),
|
|
232
|
+
bidsEntry: nonNegativeInt.meta({
|
|
233
|
+
description: 'Entrypoint in perp bid orders account. Use getClientPerpOrdersInfo function to get this value',
|
|
234
|
+
}),
|
|
235
|
+
asksEntry: nonNegativeInt.meta({
|
|
236
|
+
description: 'Entrypoint in perp ask orders account. Use getClientPerpOrdersInfo function to get this value',
|
|
237
|
+
}),
|
|
238
|
+
});
|
|
239
|
+
exports.GetClientPerpOrdersArgsSchema = GetClientPerpOrdersArgsSchema;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|