GetMarketState
Check real-time market states, including exchange availability, opening, and closing times for all stock exchanges or specific ones using the Twelve Data API.
Instructions
Check the state of all available exchanges, time to open, and time to close. Returns all available stock exchanges by default.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
params | Yes |
Input Schema (JSON Schema)
{
"$defs": {
"GetMarketStateRequest": {
"description": "Check the state of all available exchanges, time to open, and time to close. Returns all available stock exchanges by default.",
"properties": {
"apikey": {
"default": "demo",
"description": "API key",
"examples": [
"demo"
],
"title": "Apikey",
"type": "string"
},
"code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Market Identifier Code (MIC) of the exchange where the instrument is traded.",
"examples": [
"XNYS"
],
"title": "Code"
},
"country": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The country where the exchange is located. Takes country name or alpha code.",
"examples": [
"United States"
],
"title": "Country"
},
"exchange": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The exchange name where the instrument is traded.",
"examples": [
"NYSE"
],
"title": "Exchange"
},
"outputsize": {
"default": 10,
"description": "Number of data points to retrieve. Supports values in the range from `1` to `5000`. Default `10` when no date parameters are set, otherwise set to maximum",
"examples": [
10
],
"title": "Outputsize",
"type": "integer"
}
},
"title": "GetMarketStateRequest",
"type": "object"
}
},
"properties": {
"params": {
"$ref": "#/$defs/GetMarketStateRequest"
}
},
"required": [
"params"
],
"title": "GetMarketStateArguments",
"type": "object"
}