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 ReqGetFundings {
    #[serde(rename = "market_id")]
    pub market_id: i32,
    #[serde(rename = "resolution")]
    pub resolution: Resolution,
    #[serde(rename = "start_timestamp")]
    pub start_timestamp: i64,
    #[serde(rename = "end_timestamp")]
    pub end_timestamp: i64,
    #[serde(rename = "count_back")]
    pub count_back: i64,
}

impl ReqGetFundings {
    pub fn new(
        market_id: i32,
        resolution: Resolution,
        start_timestamp: i64,
        end_timestamp: i64,
        count_back: i64,
    ) -> ReqGetFundings {
        ReqGetFundings {
            market_id,
            resolution,
            start_timestamp,
            end_timestamp,
            count_back,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Resolution {
    #[serde(rename = "1h")]
    Variant1h,
    #[serde(rename = "1d")]
    Variant1d,
}

impl Default for Resolution {
    fn default() -> Resolution {
        Self::Variant1h
    }
}