# Ramp Bank

Fetch business account transactions from Ramp.

## Setup

Use the same OAuth access token as [Ramp Card](https://docs.visigrid.app/connections/ramp-card/) with `transactions:read` scope.

```bash
export RAMP_ACCESS_TOKEN=ramp_...
```

## Usage

```bash
vgrid fetch ramp-bank --from 2026-01-01 --to 2026-02-01 --out ramp-bank.csv
```

## Options

| Flag | Description | Default |
|------|-------------|---------|
| `--from` | Start date inclusive (YYYY-MM-DD) | required |
| `--to` | End date exclusive (YYYY-MM-DD) | required |
| `--api-key` | Ramp access token | `RAMP_ACCESS_TOKEN` env |
| `--state` | Transaction state filter | `CLEARED` |
| `--entity` | Filter by entity ID | — |
| `--out` | Output CSV path | stdout |
| `-q` / `--quiet` | Suppress progress messages | off |

## Type mapping

| Amount | Canonical type |
|--------|----------------|
| >= 0 | `deposit` |
| < 0 | `withdrawal` |

## Date handling

- **`effective_date`** — `user_transaction_time` truncated to YYYY-MM-DD
- **`posted_date`** — `settlement_date` truncated to YYYY-MM-DD; falls back to `effective_date`

## Notes

**Description priority.** `merchant_name` > `memo` > `merchant_descriptor` (note: different order from Ramp Card).

**`source` field.** `ramp`.

**Pagination.** Cursor-based (`page.next`). Results are fetched in ascending date order.

**Sort order.** `effective_date` ascending, then `source_id` ascending.