import { Side } from "../../gen/orders/v1/orders_pb.js"; import { SdkScales } from "../../shared/decimal-surface.js"; import * as v from "valibot"; //#region src/services/trades/trades.schemas.d.ts /** Parses a generated user-trade fill into the SDK's JSON-safe public shape. */ declare function createUserTradeSchema(scales: SdkScales): v.SchemaWithPipe; readonly symbolId: v.NumberSchema; readonly side: v.NumberSchema; readonly isMaker: v.BooleanSchema; readonly feeAsset: v.NumberSchema; readonly qtyScaled: v.BigintSchema; readonly priceTicks: v.BigintSchema; readonly feeAmountE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; readonly referralShareAmountE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; readonly feeIsRebate: v.BooleanSchema; readonly tsNs: v.BigintSchema; readonly matchId: v.BigintSchema; readonly lineage: v.OptionalSchema, v.TransformAction]>; readonly generation: v.SchemaWithPipe, v.IntegerAction, v.MinValueAction, v.MaxValueAction]>; }, undefined>, undefined>; }, undefined>, v.TransformAction<{ orderId: bigint; symbolId: number; side: number; isMaker: boolean; feeAsset: number; qtyScaled: bigint; priceTicks: bigint; feeAmountE18?: { hi: bigint; lo: bigint; } | undefined; referralShareAmountE18?: { hi: bigint; lo: bigint; } | undefined; feeIsRebate: boolean; tsNs: bigint; matchId: bigint; lineage?: { id: string; generation: number; } | undefined; }, { lineage?: { id: string; generation: number; } | undefined; feeIsRebate: boolean; tsNs: string; tsIso: string; tsMs: number; matchId: string; referralShare?: string | undefined; orderId: string; symbolId: number; sideLabel: "unspecified" | "buy" | "sell"; liquidityLabel: "maker" | "taker"; feeAsset: "unspecified" | "quote" | "base"; qty: string; price: string; fee: string; }>]>; /** A JSON-safe authenticated trade fill returned by the SDK. */ type Trade = v.InferOutput>; /** Validates filters accepted by {@link TradesService.list}. */ declare const GetUserTradesInputSchema: v.SchemaWithPipe, v.TrimAction, v.TransformAction]>, undefined>, v.TransformAction]>; readonly afterMatchId: v.OptionalSchema, undefined>; readonly side: v.SchemaWithPipe, undefined>, v.TransformAction<"buy" | "sell" | undefined, Side.BUY | Side.SELL | undefined>]>; readonly startTsNs: v.SchemaWithPipe, v.TrimAction]>, undefined>, v.TransformAction]>; readonly endTsNs: v.SchemaWithPipe, v.TrimAction]>, undefined>, v.TransformAction]>; readonly limit: v.OptionalSchema, v.IntegerAction, v.MinValueAction, v.MaxValueAction]>, undefined>; readonly pageToken: v.OptionalSchema, v.TrimAction]>, undefined>; readonly includeTransfers: v.OptionalSchema, undefined>; readonly account: v.OptionalSchema, v.StrictObjectSchema<{ readonly subaccountId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>], undefined>, undefined>; } & { readonly orderId: v.OptionalSchema, undefined>; readonly lineageId: v.OptionalSchema, undefined>; readonly throughGeneration: v.OptionalSchema, undefined>; }, undefined>, v.StrictObjectSchema<{ readonly symbolId: v.SchemaWithPipe, v.TrimAction, v.TransformAction]>, undefined>, v.TransformAction]>; readonly afterMatchId: v.OptionalSchema, undefined>; readonly side: v.SchemaWithPipe, undefined>, v.TransformAction<"buy" | "sell" | undefined, Side.BUY | Side.SELL | undefined>]>; readonly startTsNs: v.SchemaWithPipe, v.TrimAction]>, undefined>, v.TransformAction]>; readonly endTsNs: v.SchemaWithPipe, v.TrimAction]>, undefined>, v.TransformAction]>; readonly limit: v.OptionalSchema, v.IntegerAction, v.MinValueAction, v.MaxValueAction]>, undefined>; readonly pageToken: v.OptionalSchema, v.TrimAction]>, undefined>; readonly includeTransfers: v.OptionalSchema, undefined>; readonly account: v.OptionalSchema, v.StrictObjectSchema<{ readonly subaccountId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>], undefined>, undefined>; } & { readonly orderId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction, v.TransformAction]>, v.CheckAction]>; readonly lineageId: v.OptionalSchema, undefined>; readonly throughGeneration: v.OptionalSchema, undefined>; }, undefined>, v.StrictObjectSchema<{ readonly symbolId: v.SchemaWithPipe, v.TrimAction, v.TransformAction]>, undefined>, v.TransformAction]>; readonly afterMatchId: v.OptionalSchema, undefined>; readonly side: v.SchemaWithPipe, undefined>, v.TransformAction<"buy" | "sell" | undefined, Side.BUY | Side.SELL | undefined>]>; readonly startTsNs: v.SchemaWithPipe, v.TrimAction]>, undefined>, v.TransformAction]>; readonly endTsNs: v.SchemaWithPipe, v.TrimAction]>, undefined>, v.TransformAction]>; readonly limit: v.OptionalSchema, v.IntegerAction, v.MinValueAction, v.MaxValueAction]>, undefined>; readonly pageToken: v.OptionalSchema, v.TrimAction]>, undefined>; readonly includeTransfers: v.OptionalSchema, undefined>; readonly account: v.OptionalSchema, v.StrictObjectSchema<{ readonly subaccountId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>], undefined>, undefined>; } & { readonly orderId: v.OptionalSchema, undefined>; readonly lineageId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction, v.TransformAction]>, v.CheckAction]>; readonly throughGeneration: v.OptionalSchema, v.IntegerAction, v.MinValueAction, v.MaxValueAction]>, undefined>; }, undefined>], undefined>, v.UnionSchema, v.TrimAction, v.TransformAction]>, v.CheckAction]>; readonly afterMatchId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction, v.TransformAction]>; readonly side: v.SchemaWithPipe, undefined>, v.TransformAction<"buy" | "sell" | undefined, Side.BUY | Side.SELL | undefined>]>; readonly startTsNs: v.SchemaWithPipe, v.TrimAction]>, undefined>, v.TransformAction]>; readonly endTsNs: v.SchemaWithPipe, v.TrimAction]>, undefined>, v.TransformAction]>; readonly limit: v.OptionalSchema, v.IntegerAction, v.MinValueAction, v.MaxValueAction]>, undefined>; readonly pageToken: v.OptionalSchema, v.TrimAction]>, undefined>; readonly includeTransfers: v.OptionalSchema, undefined>; readonly account: v.OptionalSchema, v.StrictObjectSchema<{ readonly subaccountId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>], undefined>, undefined>; } & { readonly orderId: v.OptionalSchema, undefined>; readonly lineageId: v.OptionalSchema, undefined>; readonly throughGeneration: v.OptionalSchema, undefined>; }, undefined>, v.StrictObjectSchema<{ readonly symbolId: v.SchemaWithPipe, v.TrimAction, v.TransformAction]>, v.CheckAction]>; readonly afterMatchId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction, v.TransformAction]>; readonly side: v.SchemaWithPipe, undefined>, v.TransformAction<"buy" | "sell" | undefined, Side.BUY | Side.SELL | undefined>]>; readonly startTsNs: v.SchemaWithPipe, v.TrimAction]>, undefined>, v.TransformAction]>; readonly endTsNs: v.SchemaWithPipe, v.TrimAction]>, undefined>, v.TransformAction]>; readonly limit: v.OptionalSchema, v.IntegerAction, v.MinValueAction, v.MaxValueAction]>, undefined>; readonly pageToken: v.OptionalSchema, v.TrimAction]>, undefined>; readonly includeTransfers: v.OptionalSchema, undefined>; readonly account: v.OptionalSchema, v.StrictObjectSchema<{ readonly subaccountId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>], undefined>, undefined>; } & { readonly orderId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction, v.TransformAction]>, v.CheckAction]>; readonly lineageId: v.OptionalSchema, undefined>; readonly throughGeneration: v.OptionalSchema, undefined>; }, undefined>, v.StrictObjectSchema<{ readonly symbolId: v.SchemaWithPipe, v.TrimAction, v.TransformAction]>, v.CheckAction]>; readonly afterMatchId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction, v.TransformAction]>; readonly side: v.SchemaWithPipe, undefined>, v.TransformAction<"buy" | "sell" | undefined, Side.BUY | Side.SELL | undefined>]>; readonly startTsNs: v.SchemaWithPipe, v.TrimAction]>, undefined>, v.TransformAction]>; readonly endTsNs: v.SchemaWithPipe, v.TrimAction]>, undefined>, v.TransformAction]>; readonly limit: v.OptionalSchema, v.IntegerAction, v.MinValueAction, v.MaxValueAction]>, undefined>; readonly pageToken: v.OptionalSchema, v.TrimAction]>, undefined>; readonly includeTransfers: v.OptionalSchema, undefined>; readonly account: v.OptionalSchema, v.StrictObjectSchema<{ readonly subaccountId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>], undefined>, undefined>; } & { readonly orderId: v.OptionalSchema, undefined>; readonly lineageId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction, v.TransformAction]>, v.CheckAction]>; readonly throughGeneration: v.OptionalSchema, v.IntegerAction, v.MinValueAction, v.MaxValueAction]>, undefined>; }, undefined>], undefined>], ({ input }: v.UnionIssue | v.MinValueIssue | v.MaxValueIssue | v.MinLengthIssue | v.CheckIssue | v.StrictObjectIssue | v.PicklistIssue | v.UnionIssue | v.StrictObjectIssue | v.PicklistIssue> | v.MaxValueIssue | v.NeverIssue | v.UnionIssue | v.MinValueIssue | v.MaxValueIssue | v.MinLengthIssue | v.CheckIssue | v.StrictObjectIssue | v.PicklistIssue | v.UnionIssue | v.StrictObjectIssue | v.PicklistIssue> | v.MaxValueIssue | v.NeverIssue> | v.CheckIssue | v.UnionIssue | v.MinValueIssue | v.MaxValueIssue | v.MinLengthIssue | v.CheckIssue | v.StrictObjectIssue | v.PicklistIssue | v.UnionIssue | v.StrictObjectIssue | v.PicklistIssue> | v.MaxValueIssue | v.NeverIssue | v.CheckIssue>>) => "symbolId is required when afterMatchId is set" | "Provide at most one of orderId or lineageId" | "throughGeneration requires lineageId">, v.TransformAction<{ symbolId?: number | undefined; afterMatchId?: undefined; side?: Side.BUY | Side.SELL | undefined; startTsNs?: bigint | undefined; endTsNs?: bigint | undefined; limit?: number | undefined; pageToken?: string | undefined; includeTransfers?: boolean | undefined; account?: "active" | "main" | { subaccountId: string; } | undefined; orderId?: undefined; lineageId?: undefined; throughGeneration?: undefined; } | { symbolId?: number | undefined; afterMatchId?: undefined; side?: Side.BUY | Side.SELL | undefined; startTsNs?: bigint | undefined; endTsNs?: bigint | undefined; limit?: number | undefined; pageToken?: string | undefined; includeTransfers?: boolean | undefined; account?: "active" | "main" | { subaccountId: string; } | undefined; orderId: bigint; lineageId?: undefined; throughGeneration?: undefined; } | { symbolId?: number | undefined; afterMatchId?: undefined; side?: Side.BUY | Side.SELL | undefined; startTsNs?: bigint | undefined; endTsNs?: bigint | undefined; limit?: number | undefined; pageToken?: string | undefined; includeTransfers?: boolean | undefined; account?: "active" | "main" | { subaccountId: string; } | undefined; orderId?: undefined; lineageId: bigint; throughGeneration?: number | undefined; } | { symbolId: number; afterMatchId: bigint | undefined; side?: Side.BUY | Side.SELL | undefined; startTsNs?: bigint | undefined; endTsNs?: bigint | undefined; limit?: number | undefined; pageToken?: string | undefined; includeTransfers?: boolean | undefined; account?: "active" | "main" | { subaccountId: string; } | undefined; orderId?: undefined; lineageId?: undefined; throughGeneration?: undefined; } | { symbolId: number; afterMatchId: bigint | undefined; side?: Side.BUY | Side.SELL | undefined; startTsNs?: bigint | undefined; endTsNs?: bigint | undefined; limit?: number | undefined; pageToken?: string | undefined; includeTransfers?: boolean | undefined; account?: "active" | "main" | { subaccountId: string; } | undefined; orderId: bigint; lineageId?: undefined; throughGeneration?: undefined; } | { symbolId: number; afterMatchId: bigint | undefined; side?: Side.BUY | Side.SELL | undefined; startTsNs?: bigint | undefined; endTsNs?: bigint | undefined; limit?: number | undefined; pageToken?: string | undefined; includeTransfers?: boolean | undefined; account?: "active" | "main" | { subaccountId: string; } | undefined; orderId?: undefined; lineageId: bigint; throughGeneration?: number | undefined; }, { executionScope: { readonly case: "orderId"; readonly value: bigint; } | { readonly case: "lineageId"; readonly value: bigint; } | undefined; subaccountId: bigint | undefined; symbolId?: number | undefined; afterMatchId?: undefined; side?: Side.BUY | Side.SELL | undefined; startTsNs?: bigint | undefined; endTsNs?: bigint | undefined; limit?: number | undefined; pageToken?: string | undefined; includeTransfers?: boolean | undefined; throughGeneration?: undefined; } | { executionScope: { readonly case: "orderId"; readonly value: bigint; } | { readonly case: "lineageId"; readonly value: bigint; } | undefined; subaccountId: bigint | undefined; symbolId?: number | undefined; afterMatchId?: undefined; side?: Side.BUY | Side.SELL | undefined; startTsNs?: bigint | undefined; endTsNs?: bigint | undefined; limit?: number | undefined; pageToken?: string | undefined; includeTransfers?: boolean | undefined; throughGeneration?: undefined; } | { executionScope: { readonly case: "orderId"; readonly value: bigint; } | { readonly case: "lineageId"; readonly value: bigint; } | undefined; subaccountId: bigint | undefined; symbolId?: number | undefined; afterMatchId?: undefined; side?: Side.BUY | Side.SELL | undefined; startTsNs?: bigint | undefined; endTsNs?: bigint | undefined; limit?: number | undefined; pageToken?: string | undefined; includeTransfers?: boolean | undefined; throughGeneration?: number | undefined; } | { executionScope: { readonly case: "orderId"; readonly value: bigint; } | { readonly case: "lineageId"; readonly value: bigint; } | undefined; subaccountId: bigint | undefined; symbolId: number; afterMatchId: bigint | undefined; side?: Side.BUY | Side.SELL | undefined; startTsNs?: bigint | undefined; endTsNs?: bigint | undefined; limit?: number | undefined; pageToken?: string | undefined; includeTransfers?: boolean | undefined; throughGeneration?: undefined; } | { executionScope: { readonly case: "orderId"; readonly value: bigint; } | { readonly case: "lineageId"; readonly value: bigint; } | undefined; subaccountId: bigint | undefined; symbolId: number; afterMatchId: bigint | undefined; side?: Side.BUY | Side.SELL | undefined; startTsNs?: bigint | undefined; endTsNs?: bigint | undefined; limit?: number | undefined; pageToken?: string | undefined; includeTransfers?: boolean | undefined; throughGeneration?: undefined; } | { executionScope: { readonly case: "orderId"; readonly value: bigint; } | { readonly case: "lineageId"; readonly value: bigint; } | undefined; subaccountId: bigint | undefined; symbolId: number; afterMatchId: bigint | undefined; side?: Side.BUY | Side.SELL | undefined; startTsNs?: bigint | undefined; endTsNs?: bigint | undefined; limit?: number | undefined; pageToken?: string | undefined; includeTransfers?: boolean | undefined; throughGeneration?: number | undefined; }>]>; /** * Filters accepted by {@link TradesService.list}. Passing `afterMatchId` requires * `symbolId`, and `throughGeneration` requires `lineageId`; the shapes form a discriminated * union so both constraints are compile errors. */ type GetUserTradesInput = v.InferInput; //#endregion export { GetUserTradesInput, GetUserTradesInputSchema, Trade, createUserTradeSchema }; //# sourceMappingURL=trades.schemas.d.ts.map