bluefin_api 1.7.0

Bluefin API
Documentation
/*
 * Bluefin API
 *
 * Bluefin API
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// CancelOrdersRequest : Cancelling Orders for a specific symbol. If order hashes are not specified, all orders are canceled for this symbol
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CancelOrdersRequest {
    /// The symbol of the perpetual for which to cancel orders.
    #[serde(rename = "symbol")]
    pub symbol: String,
    /// List of order hashes of the orders to be cancelled. All orders must belong to accountAddress. Max 10 order hashes
    #[serde(rename = "orderHashes", skip_serializing_if = "Option::is_none")]
    pub order_hashes: Option<Vec<String>>,
}

impl CancelOrdersRequest {
    /// Cancelling Orders for a specific symbol. If order hashes are not specified, all orders are canceled for this symbol
    pub fn new(symbol: String) -> CancelOrdersRequest {
        CancelOrdersRequest {
            symbol,
            order_hashes: None,
        }
    }
}