☰
Login
Signup
Home
›
Python client
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Register
Categories
Recent Discussions
Activity
Categories
13.9K
All Categories
0
Incidents
156
Node JS client
40
Go client
793
.Net API client
380
Kite Publisher
537
.Net / VBA / Excel (3rd party)
457
Algorithms and Strategies
998
Java client
1.1K
API clients
404
PHP client
4K
Python client
347
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.3K
General
In this Discussion
February 2019
Vishesh
February 2019
sujith
Getting HTTPS 307 followed by Http 302
Vishesh
February 2019
edited February 2019
in
Python client
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
DEBUG:urllib3.connectionpool:
https://api.kite.trade:443
"POST /orders/BO HTTP/1.1" 307 0
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): api.kite.trade
DEBUG:urllib3.connectionpool:
http://api.kite.trade:80
"POST /orders/bo HTTP/1.1" 301 None
DEBUG:urllib3.connectionpool:
https://api.kite.trade:443
"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,
squareoff=squareoff, trailing_stoploss=trailing_stoploss,tag=tag)
<<data is my variable to store the return value from the API>>
Tagged:
Python Client
kiteapi
sujith
February 2019
It seems like you are passing upper case BO for variety. We have always recommended using the lower case values for variety field.
sujith
February 2019
You can check out
documentation here
.
Vishesh
February 2019
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.
sujith
February 2019
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.
Sign In
or
Register
to comment.
We have now moved to HAProxy wherein the behavior is different.