/*
 * Thalex RPC API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.0
 *
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PerpetualFunding {
    /// The base currency of the settled perpetual funding PnL.
    #[serde(rename = "base_currency")]
    pub base_currency: String,
    /// The settled perpetual funding amount before conversion.
    #[serde(rename = "settled_funding")]
    pub settled_funding: rust_decimal::Decimal,
    /// The price at which the asset was converted.
    #[serde(rename = "conversion_price")]
    pub conversion_price: rust_decimal::Decimal,
}

impl PerpetualFunding {
    pub fn new(
        base_currency: String,
        settled_funding: rust_decimal::Decimal,
        conversion_price: rust_decimal::Decimal,
    ) -> PerpetualFunding {
        PerpetualFunding {
            base_currency,
            settled_funding,
            conversion_price,
        }
    }
}
