You can refer to this example for placing Market equity order. To place stoploss order you need to change order_type to SL/SLM and send additional field of trigger_price and price field based on SL/S…
In this example there's no variety in place_order(). But I'm receiving this error: TypeError: place_order() missing 1 required positional argument: 'variety'