openlimits-exchange 0.3.0

The exchange traits of OpenLimits.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use async_trait::async_trait;
use super::shared::Result;
use super::info::ExchangeInfoRetrieval;
use super::ExchangeAccount;
use super::ExchangeMarketData;

#[async_trait]
pub trait Exchange: ExchangeInfoRetrieval + ExchangeAccount + ExchangeMarketData + Sized {
    type InitParams;
    type InnerClient;
    async fn new(params: Self::InitParams) -> Result<Self>;
    fn inner_client(&self) -> Option<&Self::InnerClient>;
}