예제 #1
0
 /// <summary>
 /// Internal: Output this request.  Can't use the Abstract Subscription Request because it needs to append two separate subscriptions.
 /// </summary>
 /// <param name="writer">The destination for the request content</param>
 public void WriteTo(IStructuredWriter writer)
 {
     writer.StartElement("req").StartElement("body");
     writer.StartElement("subscription");
     writer.ValueOrEmpty("type", "historicMarketData");
     writer.EndElement("subscription").EndElement("body").EndElement("req");
 }
 /// <summary>
 /// Internal: Output this request.  Can't use the Abstract Subscription Request because it needs to append two separate subscriptions.
 /// </summary>
 /// <param name="writer">The destination for the request content</param>
 public void WriteTo(IStructuredWriter writer)
 {
     writer.StartElement("req").StartElement("body");
     writer.StartElement("subscription");
     writer.ValueOrEmpty("type", "historicMarketData");
     writer.EndElement("subscription").EndElement("body").EndElement("req");
 }
 /// <summary>
 /// Internal: Output this request.
 /// </summary>
 /// <param name="writer">The destination for the content of this request</param>
 public void WriteTo(IStructuredWriter writer)
 {
     writer.
         StartElement("req").
             WriteEmptyTag("body").
         EndElement("req");
 }
예제 #4
0
 /// <summary>
 /// Internal: Output this request.
 /// </summary>
 /// <param name="writer">The destination for the content of this request</param>
 public void WriteTo(IStructuredWriter writer)
 {
     writer.
     StartElement("req").
     WriteEmptyTag("body").
     EndElement("req");
 }
예제 #5
0
 public void WriteTo(IStructuredWriter writer)
 {
     writer.StartElement("req").StartElement("body").ValueUTF8("username", this._username).ValueUTF8("password", this._password);
     if (this._checkProtocolVersion)
     {
         writer.ValueOrNone("protocolVersion", "1.8");
     }
     writer.ValueOrNone("productType", this._productType.ToString()).EndElement("body").EndElement("req");
 }
예제 #6
0
 /// <summary>
 /// Internal: Output this request.
 /// </summary>
 /// <param name="writer">The destination for the content of this request</param>
 public void WriteTo(IStructuredWriter writer)
 {
     writer.
     StartElement("req").
     StartElement("body").
     ValueOrNone("token", _token).
     EndElement("body").
     EndElement("req");
 }
        /// <summary>
        /// Internal: Output this request.
        /// </summary>
        /// <param name="writer">The destination for the content of this request</param>
        public void WriteTo(IStructuredWriter writer)
        {
            writer.
                StartElement("req").
                    StartElement("body").
                        ValueOrNone("token", _token).
                    EndElement("body").
                EndElement("req");

        }
예제 #8
0
 /// <summary>
 /// Internal: Output this request.
 /// </summary>
 /// <param name="writer">The destination for the content of this request</param>
 public void WriteTo(IStructuredWriter writer)
 {
     writer.
     StartElement("req").
     StartElement("body").
     ValueOrEmpty("instructionId", _instructionId).
     ValueOrEmpty("instrumentId", _instrumentId).
     ValueOrEmpty("originalInstructionId", _originalInstructionId).
     EndElement("body").
     EndElement("req");
 }
예제 #9
0
 /// <summary>
 /// Internal: Output this request.
 /// </summary>
 /// <param name="writer">The destination for the content of this request</param>
 public void WriteTo(IStructuredWriter writer)
 {
     writer.
         StartElement("req").
             StartElement("body").
                 ValueUTF8("username", _username).
                 ValueUTF8("password", _password).
                 ValueOrNone("protocolVersion", ProtocolVersion).
                 ValueOrNone("productType", _productType.ToString()).
             EndElement("body").
         EndElement("req");
 }
        /// <summary>
        /// Internal: Output this request.
        /// </summary>
        /// <param name="writer">The destination for the content of this request</param>
        public void WriteTo(IStructuredWriter writer)
        {
            writer.
                StartElement("req").
                    StartElement("body").
                        ValueOrEmpty("instructionId", _instructionId).
                        ValueOrEmpty("instrumentId", _instrumentId).                        
                        ValueOrEmpty("originalInstructionId", _originalInstructionId).
                    EndElement("body").
                EndElement("req");            

        }
 private IStructuredWriter WriteOptions(IStructuredWriter writer)
 {
     if (_options.Length <= 0)
     {
         return(writer);
     }
     writer.StartElement("options");
     foreach (Option option in _options)
     {
         writer.ValueOrNone("option", Convert.ToString(option).ToUpper());
     }
     writer.EndElement("options");
     return(writer);
 }
예제 #12
0
 /// <summary>
 /// Internal: Output this request.
 /// </summary>
 /// <param name="writer">The destination for the content of this request</param>
 public virtual void WriteTo(IStructuredWriter writer)
 {
     writer.
     StartElement("req").
     StartElement("body").
     StartElement("order").
     ValueOrNone("instrumentId", _instrumentId).
     ValueOrNone("instructionId", _instructionId).
     ValueOrNone("price", GetPrice()).
     ValueOrNone("quantity", _quantity).
     ValueOrNone("timeInForce", Enum.GetName(TimeInForce.GetType(), _timeInForce)).
     ValueOrNone("stopLossOffset", _stopLossPriceOffset).
     ValueOrNone("stopProfitOffset", _stopProfitPriceOffset).
     EndElement("order").
     EndElement("body").
     EndElement("req");
 }
예제 #13
0
 /// <summary>
 /// Internal: Output this request.
 /// </summary>
 /// <param name="writer">The destination for the content of this request</param>
 public override void WriteTo(IStructuredWriter writer)
 {
     writer.
     StartElement("req").
     StartElement("body").
     StartElement("order").
     ValueOrNone("instrumentId", InstrumentId).
     ValueOrNone("instructionId", InstructionId).
     ValueOrNone("stopPrice", StopPrice).
     ValueOrNone("quantity", Quantity).
     ValueOrNone("timeInForce", Enum.GetName(TimeInForce.GetType(), TimeInForce)).
     ValueOrNone("stopLossOffset", StopLossPriceOffset).
     ValueOrNone("stopProfitOffset", StopProfitPriceOffset).
     EndElement("order").
     EndElement("body").
     EndElement("req");
 }
 /// <summary>
 /// Internal: Output this request.
 /// </summary>
 /// <param name="writer">The destination for the content of this request</param>
 public void WriteTo(IStructuredWriter writer)
 {
     writer.
     StartElement("req").
     StartElement("body").
     ValueOrNone("instructionId", _instructionId).
     ValueOrNone("orderBookId", _instrumentId).
     ValueOrNone("from", Convert.ToString(DateTimeUtil.DateTimeToMillis(_from))).
     ValueOrNone("to", Convert.ToString(DateTimeUtil.DateTimeToMillis(_to))).
     StartElement("aggregate");
     WriteOptions(writer).
     ValueOrNone("resolution", Convert.ToString(_resolution).ToUpper()).
     ValueOrNone("depth", _depth).
     ValueOrNone("format", Convert.ToString(_format).ToUpper()).
     EndElement("aggregate").
     EndElement("body").
     EndElement("req");
 }
 public void WriteTo(IStructuredWriter writer)
 {
     writer.StartElement("req").StartElement("body").ValueOrNone("instructionId", new long?(this._instructionId)).ValueOrNone("orderBookId", new long?(this._instrumentId)).ValueOrNone("from", Convert.ToString(DateTimeUtil.DateTimeToMillis(this._from))).ValueOrNone("to", Convert.ToString(DateTimeUtil.DateTimeToMillis(this._to))).StartElement("orderBook").StartElement("options").ValueOrNone("option", "BID").ValueOrNone("option", "ASK").EndElement("options").ValueOrNone("depth", new long?(1L)).ValueOrNone("format", Convert.ToString((object)this._format).ToUpper()).EndElement("orderBook").EndElement("body").EndElement("req");
 }
 public void WriteTo(IStructuredWriter writer)
 {
     writer.StartElement("req").StartElement("body").StartElement("subscription");
     this.WriteSubscriptionBodyTo(writer);
     writer.EndElement("subscription").EndElement("body").EndElement("req");
 }
 /// <summary>
 /// Internal: Output this request.
 /// </summary>
 /// <param name="writer">The destination for the request content</param>
 public void WriteTo(IStructuredWriter writer)
 {
     writer.StartElement("req").StartElement("body").StartElement("subscription");
     WriteSubscriptionBodyTo(writer);
     writer.EndElement("subscription").EndElement("body").EndElement("req");
 }
예제 #18
0
 public virtual void WriteTo(IStructuredWriter writer)
 {
     writer.StartElement("req").StartElement("body").StartElement("order").ValueOrNone("instrumentId", new long?(this._instrumentId)).ValueOrNone("instructionId", this._instructionId).ValueOrNone("price", this.GetPrice()).ValueOrNone("quantity", new Decimal?(this._quantity)).ValueOrNone("timeInForce", Enum.GetName(this.TimeInForce.GetType(), (object)this._timeInForce)).ValueOrNone("stopLossOffset", this._stopLossPriceOffset).ValueOrNone("stopProfitOffset", this._stopProfitPriceOffset).EndElement("order").EndElement("body").EndElement("req");
 }
 public void WriteTo(IStructuredWriter writer)
 {
     writer.StartElement("req").StartElement("body").ValueOrEmpty("instrumentId", new long?(this._instrumentId)).ValueOrEmpty("originalInstructionId", this._originalInstructionId).ValueOrEmpty("instructionId", this._instructionId).ValueOrEmpty("stopLossOffset", this._stopLossOffset).ValueOrEmpty("stopProfitOffset", this._stopProfitOffset).EndElement("body").EndElement("req");
 }
 /// <summary>
 /// Internal: Output this request.
 /// </summary>
 /// <param name="writer">The destination for the content of this request</param>
 public void WriteTo(IStructuredWriter writer)
 {
     writer.
         StartElement("req").
             StartElement("body").
                 StartElement("order").
                     ValueOrNone("instrumentId", _instrumentId).
                     ValueOrNone("instructionId", _instructionId).
                     ValueOrNone("price", GetPrice()).
                     ValueOrNone("quantity", _quantity).
                     ValueOrNone("timeInForce", Enum.GetName(TimeInForce.GetType(), _timeInForce)).
                     ValueOrNone("stopLossOffset", _stopLossPriceOffset).
                     ValueOrNone("stopProfitOffset", _stopProfitPriceOffset).
                 EndElement("order").
             EndElement("body").
         EndElement("req");
 }