Barchart Cryptocurrency API

Spot crypto quotes and history.

OpenAPI Specification

barchart-cryptocurrency-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Barchart OnDemand Commodities & Agriculture Cryptocurrency API
  description: 'The Barchart OnDemand API is a commercially licensed market-data and commodity-data service hosted at https://ondemand.websol.barchart.com. It exposes a broad catalog of REST endpoints for quotes, historical time series, reference/instrument metadata, futures and options, fundamentals, corporate actions, cryptocurrencies, physical-commodity and agricultural data, technicals, news, and weather. Every call is authenticated with an `apikey` query parameter issued by Barchart, and each endpoint responds in JSON, XML, or CSV selected by the path suffix (for example `/getQuote.json`, `/getQuote.xml`, `/getQuote.csv`); GET, POST, and SOAP transports are supported.

    ACCESS NOTE - Barchart OnDemand is subscription and enterprise gated. The endpoint names, HTTP method, `apikey` auth, format suffixes, and the documented request parameters below are taken from Barchart''s public OnDemand documentation and are accurate. Because request quotas, the exact field catalogs, and full response payloads are entitlement-specific and not publicly published in machine-readable form, the response schemas in this document are HONESTLY MODELED (endpointsModeled) rather than captured from live authenticated responses. Field sets returned depend on your Barchart data license.'
  version: '1.0'
  contact:
    name: Barchart OnDemand
    url: https://www.barchart.com/ondemand/api
  x-access-model: subscription-and-enterprise (apikey required; contact sales / free trial)
  x-endpoints-modeled: true
servers:
- url: https://ondemand.websol.barchart.com
  description: Barchart OnDemand production host
security:
- apiKeyQuery: []
tags:
- name: Cryptocurrency
  description: Spot crypto quotes and history.
paths:
  /getCrypto.json:
    get:
      operationId: getCrypto
      tags:
      - Cryptocurrency
      summary: Get crypto quotes
      description: Spot-market cryptocurrency price data (Bitcoin, Ethereum, Ripple, Litecoin, etc.).
      parameters:
      - $ref: '#/components/parameters/ApiKey'
      - name: symbols
        in: query
        required: true
        schema:
          type: string
        example: ^BTCUSD,^ETHUSD
      responses:
        '200':
          $ref: '#/components/responses/QuoteResults'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /getCryptoHistory.json:
    get:
      operationId: getCryptoHistory
      tags:
      - Cryptocurrency
      summary: Get crypto history
      description: Historical price data for spot cryptocurrencies.
      parameters:
      - $ref: '#/components/parameters/ApiKey'
      - name: symbol
        in: query
        required: true
        schema:
          type: string
      - name: type
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/HistoryResults'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  parameters:
    ApiKey:
      name: apikey
      in: query
      required: true
      description: Barchart-issued API key.
      schema:
        type: string
  responses:
    Unauthorized:
      description: Missing, invalid, or unentitled API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Status'
    HistoryResults:
      description: A status envelope plus an array of historical bars (modeled).
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                $ref: '#/components/schemas/Status'
              results:
                type: array
                items:
                  $ref: '#/components/schemas/Bar'
    QuoteResults:
      description: A status envelope plus an array of quote records. Field set depends on your data entitlement (modeled).
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                $ref: '#/components/schemas/Status'
              results:
                type: array
                items:
                  $ref: '#/components/schemas/Quote'
  schemas:
    Bar:
      type: object
      description: Modeled historical bar.
      properties:
        symbol:
          type: string
        timestamp:
          type: string
          format: date-time
        tradingDay:
          type: string
        open:
          type: number
        high:
          type: number
        low:
          type: number
        close:
          type: number
        volume:
          type: integer
        openInterest:
          type: integer
      additionalProperties: true
    Quote:
      type: object
      description: Modeled quote record; the exact fields returned depend on entitlement.
      properties:
        symbol:
          type: string
        name:
          type: string
        exchange:
          type: string
        lastPrice:
          type: number
        netChange:
          type: number
        percentChange:
          type: number
        open:
          type: number
        high:
          type: number
        low:
          type: number
        volume:
          type: integer
        tradeTimestamp:
          type: string
          format: date-time
      additionalProperties: true
    Status:
      type: object
      description: Standard Barchart OnDemand status envelope.
      properties:
        code:
          type: integer
          example: 200
        message:
          type: string
          example: Success.
  securitySchemes:
    apiKeyQuery:
      type: apiKey
      in: query
      name: apikey
      description: Barchart-issued API key passed as the `apikey` query parameter on every request (for example `?apikey=YOUR_API_KEY`). Keys are provisioned with a Barchart OnDemand subscription or enterprise agreement.
Where this information came from

This is an independent, third-party profile of Barchart Cryptocurrency API, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.