Placing order with Stop Loss

I am having trouble placing an order that has a stop loss and take profit. The order is being created but the SL or TP doesn’t get triggered when the price shifts out of one of their ranges.
Here is the code I am using the set up an order (Python Requests)

data ={
        "symbol": symbol,
        "notional": notional,
        "side": side,
        "type": type,
        "time_in_force": time_in_force,
        "take_profit": {
            "limit_price": take_profit
        "stop_loss": {
            "stop_price": stop_loss
    r =, json=data, headers=HEADERS)

I have passed the TP and SL as both strings and number values, either way the order is still processed but without the TP/SL values. Is there something I am missing?