Skip to content

Commit

Permalink
Merge pull request #19 from spotware/88
Browse files Browse the repository at this point in the history
88 Release
  • Loading branch information
ShKhannanov authored Sep 26, 2023
2 parents 54839f6 + 7548df7 commit 7b08a7d
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 71 deletions.
18 changes: 9 additions & 9 deletions OpenApiCommonMessages.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ option java_outer_classname = "ContainerCommonMessages";

import "OpenApiCommonModelMessages.proto";


/** Base message that is used for all messages that are sent to/from Open API proxy of cTrader platform. */
message ProtoMessage {
required uint32 payloadType = 1; // Contains id of ProtoPayloadType or other custom PayloadTypes (e.g. ProtoOAPayloadType)
optional bytes payload = 2; // Serialized protobuf message that corresponds to payloadType
optional string clientMsgId = 3; // Request message id, assigned by the client that will be returned in the response
required uint32 payloadType = 1; // Contains id of ProtoPayloadType or other custom PayloadTypes (e.g. ProtoOAPayloadType).
optional bytes payload = 2; // Serialized protobuf message that corresponds to payloadType.
optional string clientMsgId = 3; // Request message id, assigned by the client that will be returned in the response.
}

/** Error response that is sent from Open API proxy when error occurs. */
message ProtoErrorRes {
optional ProtoPayloadType payloadType = 1 [default = ERROR_RES];

required string errorCode = 2; // Contains name of ProtoErrorCode or other custom ErrorCodes (e.g. ProtoCHErrorCode)
optional string description = 3; // Error description
optional uint64 maintenanceEndTimestamp = 4; // CS-10489 Epoch timestamp in second
required string errorCode = 2; // Contains name of ProtoErrorCode or other custom ErrorCodes (e.g. ProtoCHErrorCode).
optional string description = 3; // Error description.
optional uint64 maintenanceEndTimestamp = 4; // The Unix time in milliseconds of the end of the maintenance.
}

/** Event that is sent from Open API proxy and can be used as criteria that connection is healthy when no other messages are sent by cTrader platform. Open API client can send this message when he needs to keep the connection open for a period without other messages longer than 30 seconds */
/** Event that is sent from Open API proxy and can be used as criteria that connection is healthy when no other messages are sent by cTrader platform. Open API client can send this message when he needs to keep the connection open for a period without other messages longer than 30 seconds. */
message ProtoHeartbeatEvent {
optional ProtoPayloadType payloadType = 1 [default = HEARTBEAT_EVENT];
}

2 changes: 1 addition & 1 deletion OpenApiCommonModelMessages.proto
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ enum ProtoErrorCode {
FRAME_TOO_LONG = 8; // Message is too large.
MARKET_CLOSED = 9; // Market is closed.
CONCURRENT_MODIFICATION = 10; // Order is blocked (e.g. under execution) and change cannot be applied.
BLOCKED_PAYLOAD_TYPE = 11; // Message is blocked by server.
BLOCKED_PAYLOAD_TYPE = 11; // Message is blocked by server or rate limit is reached.
}

Loading

0 comments on commit 7b08a7d

Please # to comment.