Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
@tvanlaerhoven/epex-client
Advanced tools
The Epex Client package provides access to the latest European Power Exchange (EPEX) market data across all areas. It is intended primarily for hobbyist solutions.
The European Power Exchange (EPEX SPOT) is a market platform for the trading of electricity in Europe. It provides a marketplace for electricity producers, consumers, and traders to buy and sell electricity, aiming to create a transparent and efficient market for power trading.
The Epex Client package gives you access to the EPEX Spot Day-Ahead Market, where the electricity price and volume for each hour of the next day is established. You can work with these Day-Ahead prices by adjusting your electricity consumption patterns based on the price fluctuations. Here's how:
npm i @tvanlaerhoven/epex-client
or
yarn add @tvanlaerhoven/epex-client
First create an Epex client, with optional configuration.
The debug
property allows for extra logging during usage of the client.
import * as Epex from '@tvanlaerhoven/epex-client';
const client = new Epex.Client({ debug: true });
The day-ahead market data contains the established electricity prices and quantities for a selected region,
based on supply and demand. As an example. the data for MarketArea.Belgium
can be requested as follows:
try {
// Get today's hourly market data
const data = await client.getDayAheadMarketData(Epex.MarketArea.Belgium, Epex.today());
console.log(`Today's electricity price from 9h-10h is €${data.entries[9].price}`);
} catch(error) {
console.error(error.message);
}
The requested delivery date is passed as a string "YYY-MM-DD"
, or using the convenient methods Epex.today()
and
Epex.tomorrow()
.
Note that prices for the next day are typically available in the early afternoon on the day before delivery.
The Epex website does not allow browser requests from any other location than its own host (CORS). To solve this, run a local proxy server that drops any CORS headers from the http request.
import * as Epex from '@tvanlaerhoven/epex-client';
const client = new Epex.Client({ proxyServer: 'http://localhost:8088', debug: true });
The example demonstrates this. Try it by running:
npm run example
The output is a page where you can choose to either visualize today's market prices in table or as a bar graph.
1.0.2
FAQs
Collect European Power Exchange (EPEX) market data
The npm package @tvanlaerhoven/epex-client receives a total of 22 weekly downloads. As such, @tvanlaerhoven/epex-client popularity was classified as not popular.
We found that @tvanlaerhoven/epex-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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 researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.