Skip to main content
Use the Pricing API to fetch current prices, batch quotes, candle data, order book snapshots, live price streams, and pivot points. In this repo, these capabilities are exposed through the PricingService gRPC service.

API Surface

Below are the Pricing API sections.

Prices

Use GetPrice when you need the current price for one market. The request takes a market_id and can optionally specify a source. The response includes fields such as last, optional bid and ask, optional 24h metrics, the selected source, and a timestamp. Use GetPrices when you need the latest price data for multiple markets in one request. This is the batch version of single-market price lookup and is a better fit for dashboards, watchlists, and multi-market strategies. In the current SDK client, GetPrice is the pricing method that is explicitly wrapped as a helper.

Endpoints:

EndpointUse Сase
GetPriceGet the latest price for a single market, such as CC-USDC.
GetPricesFetch current prices for multiple markets in one request.

Historical Data

Use GetKlines to retrieve candle data for a market. The request includes market_id, interval, optional limit, optional start_time, optional end_time, and optional source. The proto lists supported interval examples such as 1m, 5m, 15m, 30m, 1h, 4h, 1d, and 1w.

Use Cases:

  • price charts;
  • historical analysis;
  • strategy research;
  • time-series exports.

Endpoints:

EndpointUse Сase
GetKlinesLoad candle data for charting, backtesting, or analytics.
GetOrderBookRetrieve a point-in-time order book snapshot.

Market Depth

Use GetOrderBook when you need a snapshot of bids and asks for a market. The request includes market_id, optional depth, and optional source. The response returns bid and ask levels, a timestamp, and the source used.

Use Cases:

  • rendering a read-only market depth view;
  • pre-trade analysis;
  • lightweight monitoring without opening a stream.

Endpoints:

EndpointUse Сase
GetKlinesRetrieve a point-in-time order book snapshot.

Streams

Use StreamPrices for live market data. The request accepts one or more market_ids and optional flags to include order book updates and trade updates in the stream. Stream messages include the market, price, optional bid and ask, optional volume, source, timestamp, and optional embedded order book or trade updates.

Use Cases:

  • live dashboards;
  • trading bots;
  • alerting systems;
  • continuously updated market views.

Endpoints:

EndpointUse Сase
StreamPricesSubscribe to real-time price updates, with optional order book and trade
updates.

Technical Analytics

Use GetPivotPoints when you need derived support and resistance levels. The request takes a market_id, a timeframe, and an optional source. The response can include classic, fibonacci, camarilla, woodie, and demark pivot calculations, along with a calculation timestamp.

Use Cases:

  • technical-analysis overlays;
  • signal generation;
  • trader-facing chart tools.

Endpoints:

EndpointUse Сase
GetPivotPointsGet calculated pivot levels for daily, weekly, or monthly analysis.

Example flow

A typical pricing flow looks like this:
  1. Choose a market such as CC-USDC.
  2. Call GetPrice for the latest price.
  3. Call GetKlines if you also need chart history.
  4. Call GetOrderBook if you need a current depth snapshot.
  5. Open StreamPrices if you need live updates.