# Markets

### Retrieve All Markets Info

Use this endpoint to fetch information about all available markets, including trading pairs, status, and configuration details.

`GET`  `https://perps-api-mainnet.polynomial.finance/markets`

#### Headers&#x20;

| Name         | Value                                                                                                                   |
| ------------ | ----------------------------------------------------------------------------------------------------------------------- |
| Content-Type | application/json                                                                                                        |
| Accept       | application/json                                                                                                        |
| x-api-key    | [#backend-api-key](https://docs.polynomial.fi/developer-documentation/introduction#backend-api-key "mention")(optional) |

#### Response

```json
[
  {
    "chainId": 8008,
    "markets": [
      {
        "marketId": "100",
        "symbol": "ETH",
        "skew": "-816032563610058179",
        "price": 2751.21510528,
        "currentOI": "171613599036410749027",
        "currentFundingRate": "398350812914667",
        "currentFundingVelocity": "-73442930724900",
        "makerFeeRatio": "200000000000000",
        "takerFeeRatio": "500000000000000",
        "skewScale": "100000000000000000000000",
        "maxMarketSize": "890600000000000000000",
        "maxMarketValue": "2440000000000000000000000",
        "tradesCount24h": 179,
        "tradesVolume24h": 1424621.5226680883,
        "price24HrAgo": 2762.8500625,
        "longOI": "85398783236400345424.00",
        "shortOI": "86214815800010403603.00",
        "currentSkew": "-816032563610058179",
        "positiveSkew": "49.76",
        "negativeSkew": "50.24",
        "availableLiquidityLong": "2205049577587482924536081",
        "availableLiquidityShort": "2202804496472078570026277",
        "currentFundingRate1HInPercentage": "1659795053811113",
        "currentFundingRate8HInPercentage": "13278360430488900",
        "currentFundingRate1YInPercentage": "14539804671385345500",
        "currentInterestRate1HInPercentage": "0",
        "currentInterestRate8HInPercentage": "0",
        "currentInterestRate1YInPercentage": "0",
        "netLongFundingRate1HInPercentage": "-1659795053811113",
        "netLongFundingRate8HInPercentage": "-13278360430488900",
        "netLongFundingRate1YInPercentage": "-14539804671385345500",
        "netShortFundingRate1HInPercentage": "1659795053811113",
        "netShortFundingRate8HInPercentage": "13278360430488900",
        "netShortFundingRate1YInPercentage": "14539804671385345500"
      }
      ...
    ]
  }
]

```

### Retrieve Single Market Info

Use this endpoint to fetch information about a particular market.

`GET`  `https://perps-api-mainnet.polynomial.finance/markets/<market_id>?chainId=<chain_id>`

#### Headers&#x20;

| Name         | Value                                                                                                                   |
| ------------ | ----------------------------------------------------------------------------------------------------------------------- |
| Content-Type | application/json                                                                                                        |
| Accept       | application/json                                                                                                        |
| x-api-key    | [#backend-api-key](https://docs.polynomial.fi/developer-documentation/introduction#backend-api-key "mention")(optional) |
| market\_id   | You can find market id from markets api response. [#retrieve-all-markets-info](#retrieve-all-markets-info "mention")    |
| chain\_id    | 8008 (mainnet) [addresses](https://docs.polynomial.fi/developer-documentation/api/addresses "mention")                  |

#### Response

```json
{
  "marketId": "100",
  "symbol": "ETH",
  "skew": "45546282374751452350",
  "price": 2424.36710185,
  "currentOI": "71301371035630763614",
  "currentFundingRate": "-62676311217304",
  "currentFundingVelocity": "4099165413727626",
  "makerFeeRatio": "200000000000000",
  "takerFeeRatio": "500000000000000",
  "skewScale": "100000000000000000000000",
  "maxMarketSize": "998240000000000000000",
  "maxMarketValue": "2440000000000000000000000",
  "tradesCount24h": 199,
  "tradesVolume24h": 1488494.92316207,
  "price24HrAgo": 2418.4,
  "longOI": "58423826705191107982.00",
  "shortOI": "12877544330439655632.00",
  "currentSkew": "45546282374751452350",
  "positiveSkew": "81.94",
  "negativeSkew": "18.06",
  "availableLiquidityLong": "2278459412322493199191288",
  "availableLiquidityShort": "2388880320923411113339136",
  "currentFundingRate1HInPercentage": "-261151296738767",
  "currentFundingRate8HInPercentage": "-2089210373910133",
  "currentFundingRate1YInPercentage": "-2287685359431596000",
  "currentInterestRate1HInPercentage": "0",
  "currentInterestRate8HInPercentage": "0",
  "currentInterestRate1YInPercentage": "0",
  "netLongFundingRate1HInPercentage": "261151296738767",
  "netLongFundingRate8HInPercentage": "2089210373910133",
  "netLongFundingRate1YInPercentage": "2287685359431596000",
  "netShortFundingRate1HInPercentage": "-261151296738767",
  "netShortFundingRate8HInPercentage": "-2089210373910133",
  "netShortFundingRate1YInPercentage": "-2287685359431596000"
}
```

### Response Fields

| Variable                            | Description                                                                                                                   |
| ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `marketId`                          | Unique identifier for the market                                                                                              |
| `symbol`                            | Trading symbol of the asset                                                                                                   |
| `skew`                              | Current market skew (imbalance between long and short open interest). *18 decimals*                                           |
| `price`                             | Current [Index price](https://docs.polynomial.fi/developer-documentation/price#index-price) of the asset                      |
| `currentOI`                         | Total current Open Interest. *18 decimals*                                                                                    |
| `currentFundingRate`                | Current funding rate. [Details](https://docs.polynomial.fi/trade/trade/perp/funding-rate/funding-on-polynomial)               |
| `currentFundingVelocity`            | Rate of change of the funding rate. [Details](https://docs.polynomial.fi/trade/trade/perp/funding-rate/funding-on-polynomial) |
| `makerFeeRatio`                     | Fee ratio applied to makers                                                                                                   |
| `takerFeeRatio`                     | Fee ratio applied to takers                                                                                                   |
| `skewScale`                         | Scale used to normalize market skew. Usage [example](https://docs.polynomial.fi/developer-documentation/price#market-price)   |
| `maxMarketSize`                     | Maximum allowed open interest for this market.  *18 decimals*                                                                 |
| `maxMarketValue`                    | Maximum notional value allowed in the market                                                                                  |
| `tradesCount24h`                    | Number of trades in the last 24 hours                                                                                         |
| `tradesVolume24h`                   | Trading volume in the last 24 hours                                                                                           |
| `price24HrAgo`                      | Price of the asset 24 hours ago                                                                                               |
| `longOI`                            | Open interest held by long positions.  *18 decimals*                                                                          |
| `shortOI`                           | Open interest held by short positions.  *18 decimals*                                                                         |
| `currentSkew`                       | Skew between long and short open interest                                                                                     |
| `positiveSkew`                      | Percentage of long positions                                                                                                  |
| `negativeSkew`                      | Percentage of short positions                                                                                                 |
| `availableLiquidityLong`            | Available liquidity for opening long positions                                                                                |
| `availableLiquidityShort`           | Available liquidity for opening short positions                                                                               |
| `currentFundingRate1HInPercentage`  | Funding rate over the last 1 hour.  *18 decimals*                                                                             |
| `currentFundingRate8HInPercentage`  | Funding rate over the last 8 hours.  *18 decimals*                                                                            |
| `currentFundingRate1YInPercentage`  | Funding rate over the last year.  *18 decimals*                                                                               |
| `currentInterestRate1HInPercentage` | 0                                                                                                                             |
| `currentInterestRate8HInPercentage` | 0                                                                                                                             |
| `currentInterestRate1YInPercentage` | 0                                                                                                                             |
| `netLongFundingRate1HInPercentage`  | Net funding rate paid by longs over 1 hour.  *18 decimals*                                                                    |
| `netLongFundingRate8HInPercentage`  | Net funding rate paid by longs over 8 hours.  *18 decimals*                                                                   |
| `netLongFundingRate1YInPercentage`  | Net funding rate paid by longs over 1 year.  *18 decimals*                                                                    |
| `netShortFundingRate1HInPercentage` | Net funding rate received by shorts over 1 hour.  *18 decimals*                                                               |
| `netShortFundingRate8HInPercentage` | Net funding rate received by shorts over 8 hours.  *18 decimals*                                                              |
| `netShortFundingRate1YInPercentage` | Net funding rate received by shorts over 1 year.  *18 decimals*                                                               |
