Closed mrgithub closed 3 years ago
Ok I worked it out. Set the price to null and the orderType to "MARKET",
'
Place SELL order
//Place limit sell of 5 $GME @ $50
let ticker = "GME_US_EQ";
let orderType = "MARKET"; <---
let stopPrice = null; <---
let limitPrice = "50";
let quantity = -5;
let timeValidity = "DAY";
trading212.placeOrder(ticker, orderType, stopPrice, limitPrice, quantity, timeValidity);
//If order fails
trading212.on('order-failture', (data) {
//Axios error
});
//If order succeeds
trading212.on('account', (data) => {
//data.orders
//data.positions
//console.log(data);
});
'
When will this be implemented?