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

# Market data

> Discover connected exchange markets and query raw quotes or bounded candles.

All market-data operations require `marketdata:read` and use your connected exchanges. They are available on Free, Plus and Pro subject to connected-resource eligibility.

## Discover a market

Use `GET /market-data/markets` or MCP `list_markets` to discover CCXT unified symbols, market classifications, precision and limits. Specify a connected `venue`; a market lookup does not read your balances or positions.

```bash theme={null}
curl 'https://api.portfobit.com/api/v1/market-data/markets?venue=bybit&type=swap&base=BTC&settle=USDT&linear=true&limit=50' \
  -H 'Authorization: Bearer <PORTFOBIT_OPEN_API_KEY>'
```

| Classification | Meaning |
| - | - |
| `spot` | Spot market. |
| `swap` | Perpetual contract. |
| `future` | Expiring futures contract. |
| `option` | Option; inspect `expiry`, `strike` and `option_type`. |

`margin` is a separate market capability flag. `linear` / `inverse` and `settle` distinguish contract structures and settlement currencies. Exchange-native categories are normalized; the API does not forward raw exchange parameters.

Filters combine with AND. Omitted filters include inactive and unknown states; explicit boolean filters do not match null. Results are ordered by unified symbol, with `limit` (default 50, maximum 100) and `offset` (default 0). `meta.total` counts filtered markets. No match or an offset beyond the end returns `data: []`.

`id` is the exchange-native identifier and may overlap across market types. Use `symbol`, such as `BTC/USDT` or `BTC/USDT:USDT`, for the quote and candle tools. Discovery does not grant account trading permissions or guarantee that an order will be accepted.

## Metadata time and precision

The directory reads cached market definitions for the specified exchange without forcing a refresh. `meta.markets_loaded_at` reports when the definitions used for this response were loaded, or null if that time is unknown. `meta.generated_at` is when the response was generated.

Results may not include every regional or delisted market. Requests can use different connected sources at the same exchange, so the directory and its load time may differ between pages. If the directory changes, restart pagination at offset zero.

Read precision together with `precision_mode`:

| Mode | Interpretation |
| - | - |
| `tick_size` | Precision increment. |
| `decimal_places` | Number of decimal positions, represented as a string. |
| `significant_digits` | Significant-digit precision, represented as a string. |
| `null` | Unknown mode; do not guess how to apply the precision values. |

CCXT can return negative integer precision values in applicable modes. Precision is separate from minimum and maximum order limits. In particular, `limits.amount.min` is not a quantity step. Known zero is `"0"`; unknown bounds and inapplicable fields are null, and a null maximum does not mean unlimited.

## Query prices and candles

After choosing a unified symbol, call MCP `get_market_quote` / `list_market_candles`, or `GET /market-data/quote` / `GET /market-data/candles`. Both make bounded direct requests to one connected CEX; they do not use the market-directory response as a price source.

These raw venue quotes/candles are separate from Portfobit's internal portfolio valuation prices. Source, timestamp and currency must be comparable before using one to check the other.

See the generated REST reference for all request parameters, response fields and errors. Market discovery itself requires no confirmation, trading OTP or idempotency key. Any subsequent protected trade still requires its own explicit authorization and server checks.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.