Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/danmandel/trading-client

Rust wrapper for trading platform web APIs
https://github.com/danmandel/trading-client

Last synced: about 2 months ago
JSON representation

Rust wrapper for trading platform web APIs

Awesome Lists containing this project

README

        

# Trading Client
`trading-client` is a Rust library that provides a convenient wrapper for commonly used trading platform APIs under a single unified interface.
Currently an experimental work in progress that only supports [Alpaca](https://alpaca.markets/).

# Supported API
```Rust
pub trait TradingClient {
fn new(config: &Config) -> Self
where
Self: Sized;
async fn create_order(&self, order: &Order) -> Result<(), Box>; // TODO: OrderResponse
async fn get_asset(&self, symbol: &str) -> Result>;
async fn subscribe_to_data(
&self,
symbol: &str,
) -> std::result::Result<(), Box>;
}
```