onTrade Callback

nimbus3001
nimbus3001 edited October 2020 in Python client
Is there any onTrade callback on the platform similar to "on_ticks" callback. If there is none, how do i get trades? Do I need to keep polling my position and take difference of positions at (t-1) vs position at (t) to find trades?
  • rakeshr
    Do I need to keep polling my position and take difference of positions at (t-1) vs position at (t) to find trades?
    \
    By trades, do you mean placed order?
    If yes, you can then you can use on_order_update callback. Check documentation here.
  • nimbus3001
    No, by trades I mean order execution (order fill) at the exchange.
    will on_order_update be called when my standing order is hit at the exchange?
  • rakeshr
    will on_order_update be called when my standing order is hit at the exchange?
    Yes. You can read through the documentation.
  • nimbus3001
    Thanks Rakesh.
    Can you also share the data structure that one gets on trade_events?
    I found this: Tick structure (passed to the on_ticks callback), but it seems that this is the data structure of market data event. Can you please share a similar data structure for trade_event?
  • sujith
    @nimbus3001,
    You don't get trade data structure but you will receive order update like this.
Sign In or Register to comment.