binance-sdk 60.0.0

This is a lightweight library that works as a connector to the Binance public API.
Documentation
/*
 * Prediction Trading REST API
 *
 * Place and manage prediction market orders, query positions, and transfer funds via the Prediction Trading REST API.
 *
 * The version of the OpenAPI document: 1.0.0
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

#![allow(unused_imports)]
use crate::w3w_prediction::rest_api::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetPortfolioResponse {
    #[serde(rename = "chainId", skip_serializing_if = "Option::is_none")]
    pub chain_id: Option<String>,
    #[serde(rename = "walletAddress", skip_serializing_if = "Option::is_none")]
    pub wallet_address: Option<String>,
    #[serde(
        rename = "activePositionsCount",
        skip_serializing_if = "Option::is_none"
    )]
    pub active_positions_count: Option<i32>,
    #[serde(rename = "totalRealizedPnl", skip_serializing_if = "Option::is_none")]
    pub total_realized_pnl: Option<String>,
    #[serde(rename = "totalUnrealizedPnl", skip_serializing_if = "Option::is_none")]
    pub total_unrealized_pnl: Option<String>,
    #[serde(rename = "totalPnl", skip_serializing_if = "Option::is_none")]
    pub total_pnl: Option<String>,
    #[serde(rename = "totalCostBasis", skip_serializing_if = "Option::is_none")]
    pub total_cost_basis: Option<String>,
    #[serde(rename = "totalCurrentValue", skip_serializing_if = "Option::is_none")]
    pub total_current_value: Option<String>,
    #[serde(rename = "positions", skip_serializing_if = "Option::is_none")]
    pub positions: Option<Vec<models::GetPortfolioResponsePositionsInner>>,
}

impl GetPortfolioResponse {
    #[must_use]
    pub fn new() -> GetPortfolioResponse {
        GetPortfolioResponse {
            chain_id: None,
            wallet_address: None,
            active_positions_count: None,
            total_realized_pnl: None,
            total_unrealized_pnl: None,
            total_pnl: None,
            total_cost_basis: None,
            total_current_value: None,
            positions: None,
        }
    }
}