{
 "openapi": "3.0.3",
 "info": {
  "title": "Used Tech Price API",
  "version": "v1",
  "description": "Daily used-market prices for GPUs, CPUs, RAM, SSDs, monitors, consoles, iPhones, gaming laptops, MacBooks, handheld PCs and cameras: typical price, fair range, trends and up to a year of history. Aggregated from live eBay listings including shipping (asking prices, not sold prices). Updated several times a day."
 },
 "servers": [
  {
   "url": "https://orbitbymicah.com/api/v1"
  }
 ],
 "paths": {
  "/models.json": {
   "get": {
    "summary": "All models with current prices",
    "description": "Typical used and new price, fair range, 7/30-day change and 90-day low for every tracked model.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/models/{id}.json": {
   "get": {
    "summary": "One model with price history",
    "description": "Current prices plus up to 365 days of daily typical price and fair range.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "Model id from /models.json, e.g. rtx-3080"
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/categories.json": {
   "get": {
    "summary": "Categories",
    "description": "Tracked categories and model counts.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/categories/{category}.json": {
   "get": {
    "summary": "Models in a category",
    "description": "Current prices for every model in one category.",
    "parameters": [
     {
      "name": "category",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "gpu, cpu, ram, ssd, monitor, console, phone, laptop, mac, handheld, camera"
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/movers.json": {
   "get": {
    "summary": "Biggest 7-day movers",
    "description": "Top 10 price drops and rises over the last 7 days.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  }
 },
 "components": {
  "schemas": {
   "Model": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "name": {
      "type": "string"
     },
     "category": {
      "type": "string"
     },
     "used": {
      "type": "object",
      "nullable": true,
      "properties": {
       "typical": {
        "type": "number"
       },
       "fair_low": {
        "type": "number"
       },
       "fair_high": {
        "type": "number"
       },
       "lowest": {
        "type": "number"
       },
       "listings": {
        "type": "number"
       }
      }
     },
     "new": {
      "type": "object",
      "nullable": true,
      "properties": {
       "typical": {
        "type": "number"
       }
      }
     },
     "change_7d_pct": {
      "type": "number",
      "nullable": true
     },
     "change_30d_pct": {
      "type": "number",
      "nullable": true
     },
     "low_90d": {
      "type": "number",
      "nullable": true
     }
    }
   }
  }
 }
}