public class MetatraderOrder extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
MetatraderOrder.FillingMode
Order filling mode.
|
static class |
MetatraderOrder.OrderReason
Order opening reason.
|
static class |
MetatraderOrder.OrderState
Order state.
|
static class |
MetatraderOrder.OrderType
Order type.
|
| Modifier and Type | Field and Description |
|---|---|
Double |
accountCurrencyExchangeRate
Current exchange rate of account currency into account base currency (USD if you
did not override it), or
null |
String |
brokerTime
Time order was created at, in broker timezone, YYYY-MM-DD HH:mm:ss.SSS format
|
String |
clientId
Client-assigned id or
null. |
String |
closeByPositionId
Identifier of an opposite position used for closing by order ORDER_TYPE_CLOSE_BY, or
null |
String |
comment
Order comment or
null. |
double |
currentPrice
Current price
|
double |
currentVolume
Order remaining quantity, i.e.
|
String |
doneBrokerTime
Time order was executed or canceled at, in broker timezone, YYYY-MM-DD HH:mm:ss.SSS format, or
null. |
cloud.metaapi.sdk.clients.models.IsoTime |
doneTime
Time order was executed or canceled at or
null. |
cloud.metaapi.sdk.clients.models.IsoTime |
expirationTime
Optional order expiration time or
null |
ExpirationOptions.ExpirationType |
expirationType
Order expiration type
|
MetatraderOrder.FillingMode |
fillingMode
Order filling mode
|
String |
id
Order id (ticket number)
|
long |
magic
Order magic number, identifies the EA which created the order
|
Double |
openPrice
Order open price (market price for market orders, limit price for limit orders or stop price
for stop orders) or
null |
String |
originalComment
Order original comment or
null (present if possible to restore original comment from history) |
String |
platform
Platform id (mt4 or mt5)
|
String |
positionId
Order position id or
null. |
MetatraderOrder.OrderReason |
reason
Order opening reason
|
MetatraderOrder.OrderState |
state
Order state
|
Double |
stopLimitPrice
The Limit order price for the StopLimit order, or
null |
Double |
stopLoss
Order stop loss price or
null |
String |
symbol
Order symbol
|
Double |
takeProfit
Order take profit price or
null |
cloud.metaapi.sdk.clients.models.IsoTime |
time
Time order was created at
|
MetatraderOrder.OrderType |
type
Order type
|
Boolean |
updatePending
Optional flag indicating that order client id and original comment was not
identified yet and will be updated in a future synchronization packet, or
null |
double |
volume
Order requested quantity
|
| Constructor and Description |
|---|
MetatraderOrder() |
public String id
public MetatraderOrder.OrderType type
public MetatraderOrder.OrderState state
public long magic
public cloud.metaapi.sdk.clients.models.IsoTime time
public String brokerTime
public cloud.metaapi.sdk.clients.models.IsoTime doneTime
null. Will be specified for completed orders onlypublic String doneBrokerTime
null.
Will be specified for completed orders onlypublic String symbol
public Double openPrice
nullpublic double currentPrice
public Double stopLoss
nullpublic Double takeProfit
nullpublic double volume
public double currentVolume
public String positionId
null. Present only if the order has a position attached to itpublic String comment
null. The sum of the line lengths of the comment and the clientId must be less
than or equal to 26. For more information see https://metaapi.cloud/docs/client/clientIdUsage/public String originalComment
null (present if possible to restore original comment from history)public String clientId
null. The id value can be assigned when submitting a trade
and will be present on position, history orders and history deals related to the trade.
You can use this field to bind your trades to objects in your application and then track trade progress.
The sum of the line lengths of the comment and the clientId must be less than or equal to 26.
For more information see https://metaapi.cloud/docs/client/clientIdUsage/public String platform
public Boolean updatePending
nullpublic MetatraderOrder.OrderReason reason
public MetatraderOrder.FillingMode fillingMode
public ExpirationOptions.ExpirationType expirationType
public cloud.metaapi.sdk.clients.models.IsoTime expirationTime
nullpublic Double accountCurrencyExchangeRate
nullpublic String closeByPositionId
nullpublic Double stopLimitPrice
nullCopyright © 2023. All rights reserved.