Socket
Book a DemoInstallSign in
Socket

trade-republic-api

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

trade-republic-api

Trade Republic Api wrapper

latest
Source
npmnpm
Version
1.2.0
Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

trade-republic-api

This package can be used to interact with Trade Republics API (not officially supported, use at your own risk).

Installation

npm i trade-republic-api

Usage

This example illustrates a subscription to the ticker topic for the ISIN US90364P1057. For more please check the examples folder.

const trapi = new TradeRepublicApi({});

trapi.on('connected', async () => {
  const data = await trapi.oneShot<Ticker>('ticker', {
    id: 'US90364P1057.LSX',
  });
  console.log(JSON.stringify(data));
  console.log(`Ask Price: ${data.payload.ask.price}`);
});

trapi.connect();

Authentication is required for all topics related to your personal data. You can authenticate a session by using the login method with your phone number and pin. After the initial login, a 2-Factor-Authentication token (received in your app) has to be provided in the CLI in order to proceed.

const trapi = new TradeRepublicApi({});

trapi.on('connected', async () => {
  await trapi.login('+1234567890123', '1234');
  const data = await trapi.oneShot<TimeLineResponse>('timeline');
  console.log(JSON.stringify(data));
});

trapi.connect();

Supported and tested topics

  • ticker
  • timeline

Other topics might work as well, full list is available in TradeRepublicMessageType however you need find the correct message parameters yourself.

FAQs

Package last updated on 04 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts