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

# MarketService

> Trading pairs, candles, metadata, screener, funding, and perp market data

Package: `monaco.api.market`

Source: `protos/api/market.proto`

Use `MarketService` for public market data and perp market metadata.

```protobuf theme={null}
service MarketService {
  rpc ListTradingPairs(ListTradingPairsRequest) returns (ListTradingPairsResponse);
  rpc GetTradingPair(GetTradingPairRequest) returns (GetTradingPairResponse);
  rpc GetCandles(GetCandlesRequest) returns (GetCandlesResponse);
  rpc GetMarketMetadata(GetMarketMetadataRequest) returns (GetMarketMetadataResponse);
  rpc GetScreener(GetScreenerRequest) returns (GetScreenerResponse);
  rpc GetOpenInterest(GetOpenInterestRequest) returns (GetOpenInterestResponse);
  rpc GetFundingState(GetFundingStateRequest) returns (GetFundingStateResponse);
  rpc ListFundingHistory(ListFundingHistoryRequest) returns (ListFundingHistoryResponse);
  rpc ListAllFundingHistory(ListAllFundingHistoryRequest) returns (ListAllFundingHistoryResponse);
  rpc GetPerpMarketConfig(GetPerpMarketConfigRequest) returns (GetPerpMarketConfigResponse);
  rpc GetPerpMarketSummary(GetPerpMarketSummaryRequest) returns (GetPerpMarketSummaryResponse);
  rpc GetMarkPrice(GetMarkPriceRequest) returns (GetMarkPriceResponse);
  rpc GetIndexPrice(GetIndexPriceRequest) returns (GetIndexPriceResponse);
}
```

## Notes

* Market-data RPCs are public.
* Use `ListTradingPairs` to discover trading pair IDs before calling orderbook, trade, or order RPCs.
* An operator-managed market is excluded from `ListTradingPairs`, the pair detail reads, `GetScreener` and the public price RPCs until its durable runtime projection reaches live. `is_active` does not override that on either request: passing `false` surfaces delisted ordinary pairs, never a pending, warming or halted managed launch. A pair with no managed launch keeps its existing visibility.
* `ListFundingHistory` and `ListAllFundingHistory` are cursor-paginated: send an empty `page_token` to start, then each response's `next_page_token` until it comes back empty; `page_size` is 1 to 1000. There is no `page` field: a stub generated from an older proto that still sets it is not rejected (protobuf discards the unknown field) and reads the first page on every call, so regenerate stubs and walk the token.
* `TradingPairData.isolated_only` marks an isolated-only market: a `CROSS` order that is not reduce-only is `INVALID_ARGUMENT` with `ErrorInfo.reason` `CROSS_MARGIN_NOT_ALLOWED`.


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