@polyester/sdk 0.8.0 → 0.9.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.
Files changed (93) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/catalogs/decimal.js +6 -4
  3. package/dist/catalogs/decimal.js.map +1 -1
  4. package/dist/catalogs/readers.js +1 -1
  5. package/dist/gen/auth/v1/policies_pb.d.ts +28 -10
  6. package/dist/gen/auth/v1/policies_pb.d.ts.map +1 -1
  7. package/dist/gen/auth/v1/policies_pb.js +37 -31
  8. package/dist/gen/auth/v1/policies_pb.js.map +1 -1
  9. package/dist/gen/fees/v1/fees_pb.d.ts +0 -6
  10. package/dist/gen/fees/v1/fees_pb.d.ts.map +1 -1
  11. package/dist/gen/fees/v1/fees_pb.js +1 -1
  12. package/dist/gen/fees/v1/fees_pb.js.map +1 -1
  13. package/dist/gen/marketoverview/v1/marketoverview_pb.d.ts +6 -11
  14. package/dist/gen/marketoverview/v1/marketoverview_pb.d.ts.map +1 -1
  15. package/dist/gen/marketoverview/v1/marketoverview_pb.js +1 -1
  16. package/dist/gen/marketoverview/v1/marketoverview_pb.js.map +1 -1
  17. package/dist/gen/orderbook/v1/orderbook_pb.d.ts +3 -3
  18. package/dist/gen/orderbook/v1/orderbook_pb.js +1 -1
  19. package/dist/gen/orderbook/v1/orderbook_pb.js.map +1 -1
  20. package/dist/gen/orders/v1/orders_pb.d.ts +11 -11
  21. package/dist/gen/orders/v1/orders_pb.js +1 -1
  22. package/dist/gen/orders/v1/orders_pb.js.map +1 -1
  23. package/dist/gen/triggers/v1/triggers_pb.d.ts +6 -12
  24. package/dist/gen/triggers/v1/triggers_pb.d.ts.map +1 -1
  25. package/dist/gen/triggers/v1/triggers_pb.js +1 -1
  26. package/dist/gen/triggers/v1/triggers_pb.js.map +1 -1
  27. package/dist/services/fees/fees.schemas.d.ts +2 -3
  28. package/dist/services/fees/fees.schemas.d.ts.map +1 -1
  29. package/dist/services/fees/fees.schemas.js +3 -4
  30. package/dist/services/fees/fees.schemas.js.map +1 -1
  31. package/dist/services/lifecycle/lifecycle.schemas.d.ts +42 -42
  32. package/dist/services/market-data/market-data.schemas.js +1 -1
  33. package/dist/services/market-overview/market-overview.d.ts +1 -1
  34. package/dist/services/market-overview/market-overview.js +1 -1
  35. package/dist/services/market-overview/market-overview.js.map +1 -1
  36. package/dist/services/market-overview/market-overview.schemas.d.ts +20 -7
  37. package/dist/services/market-overview/market-overview.schemas.d.ts.map +1 -1
  38. package/dist/services/market-overview/market-overview.schemas.js +8 -6
  39. package/dist/services/market-overview/market-overview.schemas.js.map +1 -1
  40. package/dist/services/orderbook/orderbook.d.ts +3 -4
  41. package/dist/services/orderbook/orderbook.d.ts.map +1 -1
  42. package/dist/services/orderbook/orderbook.js +13 -10
  43. package/dist/services/orderbook/orderbook.js.map +1 -1
  44. package/dist/services/orderbook/orderbook.schemas.d.ts +8 -9
  45. package/dist/services/orderbook/orderbook.schemas.d.ts.map +1 -1
  46. package/dist/services/orderbook/orderbook.schemas.js +9 -8
  47. package/dist/services/orderbook/orderbook.schemas.js.map +1 -1
  48. package/dist/services/orders/orders-batch.schemas.d.ts +209 -35
  49. package/dist/services/orders/orders-batch.schemas.d.ts.map +1 -1
  50. package/dist/services/orders/orders-batch.schemas.js +11 -9
  51. package/dist/services/orders/orders-batch.schemas.js.map +1 -1
  52. package/dist/services/orders/orders-input.schemas.d.ts +50 -50
  53. package/dist/services/orders/orders-input.schemas.d.ts.map +1 -1
  54. package/dist/services/orders/orders-input.schemas.js +12 -12
  55. package/dist/services/orders/orders-input.schemas.js.map +1 -1
  56. package/dist/services/orders/orders-modify.schemas.d.ts +18 -18
  57. package/dist/services/orders/orders-modify.schemas.js +1 -1
  58. package/dist/services/orders/orders-output.schemas.d.ts +6 -6
  59. package/dist/services/orders/orders-risk.schemas.d.ts +12 -12
  60. package/dist/services/orders/orders-risk.schemas.d.ts.map +1 -1
  61. package/dist/services/orders/orders-risk.schemas.js +8 -7
  62. package/dist/services/orders/orders-risk.schemas.js.map +1 -1
  63. package/dist/services/orders/orders.d.ts +4 -4
  64. package/dist/services/orders/orders.d.ts.map +1 -1
  65. package/dist/services/orders/orders.js +7 -7
  66. package/dist/services/orders/orders.js.map +1 -1
  67. package/dist/services/policies/api-key-policies/api-key-policies.schemas.d.ts +15 -15
  68. package/dist/services/policies/shared.d.ts.map +1 -1
  69. package/dist/services/policies/shared.js +2 -1
  70. package/dist/services/policies/shared.js.map +1 -1
  71. package/dist/services/policies/subaccount-policies/subaccount-policies.schemas.d.ts +9 -9
  72. package/dist/services/shared.js +4 -1
  73. package/dist/services/shared.js.map +1 -1
  74. package/dist/services/subaccounts/subaccounts.schemas.d.ts +1 -1
  75. package/dist/services/trades/trades.schemas.js +1 -1
  76. package/dist/services/trailing-oneof-inputs.js +1 -1
  77. package/dist/services/triggers/trigger-child-order.schemas.js +5 -3
  78. package/dist/services/triggers/trigger-child-order.schemas.js.map +1 -1
  79. package/dist/services/triggers/trigger-input.schemas.d.ts +36 -32
  80. package/dist/services/triggers/trigger-input.schemas.d.ts.map +1 -1
  81. package/dist/services/triggers/trigger-input.schemas.js +8 -8
  82. package/dist/services/triggers/trigger-input.schemas.js.map +1 -1
  83. package/dist/services/triggers/triggers-output.schemas.d.ts +17 -18
  84. package/dist/services/triggers/triggers-output.schemas.d.ts.map +1 -1
  85. package/dist/services/triggers/triggers-output.schemas.js +3 -3
  86. package/dist/services/triggers/triggers-output.schemas.js.map +1 -1
  87. package/dist/services/triggers/triggers.d.ts +2 -2
  88. package/dist/services/triggers/triggers.js +2 -2
  89. package/dist/services/triggers/triggers.js.map +1 -1
  90. package/dist/shared/decimal-surface.d.ts.map +1 -1
  91. package/dist/shared/decimal-surface.js +2 -2
  92. package/dist/shared/decimal-surface.js.map +1 -1
  93. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"orders-batch.schemas.js","names":["ProtoWrite.RiskPolicySchema","ProtoWrite.BatchReplaceItemAdmissionStatus","ProtoWrite.BatchReplaceAdmissionStatus","ProtoRead.BatchReplacePhase","ProtoRead.OrderStatus"],"sources":["../../../src/services/orders/orders-batch.schemas.ts"],"sourcesContent":["import * as ProtoWrite from \"../../gen/orders/v1/orders_pb.js\";\nimport * as ProtoRead from \"../../gen/orders/v1/orders_read_pb.js\";\nimport { create } from \"@bufbuild/protobuf\";\nimport * as v from \"valibot\";\nimport {\n AccountScopeInputEntries,\n accountScopeToSubaccountId,\n} from \"../../shared/account-scope.js\";\nimport { OptionalPublicIdSchema, PublicIdSchema, idInputSchema } from \"../../shared/schemas.js\";\nimport { requiredEnumLabel } from \"../../shared/proto-enum-codec.js\";\nimport { tsNsToMs } from \"../../utils/time.js\";\nimport { formatId } from \"../../utils/base58-id.js\";\nimport { SideSchema } from \"../shared.js\";\nimport {\n positiveDecimalInputToScaled,\n scaledToDecimalOutput,\n type SdkScales,\n} from \"../../shared/decimal-surface.js\";\nimport {\n BatchReplaceAdmissionStatusCodec,\n BatchReplaceItemAdmissionStatusCodec,\n BatchReplacePhaseCodec,\n OrderStatusCodec,\n OrderSideCodec,\n} from \"./orders.codecs.js\";\nimport { createOrderIntentInputSchema } from \"./orders-input.schemas.js\";\nimport { createRequiredRiskPolicyInputSchema } from \"./orders-risk.schemas.js\";\nimport {\n ClientOrderIdInputSchema,\n OrderRequestIdInputSchema,\n} from \"./orders-identifiers.schemas.js\";\nimport { OrderErrorDetailSchema } from \"./order-errors.schemas.js\";\n\nconst BatchCountSchema = v.pipe(v.number(), v.integer(), v.minValue(0));\nconst BatchItemIndexSchema = v.pipe(v.number(), v.integer(), v.minValue(0));\nconst PositivePublicIdSchema = v.pipe(\n v.bigint(),\n v.gtValue(0n),\n v.transform((value) => formatId(value)),\n);\nconst OptionalSymbolInputSchema = v.optional(v.pipe(v.string(), v.trim(), v.maxLength(32)));\nconst OptionalSideInputSchema = v.pipe(\n v.optional(SideSchema),\n v.transform((side) => (side ? OrderSideCodec.inputToProto[side] : undefined)),\n);\n\nconst CancelAllAfterTimeoutInputSchema = v.pipe(\n v.number(),\n v.integer(),\n v.check(\n (timeoutSec) => timeoutSec === 0 || (timeoutSec >= 10 && timeoutSec <= 120),\n \"timeoutSec must be 0 to disable or between 10 and 120 seconds to arm\",\n ),\n);\n\nexport const CancelAllAfterInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n timeoutSec: CancelAllAfterTimeoutInputSchema,\n symbol: OptionalSymbolInputSchema,\n side: OptionalSideInputSchema,\n requestId: v.optional(OrderRequestIdInputSchema),\n }),\n v.transform(({ account, ...input }) => ({\n ...input,\n subaccountId: accountScopeToSubaccountId(account),\n })),\n);\n\nexport type CancelAllAfterInput = v.InferInput<typeof CancelAllAfterInputSchema>;\n\nexport const CancelAllAfterResultSchema = v.pipe(\n v.object({\n status: v.picklist([\"armed\", \"disabled\"]),\n effectiveTimeoutSec: v.pipe(v.number(), v.integer(), v.minValue(0)),\n expiresAtTsNs: v.bigint(),\n tsNs: v.bigint(),\n }),\n v.transform(({ expiresAtTsNs, tsNs, ...result }) => ({\n ...result,\n expiresAt: tsNsToMs(expiresAtTsNs),\n expiresAtNs: expiresAtTsNs.toString(),\n ts: tsNsToMs(tsNs),\n tsNs: tsNs.toString(),\n })),\n);\n\nexport type CancelAllAfterResult = v.InferOutput<typeof CancelAllAfterResultSchema>;\n\nexport function createBatchCreateOrdersInputSchema(scales: SdkScales) {\n return v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n requestId: v.optional(OrderRequestIdInputSchema),\n items: v.pipe(\n v.array(createOrderIntentInputSchema(scales)),\n v.minLength(1, \"At least one order is required.\"),\n v.maxLength(20, \"Batch create accepts at most 20 orders.\"),\n ),\n }),\n v.transform(({ account, ...input }) => ({\n ...input,\n subaccountId: accountScopeToSubaccountId(account),\n })),\n );\n}\n\nexport type BatchCreateOrdersInput = v.InferInput<\n ReturnType<typeof createBatchCreateOrdersInputSchema>\n>;\n\nconst BatchCreateOrderResultRawSchema = v.object({\n clientOrderId: v.string(),\n outcome: v.variant(\"case\", [\n v.object({\n case: v.literal(\"accepted\"),\n value: v.object({\n orderId: PublicIdSchema,\n takeProfitTriggerId: OptionalPublicIdSchema,\n stopLossTriggerId: OptionalPublicIdSchema,\n trailingStopTriggerId: OptionalPublicIdSchema,\n resolvedBaseQtyScaled: v.bigint(),\n submittedMaxQuoteDebitScaled: v.optional(v.bigint()),\n }),\n }),\n v.object({\n case: v.literal(\"rejected\"),\n value: v.object({\n // The server may reject without a structured detail (e.g. capacity\n // limits); surface the rejection instead of failing the parse.\n error: v.optional(OrderErrorDetailSchema),\n }),\n }),\n ]),\n});\n\nexport function createBatchCreateOrdersResultSchema(scales: SdkScales, symbols: string[]) {\n return v.pipe(\n v.object({\n results: v.array(BatchCreateOrderResultRawSchema),\n acceptedCount: BatchCountSchema,\n rejectedCount: BatchCountSchema,\n tsNs: v.bigint(),\n }),\n v.check(\n (response) =>\n response.acceptedCount + response.rejectedCount === response.results.length,\n \"Batch create result counts do not match the returned results.\",\n ),\n v.check(\n (response) => response.results.length === symbols.length,\n \"Batch create result count does not match the submitted item count.\",\n ),\n v.transform(({ tsNs, ...response }) => ({\n ...response,\n results: response.results.map(({ clientOrderId, outcome }, index) => {\n if (outcome.case === \"rejected\") {\n return {\n status: \"rejected\" as const,\n clientOrderId,\n error: outcome.value.error,\n };\n }\n const { resolvedBaseQtyScaled, submittedMaxQuoteDebitScaled, ...accepted } =\n outcome.value;\n const symbol = symbols[index]!;\n return {\n status: \"accepted\" as const,\n clientOrderId,\n ...accepted,\n resolvedBaseQty: scaledToDecimalOutput(\n resolvedBaseQtyScaled,\n scales.baseQty(symbol),\n ),\n ...(submittedMaxQuoteDebitScaled === undefined\n ? {}\n : {\n submittedMaxQuoteDebit: scaledToDecimalOutput(\n submittedMaxQuoteDebitScaled,\n scales.quoteAmount(symbol),\n ),\n }),\n };\n }),\n ts: tsNsToMs(tsNs),\n tsNs: tsNs.toString(),\n })),\n );\n}\n\nexport type BatchCreateOrdersResult = v.InferOutput<\n ReturnType<typeof createBatchCreateOrdersResultSchema>\n>;\nexport type BatchCreateOrderResult = BatchCreateOrdersResult[\"results\"][number];\n\nconst DecimalInputStringSchema = v.pipe(v.string(), v.trim(), v.minLength(1));\nconst BATCH_REPLACE_ITEM_INPUT_KEYS = new Set([\n \"orderId\",\n \"clientOrderId\",\n \"newPrice\",\n \"newQty\",\n \"risk\",\n \"clearRisk\",\n \"newClientOrderId\",\n]);\n\nexport function assertKnownBatchReplaceOrderItemInputKeys(input: object): void {\n for (const key of Object.keys(input)) {\n if (!BATCH_REPLACE_ITEM_INPUT_KEYS.has(key)) {\n throw new Error(`Unknown key \"${key}\" in batch replace order item.`);\n }\n }\n}\n\nconst BatchReplaceTargetInputSchema = v.union([\n v.pipe(\n v.object({\n orderId: v.pipe(\n idInputSchema(\"items.orderId\"),\n v.check((value) => value > 0n, \"items.orderId must be greater than zero\"),\n ),\n clientOrderId: v.optional(v.never()),\n }),\n v.transform(({ orderId }) => ({\n key: { case: \"orderId\" as const, value: orderId },\n })),\n ),\n v.pipe(\n v.object({\n orderId: v.optional(v.never()),\n clientOrderId: ClientOrderIdInputSchema,\n }),\n v.transform(({ clientOrderId }) => ({\n key: { case: \"clientOrderId\" as const, value: clientOrderId },\n })),\n ),\n]);\n\nfunction createBatchReplaceOrderItemInputSchema(scales: SdkScales, symbolId: number) {\n const patchSchema = v.union([\n v.object({\n newPrice: DecimalInputStringSchema,\n newQty: v.optional(DecimalInputStringSchema),\n risk: v.optional(createRequiredRiskPolicyInputSchema(scales)),\n clearRisk: v.optional(v.literal(false)),\n }),\n v.object({\n newPrice: v.optional(DecimalInputStringSchema),\n newQty: DecimalInputStringSchema,\n risk: v.optional(createRequiredRiskPolicyInputSchema(scales)),\n clearRisk: v.optional(v.literal(false)),\n }),\n v.object({\n newPrice: v.optional(v.never()),\n newQty: v.optional(v.never()),\n risk: createRequiredRiskPolicyInputSchema(scales),\n clearRisk: v.optional(v.literal(false)),\n }),\n v.object({\n newPrice: v.optional(v.never()),\n newQty: v.optional(v.never()),\n risk: v.optional(v.never()),\n clearRisk: v.literal(true),\n }),\n ]);\n return v.pipe(\n v.intersect([\n BatchReplaceTargetInputSchema,\n patchSchema,\n v.object({\n newClientOrderId: v.optional(ClientOrderIdInputSchema),\n }),\n ]),\n v.transform((input) => ({\n key: input.key,\n newPriceTicks:\n input.newPrice === undefined\n ? undefined\n : positiveDecimalInputToScaled(\n \"items.newPrice\",\n input.newPrice,\n scales.price(),\n ),\n newQtyScaled:\n input.newQty === undefined\n ? undefined\n : positiveDecimalInputToScaled(\n \"items.newQty\",\n input.newQty,\n scales.baseQty(symbolId),\n ),\n newAttachedRisk:\n input.clearRisk === true ? create(ProtoWrite.RiskPolicySchema) : input.risk,\n newClientOrderId: input.newClientOrderId ?? \"\",\n })),\n );\n}\n\nexport function createBatchReplaceOrdersInputSchema(scales: SdkScales, symbolId: number) {\n return v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n symbolId: v.pipe(v.literal(symbolId), v.integer(), v.minValue(1)),\n requestId: v.optional(OrderRequestIdInputSchema),\n items: v.pipe(\n v.array(createBatchReplaceOrderItemInputSchema(scales, symbolId)),\n v.minLength(1, \"At least one replacement is required.\"),\n v.maxLength(50, \"Batch replace accepts at most 50 replacements.\"),\n ),\n }),\n v.check((input) => {\n const targets = input.items.map(\n (item) => `${item.key.case}:${item.key.value.toString()}`,\n );\n return new Set(targets).size === targets.length;\n }, \"Each batch replace target must be unique.\"),\n v.transform(({ account, ...input }) => ({\n ...input,\n subaccountId: accountScopeToSubaccountId(account),\n })),\n );\n}\n\nexport type BatchReplaceOrdersInput = {\n account?: v.InferInput<typeof AccountScopeInputEntries.account>;\n symbolId: number;\n requestId?: string;\n items: Array<{\n orderId?: string;\n clientOrderId?: string;\n newPrice?: string;\n newQty?: string;\n risk?: v.InferInput<ReturnType<typeof createRequiredRiskPolicyInputSchema>>;\n clearRisk?: boolean;\n newClientOrderId?: string;\n }>;\n};\n\nconst BatchReplaceAdmissionItemSchema = v.pipe(\n v.object({\n itemIndex: BatchItemIndexSchema,\n status: v.pipe(\n v.enum(ProtoWrite.BatchReplaceItemAdmissionStatus),\n v.transform((status) =>\n requiredEnumLabel(\n BatchReplaceItemAdmissionStatusCodec.protoToOutput,\n status,\n \"BatchReplaceAdmissionItemSchema\",\n \"status\",\n ),\n ),\n ),\n oldOrderId: OptionalPublicIdSchema,\n replacementOrderId: OptionalPublicIdSchema,\n clientOrderId: v.string(),\n code: v.string(),\n error: v.optional(OrderErrorDetailSchema),\n }),\n v.transform((item) => ({\n ...item,\n code: item.code || undefined,\n })),\n);\n\nexport type BatchReplaceAdmissionItem = v.InferOutput<typeof BatchReplaceAdmissionItemSchema>;\n\nexport const BatchReplaceOrdersResultSchema = v.pipe(\n v.object({\n batchRequestId: PositivePublicIdSchema,\n status: v.pipe(\n v.enum(ProtoWrite.BatchReplaceAdmissionStatus),\n v.transform((status) =>\n requiredEnumLabel(\n BatchReplaceAdmissionStatusCodec.protoToOutput,\n status,\n \"BatchReplaceOrdersResultSchema\",\n \"status\",\n ),\n ),\n ),\n results: v.array(BatchReplaceAdmissionItemSchema),\n acceptedCount: BatchCountSchema,\n rejectedCount: BatchCountSchema,\n acceptedTsNs: v.bigint(),\n }),\n v.check(\n (response) => response.acceptedCount + response.rejectedCount === response.results.length,\n \"Batch replace result counts do not match the returned results.\",\n ),\n v.check(\n (response) => response.results.every((item, index) => item.itemIndex === index),\n \"Batch replace results must preserve request item order.\",\n ),\n v.transform(({ acceptedTsNs, ...response }) => ({\n ...response,\n acceptedTs: tsNsToMs(acceptedTsNs),\n acceptedTsNs: acceptedTsNs.toString(),\n })),\n);\n\nexport type BatchReplaceOrdersResult = v.InferOutput<typeof BatchReplaceOrdersResultSchema>;\n\nexport const GetBatchReplaceStatusInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n batchRequestId: v.pipe(\n idInputSchema(\"batchRequestId\"),\n v.check((value) => value > 0n, \"batchRequestId must be greater than zero\"),\n ),\n }),\n v.transform(({ account, ...input }) => ({\n ...input,\n subaccountId: accountScopeToSubaccountId(account),\n })),\n);\n\nexport type GetBatchReplaceStatusInput = v.InferInput<typeof GetBatchReplaceStatusInputSchema>;\n\nconst BatchReplaceStatusItemSchema = v.pipe(\n v.object({\n itemIndex: BatchItemIndexSchema,\n phase: v.pipe(\n v.enum(ProtoRead.BatchReplacePhase),\n v.transform((phase) =>\n requiredEnumLabel(\n BatchReplacePhaseCodec.protoToOutput,\n phase,\n \"BatchReplaceStatusItemSchema\",\n \"phase\",\n ),\n ),\n ),\n oldOrderId: OptionalPublicIdSchema,\n replacementOrderId: OptionalPublicIdSchema,\n orderStatus: v.pipe(\n v.enum(ProtoRead.OrderStatus),\n v.transform((status) =>\n requiredEnumLabel(\n OrderStatusCodec.protoToOutput,\n status,\n \"BatchReplaceStatusItemSchema\",\n \"order status\",\n ),\n ),\n ),\n code: v.string(),\n updatedTsNs: v.bigint(),\n }),\n v.transform(({ updatedTsNs, ...item }) => ({\n ...item,\n code: item.code || undefined,\n updatedTs: tsNsToMs(updatedTsNs),\n updatedTsNs: updatedTsNs.toString(),\n })),\n);\n\nexport const GetBatchReplaceStatusResultSchema = v.pipe(\n v.object({\n batchRequestId: PositivePublicIdSchema,\n admissionStatus: v.pipe(\n v.enum(ProtoWrite.BatchReplaceAdmissionStatus),\n v.transform((status) =>\n requiredEnumLabel(\n BatchReplaceAdmissionStatusCodec.protoToOutput,\n status,\n \"GetBatchReplaceStatusResultSchema\",\n \"admission status\",\n ),\n ),\n ),\n items: v.array(BatchReplaceStatusItemSchema),\n acceptedCount: BatchCountSchema,\n rejectedCount: BatchCountSchema,\n acceptedTsNs: v.bigint(),\n updatedTsNs: v.bigint(),\n }),\n v.check(\n (response) => response.acceptedCount + response.rejectedCount === response.items.length,\n \"Batch replace status counts do not match the returned items.\",\n ),\n v.check(\n (response) => response.items.every((item, index) => item.itemIndex === index),\n \"Batch replace status items must preserve request item order.\",\n ),\n v.transform(({ acceptedTsNs, updatedTsNs, ...response }) => ({\n ...response,\n acceptedTs: tsNsToMs(acceptedTsNs),\n acceptedTsNs: acceptedTsNs.toString(),\n updatedTs: tsNsToMs(updatedTsNs),\n updatedTsNs: updatedTsNs.toString(),\n })),\n);\n\nexport type GetBatchReplaceStatusResult = v.InferOutput<typeof GetBatchReplaceStatusResultSchema>;\n\nconst BatchCancelOrderInputSchema = v.union([\n v.pipe(\n v.strictObject({\n orderId: v.pipe(\n idInputSchema(\"items.orderId\"),\n v.check((value) => value > 0n, \"items.orderId must be greater than zero\"),\n ),\n clientOrderId: v.optional(v.never()),\n symbolId: v.optional(v.pipe(v.number(), v.integer(), v.minValue(1))),\n }),\n v.transform(({ orderId, symbolId }) => ({ orderId, symbolId })),\n ),\n v.pipe(\n v.strictObject({\n orderId: v.optional(v.never()),\n clientOrderId: ClientOrderIdInputSchema,\n symbolId: v.optional(v.pipe(v.number(), v.integer(), v.minValue(1))),\n }),\n v.transform(({ clientOrderId, symbolId }) => ({ clientOrderId, symbolId })),\n ),\n]);\n\nexport type BatchCancelOrderInput = v.InferInput<typeof BatchCancelOrderInputSchema>;\n\nexport const BatchCancelOrdersInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n requestId: v.optional(OrderRequestIdInputSchema),\n items: v.pipe(\n v.array(BatchCancelOrderInputSchema),\n v.minLength(1, \"At least one order is required.\"),\n v.maxLength(50, \"Batch cancel accepts at most 50 orders.\"),\n ),\n }),\n v.transform(({ account, ...input }) => ({\n ...input,\n subaccountId: accountScopeToSubaccountId(account),\n })),\n);\n\nexport type BatchCancelOrdersInput = v.InferInput<typeof BatchCancelOrdersInputSchema>;\n\nconst BatchCancelOrderResultSchema = v.object({\n status: v.picklist([\"accepted\", \"rejected\"]),\n orderId: OptionalPublicIdSchema,\n clientOrderId: v.string(),\n code: v.string(),\n error: v.optional(OrderErrorDetailSchema),\n});\n\nexport type BatchCancelOrderResult = v.InferOutput<typeof BatchCancelOrderResultSchema>;\n\nexport const BatchCancelOrdersResultSchema = v.pipe(\n v.object({\n results: v.array(BatchCancelOrderResultSchema),\n acceptedCount: BatchCountSchema,\n rejectedCount: BatchCountSchema,\n tsNs: v.bigint(),\n }),\n v.check(\n (response) => response.acceptedCount + response.rejectedCount === response.results.length,\n \"Batch cancel result counts do not match the returned results.\",\n ),\n v.transform(({ tsNs, ...response }) => ({\n ...response,\n ts: tsNsToMs(tsNs),\n tsNs: tsNs.toString(),\n })),\n);\n\nexport type BatchCancelOrdersResult = v.InferOutput<typeof BatchCancelOrdersResultSchema>;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAiCA,MAAM,mBAAmB,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,QAAQ,GAAG,EAAE,SAAS,CAAC,CAAC;AACtE,MAAM,uBAAuB,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,QAAQ,GAAG,EAAE,SAAS,CAAC,CAAC;AAC1E,MAAM,yBAAyB,EAAE,KAC7B,EAAE,OAAO,GACT,EAAE,QAAQ,EAAE,GACZ,EAAE,WAAW,UAAU,SAAS,KAAK,CAAC,CAC1C;AACA,MAAM,4BAA4B,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,KAAK,GAAG,EAAE,UAAU,EAAE,CAAC,CAAC;AAC1F,MAAM,0BAA0B,EAAE,KAC9B,EAAE,SAAS,UAAU,GACrB,EAAE,WAAW,SAAU,OAAO,eAAe,aAAa,QAAQ,KAAA,CAAU,CAChF;AAEA,MAAM,mCAAmC,EAAE,KACvC,EAAE,OAAO,GACT,EAAE,QAAQ,GACV,EAAE,OACG,eAAe,eAAe,KAAM,cAAc,MAAM,cAAc,KACvE,sEACJ,CACJ;AAEA,MAAa,4BAA4B,EAAE,KACvC,EAAE,aAAa;CACX,GAAG;CACH,YAAY;CACZ,QAAQ;CACR,MAAM;CACN,WAAW,EAAE,SAAS,yBAAyB;AACnD,CAAC,GACD,EAAE,WAAW,EAAE,SAAS,GAAG,a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SAAS,IAAI;CACjB,MAAM,KAAK,SAAS;AACxB,EAAE,CACN"}
1
+ {"version":3,"file":"orders-batch.schemas.js","names":["ProtoWrite.RiskPolicySchema","ProtoWrite.BatchReplaceItemAdmissionStatus","ProtoWrite.BatchReplaceAdmissionStatus","ProtoRead.BatchReplacePhase","ProtoRead.OrderStatus"],"sources":["../../../src/services/orders/orders-batch.schemas.ts"],"sourcesContent":["import * as ProtoWrite from \"../../gen/orders/v1/orders_pb.js\";\nimport * as ProtoRead from \"../../gen/orders/v1/orders_read_pb.js\";\nimport { create } from \"@bufbuild/protobuf\";\nimport * as v from \"valibot\";\nimport {\n AccountScopeInputEntries,\n accountScopeToSubaccountId,\n} from \"../../shared/account-scope.js\";\nimport { OptionalPublicIdSchema, PublicIdSchema, idInputSchema } from \"../../shared/schemas.js\";\nimport { requiredEnumLabel } from \"../../shared/proto-enum-codec.js\";\nimport { tsNsToMs } from \"../../utils/time.js\";\nimport { formatId } from \"../../utils/base58-id.js\";\nimport { SideSchema, SymbolIdInputSchema } from \"../shared.js\";\nimport {\n positiveDecimalInputToScaled,\n scaledToDecimalOutput,\n type SdkScales,\n} from \"../../shared/decimal-surface.js\";\nimport {\n BatchReplaceAdmissionStatusCodec,\n BatchReplaceItemAdmissionStatusCodec,\n BatchReplacePhaseCodec,\n OrderStatusCodec,\n OrderSideCodec,\n} from \"./orders.codecs.js\";\nimport { createOrderIntentInputSchema } from \"./orders-input.schemas.js\";\nimport { createRequiredRiskPolicyInputSchema } from \"./orders-risk.schemas.js\";\nimport {\n ClientOrderIdInputSchema,\n OrderRequestIdInputSchema,\n} from \"./orders-identifiers.schemas.js\";\nimport { OrderErrorDetailSchema } from \"./order-errors.schemas.js\";\n\nconst BatchCountSchema = v.pipe(v.number(), v.integer(), v.minValue(0));\nconst BatchItemIndexSchema = v.pipe(v.number(), v.integer(), v.minValue(0));\nconst PositivePublicIdSchema = v.pipe(\n v.bigint(),\n v.gtValue(0n),\n v.transform((value) => formatId(value)),\n);\nconst OptionalSideInputSchema = v.pipe(\n v.optional(SideSchema),\n v.transform((side) => (side ? OrderSideCodec.inputToProto[side] : undefined)),\n);\n\nconst CancelAllAfterTimeoutInputSchema = v.pipe(\n v.number(),\n v.integer(),\n v.check(\n (timeoutSec) => timeoutSec === 0 || (timeoutSec >= 10 && timeoutSec <= 120),\n \"timeoutSec must be 0 to disable or between 10 and 120 seconds to arm\",\n ),\n);\n\nexport const CancelAllAfterInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n timeoutSec: CancelAllAfterTimeoutInputSchema,\n symbolId: v.optional(SymbolIdInputSchema),\n side: OptionalSideInputSchema,\n requestId: v.optional(OrderRequestIdInputSchema),\n }),\n v.transform(({ account, ...input }) => ({\n ...input,\n subaccountId: accountScopeToSubaccountId(account),\n })),\n);\n\nexport type CancelAllAfterInput = v.InferInput<typeof CancelAllAfterInputSchema>;\n\nexport const CancelAllAfterResultSchema = v.pipe(\n v.object({\n status: v.picklist([\"armed\", \"disabled\"]),\n effectiveTimeoutSec: v.pipe(v.number(), v.integer(), v.minValue(0)),\n expiresAtTsNs: v.bigint(),\n tsNs: v.bigint(),\n }),\n v.transform(({ expiresAtTsNs, tsNs, ...result }) => ({\n ...result,\n expiresAt: tsNsToMs(expiresAtTsNs),\n expiresAtNs: expiresAtTsNs.toString(),\n ts: tsNsToMs(tsNs),\n tsNs: tsNs.toString(),\n })),\n);\n\nexport type CancelAllAfterResult = v.InferOutput<typeof CancelAllAfterResultSchema>;\n\nexport function createBatchCreateOrdersInputSchema(scales: SdkScales) {\n return v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n requestId: v.optional(OrderRequestIdInputSchema),\n items: v.pipe(\n v.array(createOrderIntentInputSchema(scales)),\n v.minLength(1, \"At least one order is required.\"),\n v.maxLength(20, \"Batch create accepts at most 20 orders.\"),\n ),\n }),\n v.check((input) => {\n const clientOrderIds = input.items\n .map((item) => item.clientOrderId)\n .filter((clientOrderId) => clientOrderId !== undefined && clientOrderId !== \"\");\n return new Set(clientOrderIds).size === clientOrderIds.length;\n }, \"Each non-empty batch create clientOrderId must be unique.\"),\n v.transform(({ account, ...input }) => ({\n ...input,\n subaccountId: accountScopeToSubaccountId(account),\n })),\n );\n}\n\nexport type BatchCreateOrdersInput = v.InferInput<\n ReturnType<typeof createBatchCreateOrdersInputSchema>\n>;\n\nconst BatchCreateOrderResultRawSchema = v.object({\n clientOrderId: v.string(),\n outcome: v.variant(\"case\", [\n v.object({\n case: v.literal(\"accepted\"),\n value: v.object({\n orderId: PublicIdSchema,\n takeProfitTriggerId: OptionalPublicIdSchema,\n stopLossTriggerId: OptionalPublicIdSchema,\n trailingStopTriggerId: OptionalPublicIdSchema,\n resolvedBaseQtyScaled: v.bigint(),\n submittedMaxQuoteDebitScaled: v.optional(v.bigint()),\n }),\n }),\n v.object({\n case: v.literal(\"rejected\"),\n value: v.object({\n // The server may reject without a structured detail (e.g. capacity\n // limits); surface the rejection instead of failing the parse.\n error: v.optional(OrderErrorDetailSchema),\n }),\n }),\n ]),\n});\n\nexport function createBatchCreateOrdersResultSchema(scales: SdkScales, symbolIds: number[]) {\n return v.pipe(\n v.object({\n results: v.array(BatchCreateOrderResultRawSchema),\n acceptedCount: BatchCountSchema,\n rejectedCount: BatchCountSchema,\n tsNs: v.bigint(),\n }),\n v.check(\n (response) =>\n response.acceptedCount + response.rejectedCount === response.results.length,\n \"Batch create result counts do not match the returned results.\",\n ),\n v.check(\n (response) => response.results.length === symbolIds.length,\n \"Batch create result count does not match the submitted item count.\",\n ),\n v.transform(({ tsNs, ...response }) => ({\n ...response,\n results: response.results.map(({ clientOrderId, outcome }, index) => {\n if (outcome.case === \"rejected\") {\n return {\n status: \"rejected\" as const,\n clientOrderId,\n error: outcome.value.error,\n };\n }\n const { resolvedBaseQtyScaled, submittedMaxQuoteDebitScaled, ...accepted } =\n outcome.value;\n const symbolId = symbolIds[index]!;\n return {\n status: \"accepted\" as const,\n clientOrderId,\n ...accepted,\n resolvedBaseQty: scaledToDecimalOutput(\n resolvedBaseQtyScaled,\n scales.baseQty(symbolId),\n ),\n ...(submittedMaxQuoteDebitScaled === undefined\n ? {}\n : {\n submittedMaxQuoteDebit: scaledToDecimalOutput(\n submittedMaxQuoteDebitScaled,\n scales.quoteAmount(symbolId),\n ),\n }),\n };\n }),\n ts: tsNsToMs(tsNs),\n tsNs: tsNs.toString(),\n })),\n );\n}\n\nexport type BatchCreateOrdersResult = v.InferOutput<\n ReturnType<typeof createBatchCreateOrdersResultSchema>\n>;\nexport type BatchCreateOrderResult = BatchCreateOrdersResult[\"results\"][number];\n\nconst DecimalInputStringSchema = v.pipe(v.string(), v.trim(), v.minLength(1));\nconst BATCH_REPLACE_ITEM_INPUT_KEYS = new Set([\n \"orderId\",\n \"clientOrderId\",\n \"newPrice\",\n \"newQty\",\n \"risk\",\n \"clearRisk\",\n \"newClientOrderId\",\n]);\n\nexport function assertKnownBatchReplaceOrderItemInputKeys(input: object): void {\n for (const key of Object.keys(input)) {\n if (!BATCH_REPLACE_ITEM_INPUT_KEYS.has(key)) {\n throw new Error(`Unknown key \"${key}\" in batch replace order item.`);\n }\n }\n}\n\nconst BatchReplaceTargetInputSchema = v.union([\n v.pipe(\n v.object({\n orderId: v.pipe(\n idInputSchema(\"items.orderId\"),\n v.check((value) => value > 0n, \"items.orderId must be greater than zero\"),\n ),\n clientOrderId: v.optional(v.never()),\n }),\n v.transform(({ orderId }) => ({\n key: { case: \"orderId\" as const, value: orderId },\n })),\n ),\n v.pipe(\n v.object({\n orderId: v.optional(v.never()),\n clientOrderId: ClientOrderIdInputSchema,\n }),\n v.transform(({ clientOrderId }) => ({\n key: { case: \"clientOrderId\" as const, value: clientOrderId },\n })),\n ),\n]);\n\nfunction createBatchReplaceOrderItemInputSchema(scales: SdkScales, symbolId: number) {\n const patchSchema = v.union([\n v.object({\n newPrice: DecimalInputStringSchema,\n newQty: v.optional(DecimalInputStringSchema),\n risk: v.optional(createRequiredRiskPolicyInputSchema(scales)),\n clearRisk: v.optional(v.literal(false)),\n }),\n v.object({\n newPrice: v.optional(DecimalInputStringSchema),\n newQty: DecimalInputStringSchema,\n risk: v.optional(createRequiredRiskPolicyInputSchema(scales)),\n clearRisk: v.optional(v.literal(false)),\n }),\n v.object({\n newPrice: v.optional(v.never()),\n newQty: v.optional(v.never()),\n risk: createRequiredRiskPolicyInputSchema(scales),\n clearRisk: v.optional(v.literal(false)),\n }),\n v.object({\n newPrice: v.optional(v.never()),\n newQty: v.optional(v.never()),\n risk: v.optional(v.never()),\n clearRisk: v.literal(true),\n }),\n ]);\n return v.pipe(\n v.intersect([\n BatchReplaceTargetInputSchema,\n patchSchema,\n v.object({\n newClientOrderId: v.optional(ClientOrderIdInputSchema),\n }),\n ]),\n v.transform((input) => ({\n key: input.key,\n newPriceTicks:\n input.newPrice === undefined\n ? undefined\n : positiveDecimalInputToScaled(\n \"items.newPrice\",\n input.newPrice,\n scales.price(),\n ),\n newQtyScaled:\n input.newQty === undefined\n ? undefined\n : positiveDecimalInputToScaled(\n \"items.newQty\",\n input.newQty,\n scales.baseQty(symbolId),\n ),\n newAttachedRisk:\n input.clearRisk === true ? create(ProtoWrite.RiskPolicySchema) : input.risk,\n newClientOrderId: input.newClientOrderId ?? \"\",\n })),\n );\n}\n\nexport function createBatchReplaceOrdersInputSchema(scales: SdkScales, symbolId: number) {\n return v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n symbolId: v.pipe(v.literal(symbolId), v.integer(), v.minValue(1)),\n requestId: v.optional(OrderRequestIdInputSchema),\n items: v.pipe(\n v.array(createBatchReplaceOrderItemInputSchema(scales, symbolId)),\n v.minLength(1, \"At least one replacement is required.\"),\n v.maxLength(50, \"Batch replace accepts at most 50 replacements.\"),\n ),\n }),\n v.check((input) => {\n const targets = input.items.map(\n (item) => `${item.key.case}:${item.key.value.toString()}`,\n );\n return new Set(targets).size === targets.length;\n }, \"Each batch replace target must be unique.\"),\n v.transform(({ account, ...input }) => ({\n ...input,\n subaccountId: accountScopeToSubaccountId(account),\n })),\n );\n}\n\nexport type BatchReplaceOrdersInput = {\n account?: v.InferInput<typeof AccountScopeInputEntries.account>;\n symbolId: number;\n requestId?: string;\n items: Array<{\n orderId?: string;\n clientOrderId?: string;\n newPrice?: string;\n newQty?: string;\n risk?: v.InferInput<ReturnType<typeof createRequiredRiskPolicyInputSchema>>;\n clearRisk?: boolean;\n newClientOrderId?: string;\n }>;\n};\n\nconst BatchReplaceAdmissionItemSchema = v.pipe(\n v.object({\n itemIndex: BatchItemIndexSchema,\n status: v.pipe(\n v.enum(ProtoWrite.BatchReplaceItemAdmissionStatus),\n v.transform((status) =>\n requiredEnumLabel(\n BatchReplaceItemAdmissionStatusCodec.protoToOutput,\n status,\n \"BatchReplaceAdmissionItemSchema\",\n \"status\",\n ),\n ),\n ),\n oldOrderId: OptionalPublicIdSchema,\n replacementOrderId: OptionalPublicIdSchema,\n clientOrderId: v.string(),\n code: v.string(),\n error: v.optional(OrderErrorDetailSchema),\n }),\n v.transform((item) => ({\n ...item,\n code: item.code || undefined,\n })),\n);\n\nexport type BatchReplaceAdmissionItem = v.InferOutput<typeof BatchReplaceAdmissionItemSchema>;\n\nexport const BatchReplaceOrdersResultSchema = v.pipe(\n v.object({\n batchRequestId: PositivePublicIdSchema,\n status: v.pipe(\n v.enum(ProtoWrite.BatchReplaceAdmissionStatus),\n v.transform((status) =>\n requiredEnumLabel(\n BatchReplaceAdmissionStatusCodec.protoToOutput,\n status,\n \"BatchReplaceOrdersResultSchema\",\n \"status\",\n ),\n ),\n ),\n results: v.array(BatchReplaceAdmissionItemSchema),\n acceptedCount: BatchCountSchema,\n rejectedCount: BatchCountSchema,\n acceptedTsNs: v.bigint(),\n }),\n v.check(\n (response) => response.acceptedCount + response.rejectedCount === response.results.length,\n \"Batch replace result counts do not match the returned results.\",\n ),\n v.check(\n (response) => response.results.every((item, index) => item.itemIndex === index),\n \"Batch replace results must preserve request item order.\",\n ),\n v.transform(({ acceptedTsNs, ...response }) => ({\n ...response,\n acceptedTs: tsNsToMs(acceptedTsNs),\n acceptedTsNs: acceptedTsNs.toString(),\n })),\n);\n\nexport type BatchReplaceOrdersResult = v.InferOutput<typeof BatchReplaceOrdersResultSchema>;\n\nexport const GetBatchReplaceStatusInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n batchRequestId: v.pipe(\n idInputSchema(\"batchRequestId\"),\n v.check((value) => value > 0n, \"batchRequestId must be greater than zero\"),\n ),\n }),\n v.transform(({ account, ...input }) => ({\n ...input,\n subaccountId: accountScopeToSubaccountId(account),\n })),\n);\n\nexport type GetBatchReplaceStatusInput = v.InferInput<typeof GetBatchReplaceStatusInputSchema>;\n\nconst BatchReplaceStatusItemSchema = v.pipe(\n v.object({\n itemIndex: BatchItemIndexSchema,\n phase: v.pipe(\n v.enum(ProtoRead.BatchReplacePhase),\n v.transform((phase) =>\n requiredEnumLabel(\n BatchReplacePhaseCodec.protoToOutput,\n phase,\n \"BatchReplaceStatusItemSchema\",\n \"phase\",\n ),\n ),\n ),\n oldOrderId: OptionalPublicIdSchema,\n replacementOrderId: OptionalPublicIdSchema,\n orderStatus: v.pipe(\n v.enum(ProtoRead.OrderStatus),\n v.transform((status) =>\n requiredEnumLabel(\n OrderStatusCodec.protoToOutput,\n status,\n \"BatchReplaceStatusItemSchema\",\n \"order status\",\n ),\n ),\n ),\n code: v.string(),\n updatedTsNs: v.bigint(),\n }),\n v.transform(({ updatedTsNs, ...item }) => ({\n ...item,\n code: item.code || undefined,\n updatedTs: tsNsToMs(updatedTsNs),\n updatedTsNs: updatedTsNs.toString(),\n })),\n);\n\nexport const GetBatchReplaceStatusResultSchema = v.pipe(\n v.object({\n batchRequestId: PositivePublicIdSchema,\n admissionStatus: v.pipe(\n v.enum(ProtoWrite.BatchReplaceAdmissionStatus),\n v.transform((status) =>\n requiredEnumLabel(\n BatchReplaceAdmissionStatusCodec.protoToOutput,\n status,\n \"GetBatchReplaceStatusResultSchema\",\n \"admission status\",\n ),\n ),\n ),\n items: v.array(BatchReplaceStatusItemSchema),\n acceptedCount: BatchCountSchema,\n rejectedCount: BatchCountSchema,\n acceptedTsNs: v.bigint(),\n updatedTsNs: v.bigint(),\n }),\n v.check(\n (response) => response.acceptedCount + response.rejectedCount === response.items.length,\n \"Batch replace status counts do not match the returned items.\",\n ),\n v.check(\n (response) => response.items.every((item, index) => item.itemIndex === index),\n \"Batch replace status items must preserve request item order.\",\n ),\n v.transform(({ acceptedTsNs, updatedTsNs, ...response }) => ({\n ...response,\n acceptedTs: tsNsToMs(acceptedTsNs),\n acceptedTsNs: acceptedTsNs.toString(),\n updatedTs: tsNsToMs(updatedTsNs),\n updatedTsNs: updatedTsNs.toString(),\n })),\n);\n\nexport type GetBatchReplaceStatusResult = v.InferOutput<typeof GetBatchReplaceStatusResultSchema>;\n\nconst BatchCancelOrderInputSchema = v.union([\n v.pipe(\n v.strictObject({\n orderId: v.pipe(\n idInputSchema(\"items.orderId\"),\n v.check((value) => value > 0n, \"items.orderId must be greater than zero\"),\n ),\n clientOrderId: v.optional(v.never()),\n symbolId: v.optional(v.pipe(v.number(), v.integer(), v.minValue(1))),\n }),\n v.transform(({ orderId, symbolId }) => ({ orderId, symbolId })),\n ),\n v.pipe(\n v.strictObject({\n orderId: v.optional(v.never()),\n clientOrderId: ClientOrderIdInputSchema,\n symbolId: v.optional(v.pipe(v.number(), v.integer(), v.minValue(1))),\n }),\n v.transform(({ clientOrderId, symbolId }) => ({ clientOrderId, symbolId })),\n ),\n]);\n\nexport type BatchCancelOrderInput = v.InferInput<typeof BatchCancelOrderInputSchema>;\n\nexport const BatchCancelOrdersInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n requestId: v.optional(OrderRequestIdInputSchema),\n items: v.pipe(\n v.array(BatchCancelOrderInputSchema),\n v.minLength(1, \"At least one order is required.\"),\n v.maxLength(50, \"Batch cancel accepts at most 50 orders.\"),\n ),\n }),\n v.transform(({ account, ...input }) => ({\n ...input,\n subaccountId: accountScopeToSubaccountId(account),\n })),\n);\n\nexport type BatchCancelOrdersInput = v.InferInput<typeof BatchCancelOrdersInputSchema>;\n\nconst BatchCancelOrderResultSchema = v.object({\n status: v.picklist([\"accepted\", \"rejected\"]),\n orderId: OptionalPublicIdSchema,\n clientOrderId: v.string(),\n code: v.string(),\n error: v.optional(OrderErrorDetailSchema),\n});\n\nexport type BatchCancelOrderResult = v.InferOutput<typeof BatchCancelOrderResultSchema>;\n\nexport const BatchCancelOrdersResultSchema = v.pipe(\n v.object({\n results: v.array(BatchCancelOrderResultSchema),\n acceptedCount: BatchCountSchema,\n rejectedCount: BatchCountSchema,\n tsNs: v.bigint(),\n }),\n v.check(\n (response) => response.acceptedCount + response.rejectedCount === response.results.length,\n \"Batch cancel result counts do not match the returned results.\",\n ),\n v.transform(({ tsNs, ...response }) => ({\n ...response,\n ts: tsNsToMs(tsNs),\n tsNs: tsNs.toString(),\n })),\n);\n\nexport type BatchCancelOrdersResult = v.InferOutput<typeof BatchCancelOrdersResultSchema>;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAiCA,MAAM,mBAAmB,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,QAAQ,GAAG,EAAE,SAAS,CAAC,CAAC;AACtE,MAAM,uBAAuB,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,QAAQ,GAAG,EAAE,SAAS,CAAC,CAAC;AAC1E,MAAM,yBAAyB,EAAE,KAC7B,EAAE,OAAO,GACT,EAAE,QAAQ,EAAE,GACZ,EAAE,WAAW,UAAU,SAAS,KAAK,CAAC,CAC1C;AACA,MAAM,0BAA0B,EAAE,KAC9B,EAAE,SAAS,UAAU,GACrB,EAAE,WAAW,SAAU,OAAO,eAAe,aAAa,QAAQ,KAAA,CAAU,CAChF;AAEA,MAAM,mCAAmC,EAAE,KACvC,EAAE,OAAO,GACT,EAAE,QAAQ,GACV,EAAE,OACG,eAAe,eAAe,KAAM,cAAc,MAAM,cAAc,KACvE,sEACJ,CACJ;AAEA,MAAa,4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AY,UAAU,CAAC;CAC3C,SAAS;CACT,eAAe,EAAE,OAAO;CACxB,MAAM,EAAE,OAAO;CACf,OAAO,EAAE,SAAS,sBAAsB;AAC5C,CAAC;AAID,MAAa,gCAAgC,EAAE,KAC3C,EAAE,OAAO;CACL,SAAS,EAAE,MAAM,4BAA4B;CAC7C,eAAe;CACf,eAAe;CACf,MAAM,EAAE,OAAO;AACnB,CAAC,GACD,EAAE,OACG,aAAa,SAAS,gBAAgB,SAAS,kBAAkB,SAAS,QAAQ,QACnF,+DACJ,GACA,EAAE,WAAW,EAAE,MAAM,GAAG,gBAAgB;CACpC,GAAG;CACH,IAAI,SAAS,IAAI;CACjB,MAAM,KAAK,SAAS;AACxB,EAAE,CACN"}
@@ -82,7 +82,7 @@ type OrderHistoryInput = v.InferInput<typeof OrderHistoryInputSchema>;
82
82
  declare function createOrderIntentInputSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StrictObjectSchema<{
83
83
  readonly qty: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
84
84
  readonly maxQuoteDebit: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
85
- readonly symbol: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
85
+ readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>;
86
86
  readonly side: v.SchemaWithPipe<readonly [v.PicklistSchema<["buy", "sell"], undefined>, v.TransformAction<"buy" | "sell", Side.BUY | Side.SELL>]>;
87
87
  readonly execution: v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
88
88
  readonly type: v.LiteralSchema<"market_ioc", undefined>;
@@ -328,7 +328,7 @@ declare function createOrderIntentInputSchema(scales: SdkScales): v.SchemaWithPi
328
328
  }>]>;
329
329
  readonly stopLoss: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
330
330
  readonly trailingStop: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
331
- readonly oco: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
331
+ readonly oco: v.OptionalSchema<v.LiteralSchema<false, "oco requires takeProfit and exactly one stop leg">, undefined>;
332
332
  }, undefined>, v.StrictObjectSchema<{
333
333
  readonly takeProfit: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
334
334
  readonly stopLoss: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
@@ -360,7 +360,7 @@ declare function createOrderIntentInputSchema(scales: SdkScales): v.SchemaWithPi
360
360
  };
361
361
  }>]>;
362
362
  readonly trailingStop: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
363
- readonly oco: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
363
+ readonly oco: v.OptionalSchema<v.LiteralSchema<false, "oco requires takeProfit and exactly one stop leg">, undefined>;
364
364
  }, undefined>, v.StrictObjectSchema<{
365
365
  readonly takeProfit: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
366
366
  readonly stopLoss: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
@@ -427,7 +427,7 @@ declare function createOrderIntentInputSchema(scales: SdkScales): v.SchemaWithPi
427
427
  };
428
428
  activationPriceTicks: bigint;
429
429
  }>]>;
430
- readonly oco: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
430
+ readonly oco: v.OptionalSchema<v.LiteralSchema<false, "oco requires takeProfit and exactly one stop leg">, undefined>;
431
431
  }, undefined>], undefined>, undefined>, v.TransformAction<{
432
432
  takeProfit: {
433
433
  triggerPriceTicks: bigint;
@@ -508,7 +508,7 @@ declare function createOrderIntentInputSchema(scales: SdkScales): v.SchemaWithPi
508
508
  };
509
509
  stopLoss?: undefined;
510
510
  trailingStop?: undefined;
511
- oco?: boolean | undefined;
511
+ oco?: false | undefined;
512
512
  } | {
513
513
  takeProfit?: undefined;
514
514
  stopLoss: {
@@ -524,7 +524,7 @@ declare function createOrderIntentInputSchema(scales: SdkScales): v.SchemaWithPi
524
524
  };
525
525
  };
526
526
  trailingStop?: undefined;
527
- oco?: boolean | undefined;
527
+ oco?: false | undefined;
528
528
  } | {
529
529
  takeProfit?: undefined;
530
530
  stopLoss?: undefined;
@@ -551,7 +551,7 @@ declare function createOrderIntentInputSchema(scales: SdkScales): v.SchemaWithPi
551
551
  };
552
552
  activationPriceTicks: bigint;
553
553
  };
554
- oco?: boolean | undefined;
554
+ oco?: false | undefined;
555
555
  } | undefined, {
556
556
  takeProfit: {
557
557
  triggerPriceTicks: bigint;
@@ -613,7 +613,7 @@ declare function createOrderIntentInputSchema(scales: SdkScales): v.SchemaWithPi
613
613
  }, undefined>, v.StrictObjectSchema<{
614
614
  readonly qty: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
615
615
  readonly maxQuoteDebit: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
616
- readonly symbol: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
616
+ readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>;
617
617
  readonly side: v.SchemaWithPipe<readonly [v.PicklistSchema<["buy", "sell"], undefined>, v.TransformAction<"buy" | "sell", Side.BUY | Side.SELL>]>;
618
618
  readonly execution: v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
619
619
  readonly type: v.LiteralSchema<"market_ioc", undefined>;
@@ -859,7 +859,7 @@ declare function createOrderIntentInputSchema(scales: SdkScales): v.SchemaWithPi
859
859
  }>]>;
860
860
  readonly stopLoss: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
861
861
  readonly trailingStop: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
862
- readonly oco: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
862
+ readonly oco: v.OptionalSchema<v.LiteralSchema<false, "oco requires takeProfit and exactly one stop leg">, undefined>;
863
863
  }, undefined>, v.StrictObjectSchema<{
864
864
  readonly takeProfit: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
865
865
  readonly stopLoss: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
@@ -891,7 +891,7 @@ declare function createOrderIntentInputSchema(scales: SdkScales): v.SchemaWithPi
891
891
  };
892
892
  }>]>;
893
893
  readonly trailingStop: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
894
- readonly oco: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
894
+ readonly oco: v.OptionalSchema<v.LiteralSchema<false, "oco requires takeProfit and exactly one stop leg">, undefined>;
895
895
  }, undefined>, v.StrictObjectSchema<{
896
896
  readonly takeProfit: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
897
897
  readonly stopLoss: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
@@ -958,7 +958,7 @@ declare function createOrderIntentInputSchema(scales: SdkScales): v.SchemaWithPi
958
958
  };
959
959
  activationPriceTicks: bigint;
960
960
  }>]>;
961
- readonly oco: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
961
+ readonly oco: v.OptionalSchema<v.LiteralSchema<false, "oco requires takeProfit and exactly one stop leg">, undefined>;
962
962
  }, undefined>], undefined>, undefined>, v.TransformAction<{
963
963
  takeProfit: {
964
964
  triggerPriceTicks: bigint;
@@ -1039,7 +1039,7 @@ declare function createOrderIntentInputSchema(scales: SdkScales): v.SchemaWithPi
1039
1039
  };
1040
1040
  stopLoss?: undefined;
1041
1041
  trailingStop?: undefined;
1042
- oco?: boolean | undefined;
1042
+ oco?: false | undefined;
1043
1043
  } | {
1044
1044
  takeProfit?: undefined;
1045
1045
  stopLoss: {
@@ -1055,7 +1055,7 @@ declare function createOrderIntentInputSchema(scales: SdkScales): v.SchemaWithPi
1055
1055
  };
1056
1056
  };
1057
1057
  trailingStop?: undefined;
1058
- oco?: boolean | undefined;
1058
+ oco?: false | undefined;
1059
1059
  } | {
1060
1060
  takeProfit?: undefined;
1061
1061
  stopLoss?: undefined;
@@ -1082,7 +1082,7 @@ declare function createOrderIntentInputSchema(scales: SdkScales): v.SchemaWithPi
1082
1082
  };
1083
1083
  activationPriceTicks: bigint;
1084
1084
  };
1085
- oco?: boolean | undefined;
1085
+ oco?: false | undefined;
1086
1086
  } | undefined, {
1087
1087
  takeProfit: {
1088
1088
  triggerPriceTicks: bigint;
@@ -1144,7 +1144,7 @@ declare function createOrderIntentInputSchema(scales: SdkScales): v.SchemaWithPi
1144
1144
  }, undefined>], undefined>, v.CheckAction<{
1145
1145
  qty: string;
1146
1146
  maxQuoteDebit?: undefined;
1147
- symbol: string;
1147
+ symbolId: number;
1148
1148
  side: Side.BUY | Side.SELL;
1149
1149
  execution: {
1150
1150
  case: "marketIoc";
@@ -1223,7 +1223,7 @@ declare function createOrderIntentInputSchema(scales: SdkScales): v.SchemaWithPi
1223
1223
  } | {
1224
1224
  qty?: undefined;
1225
1225
  maxQuoteDebit: string;
1226
- symbol: string;
1226
+ symbolId: number;
1227
1227
  side: Side.BUY | Side.SELL;
1228
1228
  execution: {
1229
1229
  case: "marketIoc";
@@ -1302,7 +1302,7 @@ declare function createOrderIntentInputSchema(scales: SdkScales): v.SchemaWithPi
1302
1302
  }, "maxQuoteDebit is supported only for BUY market IOC and BUY limit IOC orders">, v.CheckAction<{
1303
1303
  qty: string;
1304
1304
  maxQuoteDebit?: undefined;
1305
- symbol: string;
1305
+ symbolId: number;
1306
1306
  side: Side.BUY | Side.SELL;
1307
1307
  execution: {
1308
1308
  case: "marketIoc";
@@ -1381,7 +1381,7 @@ declare function createOrderIntentInputSchema(scales: SdkScales): v.SchemaWithPi
1381
1381
  } | {
1382
1382
  qty?: undefined;
1383
1383
  maxQuoteDebit: string;
1384
- symbol: string;
1384
+ symbolId: number;
1385
1385
  side: Side.BUY | Side.SELL;
1386
1386
  execution: {
1387
1387
  case: "marketIoc";
@@ -1460,7 +1460,7 @@ declare function createOrderIntentInputSchema(scales: SdkScales): v.SchemaWithPi
1460
1460
  }, "SELL orders must use the quote fee asset">]>, v.TransformAction<{
1461
1461
  qty: string;
1462
1462
  maxQuoteDebit?: undefined;
1463
- symbol: string;
1463
+ symbolId: number;
1464
1464
  side: Side.BUY | Side.SELL;
1465
1465
  execution: {
1466
1466
  case: "marketIoc";
@@ -1539,7 +1539,7 @@ declare function createOrderIntentInputSchema(scales: SdkScales): v.SchemaWithPi
1539
1539
  } | {
1540
1540
  qty?: undefined;
1541
1541
  maxQuoteDebit: string;
1542
- symbol: string;
1542
+ symbolId: number;
1543
1543
  side: Side.BUY | Side.SELL;
1544
1544
  execution: {
1545
1545
  case: "marketIoc";
@@ -1682,7 +1682,7 @@ declare function createOrderIntentInputSchema(scales: SdkScales): v.SchemaWithPi
1682
1682
  };
1683
1683
  oco: boolean;
1684
1684
  } | undefined;
1685
- symbol: string;
1685
+ symbolId: number;
1686
1686
  side: Side.BUY | Side.SELL;
1687
1687
  execution: {
1688
1688
  case: "marketIoc";
@@ -1766,7 +1766,7 @@ declare function createOrderIntentInputSchema(scales: SdkScales): v.SchemaWithPi
1766
1766
  };
1767
1767
  oco: boolean;
1768
1768
  } | undefined;
1769
- symbol: string;
1769
+ symbolId: number;
1770
1770
  side: Side.BUY | Side.SELL;
1771
1771
  execution: {
1772
1772
  case: "marketIoc";
@@ -1788,7 +1788,7 @@ type OrderIntentInput = v.InferInput<ReturnType<typeof createOrderIntentInputSch
1788
1788
  declare function createNewOrderInputSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StrictObjectSchema<{
1789
1789
  readonly qty: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
1790
1790
  readonly maxQuoteDebit: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
1791
- readonly symbol: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
1791
+ readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>;
1792
1792
  readonly side: v.SchemaWithPipe<readonly [v.PicklistSchema<["buy", "sell"], undefined>, v.TransformAction<"buy" | "sell", Side.BUY | Side.SELL>]>;
1793
1793
  readonly execution: v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1794
1794
  readonly type: v.LiteralSchema<"market_ioc", undefined>;
@@ -2034,7 +2034,7 @@ declare function createNewOrderInputSchema(scales: SdkScales): v.SchemaWithPipe<
2034
2034
  }>]>;
2035
2035
  readonly stopLoss: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
2036
2036
  readonly trailingStop: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
2037
- readonly oco: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
2037
+ readonly oco: v.OptionalSchema<v.LiteralSchema<false, "oco requires takeProfit and exactly one stop leg">, undefined>;
2038
2038
  }, undefined>, v.StrictObjectSchema<{
2039
2039
  readonly takeProfit: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
2040
2040
  readonly stopLoss: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
@@ -2066,7 +2066,7 @@ declare function createNewOrderInputSchema(scales: SdkScales): v.SchemaWithPipe<
2066
2066
  };
2067
2067
  }>]>;
2068
2068
  readonly trailingStop: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
2069
- readonly oco: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
2069
+ readonly oco: v.OptionalSchema<v.LiteralSchema<false, "oco requires takeProfit and exactly one stop leg">, undefined>;
2070
2070
  }, undefined>, v.StrictObjectSchema<{
2071
2071
  readonly takeProfit: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
2072
2072
  readonly stopLoss: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
@@ -2133,7 +2133,7 @@ declare function createNewOrderInputSchema(scales: SdkScales): v.SchemaWithPipe<
2133
2133
  };
2134
2134
  activationPriceTicks: bigint;
2135
2135
  }>]>;
2136
- readonly oco: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
2136
+ readonly oco: v.OptionalSchema<v.LiteralSchema<false, "oco requires takeProfit and exactly one stop leg">, undefined>;
2137
2137
  }, undefined>], undefined>, undefined>, v.TransformAction<{
2138
2138
  takeProfit: {
2139
2139
  triggerPriceTicks: bigint;
@@ -2214,7 +2214,7 @@ declare function createNewOrderInputSchema(scales: SdkScales): v.SchemaWithPipe<
2214
2214
  };
2215
2215
  stopLoss?: undefined;
2216
2216
  trailingStop?: undefined;
2217
- oco?: boolean | undefined;
2217
+ oco?: false | undefined;
2218
2218
  } | {
2219
2219
  takeProfit?: undefined;
2220
2220
  stopLoss: {
@@ -2230,7 +2230,7 @@ declare function createNewOrderInputSchema(scales: SdkScales): v.SchemaWithPipe<
2230
2230
  };
2231
2231
  };
2232
2232
  trailingStop?: undefined;
2233
- oco?: boolean | undefined;
2233
+ oco?: false | undefined;
2234
2234
  } | {
2235
2235
  takeProfit?: undefined;
2236
2236
  stopLoss?: undefined;
@@ -2257,7 +2257,7 @@ declare function createNewOrderInputSchema(scales: SdkScales): v.SchemaWithPipe<
2257
2257
  };
2258
2258
  activationPriceTicks: bigint;
2259
2259
  };
2260
- oco?: boolean | undefined;
2260
+ oco?: false | undefined;
2261
2261
  } | undefined, {
2262
2262
  takeProfit: {
2263
2263
  triggerPriceTicks: bigint;
@@ -2322,7 +2322,7 @@ declare function createNewOrderInputSchema(scales: SdkScales): v.SchemaWithPipe<
2322
2322
  }, undefined>, v.StrictObjectSchema<{
2323
2323
  readonly qty: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
2324
2324
  readonly maxQuoteDebit: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
2325
- readonly symbol: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
2325
+ readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>;
2326
2326
  readonly side: v.SchemaWithPipe<readonly [v.PicklistSchema<["buy", "sell"], undefined>, v.TransformAction<"buy" | "sell", Side.BUY | Side.SELL>]>;
2327
2327
  readonly execution: v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2328
2328
  readonly type: v.LiteralSchema<"market_ioc", undefined>;
@@ -2568,7 +2568,7 @@ declare function createNewOrderInputSchema(scales: SdkScales): v.SchemaWithPipe<
2568
2568
  }>]>;
2569
2569
  readonly stopLoss: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
2570
2570
  readonly trailingStop: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
2571
- readonly oco: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
2571
+ readonly oco: v.OptionalSchema<v.LiteralSchema<false, "oco requires takeProfit and exactly one stop leg">, undefined>;
2572
2572
  }, undefined>, v.StrictObjectSchema<{
2573
2573
  readonly takeProfit: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
2574
2574
  readonly stopLoss: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
@@ -2600,7 +2600,7 @@ declare function createNewOrderInputSchema(scales: SdkScales): v.SchemaWithPipe<
2600
2600
  };
2601
2601
  }>]>;
2602
2602
  readonly trailingStop: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
2603
- readonly oco: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
2603
+ readonly oco: v.OptionalSchema<v.LiteralSchema<false, "oco requires takeProfit and exactly one stop leg">, undefined>;
2604
2604
  }, undefined>, v.StrictObjectSchema<{
2605
2605
  readonly takeProfit: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
2606
2606
  readonly stopLoss: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
@@ -2667,7 +2667,7 @@ declare function createNewOrderInputSchema(scales: SdkScales): v.SchemaWithPipe<
2667
2667
  };
2668
2668
  activationPriceTicks: bigint;
2669
2669
  }>]>;
2670
- readonly oco: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
2670
+ readonly oco: v.OptionalSchema<v.LiteralSchema<false, "oco requires takeProfit and exactly one stop leg">, undefined>;
2671
2671
  }, undefined>], undefined>, undefined>, v.TransformAction<{
2672
2672
  takeProfit: {
2673
2673
  triggerPriceTicks: bigint;
@@ -2748,7 +2748,7 @@ declare function createNewOrderInputSchema(scales: SdkScales): v.SchemaWithPipe<
2748
2748
  };
2749
2749
  stopLoss?: undefined;
2750
2750
  trailingStop?: undefined;
2751
- oco?: boolean | undefined;
2751
+ oco?: false | undefined;
2752
2752
  } | {
2753
2753
  takeProfit?: undefined;
2754
2754
  stopLoss: {
@@ -2764,7 +2764,7 @@ declare function createNewOrderInputSchema(scales: SdkScales): v.SchemaWithPipe<
2764
2764
  };
2765
2765
  };
2766
2766
  trailingStop?: undefined;
2767
- oco?: boolean | undefined;
2767
+ oco?: false | undefined;
2768
2768
  } | {
2769
2769
  takeProfit?: undefined;
2770
2770
  stopLoss?: undefined;
@@ -2791,7 +2791,7 @@ declare function createNewOrderInputSchema(scales: SdkScales): v.SchemaWithPipe<
2791
2791
  };
2792
2792
  activationPriceTicks: bigint;
2793
2793
  };
2794
- oco?: boolean | undefined;
2794
+ oco?: false | undefined;
2795
2795
  } | undefined, {
2796
2796
  takeProfit: {
2797
2797
  triggerPriceTicks: bigint;
@@ -2856,7 +2856,7 @@ declare function createNewOrderInputSchema(scales: SdkScales): v.SchemaWithPipe<
2856
2856
  }, undefined>], undefined>, v.CheckAction<{
2857
2857
  qty: string;
2858
2858
  maxQuoteDebit?: undefined;
2859
- symbol: string;
2859
+ symbolId: number;
2860
2860
  side: Side.BUY | Side.SELL;
2861
2861
  execution: {
2862
2862
  case: "marketIoc";
@@ -2938,7 +2938,7 @@ declare function createNewOrderInputSchema(scales: SdkScales): v.SchemaWithPipe<
2938
2938
  } | {
2939
2939
  qty?: undefined;
2940
2940
  maxQuoteDebit: string;
2941
- symbol: string;
2941
+ symbolId: number;
2942
2942
  side: Side.BUY | Side.SELL;
2943
2943
  execution: {
2944
2944
  case: "marketIoc";
@@ -3020,7 +3020,7 @@ declare function createNewOrderInputSchema(scales: SdkScales): v.SchemaWithPipe<
3020
3020
  }, "maxQuoteDebit is supported only for BUY market IOC and BUY limit IOC orders">, v.CheckAction<{
3021
3021
  qty: string;
3022
3022
  maxQuoteDebit?: undefined;
3023
- symbol: string;
3023
+ symbolId: number;
3024
3024
  side: Side.BUY | Side.SELL;
3025
3025
  execution: {
3026
3026
  case: "marketIoc";
@@ -3102,7 +3102,7 @@ declare function createNewOrderInputSchema(scales: SdkScales): v.SchemaWithPipe<
3102
3102
  } | {
3103
3103
  qty?: undefined;
3104
3104
  maxQuoteDebit: string;
3105
- symbol: string;
3105
+ symbolId: number;
3106
3106
  side: Side.BUY | Side.SELL;
3107
3107
  execution: {
3108
3108
  case: "marketIoc";
@@ -3184,7 +3184,7 @@ declare function createNewOrderInputSchema(scales: SdkScales): v.SchemaWithPipe<
3184
3184
  }, "SELL orders must use the quote fee asset">]>, v.TransformAction<{
3185
3185
  qty: string;
3186
3186
  maxQuoteDebit?: undefined;
3187
- symbol: string;
3187
+ symbolId: number;
3188
3188
  side: Side.BUY | Side.SELL;
3189
3189
  execution: {
3190
3190
  case: "marketIoc";
@@ -3266,7 +3266,7 @@ declare function createNewOrderInputSchema(scales: SdkScales): v.SchemaWithPipe<
3266
3266
  } | {
3267
3267
  qty?: undefined;
3268
3268
  maxQuoteDebit: string;
3269
- symbol: string;
3269
+ symbolId: number;
3270
3270
  side: Side.BUY | Side.SELL;
3271
3271
  execution: {
3272
3272
  case: "marketIoc";
@@ -3414,7 +3414,7 @@ declare function createNewOrderInputSchema(scales: SdkScales): v.SchemaWithPipe<
3414
3414
  };
3415
3415
  oco: boolean;
3416
3416
  } | undefined;
3417
- symbol: string;
3417
+ symbolId: number;
3418
3418
  side: Side.BUY | Side.SELL;
3419
3419
  execution: {
3420
3420
  case: "marketIoc";
@@ -3498,7 +3498,7 @@ declare function createNewOrderInputSchema(scales: SdkScales): v.SchemaWithPipe<
3498
3498
  };
3499
3499
  oco: boolean;
3500
3500
  } | undefined;
3501
- symbol: string;
3501
+ symbolId: number;
3502
3502
  side: Side.BUY | Side.SELL;
3503
3503
  execution: {
3504
3504
  case: "marketIoc";
@@ -3584,15 +3584,15 @@ declare const CancelOrderResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema
3584
3584
  }>]>;
3585
3585
  type CancelOrderResult = v.InferOutput<typeof CancelOrderResultSchema>;
3586
3586
  declare const CancelAllOrdersInputSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3587
- readonly symbol: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>;
3587
+ readonly symbolId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>, undefined>;
3588
3588
  readonly side: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["buy", "sell"], undefined>, undefined>, v.TransformAction<"buy" | "sell" | undefined, Side.BUY | Side.SELL | undefined>]>;
3589
3589
  readonly dryRun: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
3590
- readonly requestId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>, undefined>;
3590
+ readonly requestId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.RegexAction<string, "requestId has an invalid format">]>, undefined>;
3591
3591
  readonly account: v.OptionalSchema<v.UnionSchema<[v.PicklistSchema<["active", "main"], undefined>, v.StrictObjectSchema<{
3592
3592
  readonly subaccountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
3593
3593
  }, undefined>], undefined>, undefined>;
3594
3594
  }, undefined>, v.TransformAction<{
3595
- symbol?: string | undefined;
3595
+ symbolId?: number | undefined;
3596
3596
  side?: Side.BUY | Side.SELL | undefined;
3597
3597
  dryRun: boolean;
3598
3598
  requestId?: string | undefined;
@@ -3601,7 +3601,7 @@ declare const CancelAllOrdersInputSchema: v.SchemaWithPipe<readonly [v.StrictObj
3601
3601
  } | undefined;
3602
3602
  }, {
3603
3603
  subaccountId: bigint | undefined;
3604
- symbol?: string | undefined;
3604
+ symbolId?: number | undefined;
3605
3605
  side?: Side.BUY | Side.SELL | undefined;
3606
3606
  dryRun: boolean;
3607
3607
  requestId?: string | undefined;
@@ -3664,7 +3664,7 @@ declare const GetOrderDetailsInputSchema: v.SchemaWithPipe<readonly [v.StrictObj
3664
3664
  includeAttachedRiskState: boolean;
3665
3665
  }>]>;
3666
3666
  type GetOrderDetailsInput = v.InferInput<typeof GetOrderDetailsInputSchema>;
3667
- declare function createCreateOrderResultSchema(scales: SdkScales, symbol: string): v.SchemaWithPipe<readonly [v.ObjectSchema<{
3667
+ declare function createCreateOrderResultSchema(scales: SdkScales, symbolId: number): v.SchemaWithPipe<readonly [v.ObjectSchema<{
3668
3668
  readonly orderId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
3669
3669
  readonly clientOrderId: v.StringSchema<undefined>;
3670
3670
  readonly acceptedAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
@@ -3702,7 +3702,7 @@ declare function createCreateOrderResultSchema(scales: SdkScales, symbol: string
3702
3702
  trailingStopTriggerId?: string | undefined;
3703
3703
  }>]>;
3704
3704
  type CreateOrderResult = v.InferOutput<ReturnType<typeof createCreateOrderResultSchema>>;
3705
- declare function createPreviewOrderResultSchema(scales: SdkScales, symbol: string): v.SchemaWithPipe<readonly [v.ObjectSchema<{
3705
+ declare function createPreviewOrderResultSchema(scales: SdkScales, symbolId: number): v.SchemaWithPipe<readonly [v.ObjectSchema<{
3706
3706
  readonly admissible: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
3707
3707
  readonly rejection: v.OptionalSchema<v.ObjectSchema<{
3708
3708
  readonly code: v.SchemaWithPipe<readonly [v.EnumSchema<typeof ErrorCode, undefined>, v.TransformAction<ErrorCode, "STALE_QUOTE" | "UNSPECIFIED" | "BAD_REQUEST" | "INVALID_ARGUMENT" | "INSUFFICIENT_FUNDS" | "UNKNOWN_SYMBOL" | "BAD_PRICE" | "BAD_QTY" | "MIN_NOTIONAL" | "QTY_STEP_SIZE" | "CONFLICT_DUPLICATE_CLIENT_ORDER_ID" | "UNAVAILABLE" | "UNAUTHENTICATED" | "PERMISSION_DENIED" | "NOT_FOUND" | "UPSTREAM_ERROR" | "FEE_ASSET_NOT_ALLOWED" | "PAIR_DISABLED" | "ORDER_UNKNOWN" | "INTERNAL_ERROR" | "SUBACCOUNT_INACTIVE" | "POLICY_MARKET_DENY" | "POLICY_MAX_NOTIONAL" | "POLICY_TRADING_HALTED" | "POLICY_SPOT_TRADE_DENY" | "API_KEY_ROOT_SCOPE_ONLY" | "API_KEY_SUB_SCOPE_ONLY" | "API_KEY_SUBACCOUNT_MISMATCH" | "API_KEY_POLICY_REQUIRED" | "API_KEY_UNKNOWN" | "API_KEY_MARKET_DENY" | "PRICE_TICK_SIZE" | "MIN_QTY" | "POST_ONLY_LIMIT_ONLY" | "BATCH_TOO_LARGE" | "POLICY_MAX_OPEN_ORDERS" | "MODIFICATION_REQUIRES_REPLACE" | "CONFLICT_IDEMPOTENCY_KEY_REUSE" | "MARKET_PRICE_UNAVAILABLE" | "PAIR_NOT_LISTED_YET" | "PAIR_DELISTED" | "PAIR_CANCEL_ONLY" | "PAIR_POST_ONLY" | "PAIR_REDUCE_ONLY" | "RISK_LIMIT" | "MARKET_HALTED" | "ACCOUNT_UNKNOWN" | "POST_ONLY_CROSS" | "REDUCE_ONLY_BLOCKED" | "PRICE_BAND_VIOLATION" | "MARKET_CAP_VIOLATION" | "EMPTY_BOOK" | "FOK_INSUFFICIENT_LIQUIDITY" | "ORDER_ALREADY_TERMINAL" | "TRIGGER_PRICE_INVALID" | "TRIGGER_PRICE_SOURCE_UNSUPPORTED" | "TRAILING_DISTANCE_INVALID" | "TRIGGER_NOT_FOUND" | "TRIGGER_CANCEL_REJECTED" | "TRIGGER_STATUS_INVALID" | "TRIGGER_NOT_MODIFIABLE" | "CONFLICT_DUPLICATE_CLIENT_TRIGGER_ID" | "MAX_SLIPPAGE_INVALID" | "VALIDATION_ERROR" | "OVERLOADED" | "MAX_QUOTE_DEBIT_TOO_SMALL" | "RATE_LIMIT_EXCEEDED" | "SUBACCOUNT_READ_FORBIDDEN" | "POLICY_SPOT_READ_DENY" | "API_KEY_SPOT_READ_DENY">]>;
@@ -1 +1 @@
1
- {"version":3,"file":"orders-input.schemas.d.ts","names":[],"sources":["../../../src/services/orders/orders-input.schemas.ts"],"mappings":";;;;;;cAgEa,uBAAqB,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAatB,kBAAkB,EAAE,kBAAkB;cAErC,yBAAuB,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAkBxB,oBAAoB,EAAE,kBAAkB;iBAsHpC,6BAA6B,QAAQ,YAAS,EAAA,yBAAA,EAAA,yBAAA,EAAA,aAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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