diff --git a/src/api/info/_methods/_base/_schemas.ts b/src/api/info/_methods/_base/_schemas.ts index c9716751..11c05588 100644 --- a/src/api/info/_methods/_base/_schemas.ts +++ b/src/api/info/_methods/_base/_schemas.ts @@ -348,6 +348,11 @@ export type UserFill = { tid: number; /** Token in which the fee is denominated (e.g., USDC). */ feeToken: string; + /** + * Fee trial escrow amount. + * @pattern ^[0-9]+(\.[0-9]+)?$ + */ + feeTrialEscrow?: string; /** ID of the TWAP. */ twapId: number | null; }; diff --git a/src/api/info/_methods/userFills.ts b/src/api/info/_methods/userFills.ts index 81a2bd91..fbfd01a1 100644 --- a/src/api/info/_methods/userFills.ts +++ b/src/api/info/_methods/userFills.ts @@ -39,7 +39,7 @@ export type UserFillsResponse = (UserFill & { * Address of the liquidated user. * @pattern ^0x[a-fA-F0-9]{40}$ */ - liquidatedUser: `0x${string}`; + liquidatedUser?: `0x${string}`; /** * Mark price at the time of liquidation. * @pattern ^[0-9]+(\.[0-9]+)?$ diff --git a/tests/api/info/userFills.test.ts b/tests/api/info/userFills.test.ts index 7caacbf4..538a9d74 100644 --- a/tests/api/info/userFills.test.ts +++ b/tests/api/info/userFills.test.ts @@ -16,6 +16,7 @@ runTest({ { user: "0x563C175E6f11582f65D6d9E360A618699DEe14a9" }, { user: "0x8172cc20bc3a55dcd07c75dd37ac0c2534de3b84", aggregateByTime: true }, { user: "0x563C175E6f11582f65D6d9E360A618699DEe14a9", aggregateByTime: false }, + { user: "0xd8cb8d9747f50be8e423c698f9104ee090540961" }, // feeTrialEscrow present ]; const data = await Promise.all(params.map((p) => client.userFills(p))); @@ -23,6 +24,7 @@ runTest({ schemaCoverage(paramsSchema, params); schemaCoverage(responseSchema, data, [ "#/items/properties/twapId/defined", + "#/items/properties/liquidation/properties/liquidatedUser/missing", ]); }, }); diff --git a/tests/api/info/userFillsByTime.test.ts b/tests/api/info/userFillsByTime.test.ts index 2445e96a..fb195818 100644 --- a/tests/api/info/userFillsByTime.test.ts +++ b/tests/api/info/userFillsByTime.test.ts @@ -23,6 +23,8 @@ runTest({ { user: "0x563C175E6f11582f65D6d9E360A618699DEe14a9", startTime: now - fiveYears, aggregateByTime: false }, { user: "0x563C175E6f11582f65D6d9E360A618699DEe14a9", startTime: now - fiveYears, reversed: true }, { user: "0x563C175E6f11582f65D6d9E360A618699DEe14a9", startTime: now - fiveYears, reversed: false }, + { user: "0xd8cb8d9747f50be8e423c698f9104ee090540961", startTime: now - fiveYears }, // liquidation without liquidatedUser + { user: "0xd8cb8d9747f50be8e423c698f9104ee090540961", startTime: now - fiveYears, reversed: true }, // feeTrialEscrow present ]; const data = await Promise.all(params.map((p) => client.userFillsByTime(p))); diff --git a/tests/api/info/userTwapSliceFills.test.ts b/tests/api/info/userTwapSliceFills.test.ts index e87c91b2..b10d30c5 100644 --- a/tests/api/info/userTwapSliceFills.test.ts +++ b/tests/api/info/userTwapSliceFills.test.ts @@ -21,6 +21,7 @@ runTest({ schemaCoverage(paramsSchema, params); schemaCoverage(responseSchema, data, [ "#/items/properties/fill/properties/builderFee/present", + "#/items/properties/fill/properties/feeTrialEscrow/present", "#/items/properties/fill/properties/twapId/defined", ]); }, diff --git a/tests/api/info/userTwapSliceFillsByTime.test.ts b/tests/api/info/userTwapSliceFillsByTime.test.ts index 1605dbbd..821da227 100644 --- a/tests/api/info/userTwapSliceFillsByTime.test.ts +++ b/tests/api/info/userTwapSliceFillsByTime.test.ts @@ -25,6 +25,7 @@ runTest({ schemaCoverage(paramsSchema, params); schemaCoverage(responseSchema, data, [ "#/items/properties/fill/properties/builderFee/present", + "#/items/properties/fill/properties/feeTrialEscrow/present", "#/items/properties/fill/properties/twapId/defined", ]); }, diff --git a/tests/api/subscription/userEvents.test.ts b/tests/api/subscription/userEvents.test.ts index 2acd933b..4af8cd87 100644 --- a/tests/api/subscription/userEvents.test.ts +++ b/tests/api/subscription/userEvents.test.ts @@ -44,6 +44,7 @@ runTestWithExchange({ "#/anyOf/4/properties/twapHistory/items/properties/twapId/missing", "#/anyOf/5/properties/twapSliceFills/items/properties/fill/properties/side/enum/1", "#/anyOf/5/properties/twapSliceFills/items/properties/fill/properties/builderFee/present", + "#/anyOf/5/properties/twapSliceFills/items/properties/fill/properties/feeTrialEscrow/present", "#/anyOf/5/properties/twapSliceFills/items/properties/fill/properties/twapId/defined", ]); }, diff --git a/tests/api/subscription/userFills.test.ts b/tests/api/subscription/userFills.test.ts index eb0869b8..5fe26767 100644 --- a/tests/api/subscription/userFills.test.ts +++ b/tests/api/subscription/userFills.test.ts @@ -25,7 +25,9 @@ runTest({ schemaCoverage(paramsSchema, params); schemaCoverage(responseSchema, data, [ "#/properties/fills/items/properties/builderFee/present", + "#/properties/fills/items/properties/feeTrialEscrow/present", "#/properties/fills/items/properties/twapId/defined", + "#/properties/fills/items/properties/liquidation/properties/liquidatedUser/missing", "#/properties/isSnapshot/missing", ]); }, diff --git a/tests/api/subscription/userTwapSliceFills.test.ts b/tests/api/subscription/userTwapSliceFills.test.ts index 0c4ca55b..3aea86dc 100644 --- a/tests/api/subscription/userTwapSliceFills.test.ts +++ b/tests/api/subscription/userTwapSliceFills.test.ts @@ -29,6 +29,7 @@ runTest({ schemaCoverage(paramsSchema, params); schemaCoverage(responseSchema, data, [ "#/properties/twapSliceFills/items/properties/fill/properties/builderFee/present", + "#/properties/twapSliceFills/items/properties/fill/properties/feeTrialEscrow/present", "#/properties/twapSliceFills/items/properties/fill/properties/twapId/defined", "#/properties/isSnapshot/missing", ]);