/* 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 { MveSelectedLeg } from './mve-selected-leg';
// May contain unused imports in some cases
// @ts-ignore
import type { PriceRange } from './price-range';

export interface Market {
    'ticker': string;
    'event_ticker': string;
    /**
     * Identifies the type of market
     */
    'market_type': MarketMarketTypeEnum;
    /**
     * @deprecated
     */
    'title'?: string;
    /**
     * @deprecated
     */
    'subtitle'?: string;
    /**
     * Shortened title for the yes side of this market
     */
    'yes_sub_title': string;
    /**
     * Shortened title for the no side of this market
     */
    'no_sub_title': string;
    'created_time': string;
    /**
     * Time of the last non-trading metadata update.
     */
    'updated_time': string;
    'open_time': string;
    'close_time': string;
    /**
     * Time when this market is expected to expire
     */
    'expected_expiration_time'?: string | null;
    /**
     * @deprecated
     */
    'expiration_time'?: string;
    /**
     * Latest possible time for this market to expire
     */
    'latest_expiration_time': string;
    /**
     * The amount of time after determination that the market settles
     */
    'settlement_timer_seconds': number;
    /**
     * The current status of the market in its lifecycle.
     */
    'status': MarketStatusEnum;
    /**
     * DEPRECATED: Use price_level_structure and price_ranges instead.
     * @deprecated
     */
    'response_price_units'?: MarketResponsePriceUnitsEnum;
    /**
     * 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_bid_dollars': string;
    /**
     * 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.
     */
    'yes_bid_size_fp': 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.
     */
    'yes_ask_dollars': string;
    /**
     * 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.
     */
    'yes_ask_size_fp': 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_bid_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_ask_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.
     */
    'last_price_dollars': string;
    /**
     * 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.
     */
    'volume_fp': string;
    /**
     * 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.
     */
    'volume_24h_fp': string;
    'result': MarketResultEnum;
    'can_close_early': boolean;
    'fractional_trading_enabled': boolean;
    /**
     * 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.
     */
    'open_interest_fp': 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.
     */
    'notional_value_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.
     */
    'previous_yes_bid_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.
     */
    'previous_yes_ask_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.
     */
    'previous_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.
     */
    'liquidity_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.
     */
    'settlement_value_dollars'?: string;
    /**
     * Timestamp when the market was settled. Only filled for settled markets
     */
    'settlement_ts'?: string | null;
    /**
     * The value that was considered for the settlement
     */
    'expiration_value': string;
    /**
     * Time when this market\'s fee waiver expires
     */
    'fee_waiver_expiration_time'?: string | null;
    /**
     * The condition under which the market can close early
     */
    'early_close_condition'?: string | null;
    /**
     * DEPRECATED: Use price_level_structure and price_ranges instead.
     * @deprecated
     */
    'tick_size'?: number;
    /**
     * Strike type defines how the market strike is defined and evaluated
     */
    'strike_type'?: MarketStrikeTypeEnum;
    /**
     * Minimum expiration value that leads to a YES settlement
     */
    'floor_strike'?: number | null;
    /**
     * Maximum expiration value that leads to a YES settlement
     */
    'cap_strike'?: number | null;
    /**
     * Mapping from expiration values to settlement values
     */
    'functional_strike'?: string | null;
    /**
     * Expiration value for each target that leads to a YES settlement
     */
    'custom_strike'?: object | null;
    /**
     * A plain language description of the most important market terms
     */
    'rules_primary': string;
    /**
     * A plain language description of secondary market terms
     */
    'rules_secondary': string;
    /**
     * The ticker of the multivariate event collection
     */
    'mve_collection_ticker'?: string;
    'mve_selected_legs'?: Array<MveSelectedLeg>;
    'primary_participant_key'?: string | null;
    /**
     * Price level structure for this market, defining price ranges and tick sizes
     */
    'price_level_structure': string;
    /**
     * Valid price ranges for orders on this market
     */
    'price_ranges': Array<PriceRange>;
    /**
     * If true, the market may be removed after determination if there is no activity on it
     */
    'is_provisional'?: boolean;
}

export const MarketMarketTypeEnum = {
    Binary: 'binary',
    Scalar: 'scalar'
} as const;

export type MarketMarketTypeEnum = typeof MarketMarketTypeEnum[keyof typeof MarketMarketTypeEnum];
export const MarketStatusEnum = {
    Initialized: 'initialized',
    Inactive: 'inactive',
    Active: 'active',
    Closed: 'closed',
    Determined: 'determined',
    Disputed: 'disputed',
    Amended: 'amended',
    Finalized: 'finalized'
} as const;

export type MarketStatusEnum = typeof MarketStatusEnum[keyof typeof MarketStatusEnum];
export const MarketResponsePriceUnitsEnum = {
    UsdCent: 'usd_cent'
} as const;

export type MarketResponsePriceUnitsEnum = typeof MarketResponsePriceUnitsEnum[keyof typeof MarketResponsePriceUnitsEnum];
export const MarketResultEnum = {
    Yes: 'yes',
    No: 'no',
    Scalar: 'scalar',
    Empty: ''
} as const;

export type MarketResultEnum = typeof MarketResultEnum[keyof typeof MarketResultEnum];
export const MarketStrikeTypeEnum = {
    Greater: 'greater',
    GreaterOrEqual: 'greater_or_equal',
    Less: 'less',
    LessOrEqual: 'less_or_equal',
    Between: 'between',
    Functional: 'functional',
    Custom: 'custom',
    Structured: 'structured'
} as const;

export type MarketStrikeTypeEnum = typeof MarketStrikeTypeEnum[keyof typeof MarketStrikeTypeEnum];


