dxLink API provides access to dxFeed market data.
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
dxLink API provides access to dxFeed market data.
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?
DXLinkFeedEventListner
-> DXLinkFeedEventListener
.client.connect
is asnyc function for no reasondxLink/dxlink-specification/asyncapi.yml
Line 886 in 1eaefd9
payload:
allOf:
- $ref: "#/components/schemas/Message"
- type: object
properties:
type:
const: FEED_DATA
events:
description: Batch of events.
oneOf:
- description: |
List of events in full mode.
Empty fields are omitted from the json.
type: array
items:
- $ref: "#/components/schemas/FeedEvent"
items
doesn't accept a list per spec, the dash -
should be omitted.
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';
Hello,
I trying to run demo, but faced problem.
What I did is:
npm fund
for details“4.I’ve entered to folder dxLink/dxlink-javascript/dxlink-api/demo and ran command “vite“ and got an error message:
Failed to scan for dependencies from entries:
/win/workspaces/nbs/nbs1/repo/dxLink/dxlink-javascript/dxlink-api/demo/index.html
✘ [ERROR] Failed to resolve entry for package "@dxfeed/dxlink-core". The package may have incorrect main/module/exports specified in its package.json. [plugin vite:dep-scan]
../../../../../../../../../home/user/.nvm/versions/node/v22.3.0/lib/node_modules/vite/node_modules/esbuild/lib/main.js:1225:21:
1225 │ let result = await callback({
╵ ^
How can I fix the error, please?
@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
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.