Improve outgoing Alpaca API types
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -43,7 +43,7 @@ impl Config {
|
||||
let alpaca_source: Source = env::var("ALPACA_SOURCE")
|
||||
.expect("ALPACA_SOURCE must be set.")
|
||||
.parse()
|
||||
.expect("ALPACA_SOURCE must be a either 'iex' or 'sip'.");
|
||||
.expect("ALPACA_SOURCE must be 'iex', 'sip', or 'otc'.");
|
||||
|
||||
let clickhouse_url = env::var("CLICKHOUSE_URL").expect("CLICKHOUSE_URL must be set.");
|
||||
let clickhouse_user = env::var("CLICKHOUSE_USER").expect("CLICKHOUSE_USER must be set.");
|
||||
@@ -75,6 +75,7 @@ impl Config {
|
||||
alpaca_rate_limit: RateLimiter::direct(Quota::per_minute(match alpaca_source {
|
||||
Source::Iex => unsafe { NonZeroU32::new_unchecked(200) },
|
||||
Source::Sip => unsafe { NonZeroU32::new_unchecked(10000) },
|
||||
Source::Otc => unimplemented!("OTC rate limit not implemented."),
|
||||
})),
|
||||
alpaca_source,
|
||||
clickhouse_client: clickhouse::Client::default()
|
||||
|
Reference in New Issue
Block a user