Skip to content

Get product using a given datetime

Returns products that are available on the given date time.

Authentication not required

products does not require authentication.

Arguments

  • availableAt: DateTime

Returns

query productsAtGivenDatetime($availableAt:DateTime){
    products(availableAt:$availableAt){
        id
        availableFrom
        availableTo
        availabilityStatus
        autoTopUpDefaultAmount
        autoTopUpMinimumAmount
        basedOnTimeOfUse
        code
        description
        displayName
        fullName
        generationCredit
        isWholesale
        marketName
        notes
        prepay
        term
        termsContractType
    }
}

Example

query productsAtGivenDatetime($availableAt:DateTime){
    products(availableAt:$availableAt){
        id
        availableFrom
        availableTo
        availabilityStatus
        autoTopUpDefaultAmount
        autoTopUpMinimumAmount
        basedOnTimeOfUse
        code
        description
        displayName
        fullName
        generationCredit
        isWholesale
        marketName
        notes
        prepay
        term
        termsContractType
    }
}
1
2
3
4
# Input Variables
{
  "availableAt":"2021-03-29T00:00:00-05:00"
}

import datetime

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 productsAtGivenDatetime($availableAt:DateTime){
    products(availableAt:$availableAt){
        id
        availableFrom
        availableTo
        availabilityStatus
        autoTopUpDefaultAmount
        autoTopUpMinimumAmount
        basedOnTimeOfUse
        code
        description
        displayName
        fullName
        generationCredit
        isWholesale
        marketName
        notes
        prepay
        term
        termsContractType
    }
}
"""
VARIABLES = {
  "availableAt":"2021-03-29T00:00:00-05:00"
}

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 API_URL = "https://api.oeus-kraken.energy/v1/graphql/" // Prod
const apiUrl = "https://api.oeus-kraken.systems/v1/graphql/" // Test
let headers = {'content-type': 'application/json'}

const query = `

  query productsAtGivenDatetime($availableAt:DateTime){
      products(availableAt:$availableAt){
          id
          availableFrom
          availableTo
          availabilityStatus
          autoTopUpDefaultAmount
          autoTopUpMinimumAmount
          basedOnTimeOfUse
          code
          description
          displayName
          fullName
          generationCredit
          isWholesale
          marketName
          notes
          prepay
          term
          termsContractType
      }
  }
`
const variables = {
  "availableAt":"2021-03-29T00:00:00-05:00"
}

axios({
  url: apiUrl,
  method: "post",
  data: {
    query: query,
    variables: variables,
  },
  headers: headers,
}).then((response) => {
  console.log(JSON.stringify(response.data, null, 4));
});
import axios from 'axios';

// const API_URL = "https://api.oeus-kraken.energy/v1/graphql/" // Prod
export const apiUrl = "https://api.oeus-kraken.systems/v1/graphql/" // Test
let headers = {'content-type': 'application/json'}

export const query = `
query productsAtGivenDatetime($availableAt:DateTime){
  products(availableAt:$availableAt){
      id
      availableFrom
      availableTo
      availabilityStatus
      autoTopUpDefaultAmount
      autoTopUpMinimumAmount
      basedOnTimeOfUse
      code
      description
      displayName
      fullName
      generationCredit
      isWholesale
      marketName
      notes
      prepay
      term
      termsContractType
  }
}
`

export const variables = {
    "availableAt": "2021-03-29T00:00:00-05:00"
}

axios({
  url: apiUrl,
  method: "post",
  data: {
    query: query,
    variables: variables,
  },
  headers: headers,
}).then((response) => {
  console.log(JSON.stringify(response.data, null, 4));
});
{
    "data": {
        "products": [
            {
                "id": "2",
                "availableFrom": "2021-03-24T00:00:00-05:00",
                "availableTo": null,
                "availabilityStatus": "PUBLIC",
                "autoTopUpDefaultAmount": 7500,
                "autoTopUpMinimumAmount": 5000,
                "basedOnTimeOfUse": false,
                "code": "ERCOT-PREPAY-WHOLESALE-30-2021",
                "description": "Wholesale rate for 30 days",
                "displayName": "30-Day Wholesale Rate",
                "fullName": "30-day Pre-Pay Wholesale Rate",
                "generationCredit": true,
                "isWholesale": true,
                "marketName": "USA_ERCOT_ELECTRICITY",
                "notes": "Initial load of products for Texas - wholesale rate",
                "prepay": true,
                "term": 30,
                "termsContractType": ""
            },
            {
                "id": "1",
                "availableFrom": "2021-03-24T00:00:00-05:00",
                "availableTo": "2021-08-26T00:00:00-05:00",
                "availabilityStatus": "PUBLIC",
                "autoTopUpDefaultAmount": null,
                "autoTopUpMinimumAmount": null,
                "basedOnTimeOfUse": false,
                "code": "ERCOT-PREPAY-FIXED-30-2021",
                "description": "Fixed rate for 30 days",
                "displayName": "30-Day Fixed Rate",
                "fullName": "30-day Pre-Pay Fixed Rate",
                "generationCredit": true,
                "isWholesale": false,
                "marketName": "USA_ERCOT_ELECTRICITY",
                "notes": "Initial load of products for ERCOT - fixed rate",
                "prepay": false,
                "term": 1,
                "termsContractType": ""
            }
        ]
    }
}
Back to top