Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/danmandel/trading-client
- Owner: danmandel
- License: mit
- Created: 2024-05-13T05:24:31.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-10-23T03:12:53.000Z (3 months ago)
- Last Synced: 2024-10-24T16:28:49.175Z (3 months ago)
- Language: Rust
- Size: 38.1 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
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>;
}
```