1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! Centralized constants for default endpoints and UA.
/// Default desktop UA to avoid trivial bot blocking.
pub const USER_AGENT: &str = concat!;
/// Yahoo chart API base (symbol is appended).
pub const DEFAULT_BASE_CHART: &str = "https://query1.finance.yahoo.com/v8/finance/chart/";
/// Yahoo quoteSummary API base (symbol is appended).
pub const DEFAULT_BASE_QUOTE_API: &str =
"https://query1.finance.yahoo.com/v10/finance/quoteSummary/";
/// A URL that returns a Set-Cookie header for Yahoo domains.
pub const DEFAULT_COOKIE_URL: &str = "https://fc.yahoo.com/consent";
/// URL to fetch a crumb (requires cookie from `DEFAULT_COOKIE_URL`).
pub const DEFAULT_CRUMB_URL: &str = "https://query1.finance.yahoo.com/v1/test/getcrumb";
/// Base URL for the Yahoo Finance v7 quote API.
pub const DEFAULT_BASE_QUOTE_V7: &str = "https://query1.finance.yahoo.com/v7/finance/quote";
/// Base URL for the Yahoo Finance v7 options API.
pub const DEFAULT_BASE_OPTIONS_V7: &str = "https://query1.finance.yahoo.com/v7/finance/options/";
/// Base URL for the Yahoo Finance search API.
pub const DEFAULT_BASE_STREAM: &str = "wss://streamer.finance.yahoo.com/?version=2";
/// Base URL for the Business Insider search API (for ISIN lookup).
pub const DEFAULT_BASE_INSIDER_SEARCH: &str =
"https://markets.businessinsider.com/ajax/SearchController_Suggest";
/// Base URL for Yahoo Finance site (used for news).
pub const DEFAULT_BASE_NEWS: &str = "https://finance.yahoo.com";
/// Base URL for the Yahoo Finance timeseries API.
pub const DEFAULT_BASE_TIMESERIES: &str =
"https://query2.finance.yahoo.com/ws/fundamentals-timeseries/v1/finance/timeseries/";