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

# Get Markets

> Get all active trading markets with comprehensive market data including prices, funding rates, open interest, and volume metrics

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.strike.markets/markets"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.strike.markets/markets');
  const markets = await response.json();

  console.log('Available markets:', markets);
  ```

  ```python Python theme={null}
  import requests

  response = requests.get('https://api.strike.markets/markets')
  markets = response.json()

  print('Available markets:', markets)
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "markets": [
      {
        "symbol": "BTC-USD",
        "price": "98742.50",
        "longOi": "1250000.75",
        "shortOi": "1180000.25",
        "totalOi": "2430001.00",
        "longFundingRateHourly": "0.000125",
        "shortFundingRateHourly": "-0.000075",
        "volumeUsd24h": "45250000.50",
        "volumeUsdTotal": "2150000000.75",
        "skew": "0.0287"
      },
      {
        "symbol": "ETH-USD",
        "price": "3485.20",
        "longOi": "850000.50",
        "shortOi": "920000.75",
        "totalOi": "1770001.25",
        "longFundingRateHourly": "-0.000050",
        "shortFundingRateHourly": "0.000100",
        "volumeUsd24h": "28750000.25",
        "volumeUsdTotal": "1420000000.50",
        "skew": "-0.0394"
      },
      {
        "symbol": "SOL-USD",
        "price": "245.75",
        "longOi": "320000.25",
        "shortOi": "285000.50",
        "totalOi": "605000.75",
        "longFundingRateHourly": "0.000075",
        "shortFundingRateHourly": "-0.000025",
        "volumeUsd24h": "12500000.00",
        "volumeUsdTotal": "580000000.25",
        "skew": "0.0579"
      },
      {
        "symbol": "BNB-USD",
        "price": "692.15",
        "longOi": "180000.00",
        "shortOi": "175000.25",
        "totalOi": "355000.25",
        "longFundingRateHourly": "0.000025",
        "shortFundingRateHourly": "-0.000015",
        "volumeUsd24h": "6750000.50",
        "volumeUsdTotal": "285000000.75",
        "skew": "0.0141"
      },
      {
        "symbol": "XRP-USD",
        "price": "2.35",
        "longOi": "95000.75",
        "shortOi": "110000.25",
        "totalOi": "205001.00",
        "longFundingRateHourly": "-0.000030",
        "shortFundingRateHourly": "0.000065",
        "volumeUsd24h": "4200000.25",
        "volumeUsdTotal": "195000000.50",
        "skew": "-0.0732"
      },
      {
        "symbol": "HYPE-USD",
        "price": "28.50",
        "longOi": "45000.25",
        "shortOi": "38000.75",
        "totalOi": "83001.00",
        "longFundingRateHourly": "0.000150",
        "shortFundingRateHourly": "-0.000100",
        "volumeUsd24h": "1850000.75",
        "volumeUsdTotal": "72000000.25",
        "skew": "0.0843"
      }
    ],
    "count": 6
  }
  ```
</ResponseExample>

## Overview

Get comprehensive data for all active trading markets on Strike Protocol, including current prices, funding rates, open interest, and volume metrics. This endpoint provides everything needed to understand market conditions and make informed trading decisions.

<Note>
  This endpoint does NOT require authentication and provides real-time market data for all users.
</Note>

## Response Fields

<ResponseField name="markets" type="array">
  Array of available trading markets with comprehensive market data

  <Expandable title="Market Properties">
    <ResponseField name="symbol" type="string">
      Trading pair identifier (e.g., "BTC-USD", "ETH-USD", "SOL-USD", "BNB-USD", "XRP-USD", "HYPE-USD")
    </ResponseField>

    <ResponseField name="price" type="string">
      Current mark price derived from HyperLiquid's price feed. Used for PnL calculations, liquidation triggers, and position sizing.
    </ResponseField>

    <ResponseField name="longOi" type="string">
      Total USD value of long open interest in the market
    </ResponseField>

    <ResponseField name="shortOi" type="string">
      Total USD value of short open interest in the market
    </ResponseField>

    <ResponseField name="totalOi" type="string">
      Combined USD value of long and short open interest (longOi + shortOi)
    </ResponseField>

    <ResponseField name="longFundingRateHourly" type="string">
      Hourly funding rate for long positions. Positive values mean longs pay funding, negative values mean longs receive funding.
    </ResponseField>

    <ResponseField name="shortFundingRateHourly" type="string">
      Hourly funding rate for short positions. Positive values mean shorts pay funding, negative values mean shorts receive funding.
    </ResponseField>

    <ResponseField name="volumeUsd24h" type="string">
      Total USD trading volume in the last 24 hours
    </ResponseField>

    <ResponseField name="volumeUsdTotal" type="string">
      Total USD trading volume since market inception
    </ResponseField>

    <ResponseField name="skew" type="string">
      Open interest skew calculated as (longOi - shortOi) / totalOi. Positive values indicate more long OI, negative values indicate more short OI.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="count" type="integer">
  Total number of available markets
</ResponseField>

## Market Data Details

### Mark Price

The mark price is derived from HyperLiquid's price feed and used for:

* **PnL calculations**: Determining unrealized profit/loss
* **Liquidation triggers**: Comparing against liquidation prices
* **Position sizing**: Calculating position values
* **Fee calculations**: Basis for trading fees

### Asymmetric Funding Rates

Strike Protocol uses an innovative asymmetric funding system:

#### How It Works

* **Different rates**: Long and short positions may have different funding rates
* **OI-based**: Rates determined by open interest imbalance
* **Balancing mechanism**: Encourages balance between long/short positions
* **Zero gas**: Completely off-chain, no transaction costs

#### Rate Interpretation

* **Positive rate**: Position pays funding to the other side
* **Negative rate**: Position receives funding from the other side
* **Magnitude**: Higher absolute values indicate greater imbalance

#### Example Scenarios

**Long-Heavy Market** (More long than short OI):

```
Long Rate: +0.000125 (longs pay funding)
Short Rate: -0.000075 (shorts receive funding)
```

**Short-Heavy Market** (More short than long OI):

```
Long Rate: -0.000050 (longs receive funding)  
Short Rate: +0.000100 (shorts pay funding)
```

### Open Interest Analysis

#### Market Balance

```
OI Imbalance = |Long OI - Short OI| / Total OI
```

* **Balanced market**: Imbalance \< 20%
* **Moderate imbalance**: 20% - 40%
* **High imbalance**: > 40%

#### Liquidity Indicators

* **High total OI**: Indicates active, liquid market
* **Balanced OI**: Suggests healthy two-sided interest
* **Growing OI**: May indicate increasing volatility

### Volume Metrics

24-hour volume provides insights into:

* **Market activity**: Higher volume = more active trading
* **Liquidity depth**: Volume relative to OI
* **Interest trends**: Growing or declining activity
* **Volatility potential**: High volume often precedes price moves

## Error Responses

<ResponseField name="503 Service Unavailable" type="object">
  Market data service temporarily unavailable

  ```json theme={null}
  {
    "error": 503,
    "message": "Market data service temporarily unavailable"
  }
  ```
</ResponseField>

## Performance Considerations

### Caching Strategy

Market data changes frequently but not constantly:

```javascript theme={null}
class MarketDataCache {
  constructor(ttl = 5000) { // 5 second TTL
    this.data = null;
    this.timestamp = 0;
    this.ttl = ttl;
  }
  
  async getMarkets() {
    const now = Date.now();
    
    if (this.data && (now - this.timestamp) < this.ttl) {
      return this.data;
    }
    
    const response = await fetch('https://api.strike.markets/markets');
    const data = await response.json();
    
    this.data = data;
    this.timestamp = now;
    
    return data;
  }
  
  invalidate() {
    this.data = null;
    this.timestamp = 0;
  }
}
```

## Related Endpoints

* **[Get Funding Rates](/api-reference/market-data/funding-rates)** - Detailed funding rate data for specific markets
* **[Get Open Interest](/api-reference/market-data/open-interest)** - Detailed OI breakdown for specific markets
* **[Get Positions](/api-reference/positions/get-positions)** - See how your positions relate to market conditions
* **[Dashboard](/api-reference/account/dashboard)** - View your account in context of current markets

<Tip>
  Use this endpoint as your primary market data source. The consolidated view makes it perfect for market overviews, trading dashboards, and market selection algorithms.
</Tip>

<Info>
  Market data is updated in real-time from HyperLiquid price feeds. Funding rates and open interest are calculated continuously based on current protocol state.
</Info>


## OpenAPI

````yaml GET /markets
openapi: 3.1.0
info:
  title: Strike Protocol API
  description: >-
    Strike Protocol is a perpetual futures trading platform that allows users to
    trade with leverage (1-1000x) on various crypto assets. This API provides
    access to trading operations, account management, market data, analytics,
    and user systems.
  version: 1.0.0
  contact:
    name: Strike Protocol
    url: https://strike.markets
  license:
    name: MIT
servers:
  - url: https://api.strike.markets
    description: Production server
security:
  - apiKeyAuth: []
paths:
  /markets:
    get:
      summary: Get Markets
      description: >-
        Get all active trading markets with comprehensive market data including
        prices, funding rates, open interest, and volume metrics
      operationId: getMarkets
      responses:
        '200':
          description: Markets retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketsResponse'
      security: []
components:
  schemas:
    MarketsResponse:
      type: object
      properties:
        markets:
          type: array
          items:
            $ref: '#/components/schemas/MarketResponse'
          description: Array of available trading markets with comprehensive market data
        count:
          type: integer
          description: Total number of available markets
    MarketResponse:
      type: object
      properties:
        symbol:
          type: string
          description: Trading pair identifier (e.g., BTC-USD, ETH-USD)
        price:
          type: string
          description: Current mark price derived from HyperLiquid's price feed
          nullable: true
        longOi:
          type: string
          description: Total USD value of long open interest
          nullable: true
        shortOi:
          type: string
          description: Total USD value of short open interest
          nullable: true
        totalOi:
          type: string
          description: Combined USD value of long and short open interest
          nullable: true
        longFundingRateHourly:
          type: string
          description: Hourly funding rate for long positions
          nullable: true
        shortFundingRateHourly:
          type: string
          description: Hourly funding rate for short positions
          nullable: true
        volumeUsd24h:
          type: string
          description: Total USD trading volume in the last 24 hours
          nullable: true
        volumeUsdTotal:
          type: string
          description: Total USD trading volume since market inception
          nullable: true
        skew:
          type: string
          description: Open interest skew calculated as (longOi - shortOi) / totalOi
          nullable: true
      required:
        - symbol
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Strike Protocol API key authentication

````