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 WsFixedRateLimitEndpointDto {
    /// WebSocket namespace
    #[serde(rename = "namespace")]
    pub namespace: String,
    #[serde(rename = "protocol")]
    pub protocol: models::WsFixedRateLimitEndpointDtoProtocolEnum,
    #[serde(rename = "type")]
    pub r#type: models::WsFixedRateLimitEndpointDtoOrderType,
    /// Fixed points consumed per request
    #[serde(rename = "fixedPoints")]
    pub fixed_points: f64,
}

impl WsFixedRateLimitEndpointDto {
    pub fn new(
        namespace: String,
        protocol: models::WsFixedRateLimitEndpointDtoProtocolEnum,
        r#type: models::WsFixedRateLimitEndpointDtoOrderType,
        fixed_points: f64,
    ) -> WsFixedRateLimitEndpointDto {
        WsFixedRateLimitEndpointDto {
            namespace,
            protocol,
            r#type,
            fixed_points,
        }
    }
}