longportapp / openapi-sdk

LongPort OpenAPI SDK Base.
https://open.longportapp.com
Apache License 2.0
115 stars 11 forks source link

美股提交MIT类型卖出单报错 #88

Open fr0der1c opened 4 weeks ago

fr0der1c commented 4 weeks ago

问题描述

美股提交MIT类型卖出单报错 httpStatus:400 code:602001 message:order type not support trace:f5e4781dd37a089cb17f6b8ce92f8c8e

代码例子

    _, err := tradeContext.SubmitOrder(ctx, &trade.SubmitOrder{
        Symbol:            symbol,
        OrderType:         trade.OrderTypeMIT, 
        Side:              trade.OrderSideSell,
        SubmittedQuantity: qty,
        OutsideRTH:        trade.OutsideRTHAny,
        TimeInForce:       trade.TimeTypeGTC,
        TriggerPrice:      price,
    })
    if err != nil {
        return fmt.Errorf("submit MIT order failed: %w", err)
    }

你的环境信息

fr0der1c commented 4 weeks ago

这个函数之前在线上调通过的,今天突然报错了。而且重试了几次,稳定报错。另外,模拟炒股环境是一直稳定报错。