OrgTBoot / trading-boot

3 stars 2 forks source link

Simple Order vs Combo #7

Open maimas opened 1 year ago

maimas commented 1 year ago

Today we rely on the trading boot to monitor and trigger sell signals. WB allows placing combo orders. Should we integrate them?


POST - COMBO BUY ORDER
https://ustrade.webullfinance.com/api/trading/v1/webull/order/comboOrderPlace?secAccountId=1111111
{
    "newOrders": [
        {
            "shortSupport": true,
            "orderType": "LMT",
            "timeInForce": "GTC",
            "quantity": 1,
            "outsideRegularTradingHour": false,
            "action": "BUY",
            "tickerId": 913254559,
            "lmtPrice": "5.98",
            "comboType": "MASTER",
            "serialId": "8b4a05d9-4724-445a-8097-50bec915c027"
        },
        {
            "shortSupport": true,
            "orderType": "STP",
            "timeInForce": "GTC",
            "quantity": 1,
            "outsideRegularTradingHour": false,
            "action": "SELL",
            "tickerId": 913254559,
            "lmtPrice": null,
            "auxPrice": "5.38",
            "comboType": "STOP_LOSS",
            "serialId": "8a83f90e-112e-4bb1-a107-5208b8228c08"
        },
        {
            "shortSupport": true,
            "orderType": "LMT",
            "timeInForce": "GTC",
            "quantity": 1,
            "outsideRegularTradingHour": false,
            "action": "SELL",
            "tickerId": 913254559,
            "lmtPrice": "6.58",
            "auxPrice": null,
            "comboType": "STOP_PROFIT",
            "serialId": "75962dde-0104-4c67-80e2-219666a101ca"
        }
    ],
    "serialId": "cb3d10db-088c-482e-93de-fa22ac95f33d"
}

POST - COMBO ORDER MODIFY (cancel) 
https://ustrade.webullfinance.com/api/trading/v1/webull/order/comboOrderModify?secAccountId=11111111
{
    "serialId": "6455a74e-fe78-4dbe-8401-be22db142ebb",
    "cancelOrders": [
        "634781791995072512"
    ]
}

POST - BUY
https://ustrade.webullfinance.com/api/trading/v1/webull/order/stockOrderPlace?secAccountId=11111111
{
    "orderType": "LMT",
    "timeInForce": "DAY",
    "quantity": 30,
    "outsideRegularTradingHour": false,
    "action": "BUY",
    "tickerId": 950181551,
    "entrustType": "QTY",
    "lmtPrice": "0.0585",
    "comboType": "NORMAL",
    "assetType": "crypto",
    "serialId": "48f4ac37-33a4-4967-95c7-d78437a02174"
}