rob sinclair 0 Report post Posted July 22, 2013 I am trying to create a limit order using the code below but I get a Red Card with status reason 75 “The total quantity of guaranteed stop orders must be equal to trade order quantity”. I have the Guaranteed property set to false. The values for the submitted order are shown below as well as the response details: var response = rpcClient.TradesAndOrders.Order(ciOrder);rpcClient.MagicNumberResolver.ResolveMagicNumbers(response); var orderStatusReason = _rpcClient.Messaging.GetSystemLookup(“OrderStatusReason”, 0); var reason = orderStatusReason.ApiLookupDTOList[response.StatusReason – 1].Description; ciOrder {CIAPI.DTO.NewStopLimitOrderRequestDTO} Applicability GTDAuditId 20111215-G2PREPROD3-0137276AutoRollover TRUEBidPrice 1597.1Currency GBPDirection buyExpiryDateTimeUTC {20/01/2012 03:00:00}Guaranteed FALSEIfDone nullMarketId 400562973OcoOrder nullOfferPrice 1598OrderId 0Quantity 12TradingAccountId 400088019TriggerPrice 1500 response {CIAPI.DTO.ApiTradeOrderResponseDTO} OrderId 0Orders {CIAPI.DTO.ApiOrderResponseDTO[1]}Quote nullStatus 2Status_Resolved Red CardStatusReason 75StatusReason_Resolved Instruction processing has resulted in a Red Card. Please check details. orderStatusReason.ApiLookupDTOList[74] {CIAPI.DTO.ApiLookupDTO} Description The total quantity of guaranteed stop orders must be equal to trade order quantity.DisplayOrder 75Id 75IsActive TRUEIsAllowed FALSETranslationText The total quantity of guaranteed stop orders must be equal to trade order quantity.TranslationTextId 1979 Share this post Link to post
wilsoncg 1 Report post Posted July 24, 2013 You’ve looked up the wrong status reason, the Status and StatusReason on the ApiTradeOrderResponseDTO refer to InstructionStatus and InstructionStatusReason. You’ll want to lookup the Status and StatusReason in the Orders list of ApiOrderResponseDTO, hopefully that will give you a more informative error. Share this post Link to post