import * as z from "zod"; import { OpenEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { CommissionCreate, CommissionCreate$Outbound } from "./commissioncreate.js"; import { DateCreate, DateCreate$Outbound } from "./datecreate.js"; import { DecimalCreate, DecimalCreate$Outbound } from "./decimalcreate.js"; import { FeeCreate, FeeCreate$Outbound } from "./feecreate.js"; import { LetterOfIntentCreate, LetterOfIntentCreate$Outbound } from "./letterofintentcreate.js"; import { LimitPriceCreate, LimitPriceCreate$Outbound } from "./limitpricecreate.js"; import { RightsOfAccumulationCreate, RightsOfAccumulationCreate$Outbound } from "./rightsofaccumulationcreate.js"; import { StopPriceCreate, StopPriceCreate$Outbound } from "./stoppricecreate.js"; /** * The type of the asset in this order, which must be one of the following: * * @remarks * EQUITY, MUTUAL_FUND, and FIXED_INCOME. */ export declare enum AssetType { Equity = "EQUITY", FixedIncome = "FIXED_INCOME", MutualFund = "MUTUAL_FUND", EventContract = "EVENT_CONTRACT" } /** * The type of the asset in this order, which must be one of the following: * * @remarks * EQUITY, MUTUAL_FUND, and FIXED_INCOME. */ export type AssetTypeOpen = OpenEnum; /** * Defaults to "AGENCY" if not specified, except for Fixed Income orders from RIA correspondents which default to "PRINCIPAL" when not specified. For Equities: Only "AGENCY" is allowed. For Mutual Funds: Only "AGENCY" is allowed. For Fixed Income: Either "AGENCY" or "PRINCIPAL" are allowed. - RIA correspondents: Defaults to "PRINCIPAL" if not specified. - Other correspondents: Defaults to "AGENCY" if not specified. For Event Contracts: Only "AGENCY" is allowed. */ export declare enum BrokerCapacity { BrokerCapacityUnspecified = "BROKER_CAPACITY_UNSPECIFIED", Agency = "AGENCY", Principal = "PRINCIPAL" } /** * Defaults to "AGENCY" if not specified, except for Fixed Income orders from RIA correspondents which default to "PRINCIPAL" when not specified. For Equities: Only "AGENCY" is allowed. For Mutual Funds: Only "AGENCY" is allowed. For Fixed Income: Either "AGENCY" or "PRINCIPAL" are allowed. - RIA correspondents: Defaults to "PRINCIPAL" if not specified. - Other correspondents: Defaults to "AGENCY" if not specified. For Event Contracts: Only "AGENCY" is allowed. */ export type BrokerCapacityOpen = OpenEnum; /** * The identifier type of the asset being ordered. For Equities: only SYMBOL is supported For Mutual Funds: only SYMBOL and CUSIP are supported For Fixed Income: only CUSIP and ISIN are supported For Event Contracts: only SYMBOL and ASSET_ID are supported */ export declare enum OrderCreateIdentifierType { AssetId = "ASSET_ID", Symbol = "SYMBOL", Cusip = "CUSIP", Isin = "ISIN" } /** * The identifier type of the asset being ordered. For Equities: only SYMBOL is supported For Mutual Funds: only SYMBOL and CUSIP are supported For Fixed Income: only CUSIP and ISIN are supported For Event Contracts: only SYMBOL and ASSET_ID are supported */ export type OrderCreateIdentifierTypeOpen = OpenEnum; /** * The execution type of this order. For Equities: MARKET, LIMIT, STOP and MARKET_IF_TOUCHED are supported. For Mutual Funds: only MARKET is supported. For Fixed Income: only LIMIT is supported. For Event Contracts: only MARKET and LIMIT are supported. */ export declare enum OrderType { Limit = "LIMIT", Market = "MARKET", Stop = "STOP", MarketIfTouched = "MARKET_IF_TOUCHED" } /** * The execution type of this order. For Equities: MARKET, LIMIT, STOP and MARKET_IF_TOUCHED are supported. For Mutual Funds: only MARKET is supported. For Fixed Income: only LIMIT is supported. For Event Contracts: only MARKET and LIMIT are supported. */ export type OrderTypeOpen = OpenEnum; /** * The side of this order. */ export declare enum Side { SideUnspecified = "SIDE_UNSPECIFIED", Buy = "BUY", Sell = "SELL" } /** * The side of this order. */ export type SideOpen = OpenEnum; export declare enum SpecialReportingInstructions { SpecialReportingInstructionsUnspecified = "SPECIAL_REPORTING_INSTRUCTIONS_UNSPECIFIED", CustomerDirected = "CUSTOMER_DIRECTED", WithDividend = "WITH_DIVIDEND", WithRights = "WITH_RIGHTS", DiscretionExercised = "DISCRETION_EXERCISED", DiscretionNotExercised = "DISCRETION_NOT_EXERCISED", BrokerDealerOrder = "BROKER_DEALER_ORDER", FullyRegistered = "FULLY_REGISTERED", OddlotDiffOnRequest = "ODDLOT_DIFF_ON_REQUEST", ProspectusEnclosed = "PROSPECTUS_ENCLOSED", ProspectusSeparateMail = "PROSPECTUS_SEPARATE_MAIL", Solicited = "SOLICITED", Unsolicited = "UNSOLICITED", XDividend = "X_DIVIDEND", ActingAsPrincipal = "ACTING_AS_PRINCIPAL", AveragePrice = "AVERAGE_PRICE", BrokerLiquidation = "BROKER_LIQUIDATION", InternetOrder = "INTERNET_ORDER", MarginSellout = "MARGIN_SELLOUT", NegativeNetProceed = "NEGATIVE_NET_PROCEED", RisklessPrincipal = "RISKLESS_PRINCIPAL", ThirdMarket = "THIRD_MARKET", SuppressTraceReporting = "SUPPRESS_TRACE_REPORTING", WhenDistributed = "WHEN_DISTRIBUTED", RoundUp = "ROUND_UP", CatParentAlgo = "CAT_PARENT_ALGO", CatParentGtc = "CAT_PARENT_GTC" } export type SpecialReportingInstructionsOpen = OpenEnum; /** * For Equities: Either "DAY" or "GOOD_TILL_DATE" are allowed. For Mutual Funds: Only "DAY" is allowed. For Fixed Income: Only "DAY" is allowed. For Event Contracts: Either "DAY", "GOOD_TILL_DATE", "GOOD_TILL_CANCELED", "IMMEDIATE_OR_CANCEL", or "FILL_OR_KILL" are allowed. */ export declare enum TimeInForce { Day = "DAY", GoodTillDate = "GOOD_TILL_DATE", GoodTillCanceled = "GOOD_TILL_CANCELED", ImmediateOrCancel = "IMMEDIATE_OR_CANCEL", FillOrKill = "FILL_OR_KILL" } /** * For Equities: Either "DAY" or "GOOD_TILL_DATE" are allowed. For Mutual Funds: Only "DAY" is allowed. For Fixed Income: Only "DAY" is allowed. For Event Contracts: Either "DAY", "GOOD_TILL_DATE", "GOOD_TILL_CANCELED", "IMMEDIATE_OR_CANCEL", or "FILL_OR_KILL" are allowed. */ export type TimeInForceOpen = OpenEnum; /** * Which TradingSession to trade in, defaults to 'CORE'. Only available for Equity orders. */ export declare enum TradingSession { TradingSessionUnspecified = "TRADING_SESSION_UNSPECIFIED", Core = "CORE", Pre = "PRE", Post = "POST", Overnight = "OVERNIGHT", Apex24 = "APEX24", Gtx = "GTX" } /** * Which TradingSession to trade in, defaults to 'CORE'. Only available for Equity orders. */ export type TradingSessionOpen = OpenEnum; /** * The message describing an order */ export type OrderCreate = { /** * The type of the asset in this order, which must be one of the following: * * @remarks * EQUITY, MUTUAL_FUND, and FIXED_INCOME. */ assetType: AssetTypeOpen; /** * Defaults to "AGENCY" if not specified, except for Fixed Income orders from RIA correspondents which default to "PRINCIPAL" when not specified. For Equities: Only "AGENCY" is allowed. For Mutual Funds: Only "AGENCY" is allowed. For Fixed Income: Either "AGENCY" or "PRINCIPAL" are allowed. - RIA correspondents: Defaults to "PRINCIPAL" if not specified. - Other correspondents: Defaults to "AGENCY" if not specified. For Event Contracts: Only "AGENCY" is allowed. */ brokerCapacity?: BrokerCapacityOpen | undefined; /** * User-supplied unique order ID. Cannot be more than 40 characters long. */ clientOrderId: string; /** * Required for Equity Orders for any client who is having Apex do CAT reporting on their behalf. A value may be provided for non-Equity orders, and will be remembered, but valid timestamps will have no impact on how they are processed. */ clientReceivedTime?: Date | null | undefined; /** * Only relevant for CAT reporting when clients have Apex do CAT reporting on their behalf. Denotes the time the client sent the order to Apex. A value may be provided for non-Equity orders, and will be remembered, but valid timestamps will have no impact on how they are processed. */ clientSentTime?: Date | null | undefined; /** * A custom commission applied to an order */ commission?: CommissionCreate | undefined; /** * Defaults to "USD". Only "USD" is supported. Full list of currency codes is defined at: https://en.wikipedia.org/wiki/ISO_4217 */ currencyCode?: string | undefined; /** * Fees that will be applied to this order. Only the BROKER_FEE type is supported. */ fees?: Array | undefined; /** * Identifier of the asset (of the type specified in `identifier_type`). */ identifier: string; /** * A string attribute denoting the country of issuance or where the asset is trading. * Only available for Mutual Fund and Fixed Income orders. * Only available when the identifier_type is SYMBOL or CUSIP. * Defaults to US when the identifier_type is SYMBOL or CUSIP. * Complies with ISO-3166 Alpha-2 Codes */ identifierIssuingRegionCode?: string | undefined; /** * The identifier type of the asset being ordered. For Equities: only SYMBOL is supported For Mutual Funds: only SYMBOL and CUSIP are supported For Fixed Income: only CUSIP and ISIN are supported For Event Contracts: only SYMBOL and ASSET_ID are supported */ identifierType: OrderCreateIdentifierTypeOpen; /** * Letter of Intent (LOI). An LOI allows investors to receive sales charge discounts based on a commitment to buy a specified monetary amount of shares over a period of time, usually 13 months. */ letterOfIntent?: LetterOfIntentCreate | undefined; /** * A limit price definition */ limitPrice?: LimitPriceCreate | undefined; /** * A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's [BigDecimal][] or Python's [decimal.Decimal][]. * * @remarks * * [BigDecimal]: * https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html * [decimal.Decimal]: https://docs.python.org/3/library/decimal.html */ maxSellQuantity?: DecimalCreate | undefined; /** * A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's [BigDecimal][] or Python's [decimal.Decimal][]. * * @remarks * * [BigDecimal]: * https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html * [decimal.Decimal]: https://docs.python.org/3/library/decimal.html */ notionalValue?: DecimalCreate | undefined; /** * Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * * @remarks * * * A full date, with non-zero year, month, and day values * A month and day value, with a zero year, such as an anniversary * A year on its own, with zero month and day values * A year and month value, with a zero day, such as a credit card expiration date * * Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and `google.protobuf.Timestamp`. */ orderDate: DateCreate; /** * The execution type of this order. For Equities: MARKET, LIMIT, STOP and MARKET_IF_TOUCHED are supported. For Mutual Funds: only MARKET is supported. For Fixed Income: only LIMIT is supported. For Event Contracts: only MARKET and LIMIT are supported. */ orderType: OrderTypeOpen; /** * A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's [BigDecimal][] or Python's [decimal.Decimal][]. * * @remarks * * [BigDecimal]: * https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html * [decimal.Decimal]: https://docs.python.org/3/library/decimal.html */ quantity?: DecimalCreate | undefined; /** * Rights of Accumulation (ROA). An ROA allows an investor to aggregate their own fund shares with the holdings of certain related parties toward achieving the investment thresholds at which sales charge discounts become available. */ rightsOfAccumulation?: RightsOfAccumulationCreate | undefined; /** * The side of this order. */ side: SideOpen; /** * Special Reporting Instructions to be applied to this order. Can include multiple Instructions. Only available for Equity, Mutual Fund, and Fixed Income orders. */ specialReportingInstructions?: Array | undefined; /** * A stop price definition */ stopPrice?: StopPriceCreate | undefined; /** * For Equities: Either "DAY" or "GOOD_TILL_DATE" are allowed. For Mutual Funds: Only "DAY" is allowed. For Fixed Income: Only "DAY" is allowed. For Event Contracts: Either "DAY", "GOOD_TILL_DATE", "GOOD_TILL_CANCELED", "IMMEDIATE_OR_CANCEL", or "FILL_OR_KILL" are allowed. */ timeInForce: TimeInForceOpen; /** * Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * * @remarks * * * A full date, with non-zero year, month, and day values * A month and day value, with a zero year, such as an anniversary * A year on its own, with zero month and day values * A year and month value, with a zero day, such as a credit card expiration date * * Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and `google.protobuf.Timestamp`. */ timeInForceExpirationDate?: DateCreate | undefined; /** * Which TradingSession to trade in, defaults to 'CORE'. Only available for Equity orders. */ tradingSession?: TradingSessionOpen | undefined; }; /** @internal */ export declare const AssetType$inboundSchema: z.ZodType; /** @internal */ export declare const AssetType$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace AssetType$ { /** @deprecated use `AssetType$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `AssetType$outboundSchema` instead. */ const outboundSchema: z.ZodType; } /** @internal */ export declare const BrokerCapacity$inboundSchema: z.ZodType; /** @internal */ export declare const BrokerCapacity$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace BrokerCapacity$ { /** @deprecated use `BrokerCapacity$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `BrokerCapacity$outboundSchema` instead. */ const outboundSchema: z.ZodType; } /** @internal */ export declare const OrderCreateIdentifierType$inboundSchema: z.ZodType; /** @internal */ export declare const OrderCreateIdentifierType$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace OrderCreateIdentifierType$ { /** @deprecated use `OrderCreateIdentifierType$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `OrderCreateIdentifierType$outboundSchema` instead. */ const outboundSchema: z.ZodType; } /** @internal */ export declare const OrderType$inboundSchema: z.ZodType; /** @internal */ export declare const OrderType$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace OrderType$ { /** @deprecated use `OrderType$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `OrderType$outboundSchema` instead. */ const outboundSchema: z.ZodType; } /** @internal */ export declare const Side$inboundSchema: z.ZodType; /** @internal */ export declare const Side$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace Side$ { /** @deprecated use `Side$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Side$outboundSchema` instead. */ const outboundSchema: z.ZodType; } /** @internal */ export declare const SpecialReportingInstructions$inboundSchema: z.ZodType; /** @internal */ export declare const SpecialReportingInstructions$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace SpecialReportingInstructions$ { /** @deprecated use `SpecialReportingInstructions$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `SpecialReportingInstructions$outboundSchema` instead. */ const outboundSchema: z.ZodType; } /** @internal */ export declare const TimeInForce$inboundSchema: z.ZodType; /** @internal */ export declare const TimeInForce$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace TimeInForce$ { /** @deprecated use `TimeInForce$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `TimeInForce$outboundSchema` instead. */ const outboundSchema: z.ZodType; } /** @internal */ export declare const TradingSession$inboundSchema: z.ZodType; /** @internal */ export declare const TradingSession$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace TradingSession$ { /** @deprecated use `TradingSession$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `TradingSession$outboundSchema` instead. */ const outboundSchema: z.ZodType; } /** @internal */ export declare const OrderCreate$inboundSchema: z.ZodType; /** @internal */ export type OrderCreate$Outbound = { asset_type: string; broker_capacity?: string | undefined; client_order_id: string; client_received_time?: string | null | undefined; client_sent_time?: string | null | undefined; commission?: CommissionCreate$Outbound | undefined; currency_code?: string | undefined; fees?: Array | undefined; identifier: string; identifier_issuing_region_code?: string | undefined; identifier_type: string; letter_of_intent?: LetterOfIntentCreate$Outbound | undefined; limit_price?: LimitPriceCreate$Outbound | undefined; max_sell_quantity?: DecimalCreate$Outbound | undefined; notional_value?: DecimalCreate$Outbound | undefined; order_date: DateCreate$Outbound; order_type: string; quantity?: DecimalCreate$Outbound | undefined; rights_of_accumulation?: RightsOfAccumulationCreate$Outbound | undefined; side: string; special_reporting_instructions?: Array | undefined; stop_price?: StopPriceCreate$Outbound | undefined; time_in_force: string; time_in_force_expiration_date?: DateCreate$Outbound | undefined; trading_session?: string | undefined; }; /** @internal */ export declare const OrderCreate$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace OrderCreate$ { /** @deprecated use `OrderCreate$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `OrderCreate$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `OrderCreate$Outbound` instead. */ type Outbound = OrderCreate$Outbound; } export declare function orderCreateToJSON(orderCreate: OrderCreate): string; export declare function orderCreateFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=ordercreate.d.ts.map