> ## Documentation Index
> Fetch the complete documentation index at: https://vastai-80aa3a82-auto-cli-sdk-preview-pr-398.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# VastAI.fetch_contracts

Fetch contracts, optionally filtered by label.

## Signature

```python theme={null}
VastAI.fetch_contracts(
    label: Optional[str] = None,
    contract_ids: Optional[list] = None
) -> list
```

## Parameters

<ParamField path="label" type="Optional[str]" />

<ParamField path="contract_ids" type="Optional[list]" />

## Returns

`list`

## Example

```python theme={null}
from vastai import VastAI

client = VastAI(api_key="YOUR_API_KEY")
result = client.fetch_contracts()
print(result)
```
