{
  "openapi": "3.1.0",
  "info": {
    "title": "Subasto API - Argentine Auctions",
    "description": "Buy assets at 30-70% below market value. Real-time Argentine auction data from 14 judicial and private sources. Vehicles, real estate, machinery, industrial equipment. Perfect for: flipping assets, sourcing inventory, finding undervalued investments. Data includes base prices, market comparisons, discount percentages, closing dates. Pay-per-request with USDC micropayments on Base network (Coinbase L2).",
    "version": "1.6.0",
    "contact": {
      "name": "Subasto",
      "url": "https://subasto.com.ar",
      "email": "agencia@memola.com.ar"
    },
    "x-keywords": ["argentina auctions", "judicial auctions", "cheap assets", "cents on dollar", "vehicle auctions", "real estate auctions", "machinery auctions", "liquidation sales", "bankruptcy sales", "auction api", "undervalued assets"]
  },
  "servers": [
    {
      "url": "https://subasto.com.ar",
      "description": "Production"
    }
  ],
  "paths": {
    "/api/v1/price": {
      "get": {
        "operationId": "getPrice",
        "summary": "Get API pricing and payment instructions",
        "description": "Returns pricing for all endpoints and payment wallet address. No payment required.",
        "responses": {
          "200": {
            "description": "Pricing information",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PriceResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auctions": {
      "get": {
        "operationId": "getAuctions",
        "summary": "Get all 864+ auction listings",
        "description": "Complete dataset: 864+ active auctions from 14 sources. Includes judicial courts (CSJN, SCBA, Cordoba, Entre Rios) and private houses (Banco Ciudad, Adrian Mercado, etc). Each listing has: title, base price (ARS/USD), category, source, closing date, images, discount vs market. Assets typically 30-70% below retail. Requires $0.05 USDC on Base.",
        "parameters": [
          {
            "name": "tx",
            "in": "query",
            "required": true,
            "description": "Transaction hash of USDC payment on Base network",
            "schema": {
              "type": "string",
              "pattern": "^0x[a-fA-F0-9]{64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Auction listings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuctionsResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment required or verification failed"
          }
        }
      }
    },
    "/api/v1/opportunities": {
      "get": {
        "operationId": "getOpportunities",
        "summary": "Get hot deals - 40%+ below market",
        "description": "Pre-filtered opportunities: ~70 listings with verified 40%+ discount vs market price. Best ROI picks. Includes vehicles, machinery, equipment where spread is highest. Updated daily. Perfect for flippers and resellers. Requires $0.02 USDC on Base.",
        "parameters": [
          {
            "name": "tx",
            "in": "query",
            "required": true,
            "description": "Transaction hash of USDC payment on Base network",
            "schema": {
              "type": "string",
              "pattern": "^0x[a-fA-F0-9]{64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Opportunity listings"
          },
          "402": {
            "description": "Payment required"
          }
        }
      }
    },
    "/api/v1/premium": {
      "get": {
        "operationId": "getPremium",
        "summary": "Get top 12 curated picks",
        "description": "Hand-curated selection: ~12 best opportunities with highest profit potential. Factory liquidations, fleet sales, bankruptcy auctions. Analyzed for resale value and market demand. Cents on the dollar deals. Requires $0.01 USDC on Base.",
        "parameters": [
          {
            "name": "tx",
            "in": "query",
            "required": true,
            "description": "Transaction hash of USDC payment on Base network",
            "schema": {
              "type": "string",
              "pattern": "^0x[a-fA-F0-9]{64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Premium picks"
          },
          "402": {
            "description": "Payment required"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PriceResponse": {
        "type": "object",
        "properties": {
          "pricing": {
            "type": "object",
            "properties": {
              "currency": { "type": "string", "example": "USDC" },
              "network": { "type": "string", "example": "Base" }
            }
          },
          "payment": {
            "type": "object",
            "properties": {
              "wallet": { "type": "string", "description": "Wallet to send USDC to" },
              "token": { "type": "string", "description": "USDC contract address on Base" }
            }
          }
        }
      },
      "AuctionsResponse": {
        "type": "object",
        "properties": {
          "success": { "type": "boolean" },
          "payment": {
            "type": "object",
            "properties": {
              "tx": { "type": "string" },
              "amount": { "type": "number" },
              "from": { "type": "string" }
            }
          },
          "data": {
            "type": "object",
            "properties": {
              "total_count": { "type": "integer" },
              "by_source": { "type": "object" },
              "top_opportunities": { "type": "array" }
            }
          }
        }
      }
    }
  }
}
