---
title: GET /v1/markets/{id}
---

# `GET /v1/markets/{id}`

Get a market

One market with its current quote.

Money, price, rate and count fields cross the wire as decimal strings; units are shown beside each field ([Wire encoding](/api/wire-encoding)). Group: [Markets](/api/reference/markets/).

**Auth:** none (public)

**Effect:** `read`: reads only

## Parameters

- <span id="param-id"></span>`id` (path) · string · required

## Request

```bash [curl]
curl -fsS "$HB/v1/markets/$ID"
```

```python [Python]
import os

import requests

HB = os.environ.get("HB", "https://testnet.hardbasis.com")
ID = os.environ["ID"]

resp = requests.get(
    f"{HB}/v1/markets/{ID}",
)
resp.raise_for_status()
print(resp.json())
```

```ts [TypeScript]
const HB = process.env.HB ?? "https://testnet.hardbasis.com";
const ID = process.env.ID!;

const res = await fetch(`${HB}/v1/markets/${ID}`, {
  method: "GET",
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
console.log(await res.json());
```

## Responses

- **200**: OK
  - <span id="res-200-marketId"></span>`marketId` · string · required
  - <span id="res-200-underlying"></span>`underlying` · string · required
  - <span id="res-200-contractType"></span>`contractType` · enum(`inverse`, `quanto`, `linear_sats`) · required
  - <span id="res-200-oracleFeedId"></span>`oracleFeedId` · string · required
  - <span id="res-200-quantoMultiplierMsat"></span>`quantoMultiplierMsat` · string \| null · unit `msat` · required
  - <span id="res-200-shareScale"></span>`shareScale` · string \| null · optional
  - <span id="res-200-status"></span>`status` · enum(`live`, `reduce_only`, `halted`) · required
  - <span id="res-200-tickSizeQ8"></span>`tickSizeQ8` · string · unit `q8` · required
  - <span id="res-200-priceDp"></span>`priceDp` · string · unit `int` · required
  - <span id="res-200-minOrderContracts"></span>`minOrderContracts` · string · unit `contracts` · required
  - <span id="res-200-maxOrderContracts"></span>`maxOrderContracts` · string · unit `contracts` · required
  - <span id="res-200-takerFeeQ9"></span>`takerFeeQ9` · string · unit `q9` · required
  - <span id="res-200-maxLeverage"></span>`maxLeverage` · string · unit `int` · required
  - <span id="res-200-imRateQ9"></span>`imRateQ9` · string · unit `q9` · required
  - <span id="res-200-mmRateQ9"></span>`mmRateQ9` · string · unit `q9` · required
  - <span id="res-200-baseSpreadQ9"></span>`baseSpreadQ9` · string · unit `q9` · required
  - <span id="res-200-fundingRateHourlyQ9"></span>`fundingRateHourlyQ9` · string · unit `q9` · required
  - <span id="res-200-nextFundingTsMs"></span>`nextFundingTsMs` · string · unit `ms` · required
  - <span id="res-200-session"></span>`session` · object \| null · optional
  - <span id="res-200-oracleStalenessMs"></span>`oracleStalenessMs` · string · unit `ms` · required
  - <span id="res-200-openInterestContracts"></span>`openInterestContracts` · string · unit `contracts` · required
  - <span id="res-200-skewQ9"></span>`skewQ9` · string · unit `q9` · required
  - <span id="res-200-lastPrice"></span>`lastPrice` · object \| null · required
  - <span id="res-200-fundingInterestTerm"></span>`fundingInterestTerm` · enum(`configured`, `none_by_contract_type`) · optional
  - <span id="res-200-indexSource"></span>`indexSource` · string · optional
  - <span id="res-200-indexStaleLegs"></span>`indexStaleLegs` · enum(`equity`, `btc`, `both`) \| null · optional
  - <span id="res-200-indexLegTsMs"></span>`indexLegTsMs` · object \| null · optional

Example `200` response:

```json
{
  "marketId": "string",
  "underlying": "string",
  "contractType": "inverse",
  "oracleFeedId": "string",
  "quantoMultiplierMsat": "100000",
  "shareScale": "string",
  "status": "live",
  "tickSizeQ8": "100000",
  "priceDp": "100000",
  "minOrderContracts": "100000",
  "maxOrderContracts": "100000",
  "takerFeeQ9": "100000",
  "maxLeverage": "100000",
  "imRateQ9": "100000",
  "mmRateQ9": "100000",
  "baseSpreadQ9": "100000",
  "fundingRateHourlyQ9": "100000",
  "nextFundingTsMs": "100000",
  "session": {
    "open": true,
    "changesAtTsMs": "100000"
  },
  "oracleStalenessMs": "100000",
  "openInterestContracts": "100000",
  "skewQ9": "100000",
  "lastPrice": {
    "midQ8": "100000",
    "tsMs": "100000"
  },
  "fundingInterestTerm": "configured",
  "indexSource": "string",
  "indexStaleLegs": "equity",
  "indexLegTsMs": {
    "equity": "100000",
    "btc": "100000"
  }
}
```

## Errors

Every refusal carries a stable `code` from [`ErrorCode`](/api/reference/all#errorcode) beside human `error` prose; match on the code. See [Errors](/api/errors).

- **404**: A refusal carrying a stable machine `code` (ErrorCode) beside human `error` prose.
