dxFeed KB

B2B2C Service Overview

Introduction

get.dxfeed.com is designed as an end-to-end solution to help end-clients smoothly buy dxFeed market data subscriptions online.

Key features

The features list includes but is not limited to:

  • Personal data protection (GDPR compliant)

  • Subscription management

  • Exchanges agreements acceptance

  • Email notifications

  • Credentials management

  • Recurring and one-time payments processing

  • Online support

Terms

Term

Description

Account

A user account on the get.dxFeed portal.

Admin/Administrator

An admin user who adjusts settings for the get.dxFeed portal.

Agreement

An agreement between two parties. There are two types of agreements:

  • dxFeed (agreement with Devexperts Inc.)

  • Exchange (agreement with a specific market exchange)

Application

A third-party application that supports dxFeed as a market data provider.

Application account

A user account allowing a certain user to get access to a certain third-party application.

Exchange

An organized market where tradable securities, commodities, foreign exchange, cryptocurrencies, futures, and options contracts are sold and bought.

Feed/Service

A data feed - it’s a market-related data (as an order book, trades, quotes) reported by an exchange. Feeds are differentiated by data depth, level of details, instruments, pricing, etc. Data feeds may be real-time as well as delayed/historical.

get.dxfeed portal

A B2C portal that allows an end user to buy and manage data feeds subscriptions for third-party trading applications.

Order

Feeds that a user has chosen to subscribe to.

Payment system

A third-party system that processes payment transactions.

Receipt

An electronic document confirming that the purchaser (end user) has paid money to the seller in order to be granted a temporary access to a market data feed.

Subscription

A subscription containing information about a specific feed within a certain application which a certain user may have access to for a month.

Transaction/Payment transaction

The result of transferring funds from the user’s bank account to the dxFeed’s one.

User profile

Personal information provided by a certain B2C user.

User/B2C user/end user

Any natural person who uses the get.dxfeed portal.

Context diagram

The following diagram represents key user roles and software systems the get.dxfeed portal interacts with.

get_dxfeed_system_diagram_plus_dxfeed.png

Interoperation

The whole process of receiving dxFeed data feed is divided in two steps: the first is authorization and token generation at get.dxfeed.com, the second is data request at dxFeed endpoint.

integration_scheme.png
Authorization and token generation at get.dxfeed

The application should request the token from get.dxfeed portal every time when the user logs in to the system. The token can be obtained by sending the HTTP request to the following end point:

https://get.dxfeed.com/api/v1/token

For safety reasons, get.dxFeed generates a unique alphanumeric string, apiKey, which serves for the authorization and is sent in the authorization header.

Headers
Authorization: Bearer <ApiKey>
Content-Type: application/json
Request Body

Request parameters

Parameter

Type

Required?

Description

login

String

Yes

A user’s login that is used to access market data.

password

String

Yes

A user’s password that is used to access market data.

withDetails

Boolean

No

Defines whether information on users’ subscriptions is to be returned in the response (=true) or not (=false). Default value is "false”.

Request with no details

{
    “login”: String,
    “password”: String,
    "withDetails": false
}

or

{
    "login": "<login>",
    "password": "<password>",
    "withDetails": false
}

Response in case of success:

{
    “status”: “OK”,
    “reason”: null,
    “token”: “<JWT token>”
}

Response in case of failure:

{
    “status”: “ERROR”,
    “reason”: “<error_reason>”,
    “token”: null
}

Request with details

{
    "login": "<login>",
    "password": "<password>",
    "withDetails": true
}

Response in case of success:

{
    "status": "OK",
    "reason": null,
    "token":  "<JWT_token>",
    "details": [
        "<market_data_feed_1>",
        ...,
        "<market_data_feed_N>"
    ]
}

Response in case of failure:

{
    "status": "ERROR",
    "reason": "<error_reason>",
    "token": null,
    "details": []
}

Error codes

Status

Reason

HTTP status

Description

OK

null

200

Token has been successfully generated.

ERROR

AUTHENTICATION_FAILED

401

Authentication has failed due to wrong apiKey.

ERROR

INVALID_CREDENTIALS

200

These credentials have not been granted to any account for this application.

ERROR

NO_ACTIVE_SUBSCRIPTIONS

200

There are no active subscriptions belonging to specified credentials.

Data request at dxFeed

When the user requests data, establish a connection with dxFeed endpoint. Use the following functions and specify the token received in the previous step:

For Java API

Add auther-api.jar to the application’s classpath. String address = "<IP address>:<host port>[login=entitle:" + token + "]"; Or (preferably) set global variable and use shorter connection string

AutherLoginHandlerFactory.setAppToken(token);
address = "<IP address>:<host port>[login=entitle]";
For C API

dxf_create_connection_auth_bearer()function

For C# API
NativeConnection(string address, string token,
Action<IDxConnection> disconnectListener

constructor of NativeConnection class

For JavaScript (dxfeed.cometd.js library)
dx.feed.setAuthToken(<token>);
For Websocket (on ws-handshake)
{ ext: { "com.devexperts.auth.AuthToken": <token> }}
For REST

Specify token in the HTTP-header:

Authorization: Bearer <token>
Examples
  • IPF web service

curl -H "Authorization: Bearer <token>" -X GET "https://yourendpoint.dxfeed.com/ipf"
  • Candle web service

curl -H "Authorization: Bearer <token>" -X GET "https://yourendpoint.dxfeed.com/candledata?records=Candle&symbols=AAPL%7B=m%7D,AAPL%7B=15m%7D,AAPL%7B=d%7D&start=20190201-000000&stop=20190304-000000"