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.

Productivity
0.5 credits/call

Pricing

0.5 credits/call
ConditionCharge
Each call0.5 credits/call

Parameters

Optional parameters use the platform defaults when omitted.

ParameterTypeRequiredDescriptionDefault
codestringNoThe Market Identifier Code (MIC) of the exchange where the instrument is traded.—
countrystringNoThe country where the exchange is located. Takes country name or alpha code.—
exchangestringNoThe exchange name where the instrument is traded.—

Invocation example

Copy the request and explore its response example.

POST/agent-api/v1/tool/executeX-Api-Key
Request 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
JSONPartial content
[
  {
    "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.