bybit-rust-api 0.3.0

Complete Rust SDK for Bybit API V5 with all endpoints, comprehensive type safety and full test coverage
Documentation
use fmt::{Display, Formatter};
use serde::{Deserialize, Serialize};
use std::error::Error;
use std::fmt;

#[derive(Debug, Serialize, Deserialize)]
pub struct APIError {
    #[serde(rename = "retCode")]
    pub code: String,
    #[serde(rename = "retMsg")]
    pub message: String,
}

impl Display for APIError {
    fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
        write!(f, "<APIError> code={}, msg={}", self.code, self.message)
    }
}

impl Error for APIError {}