minara 0.3.1 → 0.4.1
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 +25 -8
- package/dist/api/perps.d.ts +25 -1
- package/dist/api/perps.js +50 -0
- package/dist/commands/assets.js +56 -9
- package/dist/commands/balance.js +8 -3
- package/dist/commands/perps.js +1384 -231
- package/dist/types.d.ts +41 -0
- package/package.json +2 -1
package/dist/types.d.ts
CHANGED
|
@@ -153,10 +153,12 @@ export interface CrossChainActivitiesDto {
|
|
|
153
153
|
}
|
|
154
154
|
export interface PerpsDepositDto {
|
|
155
155
|
usdcAmount: number;
|
|
156
|
+
subAccountId?: string;
|
|
156
157
|
}
|
|
157
158
|
export interface PerpsWithdrawDto {
|
|
158
159
|
usdcAmount: number;
|
|
159
160
|
toAddress: string;
|
|
161
|
+
subAccountId?: string;
|
|
160
162
|
}
|
|
161
163
|
export interface PerpsOrder {
|
|
162
164
|
/** asset symbol */
|
|
@@ -186,6 +188,7 @@ export interface PerpsPlaceOrdersDto {
|
|
|
186
188
|
orders: PerpsOrder[];
|
|
187
189
|
grouping: 'na' | 'normalTpsl' | 'positionTpsl';
|
|
188
190
|
expiresAfter?: number;
|
|
191
|
+
subAccountId?: string;
|
|
189
192
|
}
|
|
190
193
|
export interface PerpsCancelEntry {
|
|
191
194
|
/** asset symbol */
|
|
@@ -195,6 +198,7 @@ export interface PerpsCancelEntry {
|
|
|
195
198
|
}
|
|
196
199
|
export interface PerpsCancelOrdersDto {
|
|
197
200
|
cancels: PerpsCancelEntry[];
|
|
201
|
+
subAccountId?: string;
|
|
198
202
|
}
|
|
199
203
|
export interface PerpsPosition {
|
|
200
204
|
symbol?: string;
|
|
@@ -215,6 +219,43 @@ export interface UpdateLeverageDto {
|
|
|
215
219
|
symbol: string;
|
|
216
220
|
isCross: boolean;
|
|
217
221
|
leverage: number;
|
|
222
|
+
subAccountId?: string;
|
|
223
|
+
}
|
|
224
|
+
export interface PerpSubAccount {
|
|
225
|
+
_id?: string;
|
|
226
|
+
id?: string;
|
|
227
|
+
subAccountId?: string;
|
|
228
|
+
name?: string;
|
|
229
|
+
address?: string;
|
|
230
|
+
isDefault?: boolean;
|
|
231
|
+
equityValue?: number;
|
|
232
|
+
dispatchableValue?: number;
|
|
233
|
+
totalUnrealizedPnl?: number;
|
|
234
|
+
totalMarginUsed?: number;
|
|
235
|
+
withdrawableValue?: number;
|
|
236
|
+
positions?: PerpsPosition[];
|
|
237
|
+
strategy?: {
|
|
238
|
+
strategyId?: string;
|
|
239
|
+
status?: string;
|
|
240
|
+
symbols?: string[];
|
|
241
|
+
[key: string]: unknown;
|
|
242
|
+
};
|
|
243
|
+
[key: string]: unknown;
|
|
244
|
+
}
|
|
245
|
+
export interface CreatePerpSubAccountDto {
|
|
246
|
+
name: string;
|
|
247
|
+
}
|
|
248
|
+
export interface RenamePerpSubAccountDto {
|
|
249
|
+
subAccountId: string;
|
|
250
|
+
name: string;
|
|
251
|
+
}
|
|
252
|
+
export interface TransferFundsDto {
|
|
253
|
+
fromSubAccountId?: string;
|
|
254
|
+
toSubAccountId?: string;
|
|
255
|
+
amount: number;
|
|
256
|
+
}
|
|
257
|
+
export interface SweepFundsDto {
|
|
258
|
+
subAccountId: string;
|
|
218
259
|
}
|
|
219
260
|
export interface CreateLimitOrderDto {
|
|
220
261
|
priceCondition: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "minara",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "CLI client for Minara.ai — login, trade, deposit/withdraw, chat and more from your terminal.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/node": "^22.0.0",
|
|
49
|
+
"@vitest/coverage-v8": "^4.1.0",
|
|
49
50
|
"typescript": "^5.6.0",
|
|
50
51
|
"vitest": "^4.0.18"
|
|
51
52
|
}
|