@bulletxyz/bullet-sdk 0.18.0-rc.1 → 0.19.0-rc.0
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/browser/index.js +27 -36
- package/dist/browser/index.js.map +2 -2
- package/dist/node/index.js +27 -36
- package/dist/node/index.js.map +2 -2
- package/dist/types/calc.d.ts +5 -5
- package/dist/types/exchange.d.ts +2 -2
- package/dist/types/orderbook.d.ts +5 -6
- package/dist/types/zod-types/rest.d.ts +153 -169
- package/package.json +1 -1
package/dist/types/calc.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import Decimal from "decimal.js";
|
|
2
2
|
import { type EquityType, type MarginType } from "./bullet-wasm";
|
|
3
3
|
import type { Asset, AssetId, OrderType, PlaceOrderArgs, Side } from "./types";
|
|
4
|
-
import type { BorrowLendMarket, MarginConfig,
|
|
5
|
-
export declare function calculateOrderbookMidpoint(orderbook:
|
|
4
|
+
import type { BorrowLendMarket, MarginConfig, OrderbookL2, PerpMarket, Pricing, UserAccount } from "./zod-types/rest";
|
|
5
|
+
export declare function calculateOrderbookMidpoint(orderbook: OrderbookL2): Decimal | undefined;
|
|
6
6
|
export declare function calculateEntryPrice(asset: Asset, userAccount: UserAccount): Decimal;
|
|
7
7
|
export interface MarginContext {
|
|
8
8
|
pricing: Pricing;
|
|
@@ -18,16 +18,16 @@ export declare function calculateEstimatedLiquidationPrice(assetId: AssetId, use
|
|
|
18
18
|
export declare function calculateLiquidationRiskPercentage(userAccount: UserAccount, marginContext: MarginContext): Decimal;
|
|
19
19
|
export declare function calculateForceCancelRiskPercentage(userAccount: UserAccount, marginContext: MarginContext): Decimal;
|
|
20
20
|
export declare function calculateMaxBorrowAmount(assetId: AssetId, initialLiabilityWeight: Decimal, userAccount: UserAccount, marginContext: MarginContext): Decimal;
|
|
21
|
-
export declare function calculateMaxOrderSize(asset_id: AssetId, price: Decimal, side: Side, order_type: OrderType, reduce_only: boolean, userAccount: UserAccount, marginContext: MarginContext, orderbook:
|
|
21
|
+
export declare function calculateMaxOrderSize(asset_id: AssetId, price: Decimal, side: Side, order_type: OrderType, reduce_only: boolean, userAccount: UserAccount, marginContext: MarginContext, orderbook: OrderbookL2, n_iterations?: number, error_tolerance?: Decimal): Decimal;
|
|
22
22
|
export declare function simulateUsedMarginOnBorrow(assetId: AssetId, borrowAmount: Decimal, userAccount: UserAccount, marginType: MarginType, marginContext: MarginContext): {
|
|
23
23
|
current: Decimal;
|
|
24
24
|
updated: Decimal;
|
|
25
25
|
};
|
|
26
|
-
export declare function simulateUsedMarginOnOrder(placeOrderArgs: PlaceOrderArgs, userAccount: UserAccount, marginContext: MarginContext, orderbook:
|
|
26
|
+
export declare function simulateUsedMarginOnOrder(placeOrderArgs: PlaceOrderArgs, userAccount: UserAccount, marginContext: MarginContext, orderbook: OrderbookL2): {
|
|
27
27
|
current: Decimal;
|
|
28
28
|
updated: Decimal;
|
|
29
29
|
};
|
|
30
|
-
export declare function simulateEstimatedLiquidationPriceOnOrder(placeOrderArgs: PlaceOrderArgs, userAccount: UserAccount, marginContext: MarginContext, orderbook:
|
|
30
|
+
export declare function simulateEstimatedLiquidationPriceOnOrder(placeOrderArgs: PlaceOrderArgs, userAccount: UserAccount, marginContext: MarginContext, orderbook: OrderbookL2): {
|
|
31
31
|
current: Decimal;
|
|
32
32
|
updated: Decimal;
|
|
33
33
|
};
|
package/dist/types/exchange.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { BaseConnection } from "./connection";
|
|
2
2
|
import type { Orderbook } from "./orderbook";
|
|
3
3
|
import type { AssetId, Network } from "./types";
|
|
4
|
-
import { type BorrowLendMarket, type MarginConfig, type Order, type
|
|
4
|
+
import { type BorrowLendMarket, type MarginConfig, type Order, type OrderbookL2, type PerpMarket, type Pricing, type UsdcInsuranceFund, type UsdcPnlPool, type UserAccount } from "./zod-types/rest";
|
|
5
5
|
export declare class ExchangeConnection extends BaseConnection {
|
|
6
6
|
private wsManager;
|
|
7
7
|
constructor(network: Network);
|
|
8
8
|
getValue(): Promise<number | null>;
|
|
9
9
|
getOrder(order_id: bigint): Promise<Order | null>;
|
|
10
|
-
|
|
10
|
+
getOrderbookL2(asset_id: number, levels?: number): Promise<OrderbookL2>;
|
|
11
11
|
getUserAccountAddresses(start?: number, limit?: number): Promise<string[]>;
|
|
12
12
|
getUserAccounts(addresses: string[]): Promise<UserAccount[]>;
|
|
13
13
|
getPricing(): Promise<Pricing | null>;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import Decimal from "decimal.js";
|
|
2
2
|
import type { Asset } from "./types";
|
|
3
|
-
import type {
|
|
3
|
+
import type { OrderbookL2, PriceLevel } from "./zod-types/rest";
|
|
4
4
|
import type { OrderbookUpdate } from "./zod-types/ws";
|
|
5
5
|
type Price = Decimal;
|
|
6
6
|
type Size = Decimal;
|
|
7
|
-
export type OrderbookLevel = [Price, Size];
|
|
8
7
|
export declare class Orderbook {
|
|
9
8
|
bids: Map<Price, Size>;
|
|
10
9
|
asks: Map<Price, Size>;
|
|
@@ -14,10 +13,10 @@ export declare class Orderbook {
|
|
|
14
13
|
protected updateBid(price: Price, size: Size): void;
|
|
15
14
|
protected updateAsk(price: Price, size: Size): void;
|
|
16
15
|
applyDelta(delta: OrderbookUpdate): void;
|
|
17
|
-
getBids(levels?: number):
|
|
18
|
-
getAsks(levels?: number):
|
|
19
|
-
static
|
|
20
|
-
static
|
|
16
|
+
getBids(levels?: number): PriceLevel[];
|
|
17
|
+
getAsks(levels?: number): PriceLevel[];
|
|
18
|
+
static fromOrderbookL2(orderbook: OrderbookL2): Orderbook;
|
|
19
|
+
static toOrderbookL2(orderbook: Orderbook): OrderbookL2;
|
|
21
20
|
toDisplay(levels?: number): string;
|
|
22
21
|
setLastUpdated(ts: number): void;
|
|
23
22
|
}
|
|
@@ -362,6 +362,7 @@ export declare const BaseResponseSchemas: {
|
|
|
362
362
|
meta: Record<string, unknown> | null;
|
|
363
363
|
}>;
|
|
364
364
|
};
|
|
365
|
+
declare const PriceLevel: z.ZodTuple<[z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>, z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>], null>;
|
|
365
366
|
declare const StrippedTpsl: z.ZodObject<{
|
|
366
367
|
side: z.ZodEnum<["Bid", "Ask"]>;
|
|
367
368
|
tpsl_order_id: z.ZodBigInt;
|
|
@@ -435,60 +436,18 @@ export declare const Schemas: {
|
|
|
435
436
|
asset_id: number;
|
|
436
437
|
owner: string;
|
|
437
438
|
}>;
|
|
438
|
-
readonly
|
|
439
|
+
readonly OrderbookL2: z.ZodObject<{
|
|
439
440
|
asset_id: z.ZodNumber;
|
|
440
|
-
bids: z.ZodEffects<z.
|
|
441
|
-
|
|
442
|
-
total_size: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>;
|
|
443
|
-
}, "strip", z.ZodTypeAny, {
|
|
444
|
-
order_ids: bigint[];
|
|
445
|
-
total_size: import("decimal.js").Decimal;
|
|
446
|
-
}, {
|
|
447
|
-
order_ids: bigint[];
|
|
448
|
-
total_size: string | number;
|
|
449
|
-
}>>, Map<string, {
|
|
450
|
-
order_ids: bigint[];
|
|
451
|
-
total_size: import("decimal.js").Decimal;
|
|
452
|
-
}>, Record<string, {
|
|
453
|
-
order_ids: bigint[];
|
|
454
|
-
total_size: string | number;
|
|
455
|
-
}>>;
|
|
456
|
-
asks: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
457
|
-
order_ids: z.ZodArray<z.ZodBigInt, "many">;
|
|
458
|
-
total_size: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>;
|
|
459
|
-
}, "strip", z.ZodTypeAny, {
|
|
460
|
-
order_ids: bigint[];
|
|
461
|
-
total_size: import("decimal.js").Decimal;
|
|
462
|
-
}, {
|
|
463
|
-
order_ids: bigint[];
|
|
464
|
-
total_size: string | number;
|
|
465
|
-
}>>, Map<string, {
|
|
466
|
-
order_ids: bigint[];
|
|
467
|
-
total_size: import("decimal.js").Decimal;
|
|
468
|
-
}>, Record<string, {
|
|
469
|
-
order_ids: bigint[];
|
|
470
|
-
total_size: string | number;
|
|
471
|
-
}>>;
|
|
441
|
+
bids: z.ZodArray<z.ZodTuple<[z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>, z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>], null>, "many">;
|
|
442
|
+
asks: z.ZodArray<z.ZodTuple<[z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>, z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>], null>, "many">;
|
|
472
443
|
}, "strip", z.ZodTypeAny, {
|
|
473
444
|
asset_id: number;
|
|
474
|
-
bids:
|
|
475
|
-
|
|
476
|
-
total_size: import("decimal.js").Decimal;
|
|
477
|
-
}>;
|
|
478
|
-
asks: Map<string, {
|
|
479
|
-
order_ids: bigint[];
|
|
480
|
-
total_size: import("decimal.js").Decimal;
|
|
481
|
-
}>;
|
|
445
|
+
bids: [import("decimal.js").Decimal, import("decimal.js").Decimal][];
|
|
446
|
+
asks: [import("decimal.js").Decimal, import("decimal.js").Decimal][];
|
|
482
447
|
}, {
|
|
483
448
|
asset_id: number;
|
|
484
|
-
bids:
|
|
485
|
-
|
|
486
|
-
total_size: string | number;
|
|
487
|
-
}>;
|
|
488
|
-
asks: Record<string, {
|
|
489
|
-
order_ids: bigint[];
|
|
490
|
-
total_size: string | number;
|
|
491
|
-
}>;
|
|
449
|
+
bids: [string | number, string | number][];
|
|
450
|
+
asks: [string | number, string | number][];
|
|
492
451
|
}>;
|
|
493
452
|
readonly UsdcPnlPool: z.ZodObject<{
|
|
494
453
|
usdc_token_amount: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>;
|
|
@@ -2190,125 +2149,6 @@ export declare const ResponseSchemas: {
|
|
|
2190
2149
|
};
|
|
2191
2150
|
meta: Record<string, unknown> | null;
|
|
2192
2151
|
}>;
|
|
2193
|
-
readonly Orderbook: z.ZodObject<{
|
|
2194
|
-
data: z.ZodObject<{
|
|
2195
|
-
key: z.ZodNumber;
|
|
2196
|
-
value: z.ZodNullable<z.ZodObject<{
|
|
2197
|
-
asset_id: z.ZodNumber;
|
|
2198
|
-
bids: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
2199
|
-
order_ids: z.ZodArray<z.ZodBigInt, "many">;
|
|
2200
|
-
total_size: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>;
|
|
2201
|
-
}, "strip", z.ZodTypeAny, {
|
|
2202
|
-
order_ids: bigint[];
|
|
2203
|
-
total_size: import("decimal.js").Decimal;
|
|
2204
|
-
}, {
|
|
2205
|
-
order_ids: bigint[];
|
|
2206
|
-
total_size: string | number;
|
|
2207
|
-
}>>, Map<string, {
|
|
2208
|
-
order_ids: bigint[];
|
|
2209
|
-
total_size: import("decimal.js").Decimal;
|
|
2210
|
-
}>, Record<string, {
|
|
2211
|
-
order_ids: bigint[];
|
|
2212
|
-
total_size: string | number;
|
|
2213
|
-
}>>;
|
|
2214
|
-
asks: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
2215
|
-
order_ids: z.ZodArray<z.ZodBigInt, "many">;
|
|
2216
|
-
total_size: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>;
|
|
2217
|
-
}, "strip", z.ZodTypeAny, {
|
|
2218
|
-
order_ids: bigint[];
|
|
2219
|
-
total_size: import("decimal.js").Decimal;
|
|
2220
|
-
}, {
|
|
2221
|
-
order_ids: bigint[];
|
|
2222
|
-
total_size: string | number;
|
|
2223
|
-
}>>, Map<string, {
|
|
2224
|
-
order_ids: bigint[];
|
|
2225
|
-
total_size: import("decimal.js").Decimal;
|
|
2226
|
-
}>, Record<string, {
|
|
2227
|
-
order_ids: bigint[];
|
|
2228
|
-
total_size: string | number;
|
|
2229
|
-
}>>;
|
|
2230
|
-
}, "strip", z.ZodTypeAny, {
|
|
2231
|
-
asset_id: number;
|
|
2232
|
-
bids: Map<string, {
|
|
2233
|
-
order_ids: bigint[];
|
|
2234
|
-
total_size: import("decimal.js").Decimal;
|
|
2235
|
-
}>;
|
|
2236
|
-
asks: Map<string, {
|
|
2237
|
-
order_ids: bigint[];
|
|
2238
|
-
total_size: import("decimal.js").Decimal;
|
|
2239
|
-
}>;
|
|
2240
|
-
}, {
|
|
2241
|
-
asset_id: number;
|
|
2242
|
-
bids: Record<string, {
|
|
2243
|
-
order_ids: bigint[];
|
|
2244
|
-
total_size: string | number;
|
|
2245
|
-
}>;
|
|
2246
|
-
asks: Record<string, {
|
|
2247
|
-
order_ids: bigint[];
|
|
2248
|
-
total_size: string | number;
|
|
2249
|
-
}>;
|
|
2250
|
-
}>>;
|
|
2251
|
-
}, "strip", z.ZodTypeAny, {
|
|
2252
|
-
value: {
|
|
2253
|
-
asset_id: number;
|
|
2254
|
-
bids: Map<string, {
|
|
2255
|
-
order_ids: bigint[];
|
|
2256
|
-
total_size: import("decimal.js").Decimal;
|
|
2257
|
-
}>;
|
|
2258
|
-
asks: Map<string, {
|
|
2259
|
-
order_ids: bigint[];
|
|
2260
|
-
total_size: import("decimal.js").Decimal;
|
|
2261
|
-
}>;
|
|
2262
|
-
} | null;
|
|
2263
|
-
key: number;
|
|
2264
|
-
}, {
|
|
2265
|
-
value: {
|
|
2266
|
-
asset_id: number;
|
|
2267
|
-
bids: Record<string, {
|
|
2268
|
-
order_ids: bigint[];
|
|
2269
|
-
total_size: string | number;
|
|
2270
|
-
}>;
|
|
2271
|
-
asks: Record<string, {
|
|
2272
|
-
order_ids: bigint[];
|
|
2273
|
-
total_size: string | number;
|
|
2274
|
-
}>;
|
|
2275
|
-
} | null;
|
|
2276
|
-
key: number;
|
|
2277
|
-
}>;
|
|
2278
|
-
meta: z.ZodNullable<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnknown>, Map<unknown, unknown>, Record<string, unknown>>>;
|
|
2279
|
-
}, "strip", z.ZodTypeAny, {
|
|
2280
|
-
data: {
|
|
2281
|
-
value: {
|
|
2282
|
-
asset_id: number;
|
|
2283
|
-
bids: Map<string, {
|
|
2284
|
-
order_ids: bigint[];
|
|
2285
|
-
total_size: import("decimal.js").Decimal;
|
|
2286
|
-
}>;
|
|
2287
|
-
asks: Map<string, {
|
|
2288
|
-
order_ids: bigint[];
|
|
2289
|
-
total_size: import("decimal.js").Decimal;
|
|
2290
|
-
}>;
|
|
2291
|
-
} | null;
|
|
2292
|
-
key: number;
|
|
2293
|
-
};
|
|
2294
|
-
meta: Map<unknown, unknown> | null;
|
|
2295
|
-
}, {
|
|
2296
|
-
data: {
|
|
2297
|
-
value: {
|
|
2298
|
-
asset_id: number;
|
|
2299
|
-
bids: Record<string, {
|
|
2300
|
-
order_ids: bigint[];
|
|
2301
|
-
total_size: string | number;
|
|
2302
|
-
}>;
|
|
2303
|
-
asks: Record<string, {
|
|
2304
|
-
order_ids: bigint[];
|
|
2305
|
-
total_size: string | number;
|
|
2306
|
-
}>;
|
|
2307
|
-
} | null;
|
|
2308
|
-
key: number;
|
|
2309
|
-
};
|
|
2310
|
-
meta: Record<string, unknown> | null;
|
|
2311
|
-
}>;
|
|
2312
2152
|
readonly Pricing: z.ZodObject<{
|
|
2313
2153
|
data: z.ZodObject<{
|
|
2314
2154
|
value: z.ZodNullable<z.ZodObject<{
|
|
@@ -2548,6 +2388,149 @@ export declare const ResponseSchemas: {
|
|
|
2548
2388
|
};
|
|
2549
2389
|
meta: Record<string, unknown> | null;
|
|
2550
2390
|
}>;
|
|
2391
|
+
readonly PerpMarket: z.ZodObject<{
|
|
2392
|
+
data: z.ZodObject<{
|
|
2393
|
+
key: z.ZodNumber;
|
|
2394
|
+
value: z.ZodNullable<z.ZodObject<{
|
|
2395
|
+
is_active: z.ZodBoolean;
|
|
2396
|
+
min_tick_size: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>;
|
|
2397
|
+
min_lot_size: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>;
|
|
2398
|
+
min_interest_rate_clamp: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>;
|
|
2399
|
+
max_interest_rate_clamp: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>;
|
|
2400
|
+
min_funding_rate_clamp: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>;
|
|
2401
|
+
max_funding_rate_clamp: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>;
|
|
2402
|
+
impact_margin: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>;
|
|
2403
|
+
interest_rate: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>;
|
|
2404
|
+
}, "strip", z.ZodTypeAny, {
|
|
2405
|
+
is_active: boolean;
|
|
2406
|
+
min_tick_size: import("decimal.js").Decimal;
|
|
2407
|
+
min_lot_size: import("decimal.js").Decimal;
|
|
2408
|
+
min_interest_rate_clamp: import("decimal.js").Decimal;
|
|
2409
|
+
max_interest_rate_clamp: import("decimal.js").Decimal;
|
|
2410
|
+
min_funding_rate_clamp: import("decimal.js").Decimal;
|
|
2411
|
+
max_funding_rate_clamp: import("decimal.js").Decimal;
|
|
2412
|
+
impact_margin: import("decimal.js").Decimal;
|
|
2413
|
+
interest_rate: import("decimal.js").Decimal;
|
|
2414
|
+
}, {
|
|
2415
|
+
is_active: boolean;
|
|
2416
|
+
min_tick_size: string | number;
|
|
2417
|
+
min_lot_size: string | number;
|
|
2418
|
+
min_interest_rate_clamp: string | number;
|
|
2419
|
+
max_interest_rate_clamp: string | number;
|
|
2420
|
+
min_funding_rate_clamp: string | number;
|
|
2421
|
+
max_funding_rate_clamp: string | number;
|
|
2422
|
+
impact_margin: string | number;
|
|
2423
|
+
interest_rate: string | number;
|
|
2424
|
+
}>>;
|
|
2425
|
+
}, "strip", z.ZodTypeAny, {
|
|
2426
|
+
value: {
|
|
2427
|
+
is_active: boolean;
|
|
2428
|
+
min_tick_size: import("decimal.js").Decimal;
|
|
2429
|
+
min_lot_size: import("decimal.js").Decimal;
|
|
2430
|
+
min_interest_rate_clamp: import("decimal.js").Decimal;
|
|
2431
|
+
max_interest_rate_clamp: import("decimal.js").Decimal;
|
|
2432
|
+
min_funding_rate_clamp: import("decimal.js").Decimal;
|
|
2433
|
+
max_funding_rate_clamp: import("decimal.js").Decimal;
|
|
2434
|
+
impact_margin: import("decimal.js").Decimal;
|
|
2435
|
+
interest_rate: import("decimal.js").Decimal;
|
|
2436
|
+
} | null;
|
|
2437
|
+
key: number;
|
|
2438
|
+
}, {
|
|
2439
|
+
value: {
|
|
2440
|
+
is_active: boolean;
|
|
2441
|
+
min_tick_size: string | number;
|
|
2442
|
+
min_lot_size: string | number;
|
|
2443
|
+
min_interest_rate_clamp: string | number;
|
|
2444
|
+
max_interest_rate_clamp: string | number;
|
|
2445
|
+
min_funding_rate_clamp: string | number;
|
|
2446
|
+
max_funding_rate_clamp: string | number;
|
|
2447
|
+
impact_margin: string | number;
|
|
2448
|
+
interest_rate: string | number;
|
|
2449
|
+
} | null;
|
|
2450
|
+
key: number;
|
|
2451
|
+
}>;
|
|
2452
|
+
meta: z.ZodNullable<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnknown>, Map<unknown, unknown>, Record<string, unknown>>>;
|
|
2453
|
+
}, "strip", z.ZodTypeAny, {
|
|
2454
|
+
data: {
|
|
2455
|
+
value: {
|
|
2456
|
+
is_active: boolean;
|
|
2457
|
+
min_tick_size: import("decimal.js").Decimal;
|
|
2458
|
+
min_lot_size: import("decimal.js").Decimal;
|
|
2459
|
+
min_interest_rate_clamp: import("decimal.js").Decimal;
|
|
2460
|
+
max_interest_rate_clamp: import("decimal.js").Decimal;
|
|
2461
|
+
min_funding_rate_clamp: import("decimal.js").Decimal;
|
|
2462
|
+
max_funding_rate_clamp: import("decimal.js").Decimal;
|
|
2463
|
+
impact_margin: import("decimal.js").Decimal;
|
|
2464
|
+
interest_rate: import("decimal.js").Decimal;
|
|
2465
|
+
} | null;
|
|
2466
|
+
key: number;
|
|
2467
|
+
};
|
|
2468
|
+
meta: Map<unknown, unknown> | null;
|
|
2469
|
+
}, {
|
|
2470
|
+
data: {
|
|
2471
|
+
value: {
|
|
2472
|
+
is_active: boolean;
|
|
2473
|
+
min_tick_size: string | number;
|
|
2474
|
+
min_lot_size: string | number;
|
|
2475
|
+
min_interest_rate_clamp: string | number;
|
|
2476
|
+
max_interest_rate_clamp: string | number;
|
|
2477
|
+
min_funding_rate_clamp: string | number;
|
|
2478
|
+
max_funding_rate_clamp: string | number;
|
|
2479
|
+
impact_margin: string | number;
|
|
2480
|
+
interest_rate: string | number;
|
|
2481
|
+
} | null;
|
|
2482
|
+
key: number;
|
|
2483
|
+
};
|
|
2484
|
+
meta: Record<string, unknown> | null;
|
|
2485
|
+
}>;
|
|
2486
|
+
readonly OrderbookL2: z.ZodObject<{
|
|
2487
|
+
data: z.ZodObject<{
|
|
2488
|
+
orderbook_l2: z.ZodObject<{
|
|
2489
|
+
asset_id: z.ZodNumber;
|
|
2490
|
+
bids: z.ZodArray<z.ZodTuple<[z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>, z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>], null>, "many">;
|
|
2491
|
+
asks: z.ZodArray<z.ZodTuple<[z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>, z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>], null>, "many">;
|
|
2492
|
+
}, "strip", z.ZodTypeAny, {
|
|
2493
|
+
asset_id: number;
|
|
2494
|
+
bids: [import("decimal.js").Decimal, import("decimal.js").Decimal][];
|
|
2495
|
+
asks: [import("decimal.js").Decimal, import("decimal.js").Decimal][];
|
|
2496
|
+
}, {
|
|
2497
|
+
asset_id: number;
|
|
2498
|
+
bids: [string | number, string | number][];
|
|
2499
|
+
asks: [string | number, string | number][];
|
|
2500
|
+
}>;
|
|
2501
|
+
}, "strip", z.ZodTypeAny, {
|
|
2502
|
+
orderbook_l2: {
|
|
2503
|
+
asset_id: number;
|
|
2504
|
+
bids: [import("decimal.js").Decimal, import("decimal.js").Decimal][];
|
|
2505
|
+
asks: [import("decimal.js").Decimal, import("decimal.js").Decimal][];
|
|
2506
|
+
};
|
|
2507
|
+
}, {
|
|
2508
|
+
orderbook_l2: {
|
|
2509
|
+
asset_id: number;
|
|
2510
|
+
bids: [string | number, string | number][];
|
|
2511
|
+
asks: [string | number, string | number][];
|
|
2512
|
+
};
|
|
2513
|
+
}>;
|
|
2514
|
+
meta: z.ZodNullable<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnknown>, Map<unknown, unknown>, Record<string, unknown>>>;
|
|
2515
|
+
}, "strip", z.ZodTypeAny, {
|
|
2516
|
+
data: {
|
|
2517
|
+
orderbook_l2: {
|
|
2518
|
+
asset_id: number;
|
|
2519
|
+
bids: [import("decimal.js").Decimal, import("decimal.js").Decimal][];
|
|
2520
|
+
asks: [import("decimal.js").Decimal, import("decimal.js").Decimal][];
|
|
2521
|
+
};
|
|
2522
|
+
};
|
|
2523
|
+
meta: Map<unknown, unknown> | null;
|
|
2524
|
+
}, {
|
|
2525
|
+
data: {
|
|
2526
|
+
orderbook_l2: {
|
|
2527
|
+
asset_id: number;
|
|
2528
|
+
bids: [string | number, string | number][];
|
|
2529
|
+
asks: [string | number, string | number][];
|
|
2530
|
+
};
|
|
2531
|
+
};
|
|
2532
|
+
meta: Record<string, unknown> | null;
|
|
2533
|
+
}>;
|
|
2551
2534
|
readonly BorrowLendMarkets: z.ZodObject<{
|
|
2552
2535
|
data: z.ZodObject<{
|
|
2553
2536
|
markets: z.ZodArray<z.ZodObject<{
|
|
@@ -3058,7 +3041,8 @@ export declare const ResponseSchemas: {
|
|
|
3058
3041
|
};
|
|
3059
3042
|
export type DummyValue = z.infer<typeof Schemas.DummyValue>;
|
|
3060
3043
|
export type Order = z.infer<typeof Schemas.Order>;
|
|
3061
|
-
export type
|
|
3044
|
+
export type OrderbookL2 = z.infer<typeof Schemas.OrderbookL2>;
|
|
3045
|
+
export type PriceLevel = z.infer<typeof PriceLevel>;
|
|
3062
3046
|
export type UserAccount = z.infer<typeof Schemas.UserAccount>;
|
|
3063
3047
|
export type Pricing = z.infer<typeof Schemas.Pricing>;
|
|
3064
3048
|
export type UsdcPnlPool = z.infer<typeof Schemas.UsdcPnlPool>;
|