Hashrate IndexAPI DocumentationEnergy

Get Energy Natural Gas Price

GET
/energy/natural-gas-price

/energy/natural-gas-price has rate limitation:

Initially, the API allows for a burst of 20 requests, and afterward, it gradually restores 1 request every 15 seconds until reaching the maximum allowable limit of 20. This limitation is imposed to manage and control the rate at which requests can be made to the API, preventing potential misuse or excessive use of resources.

Natural Gas Price Tracking

This endpoint provides insights into the pricing trends of natural gas, a critical component for energy markets. Users can view current and historical prices, which are essential for energy companies and investors in making strategic decisions.

Authorization

ApiKeyAuth
X-Hi-Api-Key<token>

In: header

Query Parameters

span?string

Time span

Default"1Y"

Value in

  • "1Y"
  • "5Y"

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

curl -X GET "https://example.com/energy/natural-gas-price?span=1Y"
{  "$schema": "https://api.hashrateindex.com/v1/hashrateindex/schemas/EnergyPriceData.json",  "data": [    {      "price": 0.1,      "symbol": "string",      "timestamp": "2019-08-24T14:15:22Z"    }  ]}
{  "$schema": "https://api.hashrateindex.com/v1/hashrateindex/schemas/ErrorModel.json",  "detail": "Property foo is required but is missing.",  "errors": [    {      "location": "string",      "message": "string",      "value": null    }  ],  "instance": "https://example.com/error-log/abc123",  "status": 400,  "title": "Bad Request",  "type": "https://example.com/errors/example"}
{  "$schema": "https://api.hashrateindex.com/v1/hashrateindex/schemas/ErrorModel.json",  "detail": "Property foo is required but is missing.",  "errors": [    {      "location": "string",      "message": "string",      "value": null    }  ],  "instance": "https://example.com/error-log/abc123",  "status": 400,  "title": "Bad Request",  "type": "https://example.com/errors/example"}
{  "$schema": "https://api.hashrateindex.com/v1/hashrateindex/schemas/ErrorModel.json",  "detail": "Property foo is required but is missing.",  "errors": [    {      "location": "string",      "message": "string",      "value": null    }  ],  "instance": "https://example.com/error-log/abc123",  "status": 400,  "title": "Bad Request",  "type": "https://example.com/errors/example"}