GithubHelp home page GithubHelp logo

openapi-clientlib-js's People

Contributors

akssaxo avatar alexeykropotin avatar bkozar avatar dependabot-preview[bot] avatar dependabot[bot] avatar grajiv avatar harshitsilly avatar himanshumeena avatar hiredgun avatar hiteshdua1 avatar ikarami avatar ilyalopatkin avatar jawalker88 avatar joshuarpearce avatar kangelsl avatar kiermasp avatar lukeapage avatar lukpsaxo avatar macqbat avatar majtsaxo avatar michax avatar mvjuul avatar oskarszura avatar robatwilliams avatar sankalplakhina avatar staunsholm avatar tisgro avatar torejuloe avatar tushar-chandra-030389 avatar yugandhar02 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openapi-clientlib-js's Issues

Improve Wiki Docs

Some suggestions:

  • Describe the PR process (ie. how many approvals needed, templates etc).
  • Describe possible grunt actions ie. grunt test-watch

Support for NodeJS

Hi!

I'm currently trying to consume the openapi from NodeJS.

My on this, is that there is a dependency to the browser, and as far as I can see, it is solely caused by a dependency to SignalR library.

I have no experience with SignalR, and I haven't read too much up on it, but would it be possible to abstract the signalR-connection and add the ability to provide "your own" implementation when constructing Streaming?

I have an implementation in mind:

I will change the signature of the constructor to this:

function Streaming(transport, baseUrl, authProvider, options, signalClientProvider) {}

Then in the init function I will create the connection using the signalClientProvider instead of $.connection().

const connection = this.signalClientProvider(this.connectionUrl);

signalClientProvider will also be responsible for providing connection states:

/**
 * maps from the signalR connection state to the ConnectionState Enum
 */
function mapConnectionState(state) {
    let connectionState;
    switch (state) {
        case this.signalClientProvider.states.connecting: connectionState = this.CONNECTION_STATE_CONNECTING; break;

        case this.signalClientProvider.states.connected: connectionState = this.CONNECTION_STATE_CONNECTED; break;

        case this.signalClientProvider.states.disconnected: connectionState = this.CONNECTION_STATE_DISCONNECTED; break;

        case this.signalClientProvider.states.reconnecting: connectionState = this.CONNECTION_STATE_RECONNECTING; break;

        default:
            log.warn(LOG_AREA, 'unrecognised state', state);
            break;
    }

    return connectionState;
}

Wouldn't this be all that is needed to be able to use the client outside the browser?

Space between number and percentage sign

I admit that "10.2 %" and "10.2%" are both correct at some degree. But I'd like to ask, whether the project will consider switch "10.2 %" to "10.2%". To be honest, the second notation is more frequently seen in life.

Here are some interesting discussion https://english.stackexchange.com/questions/3281/should-there-be-a-space-before-a-percent-sign

When the symbol % is used, there should be no space. When the "percent" word is used, there should be space.

Examples from the Chicago Manual of Style Online:

Fewer than 3 percent of the employees used public transportation.
With 90โ€“95 percent of the work complete, we can relax.
A 75 percent likelihood of winning is worth the effort.
Her five-year certificate of deposit carries an interest rate of 5.9 percent.
Only 20% of the ants were observed to react to the stimulus.
The treatment resulted in a 20%โ€“25% increase in reports of night blindness.

The manual explicitly advices the following:

Note also that no space appears between the numeral and the symbol %.

Publishing to NPM

Thoughts on publishing this to NPM as a package? I'd like to use this, but cloning doesn't seem like the most efficient (or safe, from versioning standpoint) way to acquire this package.

Probe messages are discarded

As a user it isn't possible to use probe messages, or even trigger something when they arrive. This is due to the library picking them up for their "_" control message prefix but having no case for probe messages.

Why do you need visual studio project files

Why do you need visual studio project files? And if they are needed i think they should have different names then SharedJS.

Files in question:

  • SharedJS.csproj,
  • SharedJS.sln

Seperate or replace the micro emitter

Internally we would like to use the event emitter in projects without a need for the open api client library. As we would need to bundle that emitter in our output, that means we should allow not using the monolithic entry point (publish the es2015 raw source) to avoid duplication.

Any suggested replacements or should we publish the micro emitter?

Visual studio project contains reference to not existing minitrader files.

Visual studio project contains reference to not existing minitrader files.
For example SharedJS.csproj contains:

...
    <Content Include="minitrader\Content\css\site.min.css" />
    <Content Include="minitrader\Content\fonts\glyphicons-halflings-regular.svg" />
    <Content Include="minitrader\Content\img\favicon.ico" />
    <Content Include="minitrader\Content\img\mtarchitecture.png" />
    <Content Include="minitrader\Content\img\saxo1.png" />
    <Content Include="minitrader\Index.html" />
....

Floating point issue

There's a floating point issue in the format methods:

numberFormat.shortFormat(10.1, 2)
> "10"
numberFormat.shortFormat(10.11, 2)
> "0.0k"

Will investigate a fix and make a PR.

Negative zero issue

When formatting infinitesimally small negative values using formatPriceParts method of PriceFormatting class, the output comes as '-0' which makes no sense. It should be '0'.

Python Implementation

Hi Guys,

Thanks for the JS API implementation you provide.

I know it's not an issue, rather a comment, but I dont think there's anywhere else I can raise this with saxo as a dev.

What I wanted to ask is, why a JS implementation and not a Python implementation? Is this a fork from what you use at the backend and it's in JS?

JS seems a rather inconvenient choice for algo traders, since I rarely see it used anywhere else in the domain. Say I need to do some data processing, machine learning, integrate with 3rd party backtested/live trading platform, most tools available for this out there are python if we talk higher-level language. JS API library requires extra, hacky integration work/interfaces.

I would love to have an API library from you, particularly for live streaming prices and trading events. I struggle quite a bit to make a stable socket with you in python at the moment, if there was a stable library from you provided for the API in python it would be so great.

Again sorry for not raising an issue, but rather for commenting.

Thank you.

Question about api limits

hi, can someone please tell me if the open api access of 10k daily limit requests. is the request count incremented for every like info price subscription response message or just for the sub/unsub request . I know it is not a request but a stream of responses, I just wonder if it counts as activity or not? and if hopefully not then can I then set the refresh rate for the sub to be 500 mils ?
thank you

Purpose of files in libs directory

What's a purpose of files found in libs directory? Most of them aren't used directly in this project.
Some of them are external dependencies(signalR, jQuery), however documentations suggests to configure external dependencies manually using direct sources.

Archive

We are no longer open sourcing this library, though the code and npm package is still available.

Please let us know if you are using this package and would like to see it continue to be supported.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.