End-user Data Integration

Learn how to integrate your brokerage's data with StockRepublic's social trading API for a seamless user experience, including users, portfolios, and transactions.

This part of the documentation guides you through using the StockRepublic API to seamlessly integrate your brokerage's data with our platform. By providing user, portfolio, and transaction data, you can enhance your customers' social trading experience.

Don't hesitate to get in touch with us if you prefer alternative data sync methods, such as using your own APIs or file-based data transfer.

User

The user represents your customer in our systems. Its primary purpose is to authenticate and connect the customer to the data you provided us via background sync.

Example

{
  "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "status": "ACTIVE"
}

API Documentation

Portfolios

A portfolio represents a customer's account or depot, displaying their current assets, proportions, and historical performance.

Positions

Positions are a list of holdings in the portfolio, identified by ISIN and currency. By providing the value of each holding as a percentage of the entire portfolio, we can analyze customers' exposure without knowing their account balance.

Example

{
  "name": "Vestas Wind Systems",
  "isin": "DK0010268606",
  "currency": "DKK",
  "percentage": "22.8668",
  "avg_price": "435.8000"
}

Historical performance

Graph data representing the daily return of a portfolio compared to a starting point of 100.

Example

[
  {"date": "1970-01-01", "value": "100.0"},
  {"date": "1970-01-02", "value": "102.1"},
  {"date": "1970-01-02", "value": "99.4"},
  ...
]

Full example

{
  "id": "64b7f07f-9aa9-4269-ab7b-188add60d194",
  "user": "ba554c42-4c45-43c1-be78-ecc4435a9b77",
  "kind": "ISK",
  "percentage": "100.0000",
  "status": "ACTIVE",
  "positions": [
    {
      "name": "Vestas Wind Systems",
      "isin": "DK0010268606",
      "currency": "DKK",
      "percentage": "22.8668",
      "avg_price": "435.8000"
    },
    {
      "name": "H&M B",
      "isin": "SE0000106270",
      "currency": "SEK",
      "percentage": "72.3713",
      "avg_price": "664.9621"
    }
  ],
  "performance": [
    {
      "date": "2021-01-29",
      "value": "100.0000"
    },
    {
      "date": "2021-01-30",
      "value": "101.5772"
    },
    {
      "date": "2021-01-31",
      "value": "105.3022"
    },
    {
      "date": "2021-02-01",
      "value": "106.6285"
    },
    {
      "date": "2021-02-02",
      "value": "103.8763"
    },
    {
      "date": "2021-02-03",
      "value": "104.2632"
    }
  ]
}

API Documentation

Transactions

Transactions enrich the user experience by creating transaction posts that enable customers to share their trades, complete with strike prices and personalized commentary, with the StockRepublic community. These transaction posts foster engagement and provide valuable insights into trading strategies and market trends.

To ensure a seamless user experience, transactions can be pushed as part of the initial sync to give users access to their trading history. Subsequently, new transactions are pushed each time a trade is executed. Instruments are identified by ISIN and currency, consistent with position data.

{
  "portfolio": "64b7f07f-9aa9-4269-ab7b-188add60d194",
  "name": "Vestas Wind Systems ",
  "isin": "DK0010268606",
  "currency": "DKK",
  "mic": "XCSE",
  "price": "1457.5000",
  "executed": "2021-01-22T11:01:53.045118Z",
  "kind": "SELL",
  "id": "101d05b4-7615-473d-8918-7ac389ac65dd"
}

API Documentation

Universes

You can sync supported exchanges and non-exchange-tied instruments, such as mutual funds, to guarantee comprehensive market data coverage for your universe of tradable products. It ensures that users can access various investment opportunities tailored to their preferences and financial goals.

{
  "name": "default",
  "exchanges": ["XSTO", "XCSE"],
  "instruments": [
    {
      "isin": "LU0090908194",
      "currency": "SEK"
    },
    {
      "isin": "LU0086738027",
      "currency": "SEK"
    }
  ]
}

API Documentation


What's next?