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

# Get asset context for a coin

> Returns the asset context for a specific coin: funding rate, open interest, oracle/mark/mid prices, premium, volumes, and impact prices.

Data is kept current from our node's event stream and refreshed periodically from the Hyperliquid API.

Also accepts `type: "assetContext"` as an alias.



## OpenAPI

````yaml /live-data/openapi-rest.json post /info#metaAndAssetCtxs
openapi: 3.0.3
info:
  title: 'Hypedexer API: Live Data (REST)'
  version: 0.1.0
  description: >-
    REST API for real-time Hyperliquid market data served from our own
    Hyperliquid nodes.


    All data is accessed through a single unified endpoint `POST /info` that
    dispatches based on the `type` field in the JSON body.


    ## Request types


    | Type | Description | Handled |

    |------|-------------|----------|

    | `metaAndAssetCtxs` | Asset context (funding, OI, prices) | Locally (Redis
    cache) |

    | `allMids` | Mid prices for all coins | Locally (Redis cache) |

    | `userFills` / `userFillsByTime` | Fills for a specific user | Locally
    (volume files) |

    | `allFills` | All fills globally | Locally (volume files) |

    | `trades` | Trade data | Locally (volume files) |

    | `l2Book` / `l2Books` | L2 order book snapshot | Locally |

    | `availableDates` | Available data dates | Locally |

    | `clearinghouseState` | Clearinghouse state (single/multi-user) | Locally
    with upstream proxy per user |

    | `userFunding` / `accountFunding` | Funding payments of a user | Indexed
    history, returned unwrapped |

    | `userNonFundingLedgerUpdates` | Native ledger of a user: deposits,
    withdrawals, transfers, vaults, staking, borrow/lend | Indexed history,
    returned unwrapped |

    | `historicalOrders` | Latest orders of a user with their status | Indexed
    history, returned unwrapped |

    | `userTwapSliceFills` | Fills of a user's TWAP orders with their parent |
    Indexed history, returned unwrapped |

    | `fills` / `recentFills` | Indexed fills with filters (compact shape) |
    Indexed history, returned unwrapped; paging in `X-Has-More` /
    `X-Next-Cursor` headers |

    | `dataCoverage` | Start and latest timestamp per dataset | Indexed history
    |

    | `borrowLendReserveHistory` | Borrow/lend reserve history, one sample per
    minute | Indexed history, returned unwrapped |

    | `meta`, `spotMeta`, `openOrders`, ... | Proxied to local Hyperliquid node
    | Proxied to upstream |


    ## Authentication


    Optional. When `API_KEY` is configured on the server, all requests must
    include:

    ```

    Authorization: Bearer <API_KEY>

    ```


    ## Response format


    Most types return:

    ```json

    { "result": <data>, "cursor": null }

    ```


    `allMids` returns the result directly (not wrapped):

    ```json

    { "BTC": "66764.5", "ETH": "3421.2" }

    ```


    Proxied types return the upstream response as-is.
  contact:
    name: Hypedexer
servers:
  - url: https://api.hypedexer.com
    description: Production, routed to the nearest region (EU or JP)
security:
  - BearerAuth: []
tags:
  - name: Health
    description: Service health and info.
  - name: Asset Context
    description: >-
      Real-time asset context data: funding, open interest, oracle/mark/mid
      prices, volumes.
  - name: Mid Prices
    description: Mid prices for all coins, optionally filtered by DEX.
  - name: Fills
    description: >-
      Executed fills from the Hyperliquid fullnode volumes. Supports
      user-specific and global queries.
  - name: Trades
    description: Trade data from the fullnode volumes.
  - name: Order Book
    description: L2 order book snapshots.
  - name: Metadata
    description: Volume availability and data metadata.
  - name: Clearinghouse
    description: >-
      Clearinghouse state with multi-user support. Each user is fetched
      individually from the upstream Hyperliquid node.
  - name: Proxied Perpetuals
    description: >-
      Perpetual market metadata, margin, OI caps, DEX configs. Proxied to
      upstream Hyperliquid node.
  - name: Proxied Spot
    description: >-
      Spot market metadata, balances, and deploy state. Proxied to upstream
      Hyperliquid node.
  - name: Proxied Trading
    description: >-
      Orders, positions, and active asset data. Proxied to upstream Hyperliquid
      node.
  - name: Proxied Account
    description: >-
      User account info: fees, rate limits, sub-accounts, agents, roles. Proxied
      to upstream Hyperliquid node.
  - name: Proxied Vaults
    description: >-
      Vault summaries, equities, and leaderboards. Proxied to upstream
      Hyperliquid node.
  - name: Proxied Staking
    description: >-
      Delegations, staking summaries, and validator votes. Proxied to upstream
      Hyperliquid node.
  - name: Proxied Exchange
    description: >-
      Exchange status, liquidatable positions, web data. Proxied to upstream
      Hyperliquid node.
  - name: Account History
    description: >-
      Per-address history served from our index, in Hyperliquid's `info` shapes:
      funding payments, native ledger and orders.
  - name: Borrow/Lend
    description: >-
      History of Hyperliquid's borrow/lend reserves, sampled every minute from
      our own node.
  - name: Coverage
    description: >-
      What the index holds: per-dataset start and latest timestamp in the region
      answering.
paths:
  /info#metaAndAssetCtxs:
    post:
      tags:
        - Asset Context
      summary: Get asset context for a coin
      description: >-
        Returns the asset context for a specific coin: funding rate, open
        interest, oracle/mark/mid prices, premium, volumes, and impact prices.


        Data is kept current from our node's event stream and refreshed
        periodically from the Hyperliquid API.


        Also accepts `type: "assetContext"` as an alias.
      operationId: metaAndAssetCtxs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - type
                - coin
              properties:
                type:
                  type: string
                  enum:
                    - metaAndAssetCtxs
                    - assetContext
                coin:
                  type: string
                  description: Coin symbol
                  example: BTC
            example:
              type: metaAndAssetCtxs
              coin: BTC
      responses:
        '200':
          description: >-
            Asset context for the requested coin. Returns an empty context (all
            fields null) if no data is cached.
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: '#/components/schemas/AssetContext'
              example:
                result:
                  funding: '-0.0000056499'
                  openInterest: '27328.306520'
                  prevDayPx: '65633'
                  dayNtlVlm: '2290705901.9124403'
                  premium: '-0.0005538756'
                  oraclePx: '66802'
                  markPx: '66765'
                  midPx: '66764.5'
                  impactPxs:
                    - '66764'
                    - '66765'
                  dayBaseVlm: '34250.45488'
        '400':
          description: Missing `coin` parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: coin required
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
        - BearerAuth: []
components:
  schemas:
    AssetContext:
      type: object
      description: >-
        Asset context aligned with `metaAndAssetCtxs[1][i]` from the Hyperliquid
        API. Numeric values are strings to preserve precision. Fields are null
        when no data is available.
      properties:
        funding:
          type: string
          nullable: true
          description: Current funding rate
          example: '-0.0000056499'
        openInterest:
          type: string
          nullable: true
          description: Open interest (6 decimal places)
          example: '27328.306520'
        prevDayPx:
          type: string
          nullable: true
          description: Previous day price
          example: '65633'
        dayNtlVlm:
          type: string
          nullable: true
          description: Daily notional volume in USD
          example: '2290705901.9124403'
        premium:
          type: string
          nullable: true
          description: Premium rate
          example: '-0.0005538756'
        oraclePx:
          type: string
          nullable: true
          description: Oracle price
          example: '66802'
        markPx:
          type: string
          nullable: true
          description: Mark price
          example: '66765'
        midPx:
          type: string
          nullable: true
          description: Mid price (best bid + best ask / 2)
          example: '66764.5'
        impactPxs:
          type: array
          nullable: true
          items:
            type: string
          description: Impact prices [bid impact, ask impact]
          example:
            - '66764'
            - '66765'
        dayBaseVlm:
          type: string
          nullable: true
          description: Daily base volume
          example: '34250.45488'
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message
  responses:
    Unauthorized:
      description: >-
        Missing or invalid API key. The body is `missing api key` or `invalid
        api key`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Invalid API key
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your Hypedexer API key, sent as `Authorization: Bearer <key>`. The
        `X-API-Key: <key>` header and the `api_key` query parameter are accepted
        as well.

````

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