Cobalt Docs

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/v1

Authentication

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/quote

Versioning

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.json

Use 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"
  }
}
StatusMeaning
400Bad request — check your parameters
401Invalid or expired access token
403Forbidden — insufficient scope
404Resource not found
422Validation error
500Internal server error

On this page