{
    "openapi": "3.1.0",
    "info": {
        "title": "US Markets Today API",
        "version": "1.0.0",
        "description": "Free, read-only JSON with the data behind usmarketstoday.com: why stocks moved each day (with sources), daily market recaps, earnings calls, Congress trades and analyst forecasts. No key. Each record links to its page on the site; please link to it when you use the data. Prices can be delayed and summaries are AI-written. Not investment advice.",
        "termsOfService": "https://usmarketstoday.com/terms",
        "contact": {
            "name": "US Markets Today",
            "url": "https://usmarketstoday.com/contact"
        }
    },
    "servers": [
        {
            "url": "https://usmarketstoday.com/api/v1"
        }
    ],
    "paths": {
        "/moves": {
            "get": {
                "operationId": "listMoves",
                "summary": "Why stocks moved",
                "description": "Notable price moves, each with an explanation of why the stock moved and the sources behind it. With a symbol: that stock's moves, newest first. With a date: that day's moves, biggest first. With both: one move. With neither: the latest moves.",
                "parameters": [
                    {
                        "name": "symbol",
                        "in": "query",
                        "required": false,
                        "description": "Ticker as used on the site: NVDA for a stock or ETF, BTCUSD for Bitcoin, ^VIX for an index.",
                        "schema": {
                            "type": "string",
                            "example": "NVDA"
                        }
                    },
                    {
                        "name": "date",
                        "in": "query",
                        "required": false,
                        "description": "A day, YYYY-MM-DD.",
                        "schema": {
                            "type": "string",
                            "format": "date",
                            "example": "2026-11-24"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "How many moves.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 200,
                            "default": 50
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Notable moves",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Answer"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/recaps": {
            "get": {
                "operationId": "listRecaps",
                "summary": "Days with a market recap",
                "description": "Days with a market recap, newest first, each with its headline.",
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "How many days.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 400,
                            "default": 30
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Recap days",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Answer"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/recaps/{date}": {
            "get": {
                "operationId": "getRecap",
                "summary": "One day's market recap",
                "description": "The day's market summary (headlines with details) and its 10 biggest notable moves.",
                "parameters": [
                    {
                        "name": "date",
                        "in": "path",
                        "required": true,
                        "description": "The day, YYYY-MM-DD.",
                        "schema": {
                            "type": "string",
                            "format": "date",
                            "example": "2026-11-24"
                        }
                    },
                    {
                        "name": "market",
                        "in": "query",
                        "required": false,
                        "description": "us (default) or crypto.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "us",
                                "crypto"
                            ],
                            "default": "us"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A market recap",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Answer"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/earnings-calls": {
            "get": {
                "operationId": "listEarningsCalls",
                "summary": "Earnings calls",
                "description": "Earnings calls with their summary, EPS and revenue against estimates, the stock's move the next day and a link to the full transcript. Without a symbol: the latest calls of all companies.",
                "parameters": [
                    {
                        "name": "symbol",
                        "in": "query",
                        "required": false,
                        "description": "Ticker as used on the site: NVDA for a stock or ETF, BTCUSD for Bitcoin, ^VIX for an index.",
                        "schema": {
                            "type": "string",
                            "example": "NVDA"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "How many calls.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "default": 25
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Earnings calls",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Answer"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/congress-trades": {
            "get": {
                "operationId": "listCongressTrades",
                "summary": "Congress trades",
                "description": "Stock trades disclosed by members of Congress and the executive branch, latest filings first. Without parameters: filings of the last 45 days.",
                "parameters": [
                    {
                        "name": "symbol",
                        "in": "query",
                        "required": false,
                        "description": "Ticker as used on the site: NVDA for a stock or ETF, BTCUSD for Bitcoin, ^VIX for an index.",
                        "schema": {
                            "type": "string",
                            "example": "NVDA"
                        }
                    },
                    {
                        "name": "politician",
                        "in": "query",
                        "required": false,
                        "description": "One person, by the slug in their page address, e.g. nancy-pelosi.",
                        "schema": {
                            "type": "string",
                            "example": "nancy-pelosi"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "How many trades.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 500,
                            "default": 100
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Disclosed trades",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Answer"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/forecasts/{symbol}": {
            "get": {
                "operationId": "getForecast",
                "summary": "Analyst forecast",
                "description": "The analysts' consensus rating, price targets (average, median, high, low) and their 25 latest rating actions.",
                "parameters": [
                    {
                        "name": "symbol",
                        "in": "path",
                        "required": true,
                        "description": "Ticker as used on the site: NVDA for a stock or ETF, BTCUSD for Bitcoin, ^VIX for an index.",
                        "schema": {
                            "type": "string",
                            "example": "NVDA"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "An analyst forecast",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Answer"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "Answer": {
                "type": "object",
                "required": [
                    "data",
                    "meta"
                ],
                "properties": {
                    "data": {
                        "description": "A list of records, or one object for /recaps/{date} and /forecasts/{symbol}. Every record has a url: its page on usmarketstoday.com."
                    },
                    "meta": {
                        "type": "object",
                        "properties": {
                            "count": {
                                "type": "integer"
                            },
                            "generated": {
                                "type": "string",
                                "format": "date-time"
                            },
                            "docs": {
                                "type": "string"
                            },
                            "attribution": {
                                "type": "string"
                            },
                            "disclaimer": {
                                "type": "string"
                            }
                        }
                    }
                }
            },
            "Error": {
                "type": "object",
                "properties": {
                    "error": {
                        "type": "object",
                        "properties": {
                            "code": {
                                "type": "string"
                            },
                            "message": {
                                "type": "string"
                            },
                            "docs": {
                                "type": "string"
                            }
                        }
                    }
                }
            }
        },
        "responses": {
            "Error": {
                "description": "A bad parameter (400) or nothing on file (404)",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Error"
                        }
                    }
                }
            }
        }
    }
}
