alpaca-trade-api-rust

Crates.ioalpaca-trade-api-rust
lib.rsalpaca-trade-api-rust
version0.0.3
created_at2025-12-06 09:51:01.407194+00
updated_at2025-12-08 19:15:57.717523+00
descriptionThe Alpaca trading api client implement in Rust.
homepagehttps://github.com/YueLiRex/alpaca-trade-api-rust
repositoryhttps://github.com/YueLiRex/alpaca-trade-api-rust
max_upload_size
id1969916
size220,958
Yue Li (YueLiRex)

documentation

README

Alpaca-trade-api-rust

Documentation Dual License Coverage Stars Issues PRs Build

Alpaca-trade-api-rust as the name suggests. It is a Rust implementation of alpaca trading api. It allows you to interact with alpaca with its restful api.

How to use it

  1. Initialize alpaca client with api key and api secret
use alpaca_trade_api_rust::prelude::Client;

let client = Client::new(
  "localhost:8080".to_string(),
  "testApiKey".to_string(),
  "testApiSecretKey".to_string(),
);
  1. Call alpaca trading api

let orders_query = AllOrdersQueryParameter {
  status: Some(OrderStatus::Open),
  limit: Some(50),
  after: None,
  until: None,
  direction: Some(OrdersDirection::Desc),
  nested: Some(true),
  symbols: Some(ComaSeparatedStrings {
    values: vec!["AAPL", "TSLA"],
  }),
  side: None,
  asset_class: Some(ComaSeparatedStrings {
    values: vec!["us_option", "crypto"],
  }),
  before_order_id: None,
  after_order_id: None,
};

client.get_all_orders(&orders_query).await?

This repo is still in development. Welcome to submit an issue to li.yue.rex@gmail.com

Commit count: 0

cargo fmt