> ## 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><code>account\_id</code></td><td>STRING</td><td>Account as one key: <code>\{address}-\{chain\_id}</code>.</td></tr>
    <tr><td><code>chain\_id</code></td><td>STRING</td><td>Chain the edge happened on.</td></tr>
    <tr><td><code>address</code></td><td>STRING</td><td>The wallet: lowercase on EVM, verbatim base58 on Solana.</td></tr>
    <tr><td><code>venue\_project\_id</code></td><td>STRING</td><td>Venue on the other side of the edge, from <a href="/docs/catalog/accounts/registry">Accounts ▸ Registry</a>'s Venues tab.</td></tr>
    <tr><td><code>edge\_direction</code></td><td>STRING</td><td><code>to\_venue</code> or <code>from\_venue</code>.</td></tr>
    <tr><td><code>first\_edge\_at</code></td><td>TIMESTAMP</td><td>Time of the first contact between the wallet and the venue in this direction.</td></tr>
    <tr><td><code>first\_edge\_date</code></td><td>DATE</td><td>UTC date of <code>first\_edge\_at</code>. Partition column, by month.</td></tr>
    <tr><td><code>first\_transaction\_hash</code></td><td>STRING</td><td>Transaction that made the first contact.</td></tr>
    <tr><td><code>counterparty\_address</code></td><td>STRING</td><td>Venue-side address the wallet first touched.</td></tr>
    <tr><td><code>counterparty\_kind</code></td><td>STRING</td><td><code>anchor</code> for a registry-curated venue wallet, <code>deposit\_address</code> for a detected one.</td></tr>
    <tr><td><code>counterparty\_confidence</code></td><td>STRING</td><td><code>curated</code> or <code>detected</code>, matching <code>counterparty\_kind</code>.</td></tr>
    <tr><td><code>funding\_leg</code></td><td>STRING</td><td><code>erc20</code>, <code>spl</code> or <code>native</code>: the transfer leg the edge was observed on.</td></tr>
    <tr><td><code>wallet\_set\_version</code></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.
</Warning>

<Tabs>
  <Tab title="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
    ```
  </Tab>

  <Tab title="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
    ```
  </Tab>

  <Tab title="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
    ```
  </Tab>
</Tabs>


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