【发布时间】:2021-09-22 15:44:58
【问题描述】:
etrade API 的技术问题。
我正在构建一个追踪止损卖出收盘订单,在沙盒中具有以下预览:
"{"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."}}"
如您所见,我在订单对象中设置了"stopPrice":0。我将 "0" 设为零,因为这是文档中几个示例中使用的值:
https://apisb.etrade.com/docs/api/order/api-order-v1.html#/definitions/OrderDetail
我尝试将它作为数字和字符串:"stopPrice":"0",但没有成功。
是否有不同的字段/值要设置或格式/配置来完成这项工作?
【问题讨论】:
标签: algorithmic-trading etrade-api