/* 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.11.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. Currently only whole contract values are permitted, but the format supports future fractional precision. Integer contract count fields are legacy and will be deprecated; when both integer and fp fields are provided, they must match.
     */
    'count_fp'?: string;
    'yes_price'?: number;
    'no_price'?: number;
    /**
     * US dollar amount as a fixed-point decimal string with up to 6 decimal places of precision. This is the maximum supported precision; valid quote intervals for a given market are constrained by that market\'s price level structure.
     */
    'yes_price_dollars'?: string;
    /**
     * US dollar amount as a fixed-point decimal string with up to 6 decimal places of precision. This is the maximum supported precision; valid quote intervals for a given market are constrained by that market\'s price level structure.
     */
    'no_price_dollars'?: string;
    'expiration_ts'?: number;
    '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;
}

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];


