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

# getPerpPosition

> Read an account's open position on one Hyperliquid perpetual market.

A transaction carrying `hyperCore.closePerp` does this read itself and is
rejected when there is nothing to close, so this is the check to make before
offering a close at all.

## Import

```ts theme={null}
import { getPerpPosition } from '@rhinestone/sdk/hypercore'
```

## Usage

```ts theme={null}
const position = await getPerpPosition(account.getAddress(), 'BTC')
if (position) {
  // offer a close
}
```

## Parameters

<ParamField path="account" type="`0x${string}`" required>
  the account holding the position
</ParamField>

<ParamField path="asset" type="string" required>
  ticker as Hyperliquid names it, e.g. `BTC`
</ParamField>

<ParamField path="options" type="HyperliquidConfig">
  where to reach Hyperliquid's info endpoint
</ParamField>

## Returns

<ResponseField name="perpPosition" type="PerpPosition | null">
  the position, or `null` when the account has none open on that asset
</ResponseField>

## See also

* [getPerpPositions](/sdk-reference/hyper-core/get-perp-positions)
