---
title: "GetMarketIdByName"
method: POST
path: "/market_service.v1.MarketService/GetMarketIdByName"
tags: ["Markets"]
---

# GetMarketIdByName

`POST /market_service.v1.MarketService/GetMarketIdByName`

Resolves an asset/quote symbol pair to its numeric market ID.
 `asset_symbol` is required and fails with `INVALID_ARGUMENT` if
 blank; an unknown asset/quote combination returns `NOT_FOUND`.

## Headers

- `Connect-Protocol-Version` 1, required — Define the version of the Connect protocol. If omitted, use 1.
- `Connect-Timeout-Ms` number — Define the timeout, in ms

## Request body

- MarketServiceV1GetMarketIdByNameRequest
  - `assetSymbol` string, required — Underlying asset symbol, e.g. `"BTC"`. Matched case-insensitively and trimmed.
  - `quoteSymbol` string, nullable — Quote symbol, e.g. `"PERP"`. Optional, but omitting it looks up a market named exactly by `assetSymbol` alone (e.g. `"BTC"`) rather than `"BTC-PERP"`, which may not resolve to any real market.

## Response `200`

Success

- MarketServiceV1GetMarketIdByNameResponse
  - `marketId` string, int64 — Resolved on-chain market identifier.

---

[API](https://skmtc.net/fairground/apis/fairground-fi-api.md) · [All operations](https://skmtc.net/fairground/apis/fairground-fi-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/fairground/fairground-fi-api/revisions/be66e6dc0ac0/schema)
