Expand description
URL helpers, request headers, millify, display formatting, and column-name utilities.
Constants§
- DEFAULT_
TIMEOUT_ SECS - Default HTTP timeout for screener POSTs (seconds).
- DEFAULT_
USER_ AGENT - Default
User-Agentfor scanner POSTs. - MIN_
STREAM_ INTERVAL_ SECS - Minimum stream refresh interval (seconds).
- SCANNER_
ORIGIN - Base URL for scan endpoints:
{SCANNER_ORIGIN}/{subtype}/scan. - TRADINGVIEW_
ORIGIN Originheader value- TRADINGVIEW_
REFERER Refererheader value (TRADINGVIEW_ORIGIN+ trailing/).
Functions§
- add_
historical - Appends a historical lookback suffix
- add_
historical_ to_ label - Label for a historical column
- add_rec
- Recommendation companion column key
- add_
rec_ to_ label - Recommendation companion column label
- format_
recommendation - Formats a numeric recommendation as an arrow + letter (
↑ B/↓ S/- N). - format_
row - Formats a
ScreenerRow, optionally limiting tocolumn_labels. - format_
timed_ field - Rewrites timed field names for the wire format
- format_
value - Formats one JSON cell for display; null becomes
"--". - get_
columns_ to_ request - Assembles
(technical_name, label)pairs for a scan payload - get_
recommendation - Maps a numeric rating to
"S","N", or"B" - get_url
- Build the scan URL for a screener subtype (
"crypto","global", …). - is_
status_ code_ ok - Returns true when
statusis in the HTTP 2xx range - millify
- Format a magnitude with K / M / B / T suffixes and three decimal places
- request_
headers - HTTP headers for
TradingViewscanner POSTs.