Skip to main content

Crate alpaca_http

Crate alpaca_http 

Source
Expand description

Shared HTTP transport for the alpaca-rust workspace.

alpaca-rest-http provides the reusable request pipeline used by the higher-level SDK crates. It includes request construction, retry policy, response and error metadata, observer hooks, and concurrency limiting.

Most applications should use alpaca-data or alpaca-trade instead of depending on this crate directly.

use alpaca_http::{HttpClient, RetryConfig};

let client = HttpClient::builder()
    .retry_config(RetryConfig::default())
    .build()?;
let _ = client;

Re-exports§

pub use auth::Authenticator;
pub use auth::StaticHeaderAuthenticator;
pub use client::HttpClient;
pub use client::HttpClientBuilder;
pub use error::Error;
pub use meta::ErrorMeta;
pub use meta::HttpResponse;
pub use meta::ResponseMeta;
pub use observer::ErrorEvent;
pub use observer::NoopObserver;
pub use observer::RequestStart;
pub use observer::ResponseEvent;
pub use observer::RetryEvent;
pub use observer::TransportObserver;
pub use rate_limit::ConcurrencyLimit;
pub use rate_limit::ConcurrencyPermit;
pub use request::NoContent;
pub use request::RequestBody;
pub use request::RequestParts;
pub use retry::RetryConfig;
pub use retry::RetryDecision;

Modules§

auth
client
error
meta
observer
rate_limit
request
retry