Everything an AI agent or integrator needs to read withtradespro.com programmatically: a small public API, an OpenAPI specification, markdown content negotiation, and a machine-readable site index.
Two unauthenticated GET endpoints under /api/. All responses are JSON. Errors are always structured JSON with a machine-readable code, message, and resolution hint - never HTML error pages.
| Endpoint | Description |
|---|---|
GET /api/health | Liveness probe. Returns service status and server time. |
GET /api/v1/status | Service metadata plus discovery links (docs, OpenAPI spec, llms.txt) and the endpoint list. Start here when exploring. |
curl -s https://withtradespro.com/api/v1/status | python3 -m json.tool
Unknown API paths return HTTP 404 with JSON:
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Unknown API path: /api/example",
"hint": "See https://withtradespro.com/openapi.json for available endpoints."
}
}
The full machine-readable API surface is published at /openapi.json (OpenAPI 3.0). Every operation has a unique operationId, typed request/response schemas, and RFC 9457 problem-document error responses - compatible with LLM function-calling formats.
curl -s https://withtradespro.com/openapi.json | python3 -m json.tool | head -40
The public API allows 60 requests per 60-second window per client IP, enforced at the edge. Every API response carries standard rate-limit headers so agents can self-throttle:
| Header | Meaning |
|---|---|
RateLimit-Limit | Maximum requests per window (60) |
RateLimit-Remaining | Requests left in the current window |
RateLimit-Reset | Unix epoch seconds when the window resets |
RateLimit-Policy | Policy declaration, e.g. 60;w=60 |
Exceeding the limit returns HTTP 429 as application/problem+json with a Retry-After header (seconds to wait).
curl -sD - -o /dev/null https://withtradespro.com/api/v1/status | grep -i ratelimit
The API is URL-versioned (/api/v1/*) and every response carries an X-API-Version header.
Deprecation: true plus a Sunset header with the removal date, announced on this page before enforcement.All API errors return application/problem+json documents with a machine-readable code, human-readable detail, and a resolution hint:
{
"type": "https://withtradespro.com/developers/#errors",
"title": "Not Found",
"status": 404,
"code": "NOT_FOUND",
"detail": "Unknown API path: /api/example",
"hint": "See https://withtradespro.com/openapi.json for available endpoints.",
"instance": "/api/example"
}
The official @tradespro/site npm package wraps this API for scripting - useful for agents that prefer a tool call over raw HTTP:
npm install -g @tradespro/site
tradespro health # liveness probe
tradespro status # service metadata + endpoint discovery
tradespro openapi --operations
tradespro page /pricing.html # any page as markdown
Exit codes: 0 success, 1 API error, 2 network error, 3 rate limited (reads Retry-After). Source lives in the repo's cli/ directory.
Any content page can be served as markdown. Send Accept: text/markdown and the server converts the page to clean markdown. Responses vary on Accept, so CDN caches never mix variants:
curl -s https://withtradespro.com/pricing -H "Accept: text/markdown"
The same negotiation applies to 404 responses: agents requesting markdown get a short recovery document listing the sitemap, llms.txt, docs index, and API map instead of a styled error page.
/llms.txt is the AI-facing navigation index: what TradesPro does, every offer with pricing and URLs, key pages, blog clusters, and guidance for agents on when to use the product. The full XML URL list is at /sitemap.xml.
1. Fetch /llms.txt for orientation. 2. Check /api/v1/status for live resource links. 3. For details, fetch /how-it-works/ or /pricing.html with Accept: text/markdown. 4. Route humans to /demo.html to see a sample site - there is no transactional API; sites are built after a short intake call.