private void HandleResponseCommand(BotCommand cmd, User sender) { // quote from [email protected] to [email protected]:1 @ 57.3 for 200m // quote from [email protected] to [email protected]:1 @ 57.5 RaiseQuoteInquiryResponseReceived( new RfqQuoteInquiryResponse( RfqResponseType.Quote, null, cmd["requestId"], cmd["requestParty"], cmd["counterParty"], cmd.Get("product"), null, ParseQuantity(cmd.Get("quantity")), ParsePrice(cmd["price"]))); }
private void HandleRequestCommand(BotCommand cmd, User sender) { var quantitySign = cmd["action"].Equals("buy", StringComparison.InvariantCultureIgnoreCase) ? 1 : -1; var request = new RfqQuoteRequest( cmd["requestId"], cmd["requestParty"], cmd["counterParty"], cmd["product"], null, quantitySign * ParseQuantity(cmd["quantity"]).Value, ParseExpiry(cmd.Get("requestExpirationDate"))); lock (mx_) { if (!counterPartiesTrackingRequestsFromRequestParties_.Contains(request.CounterParty)) { return; } } // rfq [email protected]:1 at [email protected] buy 100m GBP/EUR (15 min) // rfq [email protected]:1 at [email protected] buy 100m GBP/EUR RaiseQuoteRequestReceived(request); }
private static RfqComment ParseComment(BotCommand command) { return(new RfqComment( command.Get("requestId"), command["requestParty"], command["counterParty"], null, command["comment"])); }