lighter-rust 0.2.0

A comprehensive Rust SDK for the Lighter trading platform with async/await, WebSocket support, and Ethereum wallet integration
/*
 *
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document:
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ExchangeStats {
    #[serde(rename = "code")]
    pub code: i32,
    #[serde(rename = "message", skip_serializing_if = "Option::is_none")]
    pub message: Option<String>,
    #[serde(rename = "total")]
    pub total: i64,
    #[serde(rename = "order_book_stats")]
    pub order_book_stats: Vec<models::OrderBookStats>,
    #[serde(rename = "daily_usd_volume")]
    pub daily_usd_volume: f64,
    #[serde(rename = "daily_trades_count")]
    pub daily_trades_count: i64,
}

impl ExchangeStats {
    pub fn new(
        code: i32,
        total: i64,
        order_book_stats: Vec<models::OrderBookStats>,
        daily_usd_volume: f64,
        daily_trades_count: i64,
    ) -> ExchangeStats {
        ExchangeStats {
            code,
            message: None,
            total,
            order_book_stats,
            daily_usd_volume,
            daily_trades_count,
        }
    }
}