ethereal_rust_sdk 0.1.6

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 CancelOrderDtoData {
    /// Bytes32 encoded subaccount name (0x prefix, zero padded)
    #[serde(rename = "subaccount")]
    pub subaccount: String,
    /// Account or linked signer address that canceled this order
    #[serde(rename = "sender")]
    pub sender: String,
    /// Message nonce timestamp (nanoseconds since Unix Epoch)
    #[serde(rename = "nonce")]
    pub nonce: String,
    /// Ids of the orders to be canceled (clientOrderIds combined length cannot exceed maximum)
    #[serde(rename = "orderIds", skip_serializing_if = "Option::is_none")]
    pub order_ids: Option<Vec<uuid::Uuid>>,
    /// Client-generated order ids to be canceled (orderIds combined length cannot exceed maximum)
    #[serde(rename = "clientOrderIds", skip_serializing_if = "Option::is_none")]
    pub client_order_ids: Option<Vec<String>>,
}

impl CancelOrderDtoData {
    pub fn new(subaccount: String, sender: String, nonce: String) -> CancelOrderDtoData {
        CancelOrderDtoData {
            subaccount,
            sender,
            nonce,
            order_ids: None,
            client_order_ids: None,
        }
    }
}