{
 "openapi": "3.1.0",
 "info": {
  "title": "TradeHouse Data API (read-only)",
  "version": "1.0",
  "description": "Cross-venue prediction-market signals, market data, resolutions and whale activity. Pass your key in the Authorization header; limits depend on your plan (see https://tradehouse.eliteaiempire.com/pricing). TradeHouse provides data only, not trading advice.",
  "termsOfService": "https://tradehouse.eliteaiempire.com/legal/terms/",
  "contact": {
   "url": "https://tradehouse.eliteaiempire.com/"
  }
 },
 "servers": [
  {
   "url": "https://th-api.eliteaiempire.com"
  }
 ],
 "paths": {
  "/api/v1/signals/list": {
   "get": {
    "summary": "Signals List",
    "operationId": "signals_list_api_v1_signals_list_get",
    "parameters": [
     {
      "name": "authorization",
      "in": "header",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Authorization"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "data"
    ]
   }
  },
  "/api/v1/signals/{name}": {
   "get": {
    "summary": "Signal History",
    "operationId": "signal_history_api_v1_signals__name__get",
    "parameters": [
     {
      "name": "name",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "title": "Name"
      }
     },
     {
      "name": "ticker",
      "in": "query",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Market ID or family",
       "title": "Ticker"
      },
      "description": "Market ID or family"
     },
     {
      "name": "since",
      "in": "query",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "ISO datetime or epoch",
       "title": "Since"
      },
      "description": "ISO datetime or epoch"
     },
     {
      "name": "until",
      "in": "query",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "ISO datetime or epoch",
       "title": "Until"
      },
      "description": "ISO datetime or epoch"
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "maximum": 5000,
       "default": 500,
       "title": "Limit"
      }
     },
     {
      "name": "authorization",
      "in": "header",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Authorization"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "data"
    ]
   }
  },
  "/api/v1/signals/{name}/live": {
   "get": {
    "summary": "Signal Live",
    "operationId": "signal_live_api_v1_signals__name__live_get",
    "parameters": [
     {
      "name": "name",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "title": "Name"
      }
     },
     {
      "name": "ticker",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "description": "Market ID",
       "title": "Ticker"
      },
      "description": "Market ID"
     },
     {
      "name": "authorization",
      "in": "header",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Authorization"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "data"
    ]
   }
  },
  "/api/v1/prediction-market-data/{ticker}": {
   "get": {
    "summary": "Prediction Market Data",
    "operationId": "prediction_market_data_api_v1_prediction_market_data__ticker__get",
    "parameters": [
     {
      "name": "ticker",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "title": "Ticker"
      }
     },
     {
      "name": "authorization",
      "in": "header",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Authorization"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "data"
    ]
   }
  },
  "/api/v1/resolutions/{ticker}": {
   "get": {
    "summary": "Market Resolution",
    "description": "Venue-published market resolution (outcome + settle time) for a market.\n\nF2138: served from the ISOLATED customer plane (customer_market.resolutions)\nsourced from venue settlement only \u2014 zero persona/pnl/decision data. Available\nto all tiers as strategy-agnostic market truth.",
    "operationId": "market_resolution_api_v1_resolutions__ticker__get",
    "parameters": [
     {
      "name": "ticker",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "title": "Ticker"
      }
     },
     {
      "name": "authorization",
      "in": "header",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Authorization"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "data"
    ]
   }
  },
  "/api/v1/whales/polymarket": {
   "get": {
    "summary": "Whales Polymarket",
    "operationId": "whales_polymarket_api_v1_whales_polymarket_get",
    "parameters": [
     {
      "name": "since",
      "in": "query",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Since"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "maximum": 200,
       "default": 50,
       "title": "Limit"
      }
     },
     {
      "name": "authorization",
      "in": "header",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Authorization"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Successful Response",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "422": {
      "description": "Validation Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      }
     }
    },
    "tags": [
     "data"
    ]
   }
  },
  "/billing/session": {
   "post": {
    "operationId": "createCheckoutSession",
    "summary": "Open a Stripe Checkout Session for one plan (303 redirect, or JSON {url,id} when the request is application/json). Nothing is charged until the buyer pays.",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "plan"
        ],
        "properties": {
         "plan": {
          "type": "string",
          "enum": [
           "tickvault_slice",
           "tickvault_history",
           "tickvault_history_year",
           "fidelity_audit_once",
           "fidelity_audit_pack"
          ]
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "{url,id} where id starts cs_live_"
     },
     "303": {
      "description": "redirect to Stripe Checkout"
     },
     "400": {
      "description": "unknown plan"
     },
     "503": {
      "description": "checkout not enabled"
     }
    }
   }
  }
 },
 "components": {
  "schemas": {
   "HTTPValidationError": {
    "properties": {
     "detail": {
      "items": {
       "$ref": "#/components/schemas/ValidationError"
      },
      "type": "array",
      "title": "Detail"
     }
    },
    "type": "object",
    "title": "HTTPValidationError"
   },
   "ValidationError": {
    "properties": {
     "loc": {
      "items": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "integer"
        }
       ]
      },
      "type": "array",
      "title": "Location"
     },
     "msg": {
      "type": "string",
      "title": "Message"
     },
     "type": {
      "type": "string",
      "title": "Error Type"
     },
     "input": {
      "title": "Input"
     },
     "ctx": {
      "type": "object",
      "title": "Context"
     }
    },
    "type": "object",
    "required": [
     "loc",
     "msg",
     "type"
    ],
    "title": "ValidationError"
   }
  }
 }
}