Skip to main content

Establishing connection

Specify the generated token when establishing a connection. Use the following functions:

For Java API

String address = "127.0.0.1:7501[login=entitle:" + token + "]";

Or (preferably) set a global variable and use a shorter connection string

AutherLoginHandlerFactory.setAppToken(token);
address = "127.0.0.1:7501[login=entitle]";

For C API

dxf_create_connection_auth_bearer() function

For C# API

NativeConnection(string address, string token, Action<IDxConnection> disconnectListener)

constructor of com.dxfeed.native.NativeConnection.NativeConnection class

For JavaScript API

dx.feed.setAuthToken(token);

For Python API

dxfeed.core.DXFeedPy.dxf_create_connection_auth_bearer()

The function creates connection to dxeed given URL address and token

Parameters:

  • address (str) – dxfeed url address

  • token (str) – dxfeed token

Returns:

cc – Cython ConnectionClass with information about connection

Return type:

class dxfeed.core.DXFeedPy.ConnectionClass

For more information please read the documentation.

For web service

  • For WebSocket (on ws-handshake):

    { ext: { "com.devexperts.auth.AuthToken": <token> }}

  • For REST:

    • Specify token in the HTTP-header:

      Authorization: Bearer <token>

    • (Deprecated workaround) If a header cannot be set, use URL-parameter:

      <REST-method>.json?access_token=<token>