1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
mod client; mod consts; mod error; pub mod models; pub mod websocket; pub use crate::client::{BitMEX, BitMEXBuilder}; pub use crate::websocket::BitMEXWebsocket; use failure::Fallible; pub const API_VERSION: &str = "1.2.0"; pub const SWAGGER_URL: &str = "https://www.bitmex.com/api/explorer/swagger.json"; pub async fn check_version() -> Fallible<bool> { let desc = client::BitMEX::new().get_swagger().await?; Ok(desc.info.version == API_VERSION) }