Ejemplo n.º 1
0
        public ProtoMessage CreateAmendPositionTakeProfitRequest(long accountId, string accessToken, long positionId, double takeProfitPrice, string clientMsgId = null)
        {
            var _msg = ProtoOAAmendPositionStopLossTakeProfitReq.CreateBuilder();

            _msg.SetAccountId(accountId);
            _msg.SetAccessToken(accessToken);
            _msg.SetPositionId(positionId);
            _msg.SetTakeProfitPrice(takeProfitPrice);
            return(CreateMessage((uint)_msg.PayloadType, _msg.Build().ToByteString(), clientMsgId));
        }
        public ProtoMessage CreateAmendPositionTakeProfitRequest(long accountId, string accessToken, long positionId, double takeProfitPrice, string clientMsgId = null)
        {
            var _msg = new ProtoOAAmendPositionStopLossTakeProfitReq();

            _msg.accountId       = accountId;
            _msg.accessToken     = accessToken;
            _msg.positionId      = positionId;
            _msg.takeProfitPrice = takeProfitPrice;
            return(CreateMessage((uint)_msg.payloadType, Utils.Serialize <ProtoOAAmendPositionStopLossTakeProfitReq>(_msg), clientMsgId));
        }
Ejemplo n.º 3
0
 public ProtoOAAmendPositionStopLossTakeProfitReq GetAmendPositionStopLossTakeProfitRequest(byte[] msg = null)
 {
     return(ProtoOAAmendPositionStopLossTakeProfitReq.CreateBuilder().MergeFrom(GetPayload(msg)).Build());
 }