rust-okx 0.5.1

Async Rust client for the OKX v5 REST API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! `trade` WebSocket channel helpers.

use crate::ws::Arg;

/// Subscribe to `orders` for one instrument type.
///
/// OKX docs: <https://www.okx.com/docs-v5/en/#order-book-trading-trade-ws-order-channel>
pub fn orders(inst_type: impl Into<String>) -> Arg {
    Arg::new("orders").inst_type(inst_type)
}

/// Subscribe to `fills` for one instrument type.
///
/// OKX docs: <https://www.okx.com/docs-v5/en/#order-book-trading-trade-ws-fills-channel>
pub fn fills(inst_type: impl Into<String>) -> Arg {
    Arg::new("fills").inst_type(inst_type)
}