Yahoo Finance API endpoint
Returns whether a Yahoo Finance market is open or closed, for the path `market` such as `US`. The response has `market` and a `status` object with the market id, name and its current open or closed state.
/yahoo-finance/market/{market}/status| Field | Filled in, of 1 checked | Values in the sample |
|---|---|---|
| hrs | 1 | 2 |
| mins | 1 | 44 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| market (path) | string | Yes | Market such as US | US | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/yahoo-finance/market/US/status" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"market": "US",
"status": {
"id": "us",
"name": "U.S. markets",
"status": "closed"
}
}
}Request schema
No body schema
Response schema
#/definitions/yahoofinance.marketStatusResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | yahoofinance.MarketStatusResponse | No | ||||
| data.market | string | No | US | Market code, for example `US`. | ||
| data.status | object | No | Current trading status of the market, as Yahoo Finance reports it. | |||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/definitions/app.Response |
| 404 | Not Found | #/definitions/app.Response |
| 500 | Internal Server Error | #/definitions/app.Response |
| 503 | Service Unavailable | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/yahoo-finance/market/US/status" \
-H "x-api-key: $CRAWLORA_API_KEY"