Watchlists
alpaca-trade::Client::watchlists() exposes the full adopted watchlist resource family.
Implemented Methods
listcreateget_by_idupdate_by_iddelete_by_idadd_asset_by_iddelete_symbol_by_idget_by_nameupdate_by_nameadd_asset_by_namedelete_by_name
Typical Request
use alpaca_trade::{Client, watchlists};
let client = Client::from_env()?;
let watchlist = client
.watchlists()
.create(watchlists::CreateRequest {
name: "core-tech".into(),
symbols: Some(vec!["AAPL".into(), "MSFT".into()]),
})
.await?;
# let _ = watchlist;
# Ok::<(), alpaca_trade::Error>(())
Notes
- both id-based and name-based official routes are supported
- this crate keeps the official route split instead of collapsing it into a custom abstraction