| Crates.io | alpaca-base |
| lib.rs | alpaca-base |
| version | 0.25.1 |
| created_at | 2026-01-01 19:51:41.124288+00 |
| updated_at | 2026-01-02 07:33:39.264844+00 |
| description | Base library with common structs, traits, and logic for Alpaca API clients |
| homepage | https://github.com/joaquinbejar/alpaca-rs |
| repository | https://github.com/joaquinbejar/alpaca-rs |
| max_upload_size | |
| id | 2017371 |
| size | 308,204 |
Base library with common structs, traits, and logic for Alpaca API clients.
alpaca-base provides the foundational building blocks for the Alpaca Market API Rust clients. It includes shared data models, authentication utilities, custom error types, and common helper functions used by both alpaca-http and alpaca-websocket.
test-utils feature).Add to your Cargo.toml:
[dependencies]
alpaca-base = "0.25.1"
While alpaca-base is primarily used internally by other crates in the workspace, you can use its types and authentication utilities directly.
[!TIP] Automated .env Loading:
Credentials::from_env()automatically attempts to load a.envfile at the start of execution using thedotenvcrate. You don't need to calldotenv().ok()manually in your code.
use alpaca_base::auth::Credentials;
// Automatically loads from .env
let credentials = Credentials::from_env()?;
We welcome contributions to this project! If you would like to contribute, please follow these steps:
If you have any questions, issues, or would like to provide feedback, please feel free to contact the project maintainer:
We appreciate your interest and look forward to your contributions!
License: MIT
This software is not officially associated with Alpaca Markets. Trading financial instruments carries risk, and this library is provided as-is without any guarantees. Always test thoroughly with a paper trading account before using in a live trading environment.