@bulletxyz/bullet-sdk 0.25.2 → 0.25.3-rc.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/dist/types/exchange.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { BaseConnection } from "./connection";
|
|
|
2
2
|
import { type Endpoints } from "./constants";
|
|
3
3
|
import type { Orderbook } from "./orderbook";
|
|
4
4
|
import type { Address, Market, Network } from "./types";
|
|
5
|
-
import { type AccountAddresses, type AssetRegistry, type BorrowLendMarkets, type MarginConfig, type MarketRegistry, type OraclePrices, type Order, type OrderbookL2, type PerpMarket, type PerpPrices, type TpslOrderIdsToExecute, type UsdcInsuranceFund, type UsdcPnlPool, type UserAccount } from "./zod-types/rest";
|
|
5
|
+
import { type AccountAddresses, type AssetRegistry, type BorrowLendMarkets, type GlobalParameters, type MarginConfig, type MarketRegistry, type OraclePrices, type Order, type OrderbookL2, type PerpMarket, type PerpPrices, type TpslOrderIdsToExecute, type UsdcInsuranceFund, type UsdcPnlPool, type UserAccount } from "./zod-types/rest";
|
|
6
6
|
export declare class ExchangeConnection extends BaseConnection {
|
|
7
7
|
private wsManager?;
|
|
8
8
|
private constructor();
|
|
@@ -26,6 +26,7 @@ export declare class ExchangeConnection extends BaseConnection {
|
|
|
26
26
|
getPerpMarkets(markets: Market[]): Promise<Map<Market, PerpMarket>>;
|
|
27
27
|
getMarginConfig(): Promise<MarginConfig | null>;
|
|
28
28
|
getTpslOrderIdsToExecute(market: Market): Promise<TpslOrderIdsToExecute | null>;
|
|
29
|
+
getGlobalParameters(): Promise<GlobalParameters | null>;
|
|
29
30
|
private getWebSocketManager;
|
|
30
31
|
subscribeOrderbook(marketId: Market): AsyncIterable<Orderbook>;
|
|
31
32
|
unsubscribeOrderbook(marketId: Market): Promise<void>;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1370,6 +1370,28 @@ export declare const Schemas: {
|
|
|
1370
1370
|
last_update_timestamp: bigint | null;
|
|
1371
1371
|
}>;
|
|
1372
1372
|
}>;
|
|
1373
|
+
readonly GlobalParameters: z.ZodObject<{
|
|
1374
|
+
max_tpsl_orders_per_user: z.ZodBigInt;
|
|
1375
|
+
max_orders_per_batch_msg: z.ZodBigInt;
|
|
1376
|
+
max_tpsls_to_execute_per_msg: z.ZodBigInt;
|
|
1377
|
+
max_order_price_deviation_from_mark_price: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>;
|
|
1378
|
+
max_tpsl_price_deviation_from_mark_price: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>;
|
|
1379
|
+
max_tpsl_price_deviation_between_order_and_trigger: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>;
|
|
1380
|
+
}, "strip", z.ZodTypeAny, {
|
|
1381
|
+
max_tpsl_orders_per_user: bigint;
|
|
1382
|
+
max_orders_per_batch_msg: bigint;
|
|
1383
|
+
max_tpsls_to_execute_per_msg: bigint;
|
|
1384
|
+
max_order_price_deviation_from_mark_price: import("decimal.js").Decimal;
|
|
1385
|
+
max_tpsl_price_deviation_from_mark_price: import("decimal.js").Decimal;
|
|
1386
|
+
max_tpsl_price_deviation_between_order_and_trigger: import("decimal.js").Decimal;
|
|
1387
|
+
}, {
|
|
1388
|
+
max_tpsl_orders_per_user: bigint;
|
|
1389
|
+
max_orders_per_batch_msg: bigint;
|
|
1390
|
+
max_tpsls_to_execute_per_msg: bigint;
|
|
1391
|
+
max_order_price_deviation_from_mark_price: string | number;
|
|
1392
|
+
max_tpsl_price_deviation_from_mark_price: string | number;
|
|
1393
|
+
max_tpsl_price_deviation_between_order_and_trigger: string | number;
|
|
1394
|
+
}>;
|
|
1373
1395
|
readonly BorrowLendMarkets: z.ZodNullable<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1374
1396
|
asset_id: z.ZodNumber;
|
|
1375
1397
|
is_active: z.ZodBoolean;
|
|
@@ -2315,6 +2337,75 @@ export declare const ResponseSchemas: {
|
|
|
2315
2337
|
};
|
|
2316
2338
|
meta: Record<string, unknown> | null;
|
|
2317
2339
|
}>;
|
|
2340
|
+
readonly GlobalParameters: z.ZodObject<{
|
|
2341
|
+
data: z.ZodObject<{
|
|
2342
|
+
value: z.ZodNullable<z.ZodObject<{
|
|
2343
|
+
max_tpsl_orders_per_user: z.ZodBigInt;
|
|
2344
|
+
max_orders_per_batch_msg: z.ZodBigInt;
|
|
2345
|
+
max_tpsls_to_execute_per_msg: z.ZodBigInt;
|
|
2346
|
+
max_order_price_deviation_from_mark_price: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>;
|
|
2347
|
+
max_tpsl_price_deviation_from_mark_price: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>;
|
|
2348
|
+
max_tpsl_price_deviation_between_order_and_trigger: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>;
|
|
2349
|
+
}, "strip", z.ZodTypeAny, {
|
|
2350
|
+
max_tpsl_orders_per_user: bigint;
|
|
2351
|
+
max_orders_per_batch_msg: bigint;
|
|
2352
|
+
max_tpsls_to_execute_per_msg: bigint;
|
|
2353
|
+
max_order_price_deviation_from_mark_price: import("decimal.js").Decimal;
|
|
2354
|
+
max_tpsl_price_deviation_from_mark_price: import("decimal.js").Decimal;
|
|
2355
|
+
max_tpsl_price_deviation_between_order_and_trigger: import("decimal.js").Decimal;
|
|
2356
|
+
}, {
|
|
2357
|
+
max_tpsl_orders_per_user: bigint;
|
|
2358
|
+
max_orders_per_batch_msg: bigint;
|
|
2359
|
+
max_tpsls_to_execute_per_msg: bigint;
|
|
2360
|
+
max_order_price_deviation_from_mark_price: string | number;
|
|
2361
|
+
max_tpsl_price_deviation_from_mark_price: string | number;
|
|
2362
|
+
max_tpsl_price_deviation_between_order_and_trigger: string | number;
|
|
2363
|
+
}>>;
|
|
2364
|
+
}, "strip", z.ZodTypeAny, {
|
|
2365
|
+
value: {
|
|
2366
|
+
max_tpsl_orders_per_user: bigint;
|
|
2367
|
+
max_orders_per_batch_msg: bigint;
|
|
2368
|
+
max_tpsls_to_execute_per_msg: bigint;
|
|
2369
|
+
max_order_price_deviation_from_mark_price: import("decimal.js").Decimal;
|
|
2370
|
+
max_tpsl_price_deviation_from_mark_price: import("decimal.js").Decimal;
|
|
2371
|
+
max_tpsl_price_deviation_between_order_and_trigger: import("decimal.js").Decimal;
|
|
2372
|
+
} | null;
|
|
2373
|
+
}, {
|
|
2374
|
+
value: {
|
|
2375
|
+
max_tpsl_orders_per_user: bigint;
|
|
2376
|
+
max_orders_per_batch_msg: bigint;
|
|
2377
|
+
max_tpsls_to_execute_per_msg: bigint;
|
|
2378
|
+
max_order_price_deviation_from_mark_price: string | number;
|
|
2379
|
+
max_tpsl_price_deviation_from_mark_price: string | number;
|
|
2380
|
+
max_tpsl_price_deviation_between_order_and_trigger: string | number;
|
|
2381
|
+
} | null;
|
|
2382
|
+
}>;
|
|
2383
|
+
meta: z.ZodNullable<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnknown>, Map<unknown, unknown>, Record<string, unknown>>>;
|
|
2384
|
+
}, "strip", z.ZodTypeAny, {
|
|
2385
|
+
data: {
|
|
2386
|
+
value: {
|
|
2387
|
+
max_tpsl_orders_per_user: bigint;
|
|
2388
|
+
max_orders_per_batch_msg: bigint;
|
|
2389
|
+
max_tpsls_to_execute_per_msg: bigint;
|
|
2390
|
+
max_order_price_deviation_from_mark_price: import("decimal.js").Decimal;
|
|
2391
|
+
max_tpsl_price_deviation_from_mark_price: import("decimal.js").Decimal;
|
|
2392
|
+
max_tpsl_price_deviation_between_order_and_trigger: import("decimal.js").Decimal;
|
|
2393
|
+
} | null;
|
|
2394
|
+
};
|
|
2395
|
+
meta: Map<unknown, unknown> | null;
|
|
2396
|
+
}, {
|
|
2397
|
+
data: {
|
|
2398
|
+
value: {
|
|
2399
|
+
max_tpsl_orders_per_user: bigint;
|
|
2400
|
+
max_orders_per_batch_msg: bigint;
|
|
2401
|
+
max_tpsls_to_execute_per_msg: bigint;
|
|
2402
|
+
max_order_price_deviation_from_mark_price: string | number;
|
|
2403
|
+
max_tpsl_price_deviation_from_mark_price: string | number;
|
|
2404
|
+
max_tpsl_price_deviation_between_order_and_trigger: string | number;
|
|
2405
|
+
} | null;
|
|
2406
|
+
};
|
|
2407
|
+
meta: Record<string, unknown> | null;
|
|
2408
|
+
}>;
|
|
2318
2409
|
readonly OraclePrices: z.ZodObject<{
|
|
2319
2410
|
data: z.ZodObject<{
|
|
2320
2411
|
value: z.ZodNullable<z.ZodObject<{
|
|
@@ -6141,6 +6232,7 @@ export type MarketRegistry = z.infer<typeof Schemas.MarketRegistry>;
|
|
|
6141
6232
|
export type BorrowLendMarkets = z.infer<typeof Schemas.BorrowLendMarkets>;
|
|
6142
6233
|
export type PerpMarket = z.infer<typeof Schemas.PerpMarket>;
|
|
6143
6234
|
export type MarginConfig = z.infer<typeof Schemas.MarginConfig>;
|
|
6235
|
+
export type GlobalParameters = z.infer<typeof Schemas.GlobalParameters>;
|
|
6144
6236
|
export type Tpsl = z.infer<typeof Tpsl>;
|
|
6145
6237
|
export type AccountAddresses = z.infer<typeof Schemas.AccountAddresses>;
|
|
6146
6238
|
export type BorrowLendRiskConfig = z.infer<typeof BorrowLendRiskConfig>;
|