Replies: 4 comments 7 replies
-
Hi, ib = IB::Connection.new # initialize with default parameter
ib.activate_plugin :process_orders, :order_prototypes, :symbols, :auto_adjust Then the Connection-Object initializes clients (class IB::Account) which are able to place orders. u = ib.clients.first
c = IB::Symbols::Stocks.msft # Microsoft
o = IB::Limit.order size: 100, price: 500
u.place order: o, contract: c https://ib-ruby.github.io/ib-api/order_workflow.html Otherwise, use the account-attribute on the order object. ib.send_message :PlaceOrder, contract: IB::Symbols::Futures.mini_dax,
order: Adaptive.order( action: :buy, size: 1, price: 18043 ,
account: 'DU4035279'),
local_id: ib.next_local_id |
Beta Was this translation helpful? Give feedback.
-
Account-groups are not implemented (yet). If you need that, contact me. |
Beta Was this translation helpful? Give feedback.
-
Thanks Hartmut for the help, I will setup ver_10 and give your first example a try. I can iterate through the accounts for now, but I can see Account-groups be a nice to have in the future so I can send the order to the group at once rather than one account at a time. is Account-groups difficult to implement? |
Beta Was this translation helpful? Give feedback.
-
If you just want use them, this should be easy. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a single login with multiple accounts, is there any way to select which account to send orders to? I couldn't find any documentation on working with multiple accounts.
Beta Was this translation helpful? Give feedback.
All reactions