/*
 * Websocket Subscription Schemas
 *
 * Schema definitions Websocket API subscriptions for Thalex exchange.
 *
 * The version of the OpenAPI document: 1.0.0
 *
 * Generated by: https://openapi-generator.tech
 */

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

/// RecentTrades : Array of trades, each item is an array with the following values: `[price, size, side (\"buy\" or \"sell\"), timestamp, instrument_name, implied_taker]`.  The `implied_taker` is a boolean flag, set to `true` when the actual taker trade happened on another order book, and the maker trade on this book is the result of implied matching.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RecentTrades {
    #[serde(rename = "trades", skip_serializing_if = "Option::is_none")]
    pub trades: Option<Vec<models::RecentTrade>>,
}

impl RecentTrades {
    /// Array of trades, each item is an array with the following values: `[price, size, side (\"buy\" or \"sell\"), timestamp, instrument_name, implied_taker]`.  The `implied_taker` is a boolean flag, set to `true` when the actual taker trade happened on another order book, and the maker trade on this book is the result of implied matching.
    pub fn new() -> RecentTrades {
        RecentTrades { trades: None }
    }
}
