node-ib icon indicating copy to clipboard operation
node-ib copied to clipboard

Order Conditioning

Open amcintyre99 opened this issue 7 years ago • 4 comments

I'm assuming since I don't find any mention of order conditioning in node-ib, except in the java ref code, that I won't be able to set these: http://interactivebrokers.github.io/tws-api/order_conditions.html

Any advice? and if it's a pull request, I will try my best but I've never done one before...

and thanks @pilwon for a great package!!

amcintyre99 avatar Aug 22 '18 00:08 amcintyre99

and thanks @pilwon for a great package!!

Good package, but needs a little love. Named parameters would be great for a start :)

@pilwon, are you still maintaining this? Open to a PR?

tredondo avatar Jun 17 '19 01:06 tredondo

@meteorpublish I am only maintaining this package. TypeScript rewrite or even enhancing with typescript definitions is highly desired but I unfortunately am not able to invest much time these days. I'd appreciate PRs are always welcomed.

pilwon avatar Jun 22 '19 09:06 pilwon

@amcintyre99 I'm not sure (well, I hope), that assumption is incorrect. node-ib does support triggerPrice for example, but searching the code for that will only show Java files - I guess because node-ib simply sends down the wire the entire order object you create, without further processing? (@pilwon, is that correct?)

@pilwon: can you confirm whether,

  1. Conditioned orders are supported but we just don't know how to form the requests?
  2. Adjusted orders are supported? See http://interactivebrokers.github.io/tws-api/adjustable_stops.html. I tried variations of that code, but nothing submitted an adjustable order the way you can manually do in TWS.

I'm willing to submit a PR to make adjusted orders work, and then maybe conditioned orders. Just need a little guidance :)

tredondo avatar Jul 02 '19 02:07 tredondo

@meteorpublish Please refer to my response https://github.com/pilwon/node-ib/issues/143#issuecomment-510891432

You should be able to pass any type of order to .placeOrder(id, contract, order) and I suggest looking for clues in the reference Java code.

pilwon avatar Jul 12 '19 13:07 pilwon