Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@tvanlaerhoven/epex-client
Advanced tools
The Epex Client package enables querying of the latest European Power Exchange (EPEX) market data. It is intended primarily for hobbyist solutions, as the data is sourced directly from the official EPEX website.
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.
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 });
Then request the market data:
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 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 table with today's market prices:
FAQs
Get European Power Exchange (EPEX) market data
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 uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.