Hashrate IndexAPI DocumentationStocks

Get Stocks by Slug

GET
/stocks

/stocks 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.

Specific Stock Details

This endpoint provides detailed information about a specific stock, identified by its slug. It includes data on company leadership, performance metrics, and recent price changes, which are essential for investors making informed decisions about specific stocks in their portfolio.

Authorization

ApiKeyAuth
X-Hi-Api-Key<token>

In: header

Query Parameters

slug*string

Stock Slug refer to Get Stocks Overview to get the list of slugs

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

curl -X GET "https://example.com/stocks?slug=mara"
{  "$schema": "https://api.hashrateindex.com/v1/hashrateindex/schemas/StocksBySlugData.json",  "data": {    "ceo": "string",    "change24H": 0,    "change24HPercent": 0,    "companyName": "string",    "description": "string",    "exchange": "string",    "forex": "string",    "headquarters": "string",    "lastPrice": 0,    "sector": "string",    "ticker": "string",    "type": "string"  }}
{  "$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"}