---
updatedAt: 2026-04-20T21:43:36.000Z
agentTools:
  projectIndex: https://docs.dinari.com/llms.txt
---

# Get Market Hours

Get the market hours for the current trading session and next open trading session.

# OpenAPI definition

```json
{
  "info": {
    "description": "**Dinari API for enterprise usage.**\n\nDinari's dShares let businesses offer tokenized access to stocks to their customers through an easy-to-use API.\nIntegrate Dinari's API and offer over a hundred stocks and ETFs to your customers.\n",
    "contact": {
      "email": "hello@dinari.com"
    },
    "license": {
      "name": "Contact us"
    },
    "termsOfService": "https://dinari.com/terms",
    "title": "Dinari Enterprise API",
    "version": "v20261009-833c33c"
  },
  "servers": [
    {
      "url": "https://api-enterprise.sbt.dinari.com",
      "description": "Production"
    },
    {
      "url": "https://api-enterprise.sandbox.dinari.com",
      "description": "Sandbox"
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyId": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key-Id",
        "description": "The API key ID provided on the [Partners Dashboard](https://partners.dinari.com)."
      },
      "ApiSecretKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Secret-Key",
        "description": "API Secret Key that is only shown once at API Key creation."
      }
    },
    "schemas": {
      "BaseOpenApiError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "description": "HTTP status code"
          },
          "message": {
            "type": "string",
            "description": "Human-readable message"
          },
          "error_id": {
            "type": "string",
            "description": "Reference Id for Dinari support"
          },
          "error": {
            "description": "Additional context and information"
          }
        },
        "required": [
          "error_id",
          "message",
          "status"
        ],
        "additionalProperties": false
      },
      "ExtendedMarketHours": {
        "type": "object",
        "properties": {
          "is_market_open": {
            "type": "boolean",
            "description": "Whether or not the market is open"
          },
          "next_session_open_dt": {
            "type": "string",
            "format": "date-time",
            "description": "Datetime at which the next session opens. ISO 8601 timestamp."
          },
          "next_session_close_dt": {
            "type": "string",
            "format": "date-time",
            "description": "Datetime at which the next session closes. ISO 8601 timestamp."
          },
          "next_session_overnight_open_time_dt": {
            "type": "string",
            "format": "date-time",
            "description": "Time at which the next session overnight starts."
          },
          "next_session_pre_market_open_time_dt": {
            "type": "string",
            "format": "date-time",
            "description": "Time at which the next session pre-market hours start."
          },
          "next_session_after_hours_close_time_dt": {
            "type": "string",
            "format": "date-time",
            "description": "Time at which the next session after-hours end."
          },
          "current_session_open_dt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Datetime at which the current session opened. `null` if the market is currently closed. ISO 8601 timestamp."
          },
          "current_session_close_dt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Datetime at which the current session closes. `null` if the market is currently closed. ISO 8601 timestamp."
          },
          "current_session_overnight_open_time_dt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Time at which the current session overnight starts."
          },
          "current_session_pre_market_open_time_dt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Time at which the current session pre-market hours start."
          },
          "current_session_after_hours_close_time_dt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Time at which the current session after-hours end."
          }
        },
        "required": [
          "is_market_open",
          "next_session_close_dt",
          "next_session_open_dt"
        ],
        "additionalProperties": false
      }
    },
    "responses": {
      "DEFAULT_ERROR": {
        "description": "Default error response",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/BaseOpenApiError"
            }
          }
        }
      }
    }
  },
  "paths": {
    "/api/v2/market_data/market_hours/": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtendedMarketHours"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "tags": [
          "Market Data"
        ],
        "summary": "Get Market Hours",
        "description": "Get the market hours for the current trading session and next open trading session.",
        "operationId": "getMarketHours",
        "security": [
          {
            "ApiKeyId": [],
            "ApiSecretKey": []
          }
        ]
      }
    }
  },
  "tags": [
    {
      "name": "Market Data",
      "description": "**Dinari provides basic market data for `Stocks` and `Alloys` that are available to transact on.**\n\nThis data is provided on a best-effort basis and we recommend using a dedicated provider for more intensive market data needs."
    }
  ],
  "openapi": "3.1.0"
}
```