Alpaca-trade-api-rust

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
- 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(),
);
- 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