1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*
* 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,
}
}
}