> ## Documentation Index
> Fetch the complete documentation index at: https://docs.silvana.one/llms.txt
> Use this file to discover all available pages before exploring further.

# Pricing API

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:

| **Endpoint** | **Use Сase**                                                 |
| :----------- | :----------------------------------------------------------- |
| `GetPrice`   | Get the latest price for a single market, such as `CC-USDC`. |
| `GetPrices`  | Fetch 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:

| **Endpoint**   | **Use Сase**                                              |
| :------------- | :-------------------------------------------------------- |
| `GetKlines`    | Load candle data for charting, backtesting, or analytics. |
| `GetOrderBook` | Retrieve 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:

| **Endpoint** | **Use Сase**                                  |
| :----------- | :-------------------------------------------- |
| `GetKlines`  | Retrieve 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:

| **Endpoint**   | **Use Сase**                                                                            |
| :------------- | :-------------------------------------------------------------------------------------- |
| `StreamPrices` | Subscribe to real-time price updates, with optional order book and trade <br />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:

| **Endpoint**     | **Use Сase**                                                        |
| :--------------- | :------------------------------------------------------------------ |
| `GetPivotPoints` | Get 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.
