Typescript
Typescript Client Reference
Client Initialization
Network Data
Fetches the endpoint at (/v4/data/network)[/api/data/get-network-data]
getNetworkData
Fetch network-level time series data for power, energy, emissions, and market value metrics.
Parameters:
networkCode
: The network to fetch data formetrics
: Array of metrics (e.g., [“power”, “energy”, “emissions”])params
: Optional parameters:interval
: Time interval (e.g., “5m”, “1h”, “1d”)dateStart
: Start date (timezone-naive)dateEnd
: End date (timezone-naive)primaryGrouping
: Primary grouping fieldsecondaryGrouping
: Secondary grouping field
Example:
Facility Data
Fetches the endpoint at (/v4/data/facility)[/api/data/get-facility-data]
getFacilityData
Fetch facility-specific time series data.
Parameters:
networkCode
: The network containing the facilitiesfacilityCodes
: Single facility code or array of codesmetrics
: Array of metrics to fetchparams
: Optional parameters (similar to getNetworkData)
Example:
Market Data
Fetches the endpoint at (/v4/market)[/api/data/get-network-data]
getMarket
Fetch market-related metrics like price and demand.
Parameters:
networkCode
: The market to fetch data formetrics
: Array of market metrics (e.g., [“price”, “demand”])params
: Optional parameters (similar to getNetworkData)
Example:
Facility Information
getFacilities
Fetches the endpoint at (/v4/facilities)[/api/facilities/get-facilities]
Get information about generation facilities and their units.
Parameters:
params
: Optional filters:status_id
: Array of facility statusesfueltech_id
: Array of fuel technologiesnetwork_id
: Network code or array of codesnetwork_region
: Specific network region
Example:
User Information
getCurrentUser
Fetches the endpoint at (/v4/user)[/api/user/get-user-me]
Get information about the current API user.
Example: