@tvanlaerhoven/epex-client
Version:
Collect European Power Exchange (EPEX) market data
135 lines (134 loc) • 4.98 kB
TypeScript
import { MarketData } from './MarketData';
export declare enum MarketArea {
Austria = "AT",
Belgium = "BE",
Denmark1 = "DK1",
Denmark2 = "DK2",
Finland = "FI",
France = "FR",
Germany = "DE-LU",
GreatBritain = "GB",
Netherlands = "NL",
Norway1 = "NO1",
Norway2 = "NO2",
Norway3 = "NO3",
Norway4 = "NO4",
Norway5 = "NO5",
Poland = "PL",
Sweden1 = "SE1",
Sweden2 = "SE2",
Sweden3 = "SE3",
Sweden4 = "SE4",
Switzerland = "CH"
}
export declare function getMarketAreaDescription(marketArea: MarketArea): string;
export declare enum TradingModality {
Auction = "Auction"
}
export declare enum MarketSegment {
DayAhead = "DayAhead",
Intraday = "Intraday"
}
export declare enum DayAheadAuction {
/**
* Single Day-Ahead Coupling (formerly Multi-Regional Coupling or MRC).
*
* A pan-European market coupling mechanism that integrates electricity markets across Europe.
* Facilitates cross-border electricity trading by matching supply and demand across regions, optimizing network
* usage.
*/
SDAC = "MRC",
/**
* First Day-Ahead Auction specifically for Great Britain (GB).
*
* Ensures price formation and market operations specific to Great Britain.
*/
GB_DAA1 = "GB",
/**
* Second Day-Ahead Auction for Great Britain.
*/
GB_DAA2 = "30-call-GB",
/**
* Day-Ahead Auction for Switzerland.
*
* A standalone auction process specific to the Swiss electricity market, which operates differently due to
* Switzerland's non-EU status but maintains connections with neighboring markets.
*/
CH = "CH"
}
export declare enum IntradayAuction {
/**
* First Intraday Auction under the Single Intraday Coupling (SIDC) framework.
*
* The SIDC mechanism enables cross-border intraday electricity trading between participating European countries.
* IDA1 is the first auction in the intraday trading process, which allows market participants to adjust their
* positions closer to real-time trading.
*/
SIDC_IDA1 = "IDA1",
/**
* Second Intraday Auction under the SIDC framework.
*
* Similar to IDA1, but it is typically scheduled later in the day to allow for additional adjustments to
* electricity positions. This auction provides flexibility for market participants to buy or sell electricity
* closer to the delivery time.
*/
SIDC_IDA2 = "IDA2",
/**
* Third Intraday Auction under the SIDC framework.
*
* It provides a final opportunity for market participants to make last-minute adjustments before the electricity
* delivery time, optimizing cross-border trading and balancing of electricity supply and demand.
*/
SIDC_IDA3 = "IDA3",
/**
* First Intraday Auction for Switzerland (CH) under the intraday coupling mechanism.
*
* Switzerland has a separate intraday auction process, which is integrated with the European SIDC mechanism,
* allowing cross-border trading between Switzerland and neighboring countries.
*/
CH_IDA1 = "CH-IDA1",
/**
* Second Intraday Auction for Switzerland.
*
* As with IDA1, but scheduled later in the day, this auction allows Swiss market participants to make additional
* adjustments for electricity trading with neighboring countries.
*/
CH_IDA2 = "CH-IDA2",
/**
* First Intraday Auction for Great Britain (GB).
*
* Great Britain has its own intraday auction process, which is also integrated into the SIDC mechanism, enabling
* cross-border electricity trading with neighboring countries.
*/
GB_IDA1 = "GB-IDA1",
/**
* Second Intraday Auction for Great Britain.
*
* Similar to the other auctions, GB-IDA2 allows for further adjustments to positions, allowing market participants
* in Great Britain to buy or sell electricity closer to delivery time.
*/
GB_IDA2 = "GB-IDA2"
}
export interface ClientConfig {
/**
* Optionally use a proxy server. This could be useful to by-pass CORS restrictions.
*/
proxyServer?: string;
/**
* Optionally output some debug logging.
*/
debug?: boolean;
}
export declare class Client {
private readonly config;
constructor(config: ClientConfig);
getDayAheadMarketData(area: MarketArea, deliveryDate?: string, tradingDate?: string, auction?: DayAheadAuction): Promise<MarketData>;
getIntradayMarketData(area: MarketArea, deliveryDate?: string, tradingDate?: string, auction?: IntradayAuction): Promise<MarketData>;
getMarketData(area: MarketArea, deliveryDate?: string, tradingDate?: string, segment?: MarketSegment, auction?: DayAheadAuction | IntradayAuction): Promise<MarketData>;
private parseTable;
private buildUrl;
private maybeUseProxy;
private extractDate;
private parseExpectedCellFloatData;
private debug;
}