KO-9 / trading212-ui

3 stars 1 forks source link

Stop limit sell and buy feature #2

Closed mrgithub closed 3 years ago

mrgithub commented 3 years ago

Feature request to add sell and buy stop limits

KO-9 commented 3 years ago

hey, you can add place a stop limit order with the following code


    let symbol = "GME_US_EQ";
    let orderType = "STOP_LIMIT";
    let quantity = -1;//Minus how ever many you wish to sell
    let limitPrice = 203; //Set limit sell at this price
    let stopPrice = 205; //Limit order is only placed on market when price is at or below this price
    let timeValidity = "DAY"; // Or "GOOD_TILL_CANCEL"

    trading212.placeOrder(symbol, orderType, stopPrice, limitPrice, quantity, timeValidity);```
KO-9 commented 3 years ago

didn't realise this was in the ui project. I've updated the code to include this now :)