Class: DhanHQ::Contracts::AlertOrderContract
- Inherits:
-
BaseContract
- Object
- Dry::Validation::Contract
- BaseContract
- DhanHQ::Contracts::AlertOrderContract
- Defined in:
- lib/DhanHQ/contracts/alert_order_contract.rb
Overview
Validates Conditional Trigger (alert order) payloads for POST /v2/alerts/orders and PUT /v2/alerts/orders/alertId. Condition: exchangeSegment (NSE_EQ|BSE_EQ|IDX_I), timeframe (required), comparisonType, operator, expDate, frequency; indicatorName/time_frame required for TECHNICAL_* comparison types. Orders: transactionType, exchangeSegment, productType (CNC|INTRADAY|MARGIN|MTF), orderType, securityId, quantity, validity, price (required); discQuantity, triggerPrice optional.
Constant Summary
Constants included from DhanHQ::Constants
DhanHQ::Constants::ALERT_CONDITION_SEGMENTS, DhanHQ::Constants::ALERT_TIMEFRAMES, DhanHQ::Constants::AMO_TIMINGS, DhanHQ::Constants::BO, DhanHQ::Constants::BSE, DhanHQ::Constants::BSE_FNO, DhanHQ::Constants::BUY, DhanHQ::Constants::CHART_EXCHANGE_SEGMENTS, DhanHQ::Constants::CHART_INTERVALS, DhanHQ::Constants::CNC, DhanHQ::Constants::CO, DhanHQ::Constants::COMPACT_CSV_URL, DhanHQ::Constants::COMPARISON_TYPES, DhanHQ::Constants::CUR, DhanHQ::Constants::DATA_API_PREFIXES, DhanHQ::Constants::DAY, DhanHQ::Constants::DETAILED_CSV_URL, DhanHQ::Constants::DHAN_ERROR_MAPPING, DhanHQ::Constants::EXCHANGE_SEGMENTS, DhanHQ::Constants::FNO, DhanHQ::Constants::FOREVER_ORDER_PRODUCT_TYPES, DhanHQ::Constants::FOREVER_ORDER_SEGMENTS, DhanHQ::Constants::INDEX, DhanHQ::Constants::INSTRUMENTS, DhanHQ::Constants::INTRA, DhanHQ::Constants::IOC, DhanHQ::Constants::Instrument, DhanHQ::Constants::LIMIT, DhanHQ::Constants::MARGIN, DhanHQ::Constants::MARGIN_CALCULATOR_SEGMENTS, DhanHQ::Constants::MARGIN_PRODUCT_TYPES, DhanHQ::Constants::MARKET, DhanHQ::Constants::MCX, DhanHQ::Constants::MTF, DhanHQ::Constants::NSE, DhanHQ::Constants::NSE_FNO, DhanHQ::Constants::OPERATORS, DhanHQ::Constants::OPTION_CHAIN_UNDERLYING_SEGMENTS, DhanHQ::Constants::ORDER_STATUSES, DhanHQ::Constants::ORDER_TYPES, DhanHQ::Constants::PAYLOAD_REQUIRES_DHAN_CLIENT_ID_PREFIXES, DhanHQ::Constants::PRODUCT_TYPES, DhanHQ::Constants::SEGMENT_MAP, DhanHQ::Constants::SELL, DhanHQ::Constants::SL, DhanHQ::Constants::SLM, DhanHQ::Constants::TRANSACTION_TYPES, DhanHQ::Constants::VALIDITY_TYPES