Giter VIP home page Giter VIP logo

dxlink's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

levithomason

dxlink's Issues

dxfeed websockets API Not Respecting FEED_SETUP Message

Hello,

I am debugging my dxfeed client, and keep running into this stubborn issue. I am unable to reproduce exactly; running the same code multiple times results in either a successful FEED_SETUP or an unsuccessful one depending on the day/hour.

I am trying to send the following FEED_SETUP message:

{'type': 'FEED_SETUP', 'channel': 1, 'acceptAggregationPeriod': 0.0, 'acceptDataFormat': 'FULL', 'acceptEventFields': {'Quote': ['eventType', 'eventSymbol', 'eventTime', 'sequence', 'timeNanoPart', 'bidTime', 'bidExchangeCode', 'bidPrice', 'bidSize', 'askTime', 'askExchangeCode', 'askPrice', 'askSize']}}

However, I keep getting back

{"type":"FEED_CONFIG","channel":1,"dataFormat":"COMPACT","aggregationPeriod":0.0}

, where acceptDataFormat is not respected. My parser is based only on the FULL dataset; COMPACT won't work for me. Why does the API not respect my FEED_SETUP message?

Minor mistakes

@Fyzu

  • typo in DXLinkFeedEventListner -> DXLinkFeedEventListener.
  • client.connect is asnyc function for no reason

Unable to start DXLinkWebSocketClient - WebSocket is not defined

Getting error when creating a client -

const client = new DXLinkWebSocketClient()
    client.connect('wss://openapi-ws.dxfeed.com/realtime')
    client.setAuthToken('xyz')

    const feed = new DXLinkFeed(client, FeedContract.AUTO)
    feed.configure({
        acceptAggregationPeriod: 10,
        acceptDataFormat: FeedDataFormat.COMPACT,
        acceptEventFields: {
            Quote: ['eventSymbol', 'askPrice', 'bidPrice'],
            Candle: ['eventSymbol', 'open', 'close', 'high', 'low', 'volume'],
        },
    })

Error -
this.socket = new WebSocket(this.url)
^
ReferenceError: WebSocket is not defined
at WebSocketConnector.start (file:///Users/xyz/tt/node_modules/@dxfeed/dxlink-websocket-client/src/connector.ts:23:23)

this.socket = new WebSocket(this.url)

I added this import in connector class which fixed the issue locally for me -
import WebSocket from 'ws';

API not sending JSON data

Most of the time I am receiving JSON data through the API. However, same code, no changes, and sometimes I get a list of data instead.

JSON:
image

LIST:
image

According to the documentation, the API should always be sending JSON data.

Can't install deps in dxlink-javascript

Trying to setup locally to make some fixes but I get this on npm i in dxlink-javascript:

npm ERR! code E403
npm ERR! 403 403 Forbidden - GET https://dxfeed.jfrog.io/artifactory/api/npm/npm-local/@dxfeed/ui-kit/-/@dxfeed/ui-kit-2.7.0.tgz
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy, or
npm ERR! 403 on a server you do not have access to.

npm ERR! A complete log of this run can be found in: ~/.npm/_logs/2024-03-23T20_13_31_780Z-debug-0.log

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.