etrade API的技术问题。
我正在Sandbox中构建尾随止损卖出至收盘订单,并使用以下预览:
"{"PreviewOrderRequest":{"orderType":"OPTN","clientOrderId":"27099010699269ea2bee","Order":[{"allOrNone":"false","priceType":"TRAILING_STOP_CNST","orderTerm":"GOOD_FOR_DAY","marketSession":"REGULAR","trailPrice":".15","stopPrice":0,"Instrument":[{"Product":{"symbol":"MSFT","securityType":"OPTN","callPut":"CALL","expiryYear":"2021","expiryMonth":"9","expiryDay":"24","strikePrice":"290"},"orderAction":"SELL_CLOSE","orderedQuantity":"10","quantity":"10"}]}]}}"
然而,在响应中,我收到以下错误消息:
"{"Error":{"code":7,"message":"You did not specify a stop price. Please fill in the missing information and resubmit your order."}}"
可以看到,我在order对象中设置了"stopPrice":0
。我将"0"
设置为零,因为这是文档中几个示例中使用的值:
https://apisb.etrade.com/docs/api/order/api-order-v1.html/定义/OrderDetail
我尝试了数字和字符串:"stopPrice":"0"
,但没有成功。
是否有不同的字段/值设置或格式/配置使此工作?
一个明显的问题是0是否是一个有效值。如果是,我会很惊讶,但这很容易检查。