Nordnet External Feeds (Feeds) are real-time feeds to be used together with Nordnet External API (API). Feeds consist of two components: Public Feed and Private Feed. Public Feed allows the customer to stream market data in real-time for all markets and products we have on the Nordnet platform. Private Feed is an event stream where order and trade notifications are sent. For more information please visit the product page.

Logging into API Feeds

To get access to Feeds the client has to initiate a successful login to API. For complete instruction on how to login, see api/2/login. The response on a successful login will contain hostname, port and session_key . Note that all commands sent to Feeds must be JSON-encoded and terminated by a linefeed (ASCII 10), this is always required unless noted otherwise. By this, we require of the client to always linefeed terminated all JSON Objects sent to Feeds.

Login request format:

Key Value

"cmd"

login

"args"

See below

Args:

Key Mandatory Description

"session_key"

true

See HTTP POST login request.

Here is an example of a login request:

{
  "cmd": "login",
  "args": {
    "session_key": "ABC123"
  }
}

Note that all requests sent must be terminated by a linefeed.

Heartbeats

A heartbeat is sent when no events are published on the stream, at an interval of five seconds.

Key Value

"type"

"heartbeat"

"data"

empty

For example:

{
  "type": "heartbeat",
  "data": {}
}

Private Feed

Private Feed is an event stream which pushes notifications for the following events. All events related to your user account will be sent. The following sections describe the structure of the messages sent over Private Feed.

Order notifications

An order notification is sent when an order on one of the client’s accounts is sent, deleted, or modified.

Key Value

"type"

"order"

"data"

See HTTP GET orders request.

For example:

{
  "type": "order",
  "data": {
    "volume": 111.0,
    "price": {
      "value": 132.55,
      "currency": "SEK"
    },
    "volume_condition": "NORMAL",
    "order_id": 202178767,
    "client_reference": "ABC132",
    "tradable": {
      "market_id": 11,
      "identifier": "101"
    },
    "validity": {
      "type": "DAY",
      "valid_until": 1613061300000
    },
    "accno": 123123,
    "accid": 1,
    "side": "BUY",
    "modified": 1612955053717,
    "activation_condition": {
      "type": "NONE"
    },
    "order_state": "LOCAL",
    "action_state": "INS_PEND",
    "order_type": "LIMIT"
  }
}

Trade notifications

A trade notification is sent when a trade is completed.

Key Value

"type"

"trade"

"data"

See HTTP GET trades request.

Public Feed

Public Feed is a real-time market data feed, for which you can subscribe to six messages types.

  • Trade - all trades on the market.

  • Price - last, best bid, best ask and so on.

  • Depth - the orderbook price depth in five levels.

  • Trading status - the state of an orderbook (e.g continuous trading, stopped, etc).

  • Indicator - price information of indicators.

  • News - news items in real-time.

Subscribe/unsubscribe requests

Subscribe requests gives the ability to ask for a stream related to an instrument, indicator etc.

Key Value

"cmd"

"subscribe" or "unsubscribe"

"session_key"

The session key from the HTTP login.

"args"

See below.

Args:

Key Value

"t"

Type - "price", "depth", "trade", "indicator", "news" or "trading_status".

"i"

The tradable identifier or indicator identifier. Used for "price", "depth", "trade", "indicator" and "trading_status".

"m"

The tradable market_id or indicator src. Used for "price", "depth", "trade", "indicator" and "trading_status". If the type is an "indicator" the field is a string otherwise it is an integer.

"s"

News source. Only used for "news".

"delay"

(Deprecated) True if delayed news are accepted. Default is false. Used only for "news".

API Feeds messages

The messages sent from the server has the following structure

Key Value

"type"

"price", "depth", "trade", "indicator", "news", "trading_status", "heartbeat".

"data"

Depends on type.

Prices

In the first message after a subscription all available fields are sent to the client. After that only "m" , "i" and changed fields are sent. All fields are not available on all markets. In other words, first a full tick is sent and after that only delta ticks are sent.

Key Value

"i"

The identifier of the tradable.

"m"

The market_id of the tradable.

"trade_timestamp"

Timestamp of the last trade - the time when last and turnover fields are updated.

"tick_timestamp"

The timestamp of this update.

"bid"

Best bid price.

"bid_volume"

Total volume of the best bid price.

"ask"

Best ask price.

"ask_volume"

Total volume of the best ask price.

"close"

Closing price.

"high"

Highest price for a trade today.

"last"

Last paid.

"last_volume"

Volume of the last trade.

"low"

Lowest price for a trade today.

"open"

Opening price.

"turnover"

Turnover value today. The currency is the orderbook currency.

"turnover_volume"

Turnover volume today.

"ep"

Equilibrium price. Only sent during auction on the Nordic markets.

"paired"

The paired quantity of shares at the equilibrium price. Only sent during auction on the Nordic markets.

"imbalance"

The quantity of shares not paired at the equilibrium price. Positive quantity indicates buy imbalance. Negative quantity indicates sell imbalance. Only sent during auction on the Nordic markets.

Trades

The trade feed contains public trade information.

Key Value

"i"

The identifier of the tradable.

"m"

The market_id of the tradable.

"trade_timestamp"

The time of the trade.

"price"

The price of the trade. Currency is the default currency of the orderbook.

"volume"

Volume traded.

"broker_buying"

Buying participant. Not supported on all markets.

"broker_selling"

Selling participant. Not supported on all markets.

"trade_type"

The exchange trade identifier. Not supported on all markets.

"trade_type"

The exchange trade type - different on different markets.

Order depth feed

In the first message after a subscription all available fields are sent to the client. After that only "m" , "i" and changed fields are sent.

Key Value

"i"

The identifier of the tradable.

"m"

The market_id of the tradable.

"tick_timestamp"

The timestamp of this update.

"bid1"

Bid price on level 1.

"bid_volume1"

Bid volume on level 1.

"ask1"

Ask price on level 1.

"ask_volume1"

Ask volume on level 1.

"bid2"

Bid price on level 2.

"bid_volume2"

Bid volume on level 2.

"ask2"

Ask price on level 2.

"ask_volume2"

Ask volume on level 2.

"bid3"

Bid price on level 3.

"bid_volume3"

Bid volume on level 3.

"ask3"

Ask price on level 3.

"ask_volume3"

Ask volume on level 3.

"bid4"

Bid price on level 4.

"bid_volume4"

Bid volume on level 4.

"ask4"

Ask price on level 4.

"ask_volume4"

Ask volume on level 4.

"bid5"

Bid price on level 5.

"bid_volume5"

Bid volume on level 5.

"ask5"

Ask price on level 5.

"ask_volume5"

Ask volume on level 5.

Trading status feed

Key Value

"i"

The identifier of the tradable.

"m"

The market_id of the tradable.

"tick_timestamp"

Timestamp of the update

"status"

The Nordnet trading status of an orderbook.

  • "C" - Continuous trading.
  • "R" - Receiving orders but trading is disabled.
  • "D" - Temporarily disabled.
  • "X" - Permanently disabled.
  • "U" - Unknown state.

"source_status"

The marketplace orderbook state.

"halted"

The halted reason if available from the market.

Indicator

Key Value

"i"

Index identification.

"m"

Index source.

"tick_timestamp"

Timestamp of the last update

"high"

Highest price today.

"low"

Lowest price today.

"last"

Last price.

"close"

Last close price.

News

Key Value

"item_id"

News item identifier can be used in the news rest service to get the whole news item.

"lang"

The language of the news.

"datetime"

The time of the news.

"source_id"

News source identifier.

"headline"

Headline of the news

"instruments"

Array of instruments involved in the news. This is only set if the news source provides the information.

Ticks and conflation

There are two types of ticks: delta and full. The full tick is the full JSON Object with every field present. This is in comparison with delta tick is the JSON Object with only changed fields included. Please note that if you are using the conflation flag you will always get full tick.

The client can set a limit of the rate of messages by using the conflation flag. If set to true it will limit the subscription to one tick per second. By default, this flag is set to false .

Subscribe examples

Price:

{
  "cmd": "subscribe",
  "args": {
    "t": "price",
    "m": 78,
    "i": "F00000X27D"
  }
}

{
  "type": "price",
  "data": {
    "delayed": 900,
    "i": "F00000X27D",
    "m": "SIX",
    "tick_timestamp": 1560168002590,
    "high": 0.5,
    "low": 1,
    "close": 213.94,
    "last": 253.94
  }
}

Order depth:

{
  "cmd": "subscribe",
  "args": {
    "t": "depth",
    "i": "1869",
    "m": 30
  }
}
{
  "type": "depth",
  "data": {
    "i": "1869",
    "m": 30,
    "tick_timestamp": 1560168002590,
    "bid1": 21,
    "bid_volume1": 100,
    "ask1": 35,
    "ask_volume1": 300
  }
}

Index:

{
  "cmd": "subscribe",
  "args": {
    "t": "indicator",
    "i": "SIX-IDX-DJI",
    "m": "SIX"
  }
}

{
  "type": "indicator",
  "data": {
    "delayed": 900,
    "i": "SIX-IDX-DJI",
    "m": "SIX",
    "tick_timestamp": 1560168002590,
    "high": 0,
    "low": 0,
    "close": 25983.94,
    "last": 25983.94
  }
}

News:

{
  "cmd": "subscribe",
  "args": {
    "t": "news",
    "s": 1
  }
}

{
  "type": "news",
  "data": {
    "news_id": 1000729440,
    "source_id": 1,
    "headline": "IDL BIOTECH: HOPPAS KUNNA BEHALLA TILLVAXTTAKT PÅ 20% - VD",
    "lang": "sv",
    "type": "NEWS",
    "timestamp": 1560173163000,
    "instruments": [
      17513784
    ]
  }
}

Disclaimer

There can be changes made to the structure and naming in the data provided, and this can happen at any time without any prior notice. For more information visit the product page.