Comments (10)
@vitsy thank you so much for reporting this Victor, I'll cc @mfrener our lead on the newer version to check it out, in the meantime feel free to use the earlier version, please don't hesitate to share a fix in case you run into it.
from ib.
OMG... there was no strict="true" on the tsconfig, but did rely on that it is there w/o actually checking..
Result is about a ton of un-checked optional chains. Have added strict="true" to and fixed all the new compile errors, including the:
tokens.push(order.softDollarTier.name)
--> should be:
tokens.push(order.softDollarTier?.name ? order.softDollarTier.name: ""), so undefined softDollarTier will translate to empty token.
There is a PR open #18, however I will not be able to actually test it before ~Wednesday.
@vitsy if you want test fix already you can do so:
Checkout https://github.com/stoqey/ib/tree/bugfix/issue-16 branch, do "npm run build" and update your node_modules/@stoqey/ib folder with /dist folder as generted by the npm build (see https://github.com/stoqey/ib/wiki/Developer-Guide how to build).
from ib.
Great!
Your pull request is solve this problem,
But i got error in the decoder .
at Decoder.decodeMsg_TICK_PRICE (/media/victor/DOG/Charting/Optimizer/server/node_modules/@stoqey/ib/src/io/decoder.ts:347:24)
I will check more later.
Thanks!
Victor
from ib.
Hmm that is strange, I'm using reqMktData / EventName.tickePrice on my own already and did had no problem so far. Let me know if you have any more info.
If you want to cross-check: the official reference code from IB we use right now is https://github.com/stoqey/ib/blob/master/ref/client/EDecoder.java - our decodeMsg_TICK_PRICE must do same as their private void processTickPriceMsg(), but in TS rather than Java.
from ib.
from ib.
Hey Victor.
In general, a value of 1.7976931348623157e+308 (= Number.MAX_VALUE) on tick values means that this values is not available right now. Can have multiple reasons, i.e. you are outside trading-hours and have request real-time, but not the frozen data (see https://stoqey.github.io/ib-doc/classes/ibapi.html#reqmarketdatatype), or you don't have market data for it all, or... many reason.
So if you get Number.MAX_VALUE value on any of the events (such as tickPrice, tickSize, tickOptionComputation, pnl, ...) is means this value is not available from IB right now.
If you can see that value on TWS but not via API, cross check https://stoqey.github.io/ib-doc/classes/ibapi.html#reqmarketdatatype
from ib.
from ib.
Ok you right, but suppose that better when this situation can be proccesed inside your API ( as far decoder.ts is inner part of API) I mean that decoder must continue work. But in any case thanks! Suppose that my issue can be closed Thanks, Victor
Воскресенье, 24 января 2021, 16:11 +03:00 от Matthias Frener @.***>: Hey Victor. In general, a value of 1.7976931348623157e+308 (= Number.MAX_VALUE) on tick values means that this values is not available right now. Can have multiple reasons, i.e. you are outside trading-hours and have request real-time, but not the frozen data (see https://stoqey.github.io/ib-doc/classes/ibapi.html#reqmarketdatatype ), or you don't have market data for it all, or... many reason. So if you get Number.MAX_VALUE value on any of the events (such as tickPrice, tickSize, tickOptionComputation, pnl, ...) is means this value is not available from IB right now. If you can see that value on TWS but on via API, cross check https://stoqey.github.io/ib-doc/classes/ibapi.html#reqmarketdatatype — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub , or unsubscribe .
-- Виктор Цыба
I was also thinking about doing some special handling inside the decoder for that, i.e. use number|undefined types and return undefined instead of Number.MAX_VALUE... but this would diverge from official IB API.
On the IB TWS Java API they use Double.MAX_VALUE, we use Number.MAX_VALUE in our TypeScript clone. So Java and are TS APIs is in sync, also if there would be better solutions for 'not available values' in TS.
Thanks for feedback & testing - waiting for PR review than it will be merged to master.
from ib.
PR is merged to master, npm update will follow soon.
Thanks for reporting!
from ib.
from ib.
Related Issues (20)
- How to unsubscribe to e.g. getMarketData? HOT 2
- How To Subscribe To Delayed Market Data? HOT 3
- connect issue HOT 12
- Forex class use incorrect SekType (FOP but should be CASH) HOT 1
- Searching securities HOT 3
- EventName.info missing id HOT 4
- How to get User Account Summary with specific IB Account Number ? HOT 1
- Historical data end does not exist? HOT 2
- Error requesting market data for options contract - When the local symbol field is empty, please fill the following fields (right, strike, expiry) HOT 1
- Error: Decoding error on undefined: unprocessed data left on queue HOT 3
- TypeError: path.resolve is not a function HOT 1
- Two active subscriptions for the same Event
- Re-connect after TWS restart not working properly HOT 5
- Update the documentation HOT 4
- Decoding error on COMPLETED_ORDER HOT 1
- Unprocessed Data HOT 14
- demo app
- Comission value from paper trading parsed incorrect HOT 3
- Security type for crypto has some white space. HOT 1
- Bug when using cancelPositionsMulti HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ib.