{
  "openapi": "3.1.0",
  "info": {
    "title": "Liquid State Markets — Live Crypto Data",
    "description": "Live crypto market data: Fear & Greed, market regime, funding rates, derivatives, and the latest Liquid State Brief. Read-only, no key required. Not financial advice.",
    "version": "1.0.0",
    "license": {
      "name": "Public data — no authentication required"
    },
    "contact": {
      "url": "https://www.liquidstate.tech/api/agent?utm_source=chatgpt_gpt&utm_medium=agent&utm_campaign=gpt_action"
    }
  },
  "servers": [
    {
      "url": "https://www.liquidstate.tech"
    }
  ],
  "paths": {
    "/api/agent": {
      "get": {
        "summary": "Liquid State — Crypto Intelligence API",
        "description": "Free, read-only crypto market intelligence for AI agents and apps. Public data, no key required.",
        "operationId": "getAgentIndex",
        "responses": {
          "200": {
            "description": "Self-documenting API index (complete, unmodified response).",
            "content": {
              "application/json": {
                "example": {
                  "name": "Liquid State — Crypto Intelligence API",
                  "description": "Free, read-only crypto market intelligence for AI agents and apps. Public data, no key required.",
                  "site": "https://www.liquidstate.tech",
                  "mcp": "https://www.liquidstate.tech/api/mcp",
                  "endpoints": {
                    "briefs": {
                      "method": "GET",
                      "path": "/api/agent/briefs?limit=15",
                      "description": "Recent Liquid State crypto briefs (analysis feed)."
                    },
                    "derivatives": {
                      "method": "GET",
                      "path": "/api/agent/derivatives?symbol=BTC",
                      "description": "Funding rate, open interest, long/short, price for one perp (OKX)."
                    },
                    "market": {
                      "method": "GET",
                      "path": "/api/agent/market",
                      "description": "Funding + price snapshot for BTC, ETH, SOL."
                    },
                    "market_state": {
                      "method": "GET",
                      "path": "/api/agent/market-state",
                      "description": "Consolidated live market snapshot: BTC/ETH/SOL funding+price+OI, 24h liquidation aggregate, and regime signal. Designed for AI citation. Includes as_of, source, citation fields."
                    },
                    "guides": {
                      "method": "GET",
                      "path": "/api/agent/guides",
                      "description": "Premium trading guides (title, description, tags, pages, price, url). 27 guides, no free access — price is disclosed, not implied free."
                    }
                  },
                  "notice": "Information only, not financial advice."
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/briefs": {
      "get": {
        "summary": "Recent Liquid State crypto briefs (analysis feed).",
        "description": "Recent Liquid State crypto briefs (analysis feed).",
        "operationId": "getAgentBriefs",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 15,
              "minimum": 1,
              "maximum": 50
            },
            "description": "Number of briefs to return (clamped 1-50)."
          },
          {
            "name": "src",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "chatgpt_gpt"
              ],
              "default": "chatgpt_gpt"
            },
            "description": "Always pass exactly \"chatgpt_gpt\" — identifies this call as coming from the Liquid State Markets GPT so the site can attribute the click."
          }
        ],
        "responses": {
          "200": {
            "description": "Recent briefs (example values are shape-illustrative — call live for current numbers).",
            "content": {
              "application/json": {
                "example": {
                  "source": "Liquid State (liquidstate.tech)",
                  "notice": "Information only, not financial advice.",
                  "count": 2,
                  "briefs": [
                    {
                      "headline": "Fed Holds Rates Steady as Crypto Funding Flips Positive",
                      "category": "Fed Watch",
                      "coins": [
                        "BTC",
                        "ETH"
                      ],
                      "summary": "...",
                      "url": "https://www.liquidstate.tech/brief/fed-holds-rates-funding-flips-positive",
                      "publishedAt": "2026-07-13T18:32:00.000Z"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Database error.",
            "content": {
              "application/json": {
                "example": {
                  "error": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/derivatives": {
      "get": {
        "summary": "Funding rate, open interest, long/short, price for one perp (OKX).",
        "description": "Funding rate, open interest, long/short, price for one perp (OKX).",
        "operationId": "getAgentDerivatives",
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9]{1,15}$",
              "default": "BTC"
            },
            "description": "Perpetual symbol (case-insensitive, normalized uppercase)."
          }
        ],
        "responses": {
          "200": {
            "description": "Funding/OI/long-short/price for one perpetual (OKX public data). Example values are shape-illustrative — call live for current numbers.",
            "content": {
              "application/json": {
                "example": {
                  "source": "OKX public API",
                  "notice": "Information only, not financial advice.",
                  "symbol": "BTC",
                  "available": true,
                  "lastPrice": 118450.32,
                  "fundingRatePct": 0.0143,
                  "nextFundingTime": 1752469200000,
                  "openInterestUsd": 8240000000,
                  "longAccountPct": 54.3
                }
              }
            }
          },
          "400": {
            "description": "Invalid symbol.",
            "content": {
              "application/json": {
                "example": {
                  "error": "string"
                }
              }
            }
          },
          "502": {
            "description": "Upstream (OKX) unavailable.",
            "content": {
              "application/json": {
                "example": {
                  "error": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/market": {
      "get": {
        "summary": "Funding + price snapshot for BTC, ETH, SOL.",
        "description": "Funding + price snapshot for BTC, ETH, SOL.",
        "operationId": "getAgentMarket",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Funding + price snapshot for BTC, ETH, SOL (OKX public data). Example values are shape-illustrative — call live for current numbers.",
            "content": {
              "application/json": {
                "example": {
                  "source": "OKX public API",
                  "notice": "Information only, not financial advice.",
                  "assets": [
                    {
                      "symbol": "BTC",
                      "available": true,
                      "lastPrice": 118450.32,
                      "fundingRatePct": 0.0143,
                      "openInterestUsd": 8240000000,
                      "longAccountPct": 54.3
                    },
                    {
                      "symbol": "ETH",
                      "available": true,
                      "lastPrice": 4210.18,
                      "fundingRatePct": 0.0091,
                      "openInterestUsd": 3150000000,
                      "longAccountPct": 51.8
                    },
                    {
                      "symbol": "SOL",
                      "available": true,
                      "lastPrice": 168.42,
                      "fundingRatePct": 0.0067,
                      "openInterestUsd": 640000000,
                      "longAccountPct": 49.6
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Upstream (OKX) unavailable.",
            "content": {
              "application/json": {
                "example": {
                  "error": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/market-state": {
      "get": {
        "summary": "Consolidated live market snapshot: BTC/ETH/SOL funding+price+OI, 24h liquidation aggregate, and regime signal. Designed for AI citation. Includes as_of, source, citation fields.",
        "description": "Consolidated live market snapshot: BTC/ETH/SOL funding+price+OI, 24h liquidation aggregate, and regime signal. Designed for AI citation. Includes as_of, source, citation fields.",
        "operationId": "getAgentMarketState",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Consolidated live market snapshot, designed for AI citation. Example values are shape-illustrative — call live for current numbers.",
            "content": {
              "application/json": {
                "example": {
                  "as_of": "2026-07-14T04:15:00.000Z",
                  "source": "Liquid State (liquidstate.tech)",
                  "citation": "Liquid State, liquidstate.tech/data, as of 2026-07-14T04:15:00.000Z. Information only, not financial advice.",
                  "notice": "Information only, not financial advice.",
                  "assets": [
                    {
                      "symbol": "BTC",
                      "available": true,
                      "lastPrice": 118450.32,
                      "fundingRatePct": 0.0143,
                      "openInterestUsd": 8240000000,
                      "longAccountPct": 54.3,
                      "source": "OKX public API"
                    }
                  ],
                  "liq24h": {
                    "available": true,
                    "totalNotional": 184500000,
                    "longPct": 58,
                    "topAsset": "BTC"
                  },
                  "regime": {
                    "label": "Neutral",
                    "basis": "BTC perpetual funding rate (OKX)",
                    "note": "Market signal only — not investment advice."
                  }
                }
              }
            }
          },
          "502": {
            "description": "Upstream (OKX) unavailable.",
            "content": {
              "application/json": {
                "example": {
                  "error": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/guides": {
      "get": {
        "summary": "Premium trading guides (title, description, tags, pages, price, url). 27 guides, no free access — price is disclosed, not implied free.",
        "description": "Premium trading guides (title, description, tags, pages, price, url). 27 guides, no free access — price is disclosed, not implied free.",
        "operationId": "getAgentGuides",
        "parameters": [
          {
            "name": "src",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "chatgpt_gpt"
              ],
              "default": "chatgpt_gpt"
            },
            "description": "Always pass exactly \"chatgpt_gpt\" — identifies this call as coming from the Liquid State Markets GPT so the site can attribute the click."
          }
        ],
        "responses": {
          "200": {
            "description": "Premium trading guide catalog — full, unmodified response.",
            "content": {
              "application/json": {
                "example": {
                  "source": "Liquid State (liquidstate.tech)",
                  "notice": "Information only, not financial advice.",
                  "count": 27,
                  "guides": [
                    {
                      "slug": "journaling-mastery",
                      "title": "Journaling Mastery for Traders",
                      "description": "A practical playbook for traders to log, analyze, and dramatically improve performance through strict journaling.",
                      "tags": [
                        "risk-management",
                        "position-sizing"
                      ],
                      "pages": 38,
                      "price": 29,
                      "url": "https://www.liquidstate.tech/guides/journaling-mastery"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server error (unreachable in practice — the catalog is local/synchronous).",
            "content": {
              "application/json": {
                "example": {
                  "error": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}