TPRAccess Doku

Entwickler-Example

Developer Example & SDK

  • 🚀 Real-time data integration for C# / .NET
  • 📊 Tick, intraday, and end-of-day data
  • ⚡ Push-based live data delivery

What is the TAI-PAN .NET Example?

This sample project shows how the TAI-PAN interface can be used in a .NET application.

It serves as a starting point for developers who want to integrate market data, real-time feeds, and historical data.

Included Features

  • 🔐 Login via DevID & user credentials
  • 📈 Access to price data (tick / intraday / historical)
  • ⚡ PushFeed for live data
  • 🖥️ Windows Forms interface
  • 🧩 Structured .NET API integration
  • 🌍 Master data access
  • 🔎 Search function
⬇ Download Example

TPRAccess Interface – Developer Documentation

Note

This interface can be used with various programming languages.
However, not all functions may be fully supported or behave identically in every language environment.

Our development and testing are primarily based on C#. All features have been validated using this language.

Please note that we are unable to provide support for implementations in other programming languages (e.g., Python).

Quick Start

Download

Please download the required DLL first:

Download TPRAccess.dll

After downloading, unzip the file TPRAccess.zip.

Integration of the DLL Interface

Open the Solution Explorer
→ Right-click on "References"
→ Select "Add Reference..."
→ Click "Browse..."
→ Select TPRAccess.dll
→ Click "Add"
→ Ensure the checkbox is selected
→ Click "OK"

Project Configuration (.NET Core)

Note: For .NET Core applications, code page 1252 must be added.

csproj file:


                
            
            

Initialization in source code:

using System.Text;
            
            Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
            

Usage

After successful integration, you can access the interface as follows:

using TPRAccess;
            

Connection ; Login

TPRClientLanguages

German – German responses
English – English responses
connection.ClientLanguage = TPRClientLanguages.German;
The language should be set immediately after creating the connection, before making any further API calls.

TPRServerConnection

var connection = new TPRServerConnection(string"DEVELOPER_ID");
                connection.ClientLanguage = TPRClientLanguages.German;
                
TPRServerConnection(string developerId)
developerId – developer ID required to activate and use the API
Central connection object for login, search, data feed, charts, watchlists, and other API calls.
A valid developer ID is required to establish a productive connection.
Note:

A developer ID is required to use the interface and must be requested in advance via our sales department.
Please contact: vertrieb@lp-software.de

Login

bool ok = connection.Login(string">"CustomerID", string">"Password");
                            
bool Login(string customerId, string password)
customerId – Customer ID / Login ID
password – User password
true – Login successful
false – Login failed
Incorrect login credentials
No connection to the server
Developer ID not valid

Client Information

var info = new TPRConnectionClientInfo();
                            connection.GetConnectionClientInfo(ref info);
                            string text = info.InfoText;
bool GetConnectionClientInfo(ref TPRConnectionClientInfo info)
info – Reference to an object
true – Data loaded successfully
false – Data could not be loaded
InfoText – Text information about the client or DLL version

User Data

GetUserInfo

var userInfo = connection.GetUserInfo();
Signature
TPRUserInfo GetUserInfo()
Return Value
TPRUserInfo – User data and master data lists of the logged-in user

TPRUserInfo

Important Data
EMail – User email address
Mobile – Mobile number
Username – Display name / username
UserId – Internal user or customer ID
UseEMail – Flag for email notifications
UseSMS – Flag for SMS notifications
Important Collections
WatchLists – Existing watchlists
Exchanges – Exchange directory
SecurityTypes – Security types
Countries – Countries
NewsSubscriptions – Existing news subscriptions

Catalog Structure

var entries = new List();
                            var folders = new Dictionary();
                            var items = new Dictionary();
                            
                            connection.GetCatalogStructure(ref entries, ref folders, ref items);
                            
GetCatalogStructure Signature
bool GetCatalogStructure(
                                ref List entries,
                                ref Dictionary folders,
                                ref Dictionary items)
Parameters
entries – List of catalog entries in structured form
folders – Dictionary containing all folder objects, keyed by folder ID
items – Dictionary containing all catalog objects, keyed by item ID
Return Value
true – Catalog structure loaded successfully
false – Loading failed

TPRSearchTypes

Default – Standard search
EDV – Search by EDV identifier
ISIN – Search by ISIN
LimitSymbolen – Special search for limit symbols
MMQuoteId – Search by MM quote ID
Name – Search by name
QuickSuggestion – Fast suggestion list for search fields
SucheSymbolKuerzel – Search by symbol abbreviation
Symbol – Search by symbol
SymbolNo – Search by internal symbol number
Symbol_Equal – Exact symbol search
Symbol_ISIN_Name – Combined search by symbol, ISIN, or name
TaiPanEODDBID – Search by internal EOD database ID

Search

var result = connection.Search(
                                TPRSearchTypes.Name,
                                string">"Daimler",
                                TPRSecurityType.All.Id,
                                0);
                            
Signature
TPRSymbolList Search(
                                TPRSearchTypes searchType,
                                string searchText,
                                int securityTypeId,
                                int exchangeId)
Parameters
searchType – Search mode from TPRSearchTypes
searchText – Search term, e.g. name, ISIN, or symbol
securityTypeId – Filter by security type; TPRSecurityType.All.Id means no type restriction
exchangeId – Filter by exchange; 0 means no restriction
Return Value
TPRSymbolList – Result list containing TPRSymbol objects

TPRSecurityType

TPRSecurityType.All.Id

All – All security types

The complete available security types are provided via userInfo.SecurityTypes. There you can access Id and description.

Watchlists

AddWatchList

Signature
TPRWatchList AddWatchList(string name)
Parameters
name – Freely selectable name of the watchlist
Return Value
TPRWatchList – Newly created watchlist
Create
var watchlist = userInfo.WatchLists.AddWatchList(string">"My Watchlist");
Add
watchlist.Add(169286);
Signature
void Add(int symbolNo)
Parameters
symbolNo – Internal symbol number of the instrument
Multiple
watchlist.Add(new List<int> {169286, 79514});
Signature
void Add(List<int> symbolNumbers)
Parameters
symbolNumbers – List of internal symbol numbers
From Search
watchlist.Add(result);
Signature
void Add(TPRSymbolList symbols)
Parameters
symbols – Result list whose contained instruments are added to the watchlist
Load
var entries = connection.GetWatchListContent(watchlist.Id);
Signature
TPRSymbolList GetWatchListContent(int watchListId)
Parameters
watchListId – ID of the watchlist
Return Value
TPRSymbolList – Contents of the watchlist
Delete
userInfo.WatchLists.DeleteWatchList(watchlist.Id);
Signature
bool DeleteWatchList(int watchListId)
Parameters
watchListId – ID of the watchlist to delete
Return Value
true – Watchlist deleted
false – Deletion failed

Realtime Feed

GetPushFeed

Signature
TPRPushFeed GetPushFeed()
Return Value
TPRPushFeed – Feed object for realtime messages
Initialization
var feed = connection.GetPushFeed();
                            feed.ConnectFeed();
Subscribe
feed.SubscribeSymbol(169286);
Signature
bool SubscribeSymbol(int symbolNo)
Parameters
symbolNo – Internal symbol number of the instrument to subscribe
Return Value
true – Subscription created
false – Subscription failed
Multiple
feed.SubscribeSymbol(new List<int> {169286, 79514});
Signature
bool SubscribeSymbol(List<int> symbolNumbers)
Parameters
symbolNumbers – List of internal symbol numbers
Return Value
true – Subscriptions created
false – At least one subscription failed or the call was unsuccessful
Unsubscribe
feed.UnsubscribeSymbol(169286);
Signature
bool UnsubscribeSymbol(int symbolNo)
Parameters
symbolNo – Internal symbol number of the instrument to unsubscribe
Return Value
true – Subscription removed
false – Removal failed
Read
var msg = feed.GetNextPushFeedMessage();
Signature
TPRPushFeedMessage GetNextPushFeedMessage()
Return Value
Next available feed message

TPRPushFeedMessageTypes

Quote – New price data
MarketDepth – New market depth
News – New message
SymbolUpdate – Master data update of a symbol
LimitUpdate – Change to a limit / alert
LimitTrigger – Limit / alert triggered
Reconnect – Reconnect status
Korrection – Price correction
Ping – Server heartbeat
Info – General information
ConnectionStatus – Connection status
Close
feed.DisconnectFeed();

Candle Charts

GetCandleChart

Available Overloads
TPRCandleList GetCandleChart(int symbolNo, DateTime from)
                            TPRCandleList GetCandleChart(int symbolNo, int compression, int count)
                            TPRCandleList GetCandleChart(int symbolNo, int compression, DateTime from)
Parameters
symbolNo – Internal symbol number of the instrument
compression – Candle compression, e.g. minute interval
count – Number of requested candles
from – Start date from which candles are loaded
Return Value
TPRCandleList – List of candle data
Daily Data
var candles = connection.GetCandleChart(169286, DateTime.Now.AddDays(-10));
Minutes
var candles = connection.GetCandleChart(169286, 15, DateTime.Now.AddDays(-10));
Count
var candles = connection.GetCandleChart(169286, 12, 42);

Intraday / Tick Data

GetIntradayChart

Important Overloads
TPRQuoteTickList GetIntradayChart(int symbolNo, DateTime from)
                        TPRQuoteTickList GetIntradayChart(int symbolNo, DateTime from, int dayCount)
                        bool GetIntradayChart(int symbolNo, DateTime from, out TPRQuoteTickList last, out TPRQuoteTickList ask, out TPRQuoteTickList bid, int dayCount)
                        
                        TPRQuoteTickList GetIntradayChart(int symbolNo, DateTime startDate, DateTime endDateThisLoad, TPRQuoteTypes quoteType)
                        
Parameters
symbolNo – internal instrument identifier
from – start date of the request
dayCount – number of days starting from "from"
startDate – start date of the request (extended overload)
endDateThisLoad – end date of the request
quoteType – type of price data (see below)
last – output parameter for last traded ticks
ask – output parameter for ask ticks
bid – output parameter for bid ticks
TPRQuoteTypes (Price Types)
TPRQuoteTypes.OFF_MARKET – pre-market and after-hours price indications (outside regular trading hours)
TPRQuoteTypes.last – last traded price (actual executed trades)
TPRQuoteTypes.bid – bid price: highest price a buyer is currently willing to pay
TPRQuoteTypes.ask – ask price: lowest price a seller is currently willing to accept
Return Value
depending on overload: TPRQuoteTickList or bool
for bool: true = data successfully loaded, false = loading failed
Simple
var ticks = connection.GetIntradayChart(169286, DateTime.Now.AddDays(-1));
With Bid/Ask
TPRQuoteTickList last, ask, bid;
                        connection.GetIntradayChart(169286, DateTime.Now.AddDays(-3), out last, out ask, out bid, 1);
With QuoteType
var ticks = connection.GetIntradayChart(169286, DateTime.Now.AddDays(-1), DateTime.Now, TPRQuoteTypes.last);

Market Depth

var depth = connection.GetMarketDepth(169286);
Signature
TPRMarketDepth GetMarketDepth(int symbolNo)
Parameters
symbolNo – Internal symbol number of the instrument
Return Value
TPRMarketDepth – Market depth with ask and bid side as well as price information
Ask
foreach (var a in depth.Ask)
                            {
                                var price = a.Quote;
                            }
Bid
foreach (var b in depth.Bid)
                            {
                                var price = b.Quote;
                            }

Options Matrix

var matrix = connection.GetOptionsMatrix(169286);
Signature
TPROptionsMatrix GetOptionsMatrix(int symbolNo)
Parameters
symbolNo – Internal symbol number of the underlying asset
Return Value
TPROptionsMatrix – Structured options matrix for the underlying asset

Important Objects

TPRSymbol

SymbolNo – Internal unique symbol number
ISIN – International securities identification number
WKN – National identifier
Name – Instrument name
SymbolString – Ticker / symbol display
LastBid – Last bid price
LastAsk – Last ask price
LastTrade – Last traded price
DayOpen – Daily open
DayHigh – Daily high
DayLow – Daily low
DayVolume or Volume – Daily volume, if available

TPRCandle

Open – Opening price
High – Highest price
Low – Lowest price
Close – Closing price
Time – Candle timestamp
Volume – Candle volume

TPRQuoteTick

Quote – Tick price
Time – Timestamp
Volume – Tick volume

Notes

A successful login must be completed before all API calls
Do not process PushFeed in the UI thread
SymbolNo is the central reference for almost all methods
ExchangeId = 0 means no restriction
Risk warning: Futures, shares and foreign exchange trading involve considerable risk and are not suitable for every investor. An investor could lose all or more than the capital invested. Risk capital is money that can be lost without jeopardizing financial security or lifestyle. Only risk capital should be used for trading and only those with sufficient risk capital should consider trading. Past performance is not necessarily an indicator of future results.