Open API Model Messages .proto file
OPEN API 2000 - 2999
Name | Number | Description |
---|---|---|
OA_AUTH_REQ | 2000 | |
OA_AUTH_RES | 2001 | |
OA_SUBSCRIBE_FOR_TRADING_EVENTS_REQ | 2002 | |
OA_SUBSCRIBE_FOR_TRADING_EVENTS_RES | 2003 | |
OA_UNSUBSCRIBE_FROM_TRADING_EVENTS_REQ | 2004 | |
OA_UNSUBSCRIBE_FROM_TRADING_EVENTS_RES | 2005 | |
OA_GET_SUBSCRIBED_ACCOUNTS_REQ | 2006 | |
OA_GET_SUBSCRIBED_ACCOUNTS_RES | 2007 | |
OA_CREATE_ORDER_REQ | 2013 | |
OA_EXECUTION_EVENT | 2016 | |
OA_CANCEL_ORDER_REQ | 2017 | |
OA_CLOSE_POSITION_REQ | 2018 | |
OA_AMEND_POSITION_SL_TP_REQ | 2019 | |
OA_AMEND_ORDER_REQ | 2020 | |
OA_SUBSCRIBE_FOR_SPOTS_REQ | 2021 | |
OA_SUBSCRIBE_FOR_SPOTS_RES | 2022 | |
OA_UNSUBSCRIBE_FROM_SPOTS_REQ | 2023 | |
OA_UNSUBSCRIBE_FROM_SPOTS_RES | 2024 | |
OA_GET_SPOT_SUBSCRIPTION_REQ | 2025 | |
OA_GET_SPOT_SUBSCRIPTION_RES | 2026 | |
OA_GET_ALL_SPOT_SUBSCRIPTIONS_REQ | 2027 | |
OA_GET_ALL_SPOT_SUBSCRIPTIONS_RES | 2028 | |
OA_SPOT_EVENT | 2029 | |
OA_PING_REQ | 2030 | |
OA_PING_RES | 2031 |
Supported order types
Name | Number | Description |
---|---|---|
OA_MARKET | 1 | |
OA_LIMIT | 2 | |
OA_STOP | 3 | |
OA_PROTECTION | 4 | |
OA_MARKET_RANGE | 5 | |
OA_STOP_LIMIT | 6 |
Open Api Execution Type
Name | Number | Description |
---|---|---|
OA_ORDER_ACCEPTED | 1 | |
OA_ORDER_FILLED | 2 | |
OA_ORDER_CANCELLED | 3 | |
OA_ORDER_EXPIRED | 4 | |
OA_ORDER_AMENDED | 5 | |
OA_ORDER_REJECTED | 6 | |
OA_ORDER_CANCEL_REJECTED | 7 |
Name | Number | Description |
---|---|---|
OA_POSITION_STATUS_OPEN | 1 | |
OA_POSITION_STATUS_CLOSED | 2 | |
OA_POSITION_STATUS_CREATED | 3 | |
OA_POSITION_STATUS_ERROR | 4 |
Name | Number | Description |
---|---|---|
M1 | 1 | |
M2 | 2 | |
M3 | 3 | |
M4 | 4 | |
M5 | 5 | |
M10 | 6 | |
M15 | 7 | |
M30 | 8 | |
H1 | 9 | |
H4 | 10 | |
H12 | 11 | |
D1 | 12 | |
W1 | 13 | |
MN1 | 14 |
Required | Type | Field Name | Description |
---|---|---|---|
required | string | partnerName |
Represents an information about an order from execution event received from server
Required | Type | Field Name | Description |
---|---|---|---|
required | int64 | orderId | trading API does NOT guarantee the uniqueness of this field. It is unique only within one account (accountId) |
required | int64 | accountId | |
required | ProtoOAOrderType | orderType | |
required | ProtoTradeSide | tradeSide | |
required | string | symbolName | |
required | bool | closingOrder | |
required | int64 | requestedVolume | in cents |
optional | int64 | executedVolume | in cents |
optional | double | executionPrice | |
optional | double | limitPrice | |
optional | double | stopPrice | |
optional | double | stopLossPrice | |
optional | double | takeProfitPrice | |
optional | double | baseSlippagePrice | |
optional | int64 | slippageInPips | |
optional | int32 | relativeStopLossInPips | |
optional | int32 | relativeTakeProfitInPips | |
optional | int64 | commission | |
optional | int64 | openTimestamp | |
optional | int64 | closeTimestamp | |
optional | int64 | expirationTimestamp | |
optional | string | channel | |
optional | string | comment | |
optional | ProtoOAClosePositionDetails | closePositionDetails | |
optional | string | clientOrderId | |
optional | bool | stopOut | |
optional | int32 | slippageInPoints |
Represents an information about a position from execution event received from server
Required | Type | Field Name | Description |
---|---|---|---|
required | int64 | positionId | trading API does NOT guarantee the uniqueness of this field. It is unique only within one account (accountId) |
required | int64 | accountId | |
required | ProtoOAPositionStatus | positionStatus | |
required | ProtoTradeSide | tradeSide | |
required | string | symbolName | |
required | int64 | volume | |
required | double | entryPrice | |
optional | int64 | swap | |
optional | int64 | commission | |
required | int64 | openTimestamp | |
optional | int64 | closeTimestamp | |
optional | double | stopLossPrice | |
optional | double | takeProfitPrice | |
optional | string | channel | |
optional | string | comment |
Represents additional details for the position which has been closed
Required | Type | Field Name | Description |
---|---|---|---|
required | double | entryPrice | |
required | int64 | profit | in cents |
required | int64 | swap | in cents |
required | int64 | commission | in cents |
required | int64 | balance | in cents |
optional | string | comment | |
optional | double | stopLossPrice | |
optional | double | takeProfitPrice | |
optional | double | quoteToDepositConversionRate | |
required | int64 | closedVolume | |
optional | bool | closedByStopOut | use stopOut field from ProtoOAOrder |
Required | Type | Field Name | Description |
---|---|---|---|
required | int64 | accountId | |
required | uint32 | subscriptionId | |
repeated | string | symbolNames | use subscribedSymbols below |
repeated | ProtoOASubscribedSpotSymbol | subscribedSymbols |
Required | Type | Field Name | Description |
---|---|---|---|
required | string | symbolName | |
repeated | ProtoOATrendbarPeriod | period |
Required | Type | Field Name | Description |
---|---|---|---|
optional | double | open | |
optional | double | close | |
optional | double | high | |
optional | double | low | |
required | int64 | volume | |
optional | int64 | utcTimestamp | |
optional | ProtoOATrendbarPeriod | period | default for handle .Net protobuf generator bug |