It looks like you're new here. If you want to get involved, click one of these buttons!
.Net API client
.Net / VBA / Excel (3rd party)
Algorithms and Strategies
Mobile and Desktop apps
Market data (WebSockets)
In this Discussion
Getting HTTPS 307 followed by Http 302
edited February 4
Im using the git hub client code provided for kite connect. Things were pretty smooth for last 1+ year...
I'm getting the following error when posting a BO
"POST /orders/BO HTTP/1.1" 307 0
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): api.kite.trade
"POST /orders/bo HTTP/1.1" 301 None
"GET /orders/bo HTTP/1.1" 400 92
EXCEPTION IN (LINE 253 "squareoff=squareoff, trailing_stoploss=trailing_stoploss,tag=tag)"): Invalid `order_id`.
Exception in DirectOrder Invalid `order_id`.
The above is console debug - triggered when the python is triggering the following code
kite = get_kite_client()
data = kite.place_order(variety=product, exchange=exchange, tradingsymbol=tradingsymbol,
transaction_type=TransactionType, quantity=quantity, product=product,
order_type=order_type, price=price, trigger_price=trigger_price, stoploss=stoploss,
<<data is my variable to store the return value from the API>>
It seems like you are passing upper case BO for variety. We have always recommended using the lower case values for variety field.
You can check out
This has resolved the issue - thanks. Strange though... BO is what I had been using for over a year now. Thanks once again! much appreciated.
Recently, we had changed the infrastructure. Nginx by default changes the route to lower case.
We have now moved to HAProxy wherein the behavior is different.