Skip to main content

Exchange Forecast

UPDATED Thursday July 15, 10:08 PM PST

HTTP Request
GET https://wprice.io/api/v1/present/exchange/exchangeForecast

This example extends the functionality of the exchange endpoint (which provides the total megawatts exchanged between two interconnected zones), by providing a 24-hour forecast of the exchanged load (in MegaWatts).

Requires an API Key

This feature is only available to WattPricer Account-holders.

Query Parameters#

ParameterDescriptionExamples
zone_key_1A string representing the first zone identifier (net flow will be in terms of net energy going from zone_key_1 to zone_key_2, with negative values indicating net inflow). We use a combination of ISO 3166-1 alpha-2 country codes, ISO 3166-2 country subdivision code, and where applicable, ISO 639-1 language codes for our locale codes. See the /zones endpoint for a list of valid zones.US-MISO
zone_key_2A string representing the second zone identifier.US-PJM
as_csv (OPTIONAL)Boolean indicating whether to return the data in CSV format.true

Code samples#

cURL command
@ECHO OFF
curl -v -X GET "https://wprice.io/api/v1/present/exchange/exchangeForecast?zone_key_1={string}&zone_key_2={string}&as_csv={boolean}"-H "x-api-key: {subscription key}"
--data-ascii "{body}"

Successful Response Samples#

HTTP 200 OK#

The above commands yield data such as the following (using zone_key_1=US-MISO and zone_key_2=US-SPP):

response for media types 'application/json' and 'text/json'
{  "datetime": ["2021-04-18T05:00:00+00:00", "2021-04-18T04:00:00+00:00", "2021-04-18T03:00:00+00:00",  "2021-04-18T02:00:00+00:00", "2021-04-18T01:00:00+00:00", "2021-04-18T00:00:00+00:00", "2021-04-17T23:00:00+00:00", "2021-04-17T22:00:00+00:00", "2021-04-17T21:00:00+00:00", "2021-04-17T20:00:00+00:00", "2021-04-17T19:00:00+00:00", "2021-04-17T18:00:00+00:00", "2021-04-17T17:00:00+00:00", "2021-04-17T16:00:00+00:00", "2021-04-17T15:00:00+00:00", "2021-04-17T14:00:00+00:00", "2021-04-17T13:00:00+00:00", "2021-04-17T12:00:00+00:00", "2021-04-17T11:00:00+00:00", "2021-04-17T10:00:00+00:00", "2021-04-17T09:00:00+00:00", "2021-04-17T08:00:00+00:00", "2021-04-17T07:00:00+00:00", "2021-04-17T06:00:00+00:00"],  "netFlow": [986, 844, 988, 810, 829, 645, 546, 512, 353, 261, 220, 280, 258, 484, 626, 389, 522, 533, 574, 769, 832, 840, 750, 752,],  "sortedZoneKeys": "US-MISO->US-SPP",  "source": "eia.gov",  "updated": "2021-05-17T05:00:00+00:00",  "zoneKey": "US-MISO"}

Error Response Samples#

(Click to expand ๐Ÿ‘‡ )