Options
- Module path:
alpaca_data::options - Client type:
OptionsClient - docs.rs module: https://docs.rs/alpaca-data/latest/alpaca_data/options/
- Site rustdoc module: https://wmzhai.github.io/alpaca-data-rs/api/alpaca_data/options/
- Scope: Public API surface
Options market data endpoints. Mirror methods cover historical bars and trades, latest quotes and trades, snapshots, chain lookups, and metadata endpoints. Convenience methods add:
Methods
| Method | Kind | Async | Request | Return | docs.rs | Site rustdoc |
|---|---|---|---|---|---|---|
bars | mirror | yes | BarsRequest | Result<BarsResponse, Error> | docs.rs | site |
bars_all | convenience | yes | BarsRequest | Result<BarsResponse, Error> | docs.rs | site |
bars_stream | convenience | no | BarsRequest | ResponseStream<Result<BarsResponse, Error>> | docs.rs | site |
trades | mirror | yes | TradesRequest | Result<TradesResponse, Error> | docs.rs | site |
trades_all | convenience | yes | TradesRequest | Result<TradesResponse, Error> | docs.rs | site |
trades_stream | convenience | no | TradesRequest | ResponseStream<Result<TradesResponse, Error>> | docs.rs | site |
latest_quotes | mirror | yes | LatestQuotesRequest | Result<LatestQuotesResponse, Error> | docs.rs | site |
latest_trades | mirror | yes | LatestTradesRequest | Result<LatestTradesResponse, Error> | docs.rs | site |
snapshots | mirror | yes | SnapshotsRequest | Result<SnapshotsResponse, Error> | docs.rs | site |
snapshots_all | convenience | yes | SnapshotsRequest | Result<SnapshotsResponse, Error> | docs.rs | site |
snapshots_stream | convenience | no | SnapshotsRequest | ResponseStream<Result<SnapshotsResponse, Error>> | docs.rs | site |
chain | mirror | yes | ChainRequest | Result<ChainResponse, Error> | docs.rs | site |
chain_all | convenience | yes | ChainRequest | Result<ChainResponse, Error> | docs.rs | site |
chain_stream | convenience | no | ChainRequest | ResponseStream<Result<ChainResponse, Error>> | docs.rs | site |
exchange_codes | mirror | yes | - | Result<ExchangeCodesResponse, Error> | docs.rs | site |
condition_codes | mirror | yes | ConditionCodesRequest | Result<ConditionCodesResponse, Error> | docs.rs | site |
Requests
BarsRequest
- Kind: struct
- Summary: -
- docs.rs: BarsRequest
- Site rustdoc: BarsRequest
| Field | Official Word | Type | Notes |
|---|---|---|---|
symbols | symbols | Vec<String> | - |
timeframe | timeframe | TimeFrame | - |
start | start | Option<String> | - |
end | end | Option<String> | - |
limit | limit | Option<u32> | - |
sort | sort | Option<Sort> | - |
page_token | page_token | Option<String> | - |
ChainRequest
- Kind: struct
- Summary: -
- docs.rs: ChainRequest
- Site rustdoc: ChainRequest
| Field | Official Word | Type | Notes |
|---|---|---|---|
underlying_symbol | underlying_symbol | String | - |
feed | feed | Option<OptionsFeed> | - |
r#type | type | Option<ContractType> | - |
strike_price_gte | strike_price_gte | Option<f64> | - |
strike_price_lte | strike_price_lte | Option<f64> | - |
expiration_date | expiration_date | Option<String> | - |
expiration_date_gte | expiration_date_gte | Option<String> | - |
expiration_date_lte | expiration_date_lte | Option<String> | - |
root_symbol | root_symbol | Option<String> | - |
updated_since | updated_since | Option<String> | - |
limit | limit | Option<u32> | - |
page_token | page_token | Option<String> | - |
ConditionCodesRequest
- Kind: struct
- Summary: -
- docs.rs: ConditionCodesRequest
- Site rustdoc: ConditionCodesRequest
| Field | Official Word | Type | Notes |
|---|---|---|---|
ticktype | ticktype | TickType | - |
LatestQuotesRequest
- Kind: struct
- Summary: -
- docs.rs: LatestQuotesRequest
- Site rustdoc: LatestQuotesRequest
| Field | Official Word | Type | Notes |
|---|---|---|---|
symbols | symbols | Vec<String> | - |
feed | feed | Option<OptionsFeed> | - |
LatestTradesRequest
- Kind: struct
- Summary: -
- docs.rs: LatestTradesRequest
- Site rustdoc: LatestTradesRequest
| Field | Official Word | Type | Notes |
|---|---|---|---|
symbols | symbols | Vec<String> | - |
feed | feed | Option<OptionsFeed> | - |
SnapshotsRequest
- Kind: struct
- Summary: -
- docs.rs: SnapshotsRequest
- Site rustdoc: SnapshotsRequest
| Field | Official Word | Type | Notes |
|---|---|---|---|
symbols | symbols | Vec<String> | - |
feed | feed | Option<OptionsFeed> | - |
limit | limit | Option<u32> | - |
page_token | page_token | Option<String> | - |
TradesRequest
- Kind: struct
- Summary: -
- docs.rs: TradesRequest
- Site rustdoc: TradesRequest
| Field | Official Word | Type | Notes |
|---|---|---|---|
symbols | symbols | Vec<String> | - |
start | start | Option<String> | - |
end | end | Option<String> | - |
limit | limit | Option<u32> | - |
sort | sort | Option<Sort> | - |
page_token | page_token | Option<String> | - |
Responses
BarsResponse
- Kind: struct
- Summary: -
- docs.rs: BarsResponse
- Site rustdoc: BarsResponse
| Field | Official Word | Type | Notes |
|---|---|---|---|
bars | bars | HashMap<String, Vec<Bar>> | - |
next_page_token | next_page_token | Option<String> | - |
ChainResponse
- Kind: struct
- Summary: -
- docs.rs: ChainResponse
- Site rustdoc: ChainResponse
| Field | Official Word | Type | Notes |
|---|---|---|---|
snapshots | snapshots | HashMap<String, Snapshot> | - |
next_page_token | next_page_token | Option<String> | - |
ConditionCodesResponse
- Kind: type
- Summary: -
- docs.rs: ConditionCodesResponse
- Site rustdoc: ConditionCodesResponse
- Alias target:
HashMap<String, String>
ExchangeCodesResponse
- Kind: type
- Summary: -
- docs.rs: ExchangeCodesResponse
- Site rustdoc: ExchangeCodesResponse
- Alias target:
HashMap<String, String>
LatestQuotesResponse
- Kind: struct
- Summary: -
- docs.rs: LatestQuotesResponse
- Site rustdoc: LatestQuotesResponse
| Field | Official Word | Type | Notes |
|---|---|---|---|
quotes | quotes | HashMap<String, Quote> | - |
LatestTradesResponse
- Kind: struct
- Summary: -
- docs.rs: LatestTradesResponse
- Site rustdoc: LatestTradesResponse
| Field | Official Word | Type | Notes |
|---|---|---|---|
trades | trades | HashMap<String, Trade> | - |
SnapshotsResponse
- Kind: struct
- Summary: -
- docs.rs: SnapshotsResponse
- Site rustdoc: SnapshotsResponse
| Field | Official Word | Type | Notes |
|---|---|---|---|
snapshots | snapshots | HashMap<String, Snapshot> | - |
next_page_token | next_page_token | Option<String> | - |
TradesResponse
- Kind: struct
- Summary: -
- docs.rs: TradesResponse
- Site rustdoc: TradesResponse
| Field | Official Word | Type | Notes |
|---|---|---|---|
trades | trades | HashMap<String, Vec<Trade>> | - |
next_page_token | next_page_token | Option<String> | - |
Models
Bar
| Field | Official Word | Type | Notes |
|---|---|---|---|
t | t | Option<Timestamp> | - |
o | o | Option<f64> | - |
h | h | Option<f64> | - |
l | l | Option<f64> | - |
c | c | Option<f64> | - |
v | v | Option<u64> | - |
n | n | Option<u64> | - |
vw | vw | Option<f64> | - |
Greeks
| Field | Official Word | Type | Notes |
|---|---|---|---|
delta | delta | Option<f64> | - |
gamma | gamma | Option<f64> | - |
rho | rho | Option<f64> | - |
theta | theta | Option<f64> | - |
vega | vega | Option<f64> | - |
Quote
| Field | Official Word | Type | Notes |
|---|---|---|---|
t | t | Option<Timestamp> | - |
bx | bx | Option<String> | - |
bp | bp | Option<f64> | - |
bs | bs | Option<u64> | - |
ax | ax | Option<String> | - |
ap | ap | Option<f64> | - |
r#as | as | Option<u64> | - |
c | c | Option<String> | - |
Snapshot
| Field | Official Word | Type | Notes |
|---|---|---|---|
latestTrade | latestTrade | Option<Trade> | - |
latestQuote | latestQuote | Option<Quote> | - |
minuteBar | minuteBar | Option<Bar> | - |
dailyBar | dailyBar | Option<Bar> | - |
prevDailyBar | prevDailyBar | Option<Bar> | - |
greeks | greeks | Option<Greeks> | - |
impliedVolatility | impliedVolatility | Option<f64> | - |
Trade
| Field | Official Word | Type | Notes |
|---|---|---|---|
t | t | Option<Timestamp> | - |
x | x | Option<String> | - |
p | p | Option<f64> | - |
s | s | Option<u64> | - |
c | c | Option<String> | - |
Enums
ContractType
- Kind: enum
- Summary: -
- docs.rs: ContractType
- Site rustdoc: ContractType
| Variant | Official Value |
|---|---|
Call | call |
Put | put |
OptionsFeed
- Kind: enum
- Summary: -
- docs.rs: OptionsFeed
- Site rustdoc: OptionsFeed
| Variant | Official Value |
|---|---|
Opra | opra |
Indicative | indicative |
TickType
| Variant | Official Value |
|---|---|
Trade | trade |
Quote | quote |
TimeFrame
- Kind: struct
- Summary: -
- docs.rs: TimeFrame
- Site rustdoc: TimeFrame
- Example constructors:
min_1 -> 1Min,day_1 -> 1Day
Related Repository Artifacts
- Examples:
examples/options_chain.rs - Tests:
tests/live_options_condition_codes.rs,tests/live_options_historical.rs,tests/live_options_latest_metadata.rs,tests/live_options_snapshots_chain.rs,tests/mock_options_errors.rs - Benchmarks:
benches/options.rs
Coverage Notes
- The strict endpoint parity ledger for this module lives in API Coverage.
- Generated reference pages mirror the shipped Rust surface and do not claim unimplemented Alpaca endpoints as available.