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

> ## Agent Instructions
> To query the Token Terminal data catalog, read https://tokenterminal.com/docs/catalog/agents-manual.md first. It is the whole catalog as one page: table naming grammar, key columns, partition and cluster rules, units, additivity, and the tables that are documented but not served yet.
> Never query a catalog table on a time bound alone. Also filter its cluster key, which you read from INFORMATION_SCHEMA.COLUMNS; an empty result means the object is a view, whose pruning contract is on its page. Compute is billed to the caller's own Google Cloud project.

# Venue edges

> Every first contact between a wallet and a venue, curated or detected.

One row per wallet, venue and edge direction: the first contact between them, to the venue or from it. `first_transaction_hash` names the transaction the edge was first observed in.

## Columns

<table>
  <thead>
    <tr>
      <th width="230">Column</th>
      <th width="120">Type</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`account_id`</td><td>STRING</td><td>Account as one key: `{address}-{chain_id}`.</td></tr>
    <tr><td>`chain_id`</td><td>STRING</td><td>Chain the edge happened on.</td></tr>
    <tr><td>`address`</td><td>STRING</td><td>The wallet: lowercase on EVM, verbatim base58 on Solana.</td></tr>
    <tr><td>`venue_project_id`</td><td>STRING</td><td>Venue on the other side of the edge, from [Accounts ▸ Registry](https://tokenterminal.com/docs/catalog/accounts/registry.md)'s Venues tab.</td></tr>
    <tr><td>`edge_direction`</td><td>STRING</td><td>`to_venue` or `from_venue`.</td></tr>
    <tr><td>`first_edge_at`</td><td>TIMESTAMP</td><td>Time of the first contact between the wallet and the venue in this direction.</td></tr>
    <tr><td>`first_edge_date`</td><td>DATE</td><td>UTC date of `first_edge_at`. Partition column, by month.</td></tr>
    <tr><td>`first_transaction_hash`</td><td>STRING</td><td>Transaction that made the first contact.</td></tr>
    <tr><td>`counterparty_address`</td><td>STRING</td><td>Venue-side address the wallet first touched.</td></tr>
    <tr><td>`counterparty_kind`</td><td>STRING</td><td>`anchor` for a registry-curated venue wallet, `deposit_address` for a detected one.</td></tr>
    <tr><td>`counterparty_confidence`</td><td>STRING</td><td>`curated` or `detected`, matching `counterparty_kind`.</td></tr>
    <tr><td>`funding_leg`</td><td>STRING</td><td>`erc20`, `spl` or `native`: the transfer leg the edge was observed on.</td></tr>
    <tr><td>`wallet_set_version`</td><td>INT64</td><td>Fingerprint of the venue's anchor set the edge was matched under.</td></tr>
  </tbody>
</table>

## Sample queries

> [!WARNING]
>
> This table is large and split by month. Bound `first_edge_date` and filter `address` and `chain_id` on every query, or you read the whole table and the whole table is billed to you.

**One wallet's edges**

`address` and `chain_id` together are the cluster key, so filtering both reads only this wallet's blocks; `first_edge_date` still bounds the months scanned.

```sql theme={null}
select
    venue_project_id,
    edge_direction,
    first_edge_at,
    counterparty_kind
from `facts_accounts.venue_edges`
where address = '0x7240234c7bf954cd7fc6323c38bbf6e6e4355e52'
  and chain_id = 'ethereum'
  and first_edge_date >= date('2024-01-01')
  and first_edge_date < date('2025-06-01')
order by first_edge_at
```

**New edges per chain, one month**

`edge_direction` splits deposits into a venue from withdrawals out of it, so grouping on it alongside `chain_id` reads both directions apart.

```sql theme={null}
select
    chain_id,
    edge_direction,
    count(*) as edges
from `facts_accounts.venue_edges`
where first_edge_date >= date('2026-08-01')
  and first_edge_date < date('2026-09-01')
group by chain_id, edge_direction
order by edges desc
```

**Curated versus detected edges, one venue**

`venue_project_id` joins `dimensions.venues` for the display name; `counterparty_kind` is the same split `facts_accounts.funding`'s `funding_venue_source` reads off the earliest edge.

```sql theme={null}
select
    venues.name,
    edges.counterparty_kind,
    count(*) as edge_count
from `facts_accounts.venue_edges` as edges
join `dimensions.venues` as venues
    on edges.venue_project_id = venues.venue_project_id
where edges.chain_id = 'ethereum'
  and edges.first_edge_date >= date('2026-08-01')
  and edges.first_edge_date < date('2026-09-01')
group by venues.name, edges.counterparty_kind
order by edge_count desc
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.