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 PageOfPositionDtos {
    /// Whether there are more objects to paginate through
    #[serde(rename = "hasNext")]
    pub has_next: bool,
    /// Pointer to the next page in pagination dataset
    #[serde(rename = "nextCursor", skip_serializing_if = "Option::is_none")]
    pub next_cursor: Option<String>,
    /// Array of position objects
    #[serde(rename = "data")]
    pub data: Vec<models::PositionDto>,
}

impl PageOfPositionDtos {
    pub fn new(has_next: bool, data: Vec<models::PositionDto>) -> PageOfPositionDtos {
        PageOfPositionDtos {
            has_next,
            next_cursor: None,
            data,
        }
    }
}