Lines of code within on_ticks

rejeesh31
rejeesh31 edited August 2020 in Python client
Hi All, this is more like a general query.
@sujith
@Imran

1.Is there any general rule of thumb about just how many lines of code you can put inside the on_ticks() before it start hampering execution. or how long is too long a code?
2. The place_order() has got 13 parameters, is it necessary to provide all of these when I place an order? Are there any ref for the min required parameters for each order_type?
3. Is there a way to fetch order_status directly other than slicing through the kite.orders() data?

Thanks!
RM
  • rakeshr
    Is there any general rule of thumb about just how many lines of code you can put inside the on_ticks() before it start hampering execution. or how long is too long a code?
    It's not recommended to do any computation inside on_ticks thread. You
    can go through Websocket Streaming FAQs here.
    The place_order() has got 13 parameters, is it necessary to provide all of these when I place an order? Are there any ref for the min required parameters for each order_type?
    You can refer sample example and detail about all order param here. Order param input depends on required order variety.
    Is there a way to fetch order_status directly other than slicing through the kite.orders() data?
    Yes, you can fetch individual order status from Order Historical end-point, with required order_id.
  • rejeesh31
    Thanks @rakeshr for the response!

    Is there a python function call for Order Historical end-point, similar to place_order ?
  • rejeesh31
    rejeesh31 edited August 2020
    @rakeshr on the order parameters,

    When I place a kite.VARIETY_REGULAR and order_type kite.ORDER_TYPE_SL I need to pass trigger_price param.

    But when I place the same order but this time as kite.ORDER_TYPE_LIMIT do I still need to pass trigger_price = None or can I completely take out this trigger_price param?

    did that make sense?

    Similarly for all different verities and order_types, do you have any ref for the min required parameters?
  • rakeshr
    Is there a python function call for Order Historical end-point, similar to place_order ?
    Yes, for python client you can refer to this method.
    But when I place the same order but this time as kite.ORDER_TYPE_LIMIT do I still need to pass trigger_price = None or can I completely take out this trigger_price param?
    Yes, you don't need to send those params/completely take out.
    Similarly for all different verities and order_types, do you have any ref for the min required parameters?
    You can go through these articles to understand different order varieties.
Sign In or Register to comment.