Class: Dtn::Lookups::Historical::DailyTimeframe
- Defined in:
- lib/dtn/lookups/historical/daily_timeframe.rb
Overview
Daily timeframe requests
Constant Summary collapse
- TEMPLATE =
"HDT,%<symbol>s,%<begin_date>s,%<end_date>s,%<max_datapoints>d,%<data_direction>d,%<id>d"
Constants inherited from Base
Base::DEFAULT_BEGIN_FILTER_TIME, Base::DEFAULT_DATAPOINTS_PER_SEND, Base::DEFAULT_DATA_DIRECTION, Base::DEFAULT_END_FILTER_TIME, Base::DEFAULT_MAX_DATAPOINTS
Constants included from Concerns::Validation
Concerns::Validation::DATE_FORMAT, Concerns::Validation::DATE_TIME_FORMAT, Concerns::Validation::DEFAULT_INTERVAL_TYPE, Concerns::Validation::MAX_INT16
Constants inherited from Request
Request::END_OF_MESSAGE_CHARACTERS, Request::NO_DATA_CHARACTERS, Request::PORT, Request::SYNTAX_ERROR_CHARACTERS
Instance Attribute Summary
Attributes inherited from Request
Instance Method Summary collapse
-
#call(symbol:, begin_date:, end_date:, **options) ⇒ Object
HDT - Retrieves [Days] days of interval data for the specified [Symbol].
- #expected_messages_class ⇒ Object
Methods inherited from Request
Methods included from Concerns::Id
Instance Method Details
#call(symbol:, begin_date:, end_date:, **options) ⇒ Object
HDT - Retrieves [Days] days of interval data for the specified [Symbol].
Example message
HDT,[Symbol],[BeginDate],[EndDate],[MaxDatapoints],[DataDirection],[RequestID],\
[DatapointsPerSend]<CR><LF>
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/dtn/lookups/historical/daily_timeframe.rb', line 17 def call(symbol:, begin_date:, end_date:, **) self. = defaults(**).merge( { symbol: validate_symbol(symbol), begin_date: validate_date(begin_date), end_date: validate_date(end_date) } ) super end |
#expected_messages_class ⇒ Object
28 29 30 |
# File 'lib/dtn/lookups/historical/daily_timeframe.rb', line 28 def Messages::Historical::DailyWeeklyMonthly end |