pub struct Order {
pub state: Option<String>,
pub client_extensions: Option<ClientExtensions>,
pub id: Option<String>,
pub create_time: Option<DateTime<Utc>>,
}
Fields§
§state: Option<String>
The current state of the Order.
client_extensions: Option<ClientExtensions>
A ClientExtensions object allows a client to attach a clientID, tag and comment to Orders and Trades in their Account. Do not set, modify, or delete this field if your account is associated with MT4.
id: Option<String>
The Order’s identifier, unique within the Order’s Account. format: The string representation of the OANDA-assigned OrderID. OANDA- assigned OrderIDs are positive integers, and are derived from the TransactionID of the Transaction that created the Order.
create_time: Option<DateTime<Utc>>
The time when the Order was created. format: The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places).
Implementations§
source§impl Order
impl Order
pub fn new() -> Order
sourcepub fn with_state(self, x: String) -> Order
pub fn with_state(self, x: String) -> Order
The current state of the Order.
- param String
- return Order
sourcepub fn with_client_extensions(self, x: ClientExtensions) -> Order
pub fn with_client_extensions(self, x: ClientExtensions) -> Order
A ClientExtensions object allows a client to attach a clientID, tag and comment to Orders and Trades in their Account. Do not set, modify, or delete this field if your account is associated with MT4.
- param ClientExtensions
- return Order
sourcepub fn with_id(self, x: String) -> Order
pub fn with_id(self, x: String) -> Order
The Order’s identifier, unique within the Order’s Account. format: The string representation of the OANDA-assigned OrderID. OANDA- assigned OrderIDs are positive integers, and are derived from the TransactionID of the Transaction that created the Order.
- param String
- return Order
sourcepub fn with_create_time(self, x: DateTime<Utc>) -> Order
pub fn with_create_time(self, x: DateTime<Utc>) -> Order
The time when the Order was created. format: The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places).
- param DateTime
- return Order