Skip to content

Commit

Permalink
Updated message files to cServer 79
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmad Noman Musleh committed Feb 15, 2022
1 parent 86b1a10 commit f35e7d6
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 9 deletions.
28 changes: 22 additions & 6 deletions OpenApiMessages.proto
Original file line number Diff line number Diff line change
Expand Up @@ -467,9 +467,7 @@ message ProtoOAUnsubscribeSpotsRes {
required int64 ctidTraderAccountId = 2; // Unique identifier of the trader's account. Used to match responses to trader's accounts.
}

/** Event that is sent when a new spot event is generated on the server side.
Requires subscription on the spot events, see ProtoOASubscribeSpotsReq.
First event, received after subscription will contain latest spot prices even if market is closed */
/** Event that is sent when a new spot event is generated on the server side. Requires subscription on the spot events, see ProtoOASubscribeSpotsReq. First event, received after subscription will contain latest spot prices even if market is closed. */
message ProtoOASpotEvent {
optional ProtoOAPayloadType payloadType = 1 [default = PROTO_OA_SPOT_EVENT];

Expand Down Expand Up @@ -553,7 +551,7 @@ message ProtoOAGetTickDataRes {
optional ProtoOAPayloadType payloadType = 1 [default = PROTO_OA_GET_TICKDATA_RES];

required int64 ctidTraderAccountId = 2; // Unique identifier of the trader's account. Used to match responses to trader's accounts.
repeated ProtoOATickData tickData = 3; // The list of ticks.
repeated ProtoOATickData tickData = 3; // The list of ticks in chronological order. The first tick contains Unix timestamp in milliseconds while all subsequent ticks have the time difference in milliseconds between previous and the current one.
required bool hasMore = 4; // If TRUE then the number of records by filter is larger than chunkSize, the response contains the number of records that is equal to chunkSize.
}

Expand Down Expand Up @@ -644,8 +642,7 @@ message ProtoOAAccountLogoutRes {
required int64 ctidTraderAccountId = 2; // The unique identifier of the trader's account in cTrader platform.
}

/** Event that is sent when the established session for an account is dropped on the server side.
A new session must be authorized for the account. */
/** Event that is sent when the established session for an account is dropped on the server side. A new session must be authorized for the account. */
message ProtoOAAccountDisconnectEvent {
optional ProtoOAPayloadType payloadType = 1 [default = PROTO_OA_ACCOUNT_DISCONNECT_EVENT];

Expand Down Expand Up @@ -710,3 +707,22 @@ message ProtoOAGetDynamicLeverageByIDRes {
required int64 ctidTraderAccountId = 2; // Unique identifier of the trader's account. Used to match responses to trader's accounts.
required ProtoOADynamicLeverage leverage = 3;
}

/** Request for retrieving the deals related to a position. */
message ProtoOADealListByPositionIdReq {
optional ProtoOAPayloadType payloadType = 1 [default = PROTO_OA_DEAL_LIST_BY_POSITION_ID_REQ];

required int64 ctidTraderAccountId = 2; // Unique identifier of the trader's account. Used to match responses to trader's accounts.
required int64 positionId = 3; // The unique ID of the position.
required int64 fromTimestamp = 4; // The exact time of starting the search in milliseconds. Must be bigger of equal to zero (1-1-1970). Validation: toTimestamp - fromTimestamp <= 604800000 (1 week).
required int64 toTimestamp = 5; // The exact time of finishing the search in milliseconds <= 2147483646000 (19-1-2038).
}

/** Response to the ProtoOADealListByPositionIdReq request. */
message ProtoOADealListByPositionIdRes {
optional ProtoOAPayloadType payloadType = 1 [default = PROTO_OA_DEAL_LIST_BY_POSITION_ID_RES];

required int64 ctidTraderAccountId = 2; // Unique identifier of the trader's account. Used to match responses to trader's accounts.
repeated ProtoOADeal deal = 3; // The list of deals.
required bool hasMore = 4; // If TRUE then the number of records by filter is larger than chunkSize, the response contains the number of records that is equal to chunkSize.
}
8 changes: 5 additions & 3 deletions OpenApiModelMessages.proto
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ enum ProtoOAPayloadType {
PROTO_OA_ORDER_LIST_RES = 2176;
PROTO_OA_GET_DYNAMIC_LEVERAGE_REQ = 2177;
PROTO_OA_GET_DYNAMIC_LEVERAGE_RES = 2178;
PROTO_OA_DEAL_LIST_BY_POSITION_ID_REQ = 2179;
PROTO_OA_DEAL_LIST_BY_POSITION_ID_RES = 2180;
}

/** Asset entity. */
Expand Down Expand Up @@ -135,8 +137,8 @@ message ProtoOASymbol {
repeated ProtoOAHoliday holiday = 33; // List of holidays for this symbol specified by broker.
optional int32 pnlConversionFeeRate = 34; // Percentage (1 = 0.01%) of the realized Gross Profit, which will be paid by the Trader for any trade if the Quote Asset of the traded Symbol is not matched with the Deposit Asset.
optional int64 leverageId = 35; // The unique identifier of dynamic leverage entity. https://help.ctrader.com/ctrader/trading/dynamic-leverage
optional int32 swapPeriod = 36; // swap is calculated every swapPeriod hours
optional int32 swapTime = 37; // from which swap period is calculated, in minutes from 00:00.
optional int32 swapPeriod = 36; // Period of charging swaps in hours. 24 means swaps will be charged 1 time per day, 12 - every 12 hours, 8 - every 8 hours, etc.
optional int32 swapTime = 37; // Time in minutes from 00:00 (UTC) when intraday swaps are charged for the first time.
}

/** Lightweight symbol entity. */
Expand Down Expand Up @@ -546,7 +548,7 @@ enum ProtoOAQuoteType {

/** Historical tick data type. */
message ProtoOATickData {
required int64 timestamp = 1; // Tick timestamp.
required int64 timestamp = 1; // Unix timestamp of the tick in milliseconds. See ProtoOAGetTickDataRes.tickData for details.
required int64 tick = 2; // Tick price.
}

Expand Down

0 comments on commit f35e7d6

Please sign in to comment.