binance-core 0.2.3

Core functionality including API request signing, HTTP client setup, and shared logic for Binance Spot and Futures.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
pub trait WebSocketEngine {
    type Command;
    type Error;
    type Response;

    fn connect(&mut self, stream: String) -> impl Future<Output = Result<(), Self::Error>> + Send;

    fn close(&mut self) -> impl Future<Output = Result<(), Self::Error>> + Send;
    fn disconnect(&mut self) -> impl Future<Output = Result<(), Self::Error>> + Send;

    fn handle(
        &self,
        message: tokio_tungstenite::tungstenite::Utf8Bytes,
    ) -> impl Future<Output = Result<Self::Response, Self::Error>> + Send;

    fn select_action(&mut self) -> impl Future<Output = Result<(), Self::Error>> + Send;
    fn run(&mut self) -> impl Future<Output = ()> + Send;
}