ethereal_rust_sdk 0.1.22

Trading client for Ethereal exchange
Documentation
/*
 * Ethereal Exchange API
 *
 * Ethereal HTTP API for real-time trading, order management, and market data access.
 *
 * The version of the OpenAPI document: 0.1.0
 *
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct FundingDto {
    /// Funding charge timestamp (ms since Unix Epoch)
    #[serde(rename = "createdAt")]
    pub created_at: f64,
    /// Hourly funding rate
    #[serde(rename = "fundingRate1h")]
    pub funding_rate1h: String,
}

impl FundingDto {
    pub fn new(created_at: f64, funding_rate1h: String) -> FundingDto {
        FundingDto {
            created_at,
            funding_rate1h,
        }
    }
}