Hello,
My BUY order code:
body = upstox_client.PlaceOrderRequest(
quantity=25,
product="I",
validity="DAY",
price=last_price,
tag="string",
instrument_token=instrument,
order_type="LIMIT",
transaction_type="BUY",
disclosed_quantity=0,
trigger_price=0,
is_amo=False
)
With this, the BUY order is placed successfully.
My SELL order code for the same option contract:
body = upstox_client.PlaceOrderRequest(
quantity=25,
product="I",
validity="DAY",
price=selling_price,
tag="string",
instrument_token=instrument,
order_type="LIMIT",
transaction_type="SELL",
disclosed_quantity=0,
trigger_price=0,
is_amo=False
)
But, the same option contract was not sold. However a new SELL order was attempted and then immediately faced with an error - “You need to add Rs.xxxx in your account to place this trade”.
The API did not return any error, and the above error was seen on my Upstox mobile app.
How can my code sell the SAME ORDER that the code has already purchased?
Thanks in advance for help.