alphapoint / apex-api Goto Github PK
View Code? Open in Web Editor NEWBase library for alphapoint library
License: MIT License
Base library for alphapoint library
License: MIT License
When a web socket error occurs, it is not passed to the onerror function that is provided during construction.
Going from the documentation the following should return a Level2 Event
apex.Level2.subscribe(console.log);
Instead you get this garbled mess
ActionType:(10) [15, 1, 1623181164534, 0, 43916.83, 1, 37467.84, 2, 0.0047, 0]
LastTradePrice:undefined
NumberOfAccounts:(10) [13, 1, 1623181164534, 0, 43916.83, 1, 38340.63, 2, 0.6923, 1]
NumberOfOrders:undefined
Price:undefined
ProductPairCode:undefined
Quantity:undefined
Side:undefined
UpdateDateTime:(10) [14, 0, 1623181160956, 2, 43916.83, 0, 37437.09, 2, 0, 0]
UpdateId:(10) [12, 0, 1623181159643, 2, 43916.83, 0, 38305.21, 2, 0, 1]
While constructing a new apex object errors occurring establishing the web socket connection are uncaught. For example:
try {
const myapex = new APEX('bad-url');
}
catch (e) {
// the above error can't be caught here because the error throws from a different thread.
}
It is also a questionable practice to perform an async operation in a constructor. It would probably be better to have a separate connect routine which is async. This would make handling errors easier too. Now the only way I could catch the error thrown above was in the process.on('uncaughtException').
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.