/* tslint:disable */ /* eslint-disable */ /** * Kalshi Trade API Manual Endpoints * Manually defined OpenAPI spec for endpoints being migrated to spec-first approach * * The version of the OpenAPI document: 3.36.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ // May contain unused imports in some cases // @ts-ignore import type { SelfTradePreventionType } from './self-trade-prevention-type'; export interface CreateOrderRequest { 'ticker': string; 'client_order_id'?: string; 'side': CreateOrderRequestSideEnum; 'action': CreateOrderRequestActionEnum; /** * Order quantity in contracts (whole contracts only). Provide count or count_fp; if both provided they must match. */ 'count'?: number; /** * Fixed-point contract count string (2 decimals, e.g., \"10.00\"; referred to as \"fp\" in field names). Requests accept 0-2 decimal places (e.g., \"10\", \"10.0\", \"10.00\"); responses always emit 2 decimals. Fractional contract values (e.g., \"2.50\") are supported; the minimum granularity is 0.01 contracts. */ 'count_fp'?: string; 'yes_price'?: number; 'no_price'?: number; /** * Fixed-point US dollar string. Most request fields accept 2-4 decimal places (e.g., \"0.56\", \"0.5600\"); responses emit up to 6. Valid quote intervals for a given market are constrained by that market\'s price level structure. */ 'yes_price_dollars'?: string; /** * Fixed-point US dollar string. Most request fields accept 2-4 decimal places (e.g., \"0.56\", \"0.5600\"); responses emit up to 6. Valid quote intervals for a given market are constrained by that market\'s price level structure. */ 'no_price_dollars'?: string; /** * Optional Unix timestamp in seconds for when the order expires. To place an expiring order, set `time_in_force` to `good_till_canceled` and provide this `expiration_ts`. `GTT` is an internal execution type and is not a valid API value for `time_in_force`. The `immediate_or_cancel` time-in-force value cannot be combined with `expiration_ts`. */ 'expiration_ts'?: number; /** * Specifies how long the order remains active. Use `good_till_canceled` with `expiration_ts` for an order that should rest until a specific expiration time; without `expiration_ts`, `good_till_canceled` is a true good-till-canceled order. `GTT` is not a valid API value. */ 'time_in_force'?: CreateOrderRequestTimeInForceEnum; /** * Maximum cost in cents. When specified, the order will automatically have Fill-or-Kill (FoK) behavior. */ 'buy_max_cost'?: number; 'post_only'?: boolean; 'reduce_only'?: boolean; /** * Deprecated: Use reduce_only instead. Only accepts value of 0. */ 'sell_position_floor'?: number; 'self_trade_prevention_type'?: SelfTradePreventionType; /** * The order group this order is part of */ 'order_group_id'?: string; /** * If this flag is set to true, the order will be canceled if the order is open and trading on the exchange is paused for any reason. */ 'cancel_order_on_pause'?: boolean; /** * The subaccount number to use for this order. 0 is the primary subaccount. */ 'subaccount'?: number; /** * Exchange shard index. Defaults to 0. Use -1 to auto-route by market ticker. */ 'exchange_index'?: number; } export const CreateOrderRequestSideEnum = { Yes: 'yes', No: 'no' } as const; export type CreateOrderRequestSideEnum = typeof CreateOrderRequestSideEnum[keyof typeof CreateOrderRequestSideEnum]; export const CreateOrderRequestActionEnum = { Buy: 'buy', Sell: 'sell' } as const; export type CreateOrderRequestActionEnum = typeof CreateOrderRequestActionEnum[keyof typeof CreateOrderRequestActionEnum]; export const CreateOrderRequestTimeInForceEnum = { FillOrKill: 'fill_or_kill', GoodTillCanceled: 'good_till_canceled', ImmediateOrCancel: 'immediate_or_cancel' } as const; export type CreateOrderRequestTimeInForceEnum = typeof CreateOrderRequestTimeInForceEnum[keyof typeof CreateOrderRequestTimeInForceEnum];