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

# Database

> Uniswap Trading API local sync: searchable entities, `.search()` filters, and operators.

The Uniswap Trading API plugin syncs data locally. Use `corsair.uniswapapi.db.<entity>.search({ data, limit?, offset? })` with the filters listed per entity.

<Info>
  **New to Corsair?** See [database operations](/concepts/database), [data synchronization](/concepts/integrations), and [multi-tenancy](/concepts/multi-tenancy).
</Info>

## Approval

Path: `uniswapapi.db.approval.search`

```ts theme={null}
const rows = await corsair.uniswapapi.db.approval.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field            | Type      | Operators                                  |
| ---------------- | --------- | ------------------------------------------ |
| `entity_id`      | `string`  | equals, contains, startsWith, endsWith, in |
| `walletAddress`  | `string`  | equals, contains, startsWith, endsWith, in |
| `token`          | `string`  | equals, contains, startsWith, endsWith, in |
| `amount`         | `string`  | equals, contains, startsWith, endsWith, in |
| `chainId`        | `number`  | equals, gt, gte, lt, lte, in               |
| `approvalNeeded` | `boolean` | equals                                     |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](/concepts/database).*

***

## Gasless Order

Path: `uniswapapi.db.gaslessOrder.search`

```ts theme={null}
const rows = await corsair.uniswapapi.db.gaslessOrder.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field         | Type     | Operators                                  |
| ------------- | -------- | ------------------------------------------ |
| `entity_id`   | `string` | equals, contains, startsWith, endsWith, in |
| `orderId`     | `string` | equals, contains, startsWith, endsWith, in |
| `orderHash`   | `string` | equals, contains, startsWith, endsWith, in |
| `orderStatus` | `string` | equals, contains, startsWith, endsWith, in |
| `chainId`     | `number` | equals, gt, gte, lt, lte, in               |
| `swapper`     | `string` | equals, contains, startsWith, endsWith, in |
| `txHash`      | `string` | equals, contains, startsWith, endsWith, in |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](/concepts/database).*

***

## Quote

Path: `uniswapapi.db.quote.search`

```ts theme={null}
const rows = await corsair.uniswapapi.db.quote.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field             | Type     | Operators                                  |
| ----------------- | -------- | ------------------------------------------ |
| `entity_id`       | `string` | equals, contains, startsWith, endsWith, in |
| `requestId`       | `string` | equals, contains, startsWith, endsWith, in |
| `quoteId`         | `string` | equals, contains, startsWith, endsWith, in |
| `tokenIn`         | `string` | equals, contains, startsWith, endsWith, in |
| `tokenOut`        | `string` | equals, contains, startsWith, endsWith, in |
| `tokenInChainId`  | `number` | equals, gt, gte, lt, lte, in               |
| `tokenOutChainId` | `number` | equals, gt, gte, lt, lte, in               |
| `amountIn`        | `string` | equals, contains, startsWith, endsWith, in |
| `amountOut`       | `string` | equals, contains, startsWith, endsWith, in |
| `swapper`         | `string` | equals, contains, startsWith, endsWith, in |
| `gasEstimate`     | `string` | equals, contains, startsWith, endsWith, in |
| `gasFeeUSD`       | `string` | equals, contains, startsWith, endsWith, in |
| `gasFeeQuote`     | `string` | equals, contains, startsWith, endsWith, in |
| `routeString`     | `string` | equals, contains, startsWith, endsWith, in |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](/concepts/database).*

***

## Swap Status

Path: `uniswapapi.db.swapStatus.search`

```ts theme={null}
const rows = await corsair.uniswapapi.db.swapStatus.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field       | Type     | Operators                                  |
| ----------- | -------- | ------------------------------------------ |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |
| `txHash`    | `string` | equals, contains, startsWith, endsWith, in |
| `chainId`   | `number` | equals, gt, gte, lt, lte, in               |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](/concepts/database).*

***

## Token

Path: `uniswapapi.db.token.search`

```ts theme={null}
const rows = await corsair.uniswapapi.db.token.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field        | Type     | Operators                                  |
| ------------ | -------- | ------------------------------------------ |
| `entity_id`  | `string` | equals, contains, startsWith, endsWith, in |
| `chainId`    | `number` | equals, gt, gte, lt, lte, in               |
| `address`    | `string` | equals, contains, startsWith, endsWith, in |
| `decimals`   | `number` | equals, gt, gte, lt, lte, in               |
| `symbol`     | `string` | equals, contains, startsWith, endsWith, in |
| `name`       | `string` | equals, contains, startsWith, endsWith, in |
| `buyFeeBps`  | `string` | equals, contains, startsWith, endsWith, in |
| `sellFeeBps` | `string` | equals, contains, startsWith, endsWith, in |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](/concepts/database).*

***
