{
  "openapi": "3.1.0",
  "info": {
    "title": "nyfin API Reference",
    "version": "0.1.0",
    "description": "NYSE / ETF Central source API for bluedoor Financial Data.\nETF Central quote and price data plus NYSE dividend ex-date data.\nCoverage: ETF quotes and prices; ETF market state; ETF popularity; Dividend ex-dates.\nGenerated from the live source contract and representative live API responses on 2026-06-07T01:30:59.456Z."
  },
  "servers": [
    {
      "url": "https://api.nyfin.bluedoor.sh",
      "description": "nyfin source API"
    }
  ],
  "externalDocs": {
    "description": "NYSE / ETF Central source API docs",
    "url": "https://bluedoor.sh/apis/financial-data/sources/nyfin"
  },
  "tags": [
    {
      "name": "Dividends"
    },
    {
      "name": "ETFs"
    }
  ],
  "paths": {
    "/v1/dividends/ex-dates": {
      "get": {
        "operationId": "nyfin_get_dividends_ex_dates",
        "summary": "Ex-dates",
        "tags": [
          "Dividends"
        ],
        "parameters": [
          {
            "name": "x-nyfin-contact",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "email"
            },
            "description": "Optional contact email for higher public rate limits and support diagnostics."
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "Bearer <key>"
            },
            "description": "Optional API-key authorization for higher-volume access tiers."
          }
        ],
        "security": [
          {},
          {
            "ContactEmail": []
          },
          {
            "BearerAuth": []
          },
          {
            "NyfinApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/nyfin_get_dividends_ex_datesResponse"
                },
                "examples": {
                  "live": {
                    "summary": "Live response",
                    "value": {
                      "data": {
                        "count": 402,
                        "next": "https://listingmanager.nyse.com/api/distributions/ad-hoc-ex-date/?page=2",
                        "previous": null,
                        "results": [
                          {
                            "issue_symbol": "BKEM",
                            "issuer_name": "BNY Mellon ETF Trust",
                            "ex_date": "2026-07-20",
                            "record_date": "2026-07-16",
                            "pay_date": "2026-07-17",
                            "is_cancelled": false
                          },
                          {
                            "issue_symbol": "BKIE",
                            "issuer_name": "BNY Mellon ETF Trust",
                            "ex_date": "2026-07-20",
                            "record_date": "2026-07-16",
                            "pay_date": "2026-07-17",
                            "is_cancelled": false
                          },
                          {
                            "issue_symbol": "BKSE",
                            "issuer_name": "BNY Mellon ETF Trust",
                            "ex_date": "2026-07-20",
                            "record_date": "2026-07-16",
                            "pay_date": "2026-07-17",
                            "is_cancelled": false
                          }
                        ]
                      },
                      "meta": {
                        "endpoint_id": "nyse.dividends.ex_dates",
                        "served_from": "cache",
                        "cached_at": "2026-06-07T01:24:03.271Z",
                        "ttl_seconds": 600,
                        "stale_seconds": 1800,
                        "version": "0.1.0",
                        "upstream_status": 200
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 400 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "bad_request",
                        "message": "Required query parameter is missing or invalid."
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. API-key authenticated tiers use an Authorization bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 401 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "unauthorized",
                        "message": "A valid API key is required for this tier."
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found. The requested route, resource, or symbol could not be resolved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 404 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "not_found",
                        "message": "The requested resource was not found."
                      }
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed. Source API routes are documented as HTTP GET unless otherwise specified.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 405 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "method_not_allowed",
                        "message": "This route does not support the requested HTTP method."
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 429 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry after the rate-limit reset."
                      }
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "Upstream source error. The source service rejected or failed the upstream request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 502 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "upstream_error",
                        "message": "The upstream source returned an error."
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable. The source API or an upstream dependency is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 503 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "service_unavailable",
                        "message": "The service is temporarily unavailable."
                      }
                    }
                  }
                }
              }
            }
          },
          "504": {
            "description": "Upstream timeout. The upstream source did not return within the source API timeout window.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 504 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "upstream_timeout",
                        "message": "The upstream source timed out."
                      }
                    }
                  }
                }
              }
            }
          },
          "5XX": {
            "description": "Upstream or transport error"
          }
        },
        "description": "Returns ex-dates with source-native fields and identifiers.",
        "x-source-api": "nyfin",
        "x-source-name": "NYSE / ETF Central",
        "x-source-upstream": "nyse.com, etfcentral.com",
        "x-docs-example-url": "https://api.nyfin.bluedoor.sh/v1/dividends/ex-dates",
        "x-docs-example-status": 200,
        "x-docs-captured-at": "2026-06-07T01:31:14.709Z"
      }
    },
    "/v1/etf/market-state": {
      "get": {
        "operationId": "nyfin_get_etf_market_state",
        "summary": "Market state",
        "tags": [
          "ETFs"
        ],
        "parameters": [
          {
            "name": "x-nyfin-contact",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "email"
            },
            "description": "Optional contact email for higher public rate limits and support diagnostics."
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "Bearer <key>"
            },
            "description": "Optional API-key authorization for higher-volume access tiers."
          }
        ],
        "security": [
          {},
          {
            "ContactEmail": []
          },
          {
            "BearerAuth": []
          },
          {
            "NyfinApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/nyfin_get_etf_market_stateResponse"
                },
                "examples": {
                  "live": {
                    "summary": "Live response",
                    "value": {
                      "data": [
                        {
                          "slug": "stocks-us-large-cap",
                          "label": "US Large Cap",
                          "shortLabel": null,
                          "featuredETFs": [
                            {
                              "fund_identifier": "SPY"
                            },
                            {
                              "fund_identifier": "QQQ"
                            },
                            {
                              "fund_identifier": "DIA"
                            }
                          ],
                          "proxyFund": "SPY"
                        },
                        {
                          "slug": "stocks-us-mid-cap",
                          "label": "US Mid Cap",
                          "shortLabel": null,
                          "featuredETFs": [
                            {
                              "fund_identifier": "MDY"
                            },
                            {
                              "fund_identifier": "IJH"
                            },
                            {
                              "fund_identifier": "VO"
                            }
                          ],
                          "proxyFund": "IJH"
                        },
                        {
                          "slug": "stocks-us-small-cap",
                          "label": "US Small Cap",
                          "shortLabel": null,
                          "featuredETFs": [
                            {
                              "fund_identifier": "SPSM"
                            },
                            {
                              "fund_identifier": "VB"
                            },
                            {
                              "fund_identifier": "IJR"
                            }
                          ],
                          "proxyFund": "IJR"
                        }
                      ],
                      "meta": {
                        "endpoint_id": "nyse.etf.market_state",
                        "served_from": "cache",
                        "cached_at": "2026-06-07T01:24:04.089Z",
                        "ttl_seconds": 1800,
                        "stale_seconds": 3600,
                        "version": "0.1.0",
                        "upstream_status": 200
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 400 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "bad_request",
                        "message": "Required query parameter is missing or invalid."
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. API-key authenticated tiers use an Authorization bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 401 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "unauthorized",
                        "message": "A valid API key is required for this tier."
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found. The requested route, resource, or symbol could not be resolved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 404 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "not_found",
                        "message": "The requested resource was not found."
                      }
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed. Source API routes are documented as HTTP GET unless otherwise specified.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 405 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "method_not_allowed",
                        "message": "This route does not support the requested HTTP method."
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 429 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry after the rate-limit reset."
                      }
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "Upstream source error. The source service rejected or failed the upstream request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 502 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "upstream_error",
                        "message": "The upstream source returned an error."
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable. The source API or an upstream dependency is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 503 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "service_unavailable",
                        "message": "The service is temporarily unavailable."
                      }
                    }
                  }
                }
              }
            }
          },
          "504": {
            "description": "Upstream timeout. The upstream source did not return within the source API timeout window.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 504 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "upstream_timeout",
                        "message": "The upstream source timed out."
                      }
                    }
                  }
                }
              }
            }
          },
          "5XX": {
            "description": "Upstream or transport error"
          }
        },
        "description": "Returns market state with source-native fields and identifiers.",
        "x-source-api": "nyfin",
        "x-source-name": "NYSE / ETF Central",
        "x-source-upstream": "nyse.com, etfcentral.com",
        "x-docs-example-url": "https://api.nyfin.bluedoor.sh/v1/etf/market-state",
        "x-docs-example-status": 200,
        "x-docs-captured-at": "2026-06-07T01:31:14.978Z"
      }
    },
    "/v1/etf/most-popular": {
      "get": {
        "operationId": "nyfin_get_etf_most_popular",
        "summary": "Most popular",
        "tags": [
          "ETFs"
        ],
        "parameters": [
          {
            "name": "x-nyfin-contact",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "email"
            },
            "description": "Optional contact email for higher public rate limits and support diagnostics."
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "Bearer <key>"
            },
            "description": "Optional API-key authorization for higher-volume access tiers."
          }
        ],
        "security": [
          {},
          {
            "ContactEmail": []
          },
          {
            "BearerAuth": []
          },
          {
            "NyfinApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/nyfin_get_etf_most_popularResponse"
                },
                "examples": {
                  "live": {
                    "summary": "Live response",
                    "value": {
                      "data": {
                        "funds": [
                          {
                            "ticker": "SPY"
                          },
                          {
                            "ticker": "QQQ"
                          },
                          {
                            "ticker": "ARKK"
                          }
                        ]
                      },
                      "meta": {
                        "endpoint_id": "nyse.etf.most_popular",
                        "served_from": "cache",
                        "cached_at": "2026-06-07T01:24:04.194Z",
                        "ttl_seconds": 1800,
                        "stale_seconds": 3600,
                        "version": "0.1.0",
                        "upstream_status": 200
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 400 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "bad_request",
                        "message": "Required query parameter is missing or invalid."
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. API-key authenticated tiers use an Authorization bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 401 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "unauthorized",
                        "message": "A valid API key is required for this tier."
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found. The requested route, resource, or symbol could not be resolved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 404 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "not_found",
                        "message": "The requested resource was not found."
                      }
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed. Source API routes are documented as HTTP GET unless otherwise specified.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 405 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "method_not_allowed",
                        "message": "This route does not support the requested HTTP method."
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 429 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry after the rate-limit reset."
                      }
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "Upstream source error. The source service rejected or failed the upstream request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 502 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "upstream_error",
                        "message": "The upstream source returned an error."
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable. The source API or an upstream dependency is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 503 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "service_unavailable",
                        "message": "The service is temporarily unavailable."
                      }
                    }
                  }
                }
              }
            }
          },
          "504": {
            "description": "Upstream timeout. The upstream source did not return within the source API timeout window.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 504 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "upstream_timeout",
                        "message": "The upstream source timed out."
                      }
                    }
                  }
                }
              }
            }
          },
          "5XX": {
            "description": "Upstream or transport error"
          }
        },
        "description": "Returns most popular with source-native fields and identifiers.",
        "x-source-api": "nyfin",
        "x-source-name": "NYSE / ETF Central",
        "x-source-upstream": "nyse.com, etfcentral.com",
        "x-docs-example-url": "https://api.nyfin.bluedoor.sh/v1/etf/most-popular",
        "x-docs-example-status": 200,
        "x-docs-captured-at": "2026-06-07T01:31:15.247Z"
      }
    },
    "/v1/etf/price": {
      "get": {
        "operationId": "nyfin_get_etf_price",
        "summary": "Price",
        "tags": [
          "ETFs"
        ],
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mic_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "ARCX"
            }
          },
          {
            "name": "x-nyfin-contact",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "email"
            },
            "description": "Optional contact email for higher public rate limits and support diagnostics."
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "Bearer <key>"
            },
            "description": "Optional API-key authorization for higher-volume access tiers."
          }
        ],
        "security": [
          {},
          {
            "ContactEmail": []
          },
          {
            "BearerAuth": []
          },
          {
            "NyfinApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/nyfin_get_etf_priceResponse"
                },
                "examples": {
                  "live": {
                    "summary": "Live response",
                    "value": {
                      "data": {
                        "code": 404,
                        "message": "**symbol** or **figi** parameter is missing or invalid. Please provide a valid symbol according to API documentation: https://twelvedata.com/docs#reference-data",
                        "status": "error"
                      },
                      "meta": {
                        "endpoint_id": "nyse.etf.price",
                        "served_from": "origin",
                        "cached_at": "2026-06-07T01:31:15.872Z",
                        "ttl_seconds": 15,
                        "stale_seconds": 60,
                        "version": "0.1.0",
                        "upstream_status": 404
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 400 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "bad_request",
                        "message": "Required query parameter is missing or invalid."
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. API-key authenticated tiers use an Authorization bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 401 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "unauthorized",
                        "message": "A valid API key is required for this tier."
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found. The requested route, resource, or symbol could not be resolved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 404 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "not_found",
                        "message": "The requested resource was not found."
                      }
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed. Source API routes are documented as HTTP GET unless otherwise specified.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 405 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "method_not_allowed",
                        "message": "This route does not support the requested HTTP method."
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 429 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry after the rate-limit reset."
                      }
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "Upstream source error. The source service rejected or failed the upstream request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 502 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "upstream_error",
                        "message": "The upstream source returned an error."
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable. The source API or an upstream dependency is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 503 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "service_unavailable",
                        "message": "The service is temporarily unavailable."
                      }
                    }
                  }
                }
              }
            }
          },
          "504": {
            "description": "Upstream timeout. The upstream source did not return within the source API timeout window.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 504 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "upstream_timeout",
                        "message": "The upstream source timed out."
                      }
                    }
                  }
                }
              }
            }
          },
          "5XX": {
            "description": "Upstream or transport error"
          }
        },
        "description": "Returns price with source-native fields and identifiers.",
        "x-source-api": "nyfin",
        "x-source-name": "NYSE / ETF Central",
        "x-source-upstream": "nyse.com, etfcentral.com",
        "x-docs-example-url": "https://api.nyfin.bluedoor.sh/v1/etf/price?symbol=AAPL",
        "x-docs-example-status": 200,
        "x-docs-captured-at": "2026-06-07T01:31:15.890Z"
      }
    },
    "/v1/etf/quote": {
      "get": {
        "operationId": "nyfin_get_etf_quote",
        "summary": "Quote",
        "tags": [
          "ETFs"
        ],
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mic_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "ARCX"
            }
          },
          {
            "name": "timezone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "America/New_York"
            }
          },
          {
            "name": "x-nyfin-contact",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "email"
            },
            "description": "Optional contact email for higher public rate limits and support diagnostics."
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "Bearer <key>"
            },
            "description": "Optional API-key authorization for higher-volume access tiers."
          }
        ],
        "security": [
          {},
          {
            "ContactEmail": []
          },
          {
            "BearerAuth": []
          },
          {
            "NyfinApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/nyfin_get_etf_quoteResponse"
                },
                "examples": {
                  "live": {
                    "summary": "Live response",
                    "value": {
                      "data": {
                        "symbol": "SPY",
                        "name": "SPDR S&P 500 ETF Trust",
                        "exchange": "NYSE",
                        "mic_code": "ARCX",
                        "currency": "USD",
                        "datetime": "2026-06-05",
                        "timestamp": 1780666200,
                        "last_quote_at": 1780689540,
                        "open": "752.31000",
                        "high": "752.82001",
                        "low": "735.53003",
                        "close": "737.54999",
                        "volume": "93678100",
                        "previous_close": "757.090027",
                        "change": "-19.54004",
                        "percent_change": "-2.58094",
                        "average_volume": "49185060",
                        "is_market_open": false,
                        "fifty_two_week": {
                          "low": "591.049988",
                          "high": "760.40002",
                          "low_change": "146.50000",
                          "high_change": "-22.85004",
                          "low_change_percent": "24.78640",
                          "high_change_percent": "-3.0050021",
                          "range": "591.049988 - 760.400024"
                        }
                      },
                      "meta": {
                        "endpoint_id": "nyse.etf.quote",
                        "served_from": "origin",
                        "cached_at": "2026-06-07T01:31:16.541Z",
                        "ttl_seconds": 15,
                        "stale_seconds": 60,
                        "version": "0.1.0",
                        "upstream_status": 200
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 400 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "bad_request",
                        "message": "Required query parameter is missing or invalid."
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. API-key authenticated tiers use an Authorization bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 401 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "unauthorized",
                        "message": "A valid API key is required for this tier."
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found. The requested route, resource, or symbol could not be resolved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 404 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "not_found",
                        "message": "The requested resource was not found."
                      }
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed. Source API routes are documented as HTTP GET unless otherwise specified.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 405 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "method_not_allowed",
                        "message": "This route does not support the requested HTTP method."
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 429 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry after the rate-limit reset."
                      }
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "Upstream source error. The source service rejected or failed the upstream request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 502 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "upstream_error",
                        "message": "The upstream source returned an error."
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable. The source API or an upstream dependency is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 503 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "service_unavailable",
                        "message": "The service is temporarily unavailable."
                      }
                    }
                  }
                }
              }
            }
          },
          "504": {
            "description": "Upstream timeout. The upstream source did not return within the source API timeout window.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "HTTP 504 error",
                    "value": {
                      "ok": false,
                      "error": {
                        "code": "upstream_timeout",
                        "message": "The upstream source timed out."
                      }
                    }
                  }
                }
              }
            }
          },
          "5XX": {
            "description": "Upstream or transport error"
          }
        },
        "description": "Returns quote with source-native fields and identifiers.",
        "x-source-api": "nyfin",
        "x-source-name": "NYSE / ETF Central",
        "x-source-upstream": "nyse.com, etfcentral.com",
        "x-docs-example-url": "https://api.nyfin.bluedoor.sh/v1/etf/quote?symbol=SPY",
        "x-docs-example-status": 200,
        "x-docs-captured-at": "2026-06-07T01:31:16.560Z"
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ContactEmail": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Nyfin-Contact"
      },
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Manual API keys are available by emailing sam@bluedoor.sh."
      },
      "NyfinApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Nyfin-Key"
      }
    },
    "schemas": {
      "ErrorEnvelope": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "ok": {
            "type": "boolean",
            "example": false
          },
          "error": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            }
          },
          "meta": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "nyfin_get_dividends_ex_datesResponse": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "data": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "count": {
                "type": "integer"
              },
              "next": {
                "type": "string"
              },
              "previous": {
                "nullable": true
              },
              "results": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": true,
                  "properties": {
                    "issue_symbol": {
                      "type": "string"
                    },
                    "issuer_name": {
                      "type": "string"
                    },
                    "ex_date": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "nullable": true
                        }
                      ]
                    },
                    "record_date": {
                      "type": "string"
                    },
                    "pay_date": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "nullable": true
                        }
                      ]
                    },
                    "is_cancelled": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ex_date",
                    "is_cancelled",
                    "issue_symbol",
                    "issuer_name",
                    "pay_date",
                    "record_date"
                  ]
                }
              }
            },
            "required": [
              "count",
              "next",
              "previous",
              "results"
            ]
          },
          "meta": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "endpoint_id": {
                "type": "string"
              },
              "served_from": {
                "type": "string"
              },
              "cached_at": {
                "type": "string"
              },
              "ttl_seconds": {
                "type": "integer"
              },
              "stale_seconds": {
                "type": "integer"
              },
              "version": {
                "type": "string"
              },
              "upstream_status": {
                "type": "integer"
              }
            },
            "required": [
              "cached_at",
              "endpoint_id",
              "served_from",
              "stale_seconds",
              "ttl_seconds",
              "upstream_status",
              "version"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "nyfin_get_etf_market_stateResponse": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "properties": {
                "slug": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "shortLabel": {
                  "nullable": true
                },
                "featuredETFs": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true,
                    "properties": {
                      "fund_identifier": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "fund_identifier"
                    ]
                  }
                },
                "proxyFund": {
                  "type": "string"
                }
              },
              "required": [
                "featuredETFs",
                "label",
                "proxyFund",
                "shortLabel",
                "slug"
              ]
            }
          },
          "meta": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "endpoint_id": {
                "type": "string"
              },
              "served_from": {
                "type": "string"
              },
              "cached_at": {
                "type": "string"
              },
              "ttl_seconds": {
                "type": "integer"
              },
              "stale_seconds": {
                "type": "integer"
              },
              "version": {
                "type": "string"
              },
              "upstream_status": {
                "type": "integer"
              }
            },
            "required": [
              "cached_at",
              "endpoint_id",
              "served_from",
              "stale_seconds",
              "ttl_seconds",
              "upstream_status",
              "version"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "nyfin_get_etf_most_popularResponse": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "data": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "funds": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": true,
                  "properties": {
                    "ticker": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ticker"
                  ]
                }
              }
            },
            "required": [
              "funds"
            ]
          },
          "meta": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "endpoint_id": {
                "type": "string"
              },
              "served_from": {
                "type": "string"
              },
              "cached_at": {
                "type": "string"
              },
              "ttl_seconds": {
                "type": "integer"
              },
              "stale_seconds": {
                "type": "integer"
              },
              "version": {
                "type": "string"
              },
              "upstream_status": {
                "type": "integer"
              }
            },
            "required": [
              "cached_at",
              "endpoint_id",
              "served_from",
              "stale_seconds",
              "ttl_seconds",
              "upstream_status",
              "version"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "nyfin_get_etf_priceResponse": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "data": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "code": {
                "type": "integer"
              },
              "message": {
                "type": "string"
              },
              "status": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message",
              "status"
            ]
          },
          "meta": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "endpoint_id": {
                "type": "string"
              },
              "served_from": {
                "type": "string"
              },
              "cached_at": {
                "type": "string"
              },
              "ttl_seconds": {
                "type": "integer"
              },
              "stale_seconds": {
                "type": "integer"
              },
              "version": {
                "type": "string"
              },
              "upstream_status": {
                "type": "integer"
              }
            },
            "required": [
              "cached_at",
              "endpoint_id",
              "served_from",
              "stale_seconds",
              "ttl_seconds",
              "upstream_status",
              "version"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "nyfin_get_etf_quoteResponse": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "data": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "symbol": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "exchange": {
                "type": "string"
              },
              "mic_code": {
                "type": "string"
              },
              "currency": {
                "type": "string"
              },
              "datetime": {
                "type": "string"
              },
              "timestamp": {
                "type": "integer"
              },
              "last_quote_at": {
                "type": "integer"
              },
              "open": {
                "type": "string"
              },
              "high": {
                "type": "string"
              },
              "low": {
                "type": "string"
              },
              "close": {
                "type": "string"
              },
              "volume": {
                "type": "string"
              },
              "previous_close": {
                "type": "string"
              },
              "change": {
                "type": "string"
              },
              "percent_change": {
                "type": "string"
              },
              "average_volume": {
                "type": "string"
              },
              "is_market_open": {
                "type": "boolean"
              },
              "fifty_two_week": {
                "type": "object",
                "additionalProperties": true,
                "properties": {
                  "low": {
                    "type": "string"
                  },
                  "high": {
                    "type": "string"
                  },
                  "low_change": {
                    "type": "string"
                  },
                  "high_change": {
                    "type": "string"
                  },
                  "low_change_percent": {
                    "type": "string"
                  },
                  "high_change_percent": {
                    "type": "string"
                  },
                  "range": {
                    "type": "string"
                  }
                },
                "required": [
                  "high",
                  "high_change",
                  "high_change_percent",
                  "low",
                  "low_change",
                  "low_change_percent",
                  "range"
                ]
              }
            },
            "required": [
              "average_volume",
              "change",
              "close",
              "currency",
              "datetime",
              "exchange",
              "fifty_two_week",
              "high",
              "is_market_open",
              "last_quote_at",
              "low",
              "mic_code",
              "name",
              "open",
              "percent_change",
              "previous_close",
              "symbol",
              "timestamp",
              "volume"
            ]
          },
          "meta": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "endpoint_id": {
                "type": "string"
              },
              "served_from": {
                "type": "string"
              },
              "cached_at": {
                "type": "string"
              },
              "ttl_seconds": {
                "type": "integer"
              },
              "stale_seconds": {
                "type": "integer"
              },
              "version": {
                "type": "string"
              },
              "upstream_status": {
                "type": "integer"
              }
            },
            "required": [
              "cached_at",
              "endpoint_id",
              "served_from",
              "stale_seconds",
              "ttl_seconds",
              "upstream_status",
              "version"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      }
    }
  },
  "x-generated-at": "2026-06-07T01:30:59.456Z",
  "x-source-api": "nyfin",
  "x-source-base-url": "https://api.nyfin.bluedoor.sh"
}
