> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://sdk.railnet.org/api/mcp` to find what you need.

# useVehicleManagerLimits

Reads a multi vehicle's auto-fulfill threshold, withdrawal buffer and deposit cap in one multicall, as
a TanStack Query result.

## Import

```ts
import { useVehicleManagerLimits } from '@railnetorg/railnet-sdk/react'
```

## Usage

```tsx
import { useVehicleManagerLimits } from '@railnetorg/railnet-sdk/react'
import { formatUnits } from 'viem'

export function LimitsPanel({ vehicleManager }: { vehicleManager: Address }) {
  const { data: limits, isPending } = useVehicleManagerLimits({ vehicleManager })

  if (isPending || !limits) return <Skeleton />

  const uncapped = limits.maxTotalAssets === 2n ** 256n - 1n

  return (
    <dl>
      <dt>Deposit cap</dt>
      <dd>{uncapped ? 'none' : formatUnits(limits.maxTotalAssets, decimals)}</dd>
      <dt>Withdrawal buffer</dt>
      <dd>{formatUnits(limits.extraAssetsForWithdrawalRequests, decimals)}</dd>
    </dl>
  )
}
```

`maxTotalAssets` and `minSharesForAutoFulfill` use `2n ** 256n - 1n` as their no-limit value.
[`getVehicleManagerLimits`](/actions/getVehicleManagerLimits) gives the units of each field.

## Returns

A TanStack Query result over `VehicleManagerLimits`, with its `queryKey` attached.

## Parameters

### vehicleManager

* **Type:** `Address`

### chainId (optional)

* **Type:** `number`
* **Default:** the connected chain

### enabled (optional)

* **Type:** `boolean`
* **Default:** `true`

## Query options

[`vehicleManagerLimitsQueryOptions`](/react/queryOptions) is this read as TanStack Query options, with
`vehicleManagerLimitsQueryKey` and `vehicleManagerLimitsQueryPrefix` for invalidation.

```ts
import { vehicleManagerLimitsQueryOptions } from '@railnetorg/railnet-sdk/react'

await queryClient.prefetchQuery(vehicleManagerLimitsQueryOptions(client, parameters))
```
