openapi: 3.2.0 info: title: Gridx Ai Market Prices API version: 2.0.0 contact: name: gridX url: https://www.gridx.ai/module/api email: developer-community@gridx.de license: name: All rights reserved. url: https://www.gridx.ai/ x-api-id: ba9d6a25-ae1a-4ac8-af7a-70b76db17021 x-audience: public-external description: 'Operations tagged Market Prices across 2 of this provider''s published API definitions: gridx-api.json, gridx-ai-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://api.gridx.de description: Production tags: - name: Market Prices x-displayName: Market Prices paths: /account/market-prices/{platform}: get: operationId: listMarketPrices summary: Retrieve energy market prices for the authenticated account deprecated: true description: 'List energy market prices for the given interval. Prices are fetched from an external energy market platform. For the given interval, the hourly prices of the second to last day and for the last day are returned in a 60M resolution. For all the other days in the interval, the average daily price is returned. For example, in order to get hourly prices for the current day and the day before, set the **end** of the interval to the current day. **Deprecated** - Use `/systems/{systemID}/tariff/prices` instead.' tags: - Market Prices security: - HeaderAuth: [] parameters: - in: path name: platform required: true schema: type: string example: entso-e description: 'Specifies an external platform to receive the energy market prices from (currently only one supported). - "entso-e": Fetch prices from ENTSO-E Transparency Platform. ' - in: query name: domain required: false schema: type: string description: 'Specifies an Area-Code which is currently in use of the European markets. If set, the default bidding zone set in the account is ignored. More details about the bidding zones, can be found [here](https://transparency.entsoe.eu/content/static_content/Static%20content/web%20api/Guide.html#_areas).' example: 10Y1001A1001A82H - in: query name: interval description: Requested time interval for fetching prices in UTC. required: true example: 2020-09-21T00:00:00Z/2022-09-23T00:00:00Z schema: type: string format: datetime - in: query name: timezone description: Timezone in which all related times should be loaded before being returned. required: true schema: type: string example: Europe/Berlin responses: '200': description: Energy market prices returned. content: application/vnd.gridx.v2+json: schema: description: Contains the energy market data for a specific time interval. title: Energy Market Data type: object properties: priceUnit: type: string description: Currency unit which the prices are (ct/kWh). example: EUR/MWh averagePriceDay: type: number format: double description: Average price of the second to last day in EUR/MWh. example: 33.6 periodStart: type: string description: Starting date at which the prices are fetched in RFC3339 format. example: '2020-09-24T00:00:00Z' periodEnd: type: string description: Ending date at which the prices are fetched in RFC3339 format. example: '2022-09-27T00:00:00Z' totalPrices: description: 'Contains an array of arrays in the format [time, price]. The fetched prices are in the following order: * Average prices for each day between [PeriodStart, SecondToLastDay]. * Prices for the second to last day from the given interval with resolution 1h. * Price for the last day of the given interval with resolution 1h.' type: array items: type: array items: oneOf: - type: string - type: number example: - - '2022-09-25T22:00:00Z' - 2.5 - - '2022-09-25T23:00:00Z' - 1 - - '2022-09-26T00:00:00Z' - 2 - - '2022-09-26T01:00:00Z' - 3 - - '2022-09-26T02:00:00Z' - 4 - - '2022-09-26T23:00:00Z' - 1 - - '2022-09-27T00:00:00Z' - 2 - - '2022-09-27T01:00:00Z' - 3 - - '2022-09-27T02:00:00Z' - 4 x-readme-ref-name: EnergyMarketData '400': description: Malformed request. content: application/vnd.gridx.v2+json: schema: readOnly: true allOf: - title: General Exception description: Represents a general error structure returned by our REST API. type: object properties: message: type: string description: Message represents the message reported to the user. details: type: array description: 'Details represents detail information for the user to fix this problem ' items: type: string required: - message x-readme-ref-name: GeneralException - title: ClientError - Bad Request description: 'Bad Request indicates that the request body is not a valid JSON or it contains a invalid json type. ' example: message: Problems parsing JSON x-readme-ref-name: BadRequestException '403': description: Forbidden. content: application/vnd.gridx.v2+json: schema: readOnly: true allOf: - title: General Exception description: Represents a general error structure returned by our REST API. type: object properties: message: type: string description: Message represents the message reported to the user. details: type: array description: 'Details represents detail information for the user to fix this problem ' items: type: string required: - message x-readme-ref-name: GeneralException - title: UnauthorizedError - Forbidden Error description: Forbidden Error example: message: Bad credentials x-readme-ref-name: ForbiddenException '404': description: Account not found. content: application/vnd.gridx.v2+json: schema: readOnly: true allOf: - title: General Exception description: Represents a general error structure returned by our REST API. type: object properties: message: type: string description: Message represents the message reported to the user. details: type: array description: 'Details represents detail information for the user to fix this problem ' items: type: string required: - message x-readme-ref-name: GeneralException - title: ClientError - Not Found description: Not Found indicates that the entity was not found. example: message: Not Found x-readme-ref-name: NotFoundException '500': description: There has been an internal error on our side. We're looking into it. content: application/vnd.gridx.v2+json: schema: readOnly: true allOf: - title: General Exception description: Represents a general error structure returned by our REST API. type: object properties: message: type: string description: Message represents the message reported to the user. details: type: array description: 'Details represents detail information for the user to fix this problem ' items: type: string required: - message x-readme-ref-name: GeneralException - title: ServerSideError - Internal Server Error description: Internal Server Error example: message: Internal Server Error x-readme-ref-name: InternalException '502': description: There has been an error from an upstream server. content: application/vnd.gridx.v2+json: schema: readOnly: true allOf: - title: General Exception description: Represents a general error structure returned by our REST API. type: object properties: message: type: string description: Message represents the message reported to the user. details: type: array description: 'Details represents detail information for the user to fix this problem ' items: type: string required: - message x-readme-ref-name: GeneralException - title: BadGatewayError description: Indicates that there has been an error from an upstream server. example: message: Bad Gateway x-readme-ref-name: BadGateway x-code-samples: - lang: python label: Python source: 'import requests url = "https://api.gridx.de/account/market-prices/platform" headers = {"accept": "application/vnd.gridx.v2+json"} response = requests.get(url, headers=headers) print(response.text)' - lang: shell label: Shell source: "curl --request GET \\\n --url https://api.gridx.de/account/market-prices/platform \\\n --header 'accept: application/vnd.gridx.v2+json'" - lang: go label: Go source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.gridx.de/account/market-prices/platform\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"accept\", \"application/vnd.gridx.v2+json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(string(body))\n\n}" - lang: javascript label: Javascript source: "const options = {method: 'GET', headers: {accept: 'application/vnd.gridx.v2+json'}};\n\nfetch('https://api.gridx.de/account/market-prices/platform', options)\n .then(res => res.json())\n .then(res => console.log(res))\n .catch(err => console.error(err));" - lang: java label: Java source: "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.gridx.de/account/market-prices/platform\")\n .get()\n .addHeader(\"accept\", \"application/vnd.gridx.v2+json\")\n .build();\n\nResponse response = client.newCall(request).execute();" - lang: java label: Kotlin source: "val client = OkHttpClient()\n\nval request = Request.Builder()\n .url(\"https://api.gridx.de/account/market-prices/platform\")\n .get()\n .addHeader(\"accept\", \"application/vnd.gridx.v2+json\")\n .build()\n\nval response = client.newCall(request).execute()" - lang: javascript label: Swift source: 'import Foundation let url = URL(string: "https://api.gridx.de/account/market-prices/platform")! var request = URLRequest(url: url) request.httpMethod = "GET" request.timeoutInterval = 10 request.allHTTPHeaderFields = ["accept": "application/vnd.gridx.v2+json"] let (data, _) = try await URLSession.shared.data(for: request) print(String(decoding: data, as: UTF8.self))' - lang: csharp label: C# source: 'using RestSharp; var options = new RestClientOptions("https://api.gridx.de/account/market-prices/platform"); var client = new RestClient(options); var request = new RestRequest(""); request.AddHeader("accept", "application/vnd.gridx.v2+json"); var response = await client.GetAsync(request); Console.WriteLine("{0}", response.Content); ' servers: - url: https://api.gridx.de description: Production components: securitySchemes: HeaderAuth: type: apiKey name: Authorization in: header description: Enter either the JWT token with the prefix `Bearer ` or an API token with the prefix `Token ` x-refined-from: - gridx-api.json - gridx-ai-openapi.yml