Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
trading212-unofficial-api
Advanced tools
const trading212 = new Trading212();
This method is used to retrieve a list of companies available for trading on the Trading 212 platform.
import Trading212 from 'trading212-unofficial-api';
// ...
const data = await trading212.companies().select();
Current methods for candles :
const data = await trading212.from(['MSFT','AAPL']).candles().select();
const data2 = await trading212.from(['MSFT','AAPL']).candles().limit(100).select();
const data3 = await trading212.from(['MSFT','AAPL']).candles().timeframe('ONE_DAY').limit(50).select()
showPreviousPrice
(optional) : boolean
The showPreviousPrice property is a boolean that indicates whether the previous price for the financial instrument should be included in the returned data. The default value for this property is false.
The method returns a Promise that resolves to an object containing the current candle data for each financial instrument specified in the input array.
const data = await trading212.from(['EURUSD','USDJPY']).currentCandle().select();
currentWeekCandles
Setting up timeframe is optional, default is Daily.
const data = await trading212.from(['EURUSD','USDJPY']).currentWeekCandles().timeframe('FIFTEEN_MINUTES').select()
Currently we are working to improve this function.
const data = await trading212.from('MSFT']).currentWeekCandles().timeframe('ONE_HOUR').svg();
//or
const data = await trading212.from(['MSFT','AAPL']).currentWeekCandles().timeframe('ONE_HOUR').svg();
//or
const data = await trading212.from(['MSFT','AAPL']).candles().svg();
This code is work in progress. I am in no way affiliated with trading212 and trading212 does not endorse this project. Use this code at your own risk. I afford no guarantee that the code is stable or error free.
FAQs
An unofficial trading212 API written in typescript.
The npm package trading212-unofficial-api receives a total of 3 weekly downloads. As such, trading212-unofficial-api popularity was classified as not popular.
We found that trading212-unofficial-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.