@0xarchive/sdk 1.3.0 → 1.4.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/README.md CHANGED
@@ -92,11 +92,11 @@ The `depth` parameter controls how many price levels are returned per side. Tier
92
92
  | Tier | Max Depth |
93
93
  |------|-----------|
94
94
  | Free | 20 |
95
- | Build | 50 |
96
- | Pro | 100 |
95
+ | Build | 200 |
96
+ | Pro | Full Depth |
97
97
  | Enterprise | Full Depth |
98
98
 
99
- **Note:** Hyperliquid source data only contains 20 levels. Higher limits apply to Lighter.xyz data.
99
+ **Note:** Hyperliquid L2 source data contains 20 levels. Full-depth L2 (derived from L4) and Lighter.xyz provide full depth on Pro+. Depth limits apply to L2 snapshot endpoints only — L4 and L2 diff endpoints return full data.
100
100
 
101
101
  #### Lighter Orderbook Granularity
102
102
 
package/dist/index.d.mts CHANGED
@@ -132,6 +132,18 @@ interface Trade {
132
132
  makerAddress?: string;
133
133
  /** Taker's wallet address (for market-level WebSocket trades) */
134
134
  takerAddress?: string;
135
+ /** Builder address that routed this order. Present only when the order was placed through a builder. */
136
+ builderAddress?: string;
137
+ /** Builder fee charged on this fill, paid to the builder (in quote currency, typically USDC). Present only when builderAddress is set. */
138
+ builderFee?: string;
139
+ /** HIP-3 deployer fee share on this fill (in quote currency). Negative for the maker side (rebate), positive for the taker side. Present only on HIP-3 fills. */
140
+ deployerFee?: string;
141
+ /** Priority fee burned in HYPE (not USDC) for write priority on the Hyperliquid validator queue. Independent of builderFee and deployerFee — paid to the network, not to a builder or deployer. Present only when the order paid for priority. */
142
+ priorityGas?: number;
143
+ /** Client order ID */
144
+ cloid?: string;
145
+ /** TWAP execution ID */
146
+ twapId?: number;
135
147
  }
136
148
  /**
137
149
  * Cursor-based pagination parameters (recommended)
@@ -3334,6 +3346,12 @@ declare const TradeSchema: z.ZodObject<{
3334
3346
  userAddress: z.ZodOptional<z.ZodString>;
3335
3347
  makerAddress: z.ZodOptional<z.ZodString>;
3336
3348
  takerAddress: z.ZodOptional<z.ZodString>;
3349
+ builderAddress: z.ZodOptional<z.ZodString>;
3350
+ builderFee: z.ZodOptional<z.ZodString>;
3351
+ deployerFee: z.ZodOptional<z.ZodString>;
3352
+ priorityGas: z.ZodOptional<z.ZodNumber>;
3353
+ cloid: z.ZodOptional<z.ZodString>;
3354
+ twapId: z.ZodOptional<z.ZodNumber>;
3337
3355
  }, "strip", z.ZodTypeAny, {
3338
3356
  coin: string;
3339
3357
  timestamp: string;
@@ -3352,6 +3370,12 @@ declare const TradeSchema: z.ZodObject<{
3352
3370
  userAddress?: string | undefined;
3353
3371
  makerAddress?: string | undefined;
3354
3372
  takerAddress?: string | undefined;
3373
+ builderAddress?: string | undefined;
3374
+ builderFee?: string | undefined;
3375
+ deployerFee?: string | undefined;
3376
+ priorityGas?: number | undefined;
3377
+ cloid?: string | undefined;
3378
+ twapId?: number | undefined;
3355
3379
  }, {
3356
3380
  coin: string;
3357
3381
  timestamp: string;
@@ -3370,6 +3394,12 @@ declare const TradeSchema: z.ZodObject<{
3370
3394
  userAddress?: string | undefined;
3371
3395
  makerAddress?: string | undefined;
3372
3396
  takerAddress?: string | undefined;
3397
+ builderAddress?: string | undefined;
3398
+ builderFee?: string | undefined;
3399
+ deployerFee?: string | undefined;
3400
+ priorityGas?: number | undefined;
3401
+ cloid?: string | undefined;
3402
+ twapId?: number | undefined;
3373
3403
  }>;
3374
3404
  declare const InstrumentTypeSchema: z.ZodEnum<["perp", "spot"]>;
3375
3405
  declare const InstrumentSchema: z.ZodObject<{
@@ -4284,6 +4314,12 @@ declare const TradeArrayResponseSchema: z.ZodObject<{
4284
4314
  userAddress: z.ZodOptional<z.ZodString>;
4285
4315
  makerAddress: z.ZodOptional<z.ZodString>;
4286
4316
  takerAddress: z.ZodOptional<z.ZodString>;
4317
+ builderAddress: z.ZodOptional<z.ZodString>;
4318
+ builderFee: z.ZodOptional<z.ZodString>;
4319
+ deployerFee: z.ZodOptional<z.ZodString>;
4320
+ priorityGas: z.ZodOptional<z.ZodNumber>;
4321
+ cloid: z.ZodOptional<z.ZodString>;
4322
+ twapId: z.ZodOptional<z.ZodNumber>;
4287
4323
  }, "strip", z.ZodTypeAny, {
4288
4324
  coin: string;
4289
4325
  timestamp: string;
@@ -4302,6 +4338,12 @@ declare const TradeArrayResponseSchema: z.ZodObject<{
4302
4338
  userAddress?: string | undefined;
4303
4339
  makerAddress?: string | undefined;
4304
4340
  takerAddress?: string | undefined;
4341
+ builderAddress?: string | undefined;
4342
+ builderFee?: string | undefined;
4343
+ deployerFee?: string | undefined;
4344
+ priorityGas?: number | undefined;
4345
+ cloid?: string | undefined;
4346
+ twapId?: number | undefined;
4305
4347
  }, {
4306
4348
  coin: string;
4307
4349
  timestamp: string;
@@ -4320,6 +4362,12 @@ declare const TradeArrayResponseSchema: z.ZodObject<{
4320
4362
  userAddress?: string | undefined;
4321
4363
  makerAddress?: string | undefined;
4322
4364
  takerAddress?: string | undefined;
4365
+ builderAddress?: string | undefined;
4366
+ builderFee?: string | undefined;
4367
+ deployerFee?: string | undefined;
4368
+ priorityGas?: number | undefined;
4369
+ cloid?: string | undefined;
4370
+ twapId?: number | undefined;
4323
4371
  }>, "many">;
4324
4372
  meta: z.ZodObject<{
4325
4373
  count: z.ZodNumber;
@@ -4353,6 +4401,12 @@ declare const TradeArrayResponseSchema: z.ZodObject<{
4353
4401
  userAddress?: string | undefined;
4354
4402
  makerAddress?: string | undefined;
4355
4403
  takerAddress?: string | undefined;
4404
+ builderAddress?: string | undefined;
4405
+ builderFee?: string | undefined;
4406
+ deployerFee?: string | undefined;
4407
+ priorityGas?: number | undefined;
4408
+ cloid?: string | undefined;
4409
+ twapId?: number | undefined;
4356
4410
  }[];
4357
4411
  success: boolean;
4358
4412
  meta: {
@@ -4379,6 +4433,12 @@ declare const TradeArrayResponseSchema: z.ZodObject<{
4379
4433
  userAddress?: string | undefined;
4380
4434
  makerAddress?: string | undefined;
4381
4435
  takerAddress?: string | undefined;
4436
+ builderAddress?: string | undefined;
4437
+ builderFee?: string | undefined;
4438
+ deployerFee?: string | undefined;
4439
+ priorityGas?: number | undefined;
4440
+ cloid?: string | undefined;
4441
+ twapId?: number | undefined;
4382
4442
  }[];
4383
4443
  success: boolean;
4384
4444
  meta: {
package/dist/index.d.ts CHANGED
@@ -132,6 +132,18 @@ interface Trade {
132
132
  makerAddress?: string;
133
133
  /** Taker's wallet address (for market-level WebSocket trades) */
134
134
  takerAddress?: string;
135
+ /** Builder address that routed this order. Present only when the order was placed through a builder. */
136
+ builderAddress?: string;
137
+ /** Builder fee charged on this fill, paid to the builder (in quote currency, typically USDC). Present only when builderAddress is set. */
138
+ builderFee?: string;
139
+ /** HIP-3 deployer fee share on this fill (in quote currency). Negative for the maker side (rebate), positive for the taker side. Present only on HIP-3 fills. */
140
+ deployerFee?: string;
141
+ /** Priority fee burned in HYPE (not USDC) for write priority on the Hyperliquid validator queue. Independent of builderFee and deployerFee — paid to the network, not to a builder or deployer. Present only when the order paid for priority. */
142
+ priorityGas?: number;
143
+ /** Client order ID */
144
+ cloid?: string;
145
+ /** TWAP execution ID */
146
+ twapId?: number;
135
147
  }
136
148
  /**
137
149
  * Cursor-based pagination parameters (recommended)
@@ -3334,6 +3346,12 @@ declare const TradeSchema: z.ZodObject<{
3334
3346
  userAddress: z.ZodOptional<z.ZodString>;
3335
3347
  makerAddress: z.ZodOptional<z.ZodString>;
3336
3348
  takerAddress: z.ZodOptional<z.ZodString>;
3349
+ builderAddress: z.ZodOptional<z.ZodString>;
3350
+ builderFee: z.ZodOptional<z.ZodString>;
3351
+ deployerFee: z.ZodOptional<z.ZodString>;
3352
+ priorityGas: z.ZodOptional<z.ZodNumber>;
3353
+ cloid: z.ZodOptional<z.ZodString>;
3354
+ twapId: z.ZodOptional<z.ZodNumber>;
3337
3355
  }, "strip", z.ZodTypeAny, {
3338
3356
  coin: string;
3339
3357
  timestamp: string;
@@ -3352,6 +3370,12 @@ declare const TradeSchema: z.ZodObject<{
3352
3370
  userAddress?: string | undefined;
3353
3371
  makerAddress?: string | undefined;
3354
3372
  takerAddress?: string | undefined;
3373
+ builderAddress?: string | undefined;
3374
+ builderFee?: string | undefined;
3375
+ deployerFee?: string | undefined;
3376
+ priorityGas?: number | undefined;
3377
+ cloid?: string | undefined;
3378
+ twapId?: number | undefined;
3355
3379
  }, {
3356
3380
  coin: string;
3357
3381
  timestamp: string;
@@ -3370,6 +3394,12 @@ declare const TradeSchema: z.ZodObject<{
3370
3394
  userAddress?: string | undefined;
3371
3395
  makerAddress?: string | undefined;
3372
3396
  takerAddress?: string | undefined;
3397
+ builderAddress?: string | undefined;
3398
+ builderFee?: string | undefined;
3399
+ deployerFee?: string | undefined;
3400
+ priorityGas?: number | undefined;
3401
+ cloid?: string | undefined;
3402
+ twapId?: number | undefined;
3373
3403
  }>;
3374
3404
  declare const InstrumentTypeSchema: z.ZodEnum<["perp", "spot"]>;
3375
3405
  declare const InstrumentSchema: z.ZodObject<{
@@ -4284,6 +4314,12 @@ declare const TradeArrayResponseSchema: z.ZodObject<{
4284
4314
  userAddress: z.ZodOptional<z.ZodString>;
4285
4315
  makerAddress: z.ZodOptional<z.ZodString>;
4286
4316
  takerAddress: z.ZodOptional<z.ZodString>;
4317
+ builderAddress: z.ZodOptional<z.ZodString>;
4318
+ builderFee: z.ZodOptional<z.ZodString>;
4319
+ deployerFee: z.ZodOptional<z.ZodString>;
4320
+ priorityGas: z.ZodOptional<z.ZodNumber>;
4321
+ cloid: z.ZodOptional<z.ZodString>;
4322
+ twapId: z.ZodOptional<z.ZodNumber>;
4287
4323
  }, "strip", z.ZodTypeAny, {
4288
4324
  coin: string;
4289
4325
  timestamp: string;
@@ -4302,6 +4338,12 @@ declare const TradeArrayResponseSchema: z.ZodObject<{
4302
4338
  userAddress?: string | undefined;
4303
4339
  makerAddress?: string | undefined;
4304
4340
  takerAddress?: string | undefined;
4341
+ builderAddress?: string | undefined;
4342
+ builderFee?: string | undefined;
4343
+ deployerFee?: string | undefined;
4344
+ priorityGas?: number | undefined;
4345
+ cloid?: string | undefined;
4346
+ twapId?: number | undefined;
4305
4347
  }, {
4306
4348
  coin: string;
4307
4349
  timestamp: string;
@@ -4320,6 +4362,12 @@ declare const TradeArrayResponseSchema: z.ZodObject<{
4320
4362
  userAddress?: string | undefined;
4321
4363
  makerAddress?: string | undefined;
4322
4364
  takerAddress?: string | undefined;
4365
+ builderAddress?: string | undefined;
4366
+ builderFee?: string | undefined;
4367
+ deployerFee?: string | undefined;
4368
+ priorityGas?: number | undefined;
4369
+ cloid?: string | undefined;
4370
+ twapId?: number | undefined;
4323
4371
  }>, "many">;
4324
4372
  meta: z.ZodObject<{
4325
4373
  count: z.ZodNumber;
@@ -4353,6 +4401,12 @@ declare const TradeArrayResponseSchema: z.ZodObject<{
4353
4401
  userAddress?: string | undefined;
4354
4402
  makerAddress?: string | undefined;
4355
4403
  takerAddress?: string | undefined;
4404
+ builderAddress?: string | undefined;
4405
+ builderFee?: string | undefined;
4406
+ deployerFee?: string | undefined;
4407
+ priorityGas?: number | undefined;
4408
+ cloid?: string | undefined;
4409
+ twapId?: number | undefined;
4356
4410
  }[];
4357
4411
  success: boolean;
4358
4412
  meta: {
@@ -4379,6 +4433,12 @@ declare const TradeArrayResponseSchema: z.ZodObject<{
4379
4433
  userAddress?: string | undefined;
4380
4434
  makerAddress?: string | undefined;
4381
4435
  takerAddress?: string | undefined;
4436
+ builderAddress?: string | undefined;
4437
+ builderFee?: string | undefined;
4438
+ deployerFee?: string | undefined;
4439
+ priorityGas?: number | undefined;
4440
+ cloid?: string | undefined;
4441
+ twapId?: number | undefined;
4382
4442
  }[];
4383
4443
  success: boolean;
4384
4444
  meta: {
package/dist/index.js CHANGED
@@ -323,7 +323,13 @@ var TradeSchema = import_zod.z.object({
323
323
  startPosition: import_zod.z.string().optional(),
324
324
  userAddress: import_zod.z.string().optional(),
325
325
  makerAddress: import_zod.z.string().optional(),
326
- takerAddress: import_zod.z.string().optional()
326
+ takerAddress: import_zod.z.string().optional(),
327
+ builderAddress: import_zod.z.string().optional(),
328
+ builderFee: import_zod.z.string().optional(),
329
+ deployerFee: import_zod.z.string().optional(),
330
+ priorityGas: import_zod.z.number().optional(),
331
+ cloid: import_zod.z.string().optional(),
332
+ twapId: import_zod.z.number().optional()
327
333
  });
328
334
  var InstrumentTypeSchema = import_zod.z.enum(["perp", "spot"]);
329
335
  var InstrumentSchema = import_zod.z.object({