Validates whether a frequency duration in seconds corresponds to an allowed KuCoin klines interval.
Usage
check_allowed_frequency_s(freq_s)
Arguments
- freq_s
Numeric value representing the frequency in seconds.
Value
Invisible NULL
if valid; aborts with an error if invalid.
Details
Workflow Overview
Validation: Checks if freq_s
matches any value in freq_to_second_map
, aborting with an error message listing allowed values if not.
API Endpoint
Not applicable (helper validation function).
Usage
Utilised to confirm frequency durations in seconds are valid for klines data segmentation.
Official Documentation
Not directly tied to a specific endpoint; see KuCoin klines API documentation for frequency durations.
Examples
if (FALSE) { # \dontrun{
check_allowed_frequency_s(60) # Proceeds silently (matches "1min")
check_allowed_frequency_s(120) # Aborts with error
} # }