{
  "openapi": "3.1.0",
  "info": {
    "title": "UpTrendDownTrend daily research sample",
    "version": "1.0.0",
    "description": "Read up to one verified close-session snapshot for the same five tracked US stocks. Verify the market_session before using it. No per-symbol search or pagination. One owner-approved, read-only key per account. Agent enrollment is currently closed. The public browser beta is open."
  },
  "servers": [
    {
      "url": "https://fintrends-api.onrender.com"
    }
  ],
  "externalDocs": {
    "url": "https://www.uptrenddowntrend.com/agents.html"
  },
  "paths": {
    "/api/agent/v1/daily-sample": {
      "get": {
        "operationId": "getDailyTrendSample",
        "summary": "Read both proprietary trend readings for five fixed stocks",
        "description": "One call returns the full basket. Cache the session on the client where permitted. Check once daily after the close verification and honor Retry-After. Trend 1 responds faster; Trend 2 is smoother. A reading is neither a price nor a probability.",
        "security": [
          {
            "sampleKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Complete observed readings for one confirmed market session.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "market_session",
                    "basis",
                    "source",
                    "symbols",
                    "research_guide"
                  ],
                  "properties": {
                    "market_session": {
                      "type": "string",
                      "format": "date"
                    },
                    "basis": {
                      "const": "confirmed_end_of_day"
                    },
                    "source": {
                      "const": "UpTrendDownTrend"
                    },
                    "research_guide": {
                      "type": "string",
                      "format": "uri"
                    },
                    "symbols": {
                      "type": "array",
                      "minItems": 5,
                      "maxItems": 5,
                      "items": {
                        "type": "object",
                        "required": [
                          "symbol",
                          "trend_1",
                          "trend_2"
                        ],
                        "properties": {
                          "symbol": {
                            "type": "string",
                            "enum": [
                              "AAPL",
                              "AMZN",
                              "GOOGL",
                              "MSFT",
                              "NVDA"
                            ]
                          },
                          "trend_1": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "trend_2": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "A valid, unexpired sample key is required."
          },
          "404": {
            "description": "Service disabled or unavailable on this deployment."
          },
          "429": {
            "description": "Request budget reached. Wait for Retry-After before retrying.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          },
          "503": {
            "description": "A complete confirmed snapshot or required service is unavailable. Do not substitute an older or invented reading."
          },
          "400": {
            "description": "Query parameters or headers are unsupported."
          },
          "413": {
            "description": "Request bodies are unsupported."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "sampleKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "A verified owner can create a key in Account > Agent access when enrollment is open. Use this key only with the listed API origin. Never send an account password, Auth0 token or key to another agent in a prompt."
      }
    }
  }
}
