You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[feature request] Add support for Trailing Stop Limit Order via CLIENT_VERSION Upgrade #145
From looking at the code further, the primary in-depth change needed to make this work is to support the lmtPriceOffset field, which is currently not handled in the outgoing.js file. Specifically, this section of the EClient.java file would need to be ported for this to work correctly.
Thanks for the suggestion @nemozny. I tried manually building the order as
well before, and was able to send other types of order that way. The issue
is that the “lmtPriceOffset” field doesn’t get transmitted since
outgoing.js doesn’t have code to handle it.
On Mon, Aug 19, 2019 at 12:16 PM nemozny ***@***.***> wrote:
You don't need to use /lib/orders, those are just for your convenience.
You can construct the order by yourself, which is what I do.
const parent = orderId++
ib.placeOrder(parent, contract, {
action : "BUY",
orderType : "MKT",
transmit : false
})
ib.placeOrder(orderId++, contract, {
action : "SELL",
orderType : "TRAIL",
auxPrice : 10,
parentId : parent,
transmit : true
})
The important here is the transmit and parentId keys.
Similarly you can build your TRAIL LIMIT.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#145?email_source=notifications&email_token=ACE2MM6N4FUUM55P3TEYOOTQFLBNJA5CNFSM4IKYFK62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4TPVJQ#issuecomment-522648230>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACE2MMYK7XYGJBBDWC5K3FDQFLBNJANCNFSM4IKYFK6Q>
.
changed the title [-][feature request] Add support for Trailing Stop Limit Order[/-][+][feature request] Add support for Trailing Stop Limit Order via CLIENT_VERSION Upgrade[/+]on Aug 31, 2019
I have a hunch about how to adjust this part of the code with outgoing.js, but am unsure about the extent of the other API changes needed for deserializing incoming payloads.
@pilwon you must update the readme and point to this new version, clearly, this node-ib is very outdated and you barely merge changes, which is very misleading to other developers
This is such a genius project, I want to join in!! I'm currently using your program and if I find any bugs, I will provide feedback on the open-source platform!!! The author is incredible!!! Please give me the PayPal of the owner, I want to make a donation!!!! My email is [email protected]
Activity
hydrosquall commentedon Aug 10, 2019
From looking at the code further, the primary in-depth change needed to make this work is to support the
lmtPriceOffsetfield, which is currently not handled in theoutgoing.jsfile. Specifically, this section of theEClient.javafile would need to be ported for this to work correctly.node-ib/ref/client/EClient.java
Lines 1829 to 1879 in 85305c7
nemozny commentedon Aug 19, 2019
You don't need to use /lib/orders, those are just for your convenience. You can construct the order by yourself, which is what I do.
The important here is the transmit and parentId keys.
Similarly you can build your TRAIL LIMIT.
hydrosquall commentedon Aug 19, 2019
[-][feature request] Add support for Trailing Stop Limit Order[/-][+][feature request] Add support for Trailing Stop Limit Order via CLIENT_VERSION Upgrade[/+]hydrosquall commentedon Aug 31, 2019
Update:
Upon closer inspection, it appears that adding these fields was probably part of the jump from API version
9.70.01from9.73(Compare what the Java client supports)
node-ib/ref/client/EClient.java
Line 100 in 85305c7
(to what the JS code implements)
node-ib/lib/constants.js
Line 1 in 9a4dc7b
node-ib/lib/constants.js
Line 8 in 9a4dc7b
Adding support for newer versions of the client would address these sibling issues:
I have a hunch about how to adjust this part of the code with
outgoing.js, but am unsure about the extent of the other API changes needed for deserializing incoming payloads.tredondo commentedon Aug 18, 2021
@pilwon: how can we add fields to the code that deserializes them from the server?
For example, in
placeOrder,orderStatemisses many of the newer fields likeinitMarginChange.I tried adding
orderState.foo = this.dequeue()after the last assignment (to.warningText) but that caused the client to time out.ceddybi commentedon Aug 20, 2021
@tredondo @hydrosquall - you are late to the party, we have everything here https://github.com/stoqey/ib,
@pilwon you must update the readme and point to this new version, clearly, this node-ib is very outdated and you barely merge changes, which is very misleading to other developers
GithubJaimeLee commentedon Nov 30, 2023
This is such a genius project, I want to join in!! I'm currently using your program and if I find any bugs, I will provide feedback on the open-source platform!!! The author is incredible!!! Please give me the PayPal of the owner, I want to make a donation!!!! My email is [email protected]