tedchou12 / webull

Unofficial APIs for Webull.
MIT License
601 stars 185 forks source link

feature: comboOrderModify #378

Open dereckmartin opened 1 year ago

dereckmartin commented 1 year ago

I would like to update a combo order, or in the web interface this is editing a profit/loss sell order on an already open position.

Specifically, I am interested in seeing if I can set outsideRegularTradingHour to true through the API. The web interface hides this option and defaults to false.

https://ustrade.webullfinance.com/api/trading/v1/webull/order/comboOrderModify

[
    {
        "shortSupport": true,
        "orderType": "STP",
        "timeInForce": "GTC",
        "quantity": 1,
        "outsideRegularTradingHour": false,
        "action": "SELL",
        "tickerId": <tickerId>,
        "lmtPrice": null,
        "comboType": "STOP_LOSS",
        "orderId": "<order_id>",
        "auxPrice": "38.59",
        "serialId": "<serial-id>"
    },
    {
        "shortSupport": true,
        "orderType": "LMT",
        "timeInForce": "GTC",
        "quantity": 1,
        "outsideRegularTradingHour": false,
        "action": "SELL",
        "tickerId": <tickerId>,
        "lmtPrice": "69.06",
        "comboType": "STOP_PROFIT",
        "orderId": "<order_id>",
        "auxPrice": null,
        "serialId": "<serial-id>"
    }
]
ICANTFINDAUSERNAMEATALL commented 1 year ago

I tried to do similar things, except just change the quant and it raised an error for me. What I found to work was that I'd have to cancel the order, then replace it but I don't think it would work with these combo orders since I don't think you can place these with this api.

Biletnikoff commented 1 year ago

I tried to do similar things, except just change the quant and it raised an error for me. What I found to work was that I'd have to cancel the order, then replace it but I don't think it would work with these combo orders since I don't think you can place these with this api.

Are you saying place_order_otocodoesn't work?