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

# Get a position

> Returns your open position in one market.



## OpenAPI

````yaml /openapi.yaml get /v1/positions/{symbol}
openapi: 3.1.0
info:
  title: Trading API
  license:
    name: Proprietary
    identifier: LicenseRef-Proprietary
  version: '1'
  summary: Trade perpetual futures on Hyperliquid with plain HTTP requests.
  description: >
    The Trading API places market orders on Hyperliquid perpetual futures and
    reports your

    positions, fills and balance. You never sign anything, manage nonces or look
    up asset

    indexes: send a market, a side and a value in US dollars.


    Every request authenticates with an API key created on the account page:

    `Authorization: Bearer tapi_…`.
servers:
  - url: https://tradingapi.dev
    description: Production. Orders trade real money on Hyperliquid mainnet.
security:
  - apiKey: []
tags:
  - name: Markets
    description: The markets you can trade, with their rules and current prices.
  - name: Orders
    description: Place, preview, list and look up orders.
  - name: Positions
    description: Your open positions, and closing them.
  - name: Account
    description: Your balance, the calling key, fills and withdrawals.
paths:
  /v1/positions/{symbol}:
    get:
      tags:
        - Positions
      summary: Get a position
      description: Returns your open position in one market.
      operationId: getPosition
      parameters:
        - $ref: '#/components/parameters/MarketSymbol'
      responses:
        '200':
          description: The position.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Position'
              examples:
                long:
                  $ref: '#/components/examples/PositionLong'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: >-
            `position_not_found` when you have no position in this market;
            `market_not_found` for an unknown symbol.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/Unavailable'
components:
  parameters:
    MarketSymbol:
      name: symbol
      in: path
      required: true
      description: >-
        A market symbol from `GET /v1/markets`, for example `BTC` or `TSLA`.
        Case-insensitive.
      schema:
        type: string
  schemas:
    Position:
      type: object
      required:
        - object
        - market
        - direction
        - size
        - value
        - entry_price
        - price
        - unrealized_pnl
        - liquidation_price
        - funding_since_open
        - summary
      properties:
        object:
          type: string
          const: position
        market:
          type: string
        direction:
          type: string
          enum:
            - long
            - short
        size:
          type: string
          description: Always positive; `direction` gives the side.
        value:
          type: string
          description: '`size` × `price`, in USD.'
        entry_price:
          type: string
          description: The average price of the position.
        price:
          type: string
          description: The current mark price.
        unrealized_pnl:
          type: string
          description: Profit or loss if the position closed at `price`, in USD.
        liquidation_price:
          type:
            - string
            - 'null'
          description: >-
            The price at which the position would be liquidated. Positions are
            1×, so it is far away.
        funding_since_open:
          type: string
          description: >-
            Funding paid (negative) or received (positive) since the position
            opened, in USD.
        summary:
          type: string
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/Error'
    Error:
      type: object
      required:
        - type
        - code
        - message
        - param
        - hint
        - details
        - errors
        - retryable
        - doc_url
      properties:
        type:
          type: string
          enum:
            - invalid_request
            - authentication
            - permission
            - not_found
            - conflict
            - unprocessable
            - rate_limited
            - unavailable
            - internal
          description: The kind of error. It determines the HTTP status.
        code:
          type: string
          description: >-
            A stable identifier for the error. Branch on this. New codes may be
            added.
        message:
          type: string
          description: What was wrong, with the values involved.
        param:
          type:
            - string
            - 'null'
          description: The request field at fault, as a JSON path, or `null`.
        hint:
          type:
            - string
            - 'null'
          description: One concrete way to fix the request.
        details:
          type: object
          description: The numbers and values the message refers to, as fields.
          additionalProperties: true
        errors:
          type: array
          description: Every field error, when `code` is `invalid_fields`. Empty otherwise.
          items:
            $ref: '#/components/schemas/Error'
        retryable:
          type: boolean
          description: Whether the same request can succeed later, unchanged.
        retry_after:
          $ref: '#/components/schemas/Timestamp'
          description: When a retry can succeed, if known.
        doc_url:
          type: string
          format: uri
    Timestamp:
      type: string
      format: date-time
      description: >-
        RFC 3339 in UTC with milliseconds, for example
        `2026-09-27T14:30:00.123Z`.
  examples:
    PositionLong:
      summary: A BTC long
      value:
        object: position
        market: BTC
        direction: long
        size: '0.0692'
        value: '5815.21'
        entry_price: '83938.1'
        price: '84034.9'
        unrealized_pnl: '6.70'
        liquidation_price: '1049.2'
        funding_since_open: '-0.42'
        summary: >-
          Long 0.0692 BTC ($5,815.21), up $6.70 since an average entry of
          $83,938.10.
  responses:
    Unauthorized:
      description: No valid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            invalid_api_key:
              value:
                error:
                  type: authentication
                  code: invalid_api_key
                  message: This API key is not valid. It may have been revoked.
                  param: null
                  hint: >-
                    Send a current key as Authorization: Bearer tapi_…. Keys are
                    created and revoked on the account page.
                  details: {}
                  errors: []
                  retryable: false
                  doc_url: >-
                    https://docs.tradingapi.dev/api-reference/errors#invalid_api_key
    RateLimited:
      description: >-
        The key made too many requests. Each key may make 10 requests at once,
        then 5 a second. Nothing was done; retry after `Retry-After` seconds.
      headers:
        Retry-After:
          description: The seconds to wait before retrying, always `1`.
          schema:
            type: string
            enum:
              - '1'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            rate_limited:
              value:
                error:
                  type: rate_limited
                  code: rate_limited
                  message: This key made too many requests; retry in 1 s.
                  param: null
                  hint: >-
                    Slow down: each key may make 10 requests at once, then 5 a
                    second.
                  details: {}
                  errors: []
                  retryable: true
                  retry_after: '2026-09-28T14:05:12.000Z'
                  doc_url: >-
                    https://docs.tradingapi.dev/api-reference/errors#rate_limited
    Unavailable:
      description: A service we depend on failed. Retry the same request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            unavailable:
              value:
                error:
                  type: unavailable
                  code: unavailable
                  message: The exchange could not be reached.
                  param: null
                  hint: >-
                    Retry the same request with the same client_order_id; an
                    order may already have been recorded.
                  details: {}
                  errors: []
                  retryable: true
                  doc_url: https://docs.tradingapi.dev/api-reference/errors#unavailable
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: tapi_…
      description: >-
        An API key from the account page, sent as `Authorization: Bearer
        tapi_…`.

````