{
 "openapi": "3.1.0",
 "info": {
  "title": "Trading Checkup - Trading Facts Feed",
  "version": "1.0",
  "description": "Prop-firm rules and exchange/broker order facts with the source page and the date each row was checked; signed rows (ed25519). Plans: Starter (prop rules), Standard (+ exchange facts), Pro (+ error codes, daily changes, change webhook). Information only, not financial advice.",
  "license": {
   "name": "Trading Facts Feed licence (internal use, no redistribution)",
   "url": "https://tradingcheckup.com/data/trading-facts-feed/#licence"
  }
 },
 "servers": [
  {
   "url": "https://api.tradingcheckup.com/lic/feed/v1"
  }
 ],
 "components": {
  "securitySchemes": {
   "key": {
    "type": "http",
    "scheme": "bearer"
   }
  }
 },
 "security": [
  {
   "key": []
  }
 ],
 "paths": {
  "/me": {
   "get": {
    "summary": "Your plan, quota used today, key valid until",
    "responses": {
     "200": {
      "description": "rows (JSON object with rows_data, or CSV)"
     },
     "401": {
      "description": "no or bad key"
     },
     "403": {
      "description": "not in your plan"
     },
     "429": {
      "description": "rate or daily quota"
     }
    }
   }
  },
  "/prop-rules": {
   "get": {
    "summary": "Prop-firm rule rows (all plans)",
    "parameters": [
     {
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      },
      "name": "firm"
     },
     {
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      },
      "name": "field"
     },
     {
      "in": "query",
      "name": "format",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "json",
        "csv"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "rows (JSON object with rows_data, or CSV)"
     },
     "401": {
      "description": "no or bad key"
     },
     "403": {
      "description": "not in your plan"
     },
     "429": {
      "description": "rate or daily quota"
     }
    }
   }
  },
  "/exchange-facts": {
   "get": {
    "summary": "Exchange/broker order facts (Standard, Pro)",
    "parameters": [
     {
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      },
      "name": "venue"
     },
     {
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      },
      "name": "symbol"
     },
     {
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      },
      "name": "field"
     },
     {
      "in": "query",
      "name": "format",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "json",
        "csv"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "rows (JSON object with rows_data, or CSV)"
     },
     "401": {
      "description": "no or bad key"
     },
     "403": {
      "description": "not in your plan"
     },
     "429": {
      "description": "rate or daily quota"
     }
    }
   }
  },
  "/error-codes": {
   "get": {
    "summary": "Exchange/MT5 error codes with plain meaning and fix steps (Pro)",
    "parameters": [
     {
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      },
      "name": "venue"
     },
     {
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      },
      "name": "code"
     },
     {
      "in": "query",
      "name": "format",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "json",
        "csv"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "rows (JSON object with rows_data, or CSV)"
     },
     "401": {
      "description": "no or bad key"
     },
     "403": {
      "description": "not in your plan"
     },
     "429": {
      "description": "rate or daily quota"
     }
    }
   }
  },
  "/changes": {
   "get": {
    "summary": "What changed in the newest daily snapshot (Pro)",
    "responses": {
     "200": {
      "description": "rows (JSON object with rows_data, or CSV)"
     },
     "401": {
      "description": "no or bad key"
     },
     "403": {
      "description": "not in your plan"
     },
     "429": {
      "description": "rate or daily quota"
     }
    }
   }
  },
  "/snapshots": {
   "get": {
    "summary": "Dates of available daily snapshots",
    "responses": {
     "200": {
      "description": "rows (JSON object with rows_data, or CSV)"
     },
     "401": {
      "description": "no or bad key"
     },
     "403": {
      "description": "not in your plan"
     },
     "429": {
      "description": "rate or daily quota"
     }
    }
   }
  },
  "/snapshot/{date}.zip": {
   "get": {
    "summary": "Daily snapshot zip for your plan (date or 'latest')",
    "parameters": [
     {
      "in": "path",
      "name": "date",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "rows (JSON object with rows_data, or CSV)"
     },
     "401": {
      "description": "no or bad key"
     },
     "403": {
      "description": "not in your plan"
     },
     "429": {
      "description": "rate or daily quota"
     }
    }
   }
  },
  "/webhook": {
   "post": {
    "summary": "Pro: set the HTTPS URL that receives the daily changes (signed, header X-TC-Signature)",
    "responses": {
     "200": {
      "description": "rows (JSON object with rows_data, or CSV)"
     },
     "401": {
      "description": "no or bad key"
     },
     "403": {
      "description": "not in your plan"
     },
     "429": {
      "description": "rate or daily quota"
     }
    }
   },
   "delete": {
    "summary": "Pro: remove the change webhook",
    "responses": {
     "200": {
      "description": "rows (JSON object with rows_data, or CSV)"
     },
     "401": {
      "description": "no or bad key"
     },
     "403": {
      "description": "not in your plan"
     },
     "429": {
      "description": "rate or daily quota"
     }
    }
   }
  }
 }
}