dxfeed / dxlink Goto Github PK
View Code? Open in Web Editor NEWMarket Data API
Home Page: https://demo.dxfeed.com/dxlink-ws/
License: Mozilla Public License 2.0
Market Data API
Home Page: https://demo.dxfeed.com/dxlink-ws/
License: Mozilla Public License 2.0
DXLinkFeedEventListner
-> DXLinkFeedEventListener
.client.connect
is asnyc function for no reasonHello,
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?
@Fyzu Hi, the client doesn't emit unsubscribe message
Codesandbox example
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
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)
I added this import in connector class which fixed the issue locally for me -
import WebSocket from 'ws';
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.