IB adapter InstrumentId format to '[email protected]' #861
Replies: 2 comments 1 reply
-
Hey @rsmb7z, thanks for your thoughts! @cjdsellers and I discussed briefly your PR and these questions, I'm going to reply to both your PR (#864) and this discussion. We currently have another mechanism in nautilus that attempts to handle this situation when running live, the Configuring this in a live node looks something like: config_node = TradingNodeConfig(
exec_clients={
"IB": InteractiveBrokersExecClientConfig(
routing=RoutingConfig(
default=True,
venues={Venue("NASDAQ"), Venue("NYSE")}
)
),
},
) This would mean that any orders send for Regarding your PR, we are hesitant to make any changes to the That being said, you correctly raise some questions about routing and execution that are not being handled as well as they could be right now. The most pressing issue I see currently is that we are unable to correctly subscribe to data / instruments or place orders via a broker in the correct way. The IB adapter should be able to place orders via SMART routing, or DMA to an exchange, but when those fills come through we need to correctly identify where they were executed (for commission handling etc). I think this ultimately boils down to improvements for the IB adapter, not changing the way we handle instruments in nautilus (and possibly some additions to how we can tag orders sent from the strategy as SMART or DMA) , but I'd like to hear any further thoughts you have. |
Beta Was this translation helpful? Give feedback.
-
Hi @rsmb7z So here is the definition for the
You've also correctly identified the account <-> venue one-to-one mapping, this is intentional, partly for simplicity. So as per Brads thoughts, we don't want to change the semantics of the Having said that, you've given us some good ideas for how we could add some more flexibility when submitting orders for smart routing e.g. Where this can be specified is likely to be the The other part to this is how we indicate where you were filled... this is trickier because sending an order with an instrument ID of This is still being determined and discussed. In the mean time we'll close your PR for now pending the final solution. Many thanks for your thoughts and efforts on this! 🙏 |
Beta Was this translation helpful? Give feedback.
-
Hi @limx0, @cjdsellers,
In regards to IB I see that the InstrumentId format is
localSymbol.exchange
where exchange serve as Venue. On the other hand if I see the Backtest Engine which require one account for one Venue each. So from different struggle and understanding what I understood is that Nautilus Trader starting with other adapters which are mostly I believe single Venue based (some sort of different symbol mechanism and Venue being the place where account is). So is there any particular reason for using 'localSymbol.exchange'? Why not similar to[email protected]
. Using the later one I noticed few benefits though;Let me know if you need more information.
Beta Was this translation helpful? Give feedback.
All reactions