API Reference
Explore the Cobalt Public API — authenticate with OAuth, query market data, and build integrations.
Overview
The Cobalt Public API lets you programmatically access market data, portfolio analytics, and financial insights. All endpoints are versioned under /v1/ and require OAuth 2.0 authentication.
Base URL
https://cobalt-server.vercel.app/v1Authentication
Cobalt uses Google OAuth for API authentication. See the Authentication guide for the full setup flow.
Once authenticated, include the access token in your requests:
curl -H "Authorization: Bearer <access_token>" \
https://cobalt-server.vercel.app/v1/tickers/AAPL/quoteVersioning
The API is versioned via the URL path (/v1/). Breaking changes will be introduced under a new version. Non-breaking additions (new fields, new endpoints) may be added to the current version.
OpenAPI Specification
The full OpenAPI 3.1 spec is available at:
https://cobalt-server.vercel.app/v1/openapi.jsonUse it to generate client SDKs, import into Postman, or integrate with any OpenAPI-compatible tooling.
Error Format
All errors follow a consistent structure:
{
"error": {
"code": "NOT_FOUND",
"message": "Ticker not found"
}
}| Status | Meaning |
|---|---|
400 | Bad request — check your parameters |
401 | Invalid or expired access token |
403 | Forbidden — insufficient scope |
404 | Resource not found |
422 | Validation error |
500 | Internal server error |