@crypticdot/defituna-api 1.5.1 → 1.5.2
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/index.d.mts +17 -4
- package/dist/index.d.ts +17 -4
- package/dist/index.js +1 -0
- package/dist/index.mjs +1 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1167,6 +1167,7 @@ declare const TunaSpotPosition$1: z.ZodObject<{
|
|
|
1167
1167
|
amount: bigint;
|
|
1168
1168
|
usd: number;
|
|
1169
1169
|
}>;
|
|
1170
|
+
uiLiquidationPrice: z.ZodNullable<z.ZodNumber>;
|
|
1170
1171
|
pnlUsd: z.ZodObject<{
|
|
1171
1172
|
amount: z.ZodNumber;
|
|
1172
1173
|
bps: z.ZodNumber;
|
|
@@ -1219,6 +1220,7 @@ declare const TunaSpotPosition$1: z.ZodObject<{
|
|
|
1219
1220
|
amount: bigint;
|
|
1220
1221
|
usd: number;
|
|
1221
1222
|
};
|
|
1223
|
+
uiLiquidationPrice: number | null;
|
|
1222
1224
|
leverage: number;
|
|
1223
1225
|
openedAtSlot: bigint;
|
|
1224
1226
|
}, {
|
|
@@ -1258,6 +1260,7 @@ declare const TunaSpotPosition$1: z.ZodObject<{
|
|
|
1258
1260
|
amount: bigint;
|
|
1259
1261
|
usd: number;
|
|
1260
1262
|
};
|
|
1263
|
+
uiLiquidationPrice: number | null;
|
|
1261
1264
|
leverage: number;
|
|
1262
1265
|
openedAtSlot: bigint;
|
|
1263
1266
|
}>;
|
|
@@ -2207,6 +2210,7 @@ declare const IncreaseSpotPositionQuote$1: z.ZodObject<{
|
|
|
2207
2210
|
/** Liquidation price */
|
|
2208
2211
|
uiLiquidationPrice: z.ZodNullable<z.ZodNumber>;
|
|
2209
2212
|
}, "strip", z.ZodTypeAny, {
|
|
2213
|
+
uiLiquidationPrice: number | null;
|
|
2210
2214
|
collateralAmount: bigint;
|
|
2211
2215
|
borrowAmount: bigint;
|
|
2212
2216
|
estimatedAmount: bigint;
|
|
@@ -2215,8 +2219,8 @@ declare const IncreaseSpotPositionQuote$1: z.ZodObject<{
|
|
|
2215
2219
|
protocolFeeA: bigint;
|
|
2216
2220
|
protocolFeeB: bigint;
|
|
2217
2221
|
priceImpact: number;
|
|
2218
|
-
uiLiquidationPrice: number | null;
|
|
2219
2222
|
}, {
|
|
2223
|
+
uiLiquidationPrice: number | null;
|
|
2220
2224
|
collateralAmount: bigint;
|
|
2221
2225
|
borrowAmount: bigint;
|
|
2222
2226
|
estimatedAmount: bigint;
|
|
@@ -2225,7 +2229,6 @@ declare const IncreaseSpotPositionQuote$1: z.ZodObject<{
|
|
|
2225
2229
|
protocolFeeA: bigint;
|
|
2226
2230
|
protocolFeeB: bigint;
|
|
2227
2231
|
priceImpact: number;
|
|
2228
|
-
uiLiquidationPrice: number | null;
|
|
2229
2232
|
}>;
|
|
2230
2233
|
declare const DecreaseSpotPositionQuote$1: z.ZodObject<{
|
|
2231
2234
|
/** Position decrease percentage */
|
|
@@ -2257,26 +2260,26 @@ declare const DecreaseSpotPositionQuote$1: z.ZodObject<{
|
|
|
2257
2260
|
}, "strip", z.ZodTypeAny, {
|
|
2258
2261
|
collateralToken: number;
|
|
2259
2262
|
positionToken: number;
|
|
2263
|
+
uiLiquidationPrice: number | null;
|
|
2260
2264
|
collateralAmount: bigint;
|
|
2261
2265
|
borrowAmount: bigint;
|
|
2262
2266
|
estimatedAmount: bigint;
|
|
2263
2267
|
protocolFeeA: bigint;
|
|
2264
2268
|
protocolFeeB: bigint;
|
|
2265
2269
|
priceImpact: number;
|
|
2266
|
-
uiLiquidationPrice: number | null;
|
|
2267
2270
|
decreasePercent: number;
|
|
2268
2271
|
decreaseAcceptableSwapAmount: bigint;
|
|
2269
2272
|
increaseMinSwapOutputAmount: bigint;
|
|
2270
2273
|
}, {
|
|
2271
2274
|
collateralToken: number;
|
|
2272
2275
|
positionToken: number;
|
|
2276
|
+
uiLiquidationPrice: number | null;
|
|
2273
2277
|
collateralAmount: bigint;
|
|
2274
2278
|
borrowAmount: bigint;
|
|
2275
2279
|
estimatedAmount: bigint;
|
|
2276
2280
|
protocolFeeA: bigint;
|
|
2277
2281
|
protocolFeeB: bigint;
|
|
2278
2282
|
priceImpact: number;
|
|
2279
|
-
uiLiquidationPrice: number | null;
|
|
2280
2283
|
decreasePercent: number;
|
|
2281
2284
|
decreaseAcceptableSwapAmount: bigint;
|
|
2282
2285
|
increaseMinSwapOutputAmount: bigint;
|
|
@@ -3997,6 +4000,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
3997
4000
|
amount: bigint;
|
|
3998
4001
|
usd: number;
|
|
3999
4002
|
}>;
|
|
4003
|
+
uiLiquidationPrice: z.ZodNullable<z.ZodNumber>;
|
|
4000
4004
|
pnlUsd: z.ZodObject<{
|
|
4001
4005
|
amount: z.ZodNumber;
|
|
4002
4006
|
bps: z.ZodNumber;
|
|
@@ -4049,6 +4053,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
4049
4053
|
amount: bigint;
|
|
4050
4054
|
usd: number;
|
|
4051
4055
|
};
|
|
4056
|
+
uiLiquidationPrice: number | null;
|
|
4052
4057
|
leverage: number;
|
|
4053
4058
|
openedAtSlot: bigint;
|
|
4054
4059
|
}, {
|
|
@@ -4088,6 +4093,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
4088
4093
|
amount: bigint;
|
|
4089
4094
|
usd: number;
|
|
4090
4095
|
};
|
|
4096
|
+
uiLiquidationPrice: number | null;
|
|
4091
4097
|
leverage: number;
|
|
4092
4098
|
openedAtSlot: bigint;
|
|
4093
4099
|
}>;
|
|
@@ -4151,6 +4157,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
4151
4157
|
amount: bigint;
|
|
4152
4158
|
usd: number;
|
|
4153
4159
|
}>;
|
|
4160
|
+
uiLiquidationPrice: z.ZodNullable<z.ZodNumber>;
|
|
4154
4161
|
pnlUsd: z.ZodObject<{
|
|
4155
4162
|
amount: z.ZodNumber;
|
|
4156
4163
|
bps: z.ZodNumber;
|
|
@@ -4203,6 +4210,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
4203
4210
|
amount: bigint;
|
|
4204
4211
|
usd: number;
|
|
4205
4212
|
};
|
|
4213
|
+
uiLiquidationPrice: number | null;
|
|
4206
4214
|
leverage: number;
|
|
4207
4215
|
openedAtSlot: bigint;
|
|
4208
4216
|
}, {
|
|
@@ -4242,6 +4250,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
4242
4250
|
amount: bigint;
|
|
4243
4251
|
usd: number;
|
|
4244
4252
|
};
|
|
4253
|
+
uiLiquidationPrice: number | null;
|
|
4245
4254
|
leverage: number;
|
|
4246
4255
|
openedAtSlot: bigint;
|
|
4247
4256
|
}>;
|
|
@@ -4288,6 +4297,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
4288
4297
|
amount: bigint;
|
|
4289
4298
|
usd: number;
|
|
4290
4299
|
};
|
|
4300
|
+
uiLiquidationPrice: number | null;
|
|
4291
4301
|
leverage: number;
|
|
4292
4302
|
openedAtSlot: bigint;
|
|
4293
4303
|
};
|
|
@@ -4334,6 +4344,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
4334
4344
|
amount: bigint;
|
|
4335
4345
|
usd: number;
|
|
4336
4346
|
};
|
|
4347
|
+
uiLiquidationPrice: number | null;
|
|
4337
4348
|
leverage: number;
|
|
4338
4349
|
openedAtSlot: bigint;
|
|
4339
4350
|
};
|
|
@@ -4380,6 +4391,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
4380
4391
|
amount: bigint;
|
|
4381
4392
|
usd: number;
|
|
4382
4393
|
};
|
|
4394
|
+
uiLiquidationPrice: number | null;
|
|
4383
4395
|
leverage: number;
|
|
4384
4396
|
openedAtSlot: bigint;
|
|
4385
4397
|
};
|
|
@@ -4426,6 +4438,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
4426
4438
|
amount: bigint;
|
|
4427
4439
|
usd: number;
|
|
4428
4440
|
};
|
|
4441
|
+
uiLiquidationPrice: number | null;
|
|
4429
4442
|
leverage: number;
|
|
4430
4443
|
openedAtSlot: bigint;
|
|
4431
4444
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1167,6 +1167,7 @@ declare const TunaSpotPosition$1: z.ZodObject<{
|
|
|
1167
1167
|
amount: bigint;
|
|
1168
1168
|
usd: number;
|
|
1169
1169
|
}>;
|
|
1170
|
+
uiLiquidationPrice: z.ZodNullable<z.ZodNumber>;
|
|
1170
1171
|
pnlUsd: z.ZodObject<{
|
|
1171
1172
|
amount: z.ZodNumber;
|
|
1172
1173
|
bps: z.ZodNumber;
|
|
@@ -1219,6 +1220,7 @@ declare const TunaSpotPosition$1: z.ZodObject<{
|
|
|
1219
1220
|
amount: bigint;
|
|
1220
1221
|
usd: number;
|
|
1221
1222
|
};
|
|
1223
|
+
uiLiquidationPrice: number | null;
|
|
1222
1224
|
leverage: number;
|
|
1223
1225
|
openedAtSlot: bigint;
|
|
1224
1226
|
}, {
|
|
@@ -1258,6 +1260,7 @@ declare const TunaSpotPosition$1: z.ZodObject<{
|
|
|
1258
1260
|
amount: bigint;
|
|
1259
1261
|
usd: number;
|
|
1260
1262
|
};
|
|
1263
|
+
uiLiquidationPrice: number | null;
|
|
1261
1264
|
leverage: number;
|
|
1262
1265
|
openedAtSlot: bigint;
|
|
1263
1266
|
}>;
|
|
@@ -2207,6 +2210,7 @@ declare const IncreaseSpotPositionQuote$1: z.ZodObject<{
|
|
|
2207
2210
|
/** Liquidation price */
|
|
2208
2211
|
uiLiquidationPrice: z.ZodNullable<z.ZodNumber>;
|
|
2209
2212
|
}, "strip", z.ZodTypeAny, {
|
|
2213
|
+
uiLiquidationPrice: number | null;
|
|
2210
2214
|
collateralAmount: bigint;
|
|
2211
2215
|
borrowAmount: bigint;
|
|
2212
2216
|
estimatedAmount: bigint;
|
|
@@ -2215,8 +2219,8 @@ declare const IncreaseSpotPositionQuote$1: z.ZodObject<{
|
|
|
2215
2219
|
protocolFeeA: bigint;
|
|
2216
2220
|
protocolFeeB: bigint;
|
|
2217
2221
|
priceImpact: number;
|
|
2218
|
-
uiLiquidationPrice: number | null;
|
|
2219
2222
|
}, {
|
|
2223
|
+
uiLiquidationPrice: number | null;
|
|
2220
2224
|
collateralAmount: bigint;
|
|
2221
2225
|
borrowAmount: bigint;
|
|
2222
2226
|
estimatedAmount: bigint;
|
|
@@ -2225,7 +2229,6 @@ declare const IncreaseSpotPositionQuote$1: z.ZodObject<{
|
|
|
2225
2229
|
protocolFeeA: bigint;
|
|
2226
2230
|
protocolFeeB: bigint;
|
|
2227
2231
|
priceImpact: number;
|
|
2228
|
-
uiLiquidationPrice: number | null;
|
|
2229
2232
|
}>;
|
|
2230
2233
|
declare const DecreaseSpotPositionQuote$1: z.ZodObject<{
|
|
2231
2234
|
/** Position decrease percentage */
|
|
@@ -2257,26 +2260,26 @@ declare const DecreaseSpotPositionQuote$1: z.ZodObject<{
|
|
|
2257
2260
|
}, "strip", z.ZodTypeAny, {
|
|
2258
2261
|
collateralToken: number;
|
|
2259
2262
|
positionToken: number;
|
|
2263
|
+
uiLiquidationPrice: number | null;
|
|
2260
2264
|
collateralAmount: bigint;
|
|
2261
2265
|
borrowAmount: bigint;
|
|
2262
2266
|
estimatedAmount: bigint;
|
|
2263
2267
|
protocolFeeA: bigint;
|
|
2264
2268
|
protocolFeeB: bigint;
|
|
2265
2269
|
priceImpact: number;
|
|
2266
|
-
uiLiquidationPrice: number | null;
|
|
2267
2270
|
decreasePercent: number;
|
|
2268
2271
|
decreaseAcceptableSwapAmount: bigint;
|
|
2269
2272
|
increaseMinSwapOutputAmount: bigint;
|
|
2270
2273
|
}, {
|
|
2271
2274
|
collateralToken: number;
|
|
2272
2275
|
positionToken: number;
|
|
2276
|
+
uiLiquidationPrice: number | null;
|
|
2273
2277
|
collateralAmount: bigint;
|
|
2274
2278
|
borrowAmount: bigint;
|
|
2275
2279
|
estimatedAmount: bigint;
|
|
2276
2280
|
protocolFeeA: bigint;
|
|
2277
2281
|
protocolFeeB: bigint;
|
|
2278
2282
|
priceImpact: number;
|
|
2279
|
-
uiLiquidationPrice: number | null;
|
|
2280
2283
|
decreasePercent: number;
|
|
2281
2284
|
decreaseAcceptableSwapAmount: bigint;
|
|
2282
2285
|
increaseMinSwapOutputAmount: bigint;
|
|
@@ -3997,6 +4000,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
3997
4000
|
amount: bigint;
|
|
3998
4001
|
usd: number;
|
|
3999
4002
|
}>;
|
|
4003
|
+
uiLiquidationPrice: z.ZodNullable<z.ZodNumber>;
|
|
4000
4004
|
pnlUsd: z.ZodObject<{
|
|
4001
4005
|
amount: z.ZodNumber;
|
|
4002
4006
|
bps: z.ZodNumber;
|
|
@@ -4049,6 +4053,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
4049
4053
|
amount: bigint;
|
|
4050
4054
|
usd: number;
|
|
4051
4055
|
};
|
|
4056
|
+
uiLiquidationPrice: number | null;
|
|
4052
4057
|
leverage: number;
|
|
4053
4058
|
openedAtSlot: bigint;
|
|
4054
4059
|
}, {
|
|
@@ -4088,6 +4093,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
4088
4093
|
amount: bigint;
|
|
4089
4094
|
usd: number;
|
|
4090
4095
|
};
|
|
4096
|
+
uiLiquidationPrice: number | null;
|
|
4091
4097
|
leverage: number;
|
|
4092
4098
|
openedAtSlot: bigint;
|
|
4093
4099
|
}>;
|
|
@@ -4151,6 +4157,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
4151
4157
|
amount: bigint;
|
|
4152
4158
|
usd: number;
|
|
4153
4159
|
}>;
|
|
4160
|
+
uiLiquidationPrice: z.ZodNullable<z.ZodNumber>;
|
|
4154
4161
|
pnlUsd: z.ZodObject<{
|
|
4155
4162
|
amount: z.ZodNumber;
|
|
4156
4163
|
bps: z.ZodNumber;
|
|
@@ -4203,6 +4210,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
4203
4210
|
amount: bigint;
|
|
4204
4211
|
usd: number;
|
|
4205
4212
|
};
|
|
4213
|
+
uiLiquidationPrice: number | null;
|
|
4206
4214
|
leverage: number;
|
|
4207
4215
|
openedAtSlot: bigint;
|
|
4208
4216
|
}, {
|
|
@@ -4242,6 +4250,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
4242
4250
|
amount: bigint;
|
|
4243
4251
|
usd: number;
|
|
4244
4252
|
};
|
|
4253
|
+
uiLiquidationPrice: number | null;
|
|
4245
4254
|
leverage: number;
|
|
4246
4255
|
openedAtSlot: bigint;
|
|
4247
4256
|
}>;
|
|
@@ -4288,6 +4297,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
4288
4297
|
amount: bigint;
|
|
4289
4298
|
usd: number;
|
|
4290
4299
|
};
|
|
4300
|
+
uiLiquidationPrice: number | null;
|
|
4291
4301
|
leverage: number;
|
|
4292
4302
|
openedAtSlot: bigint;
|
|
4293
4303
|
};
|
|
@@ -4334,6 +4344,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
4334
4344
|
amount: bigint;
|
|
4335
4345
|
usd: number;
|
|
4336
4346
|
};
|
|
4347
|
+
uiLiquidationPrice: number | null;
|
|
4337
4348
|
leverage: number;
|
|
4338
4349
|
openedAtSlot: bigint;
|
|
4339
4350
|
};
|
|
@@ -4380,6 +4391,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
4380
4391
|
amount: bigint;
|
|
4381
4392
|
usd: number;
|
|
4382
4393
|
};
|
|
4394
|
+
uiLiquidationPrice: number | null;
|
|
4383
4395
|
leverage: number;
|
|
4384
4396
|
openedAtSlot: bigint;
|
|
4385
4397
|
};
|
|
@@ -4426,6 +4438,7 @@ declare const TunaSpotPositionNotification: z.ZodObject<{
|
|
|
4426
4438
|
amount: bigint;
|
|
4427
4439
|
usd: number;
|
|
4428
4440
|
};
|
|
4441
|
+
uiLiquidationPrice: number | null;
|
|
4429
4442
|
leverage: number;
|
|
4430
4443
|
openedAtSlot: bigint;
|
|
4431
4444
|
};
|
package/dist/index.js
CHANGED
|
@@ -450,6 +450,7 @@ var TunaSpotPosition = import_zod.z.object({
|
|
|
450
450
|
loanFunds: amountWithUsd,
|
|
451
451
|
currentLoan: amountWithUsd,
|
|
452
452
|
total: amountWithUsd,
|
|
453
|
+
uiLiquidationPrice: import_zod.z.nullable(import_zod.z.number()),
|
|
453
454
|
pnlUsd: usdPnl,
|
|
454
455
|
leverage: import_zod.z.number(),
|
|
455
456
|
openedAt: import_zod.z.coerce.date(),
|
package/dist/index.mjs
CHANGED