dxFeed / dxfeed-net-api

dxFeed .NET API
Mozilla Public License 2.0
18 stars 9 forks source link

Where to pass the token? #61

Closed gowthamnatarajan closed 1 year ago

gowthamnatarajan commented 1 year ago

How do I pass the token to get live data? There is no parameter to pass a token. My websoket URL is for live data.

In python it's as follows:

const feed = new Feed()
feed.setAuthToken('Token')

Overall I am trying to write the following python code in C#

import Feed, { EventType } from '@dxfeed/api'
const feed = new Feed()
feed.setAuthToken('Token')
feed.connect('https://tasty-live-web.dxfeed.com/live/cometd')

feed.subscribe(
  [EventType.Greeks, EventType.Profile, EventType.Quote, EventType.Summary, EventType.Trade],
  ['AAPL', '.AAPL220617P150'],
  event => console.log(event)
)
Strotsev commented 1 year ago

Hello, @gowthamnatarajan ! Here is the link to the documentation. And here is the link to an example where this method is used. If you still have questions or new ones appear, you can also ask them on our portal.