bluefin_api 1.8.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};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateOrderRequestSignedFields {
    /// The symbol of the perpetual for which to create the order
    #[serde(rename = "symbol")]
    pub symbol: String,
    /// The account address of the order. May be an account user is authorized for.
    #[serde(rename = "accountAddress")]
    pub account_address: String,
    /// The price in base e9 of the asset to be traded. Should always be a number
    #[serde(rename = "priceE9")]
    pub price_e9: String,
    /// The quantity in base e9 of the asset to be traded. Should always be a number
    #[serde(rename = "quantityE9")]
    pub quantity_e9: String,
    #[serde(rename = "side")]
    pub side: models::OrderSide,
    /// The leverage in base e9 of the order to be traded. Should always be a number
    #[serde(rename = "leverageE9")]
    pub leverage_e9: String,
    /// Is this order isolated or cross margin. Note market must be set to the same mode.
    #[serde(rename = "isIsolated")]
    pub is_isolated: bool,
    /// The random generated SALT. Should always be a number
    #[serde(rename = "salt")]
    pub salt: String,
    /// the ID of the internal datastore for the target network
    #[serde(rename = "idsId")]
    pub ids_id: String,
    /// The timestamp in millis at which order will expire.
    #[serde(rename = "expiresAtMillis")]
    pub expires_at_millis: i64,
    /// The timestamp in millis at which the request was signed
    #[serde(rename = "signedAtMillis")]
    pub signed_at_millis: i64,
}

impl CreateOrderRequestSignedFields {
    pub fn new(symbol: String, account_address: String, price_e9: String, quantity_e9: String, side: models::OrderSide, leverage_e9: String, is_isolated: bool, salt: String, ids_id: String, expires_at_millis: i64, signed_at_millis: i64) -> CreateOrderRequestSignedFields {
        CreateOrderRequestSignedFields {
            symbol,
            account_address,
            price_e9,
            quantity_e9,
            side,
            leverage_e9,
            is_isolated,
            salt,
            ids_id,
            expires_at_millis,
            signed_at_millis,
        }
    }
}