Example #1
0
        public static Payload ContractQuotes(Uid contract,
                                             IEnumerable<Proto.Seto.Quote> bids,
                                             IEnumerable<Proto.Seto.Quote> offers)
        {
            var payload = new Payload {
                Type = PayloadType.PAYLOADCONTRACTQUOTES,
                ContractQuotes = new Proto.Seto.ContractQuotes {
                    Contract = contract.ToUuid128()
                }
            };

            payload.ContractQuotes.Bids.AddRange(bids);
            payload.ContractQuotes.Offers.AddRange(offers);

            return payload;
        }
Example #2
0
 public static Payload OrderCancelled(Uid order)
 {
     return new Payload {
         Type = PayloadType.PAYLOADORDERCANCELLED,
         OrderCancelled = new OrderCancelled {
             Order = order.ToUuid128(),
             Reason = Proto.Seto.OrderCancelledReason.ORDERCANCELLEDMEMBERREQUESTED
         }
     };
 }
Example #3
0
 public static Payload OrdersForMarketRequest(Uid market)
 {
     return new Payload {
         Type = PayloadType.PAYLOADORDERSFORMARKETREQUEST,
             OrdersForMarketRequest = new OrdersForMarketRequest {
             Market = market.ToUuid128()
         }
     };
 }
Example #4
0
 public static Payload OrderCancel(Uid order)
 {
     return new Payload {
         Type = PayloadType.PAYLOADORDERCANCEL,
             OrderCancel = new OrderCancel {
             Order = order.ToUuid128()
         }
     };
 }
Example #5
0
 public static Payload OrderAccepted(Uid order, ulong sequence)
 {
     return new Payload {
         Type = PayloadType.PAYLOADORDERACCEPTED,
         OrderAccepted = new OrderAccepted {
             Seq = sequence,
             Order = order.ToUuid128()
         }
     };
 }
Example #6
0
 public static Payload MarketUnsubscribe(Uid market)
 {
     return new Payload {
         Type = PayloadType.PAYLOADMARKETUNSUBSCRIBE,
         MarketUnsubscribe = new MarketUnsubscribe {
             Market = market.ToUuid128()
         }
     };
 }
Example #7
0
 public static Payload MarketQuotesRequest(Uid market)
 {
     return new Payload {
         Type = PayloadType.PAYLOADMARKETQUOTESREQUEST,
         MarketQuotesRequest = new MarketQuotesRequest {
             Market = market.ToUuid128()
         }
     };
 }
Example #8
0
 public static Payload MarketQuotes(Uid market)
 {
     return new Payload {
         Type = PayloadType.PAYLOADMARKETQUOTES,
         MarketQuotes = new Proto.Seto.MarketQuotes {
             Market = market.ToUuid128(),
             PriceType = Proto.Seto.PriceType.PRICEPERCENTODDS,
             QuantityType = Proto.Seto.QuantityType.QUANTITYPAYOFFCURRENCY
         }
     };
 }