Skip to content

Working days

Returns a list of ERCOT and Octopus Energy holidays.

Authentication Required

Requires organization level access.

Arguments

  • year: Integer! (required)

Returns

1
2
3
4
5
query getErcotHolidays($year:Int!){
    ercotHolidays(year:$year){
        holidayList
    }
}
1
2
3
4
# Input variables
{
  "year": ENTER_YEAR_HERE,
}

Example

1
2
3
4
5
query getErcotHolidays($year:Int!){
    ercotHolidays(year:$year){
        holidayList
    }
}
1
2
3
4
# Input variables
{
   "year": 2022,
}
import pprint

import requests

# API_URL = "https://api.oeus-kraken.energy/v1/graphql/" # Prod
API_URL = "https://api.oeus-kraken.systems/v1/graphql/" # Test
HEADERS = {}

QUERY = """
    query getErcotHolidays($year:Int!){
        ercotHolidays(year:$year){
            holidayList
        }
    }
"""

VARIABLES = {
    "year": 2022
}

session = requests.Session()
session.headers.update(HEADERS)
response = session.post(
    url=API_URL,
    json={"query": QUERY, "variables": VARIABLES}
)
pprint.pprint(response.json())
const axios = require("axios")

// const apiUrl = "https://api.oeus-kraken.energy/v1/graphql/" // Prod
const apiUrl = "https://api.oeus-kraken.systems/v1/graphql/" // Test

const jwtToken = "PLACE_JWT_TOKEN_HERE"

let headers = {
  "Authorization": `JWT ${jwtToken}`
}

const query = `
query getErcotHolidays($year:Int!){
    ercotHolidays(year:$year){
        holidayList
    }
}
`
const variables = {
  "year": 2022
}

axios({
  url: apiUrl,
  method: "post",
  data: {
    query: query,
    variables: variables,
  },
  headers: headers,
}).then((response) => {
  console.log(JSON.stringify(response.data, null, 4));
});
{
    "data":{
        "ercotHolidays": {
            "holidayList": [
                "2022-01-01",
                "2022-01-17",
                "2022-05-30",
                "2022-06-20",
                "2022-07-04",
                "2022-09-05",
                "2022-11-24",
                "2022-11-25",
                "2022-12-23",
                "2022-12-26"
            ]
         }
    }
}
Back to top