Twelve Data Get Market State
0.5 credits/call
ae_twelvedata_get_market_state
Check the current open or closed status of stock exchanges with Twelve Data, including time until the next opening or closing.
0.5 credits/call
Pricing
0.5 credits/call
| Condition | Charge |
|---|---|
| Each call | 0.5 credits/call |
Parameters
Optional parameters use the platform defaults when omitted.
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
code | string | No | The Market Identifier Code (MIC) of the exchange where the instrument is traded. | — |
country | string | No | The country where the exchange is located. Takes country name or alpha code. | — |
exchange | string | No | The exchange name where the instrument is traded. | — |
Invocation example
Copy the request and explore its response example.
POST
/agent-api/v1/tool/executeX-Api-KeyRequest coderequest.sh
curl --request POST \
--url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_twelvedata_get_market_state' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"exchange": "NYSE"
}
}'Response exampleresponse.json
[
{
"code": "XNYS",
"country": "United States",
"is_market_open": false,
"name": "NYSE",
"time_after_open": "00:00:00",
"time_to_close": "00:00:00"
}
]This example shows part of the response. Copied content is valid JSON.

