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

> ## Agent Instructions
> To integrate AGG, start with Quickstart: REST (https://docs.agg.market/quickstart/rest), then Order lifecycle & statuses (https://docs.agg.market/concepts/order-lifecycle).
> Track every trade until it reaches a terminal status. Before retrying a failed or timed-out call, read Errors, retries & idempotency (https://docs.agg.market/concepts/errors).
> The API reference is generated from https://docs.agg.market/openapi/openapi.json.

# Identifiers

> Choose the correct identifiers for discovery, trading, charts, and durable cross-venue references.

| Job | Id | Not this |
| - | - | - |
| Join venues for this page | Anchor `id` from unfiltered `GET /venue-events` | `aggKey`, title |
| Store a venue event or market in a watchlist | `(venue, externalIdentifier)`, then re-resolve | The anchor id. Clusters merge |
| Fetch one contract when the key converges | `aggKey` | Elections, dated markets, null keys |
| Trade, chart, orderbook socket | `venueMarketOutcomeId` | `venueMarketId` |
| Midpoints and arb | `venueMarketId` | Outcome id |
| Durable partner user | HMAC `externalId` | Venue `externalIdentifier` |

Filtering `venue` plus `externalIdentifier` returns that member, not the anchor. List responses return one row per matched cluster, and for a matched event `id` is the anchor. Re-resolve it. Do not store it as a permanent key.

Hyperliquid HIP-4 books are also split by `deployerVenue`. See [Hyperliquid deployers](/recipes/hyperliquid-deployers).

<CodeGroup>
  ```ts SDK theme={null}
  const page = await client.getVenueEvents({ limit: 1 });
  const event = page.data[0];
  // event.id, event.externalIdentifier, event.aggKey, event.matchedVenueEvents
  ```

  ```bash cURL theme={null}
  curl -s -H "x-app-id: $APP_ID" "$API/venue-events?limit=1" \
    | jq '.data[0] | {id, externalIdentifier, aggKey, matchedVenueEvents}'
  ```
</CodeGroup>

Full shape on [List venue events](/api-reference/markets/list-venue-events). Markets for an event are [List venue markets](/api-reference/markets/list-venue-markets). One contract is [Look up venue market outcomes by external identifier](/api-reference/markets/look-up-venue-market-outcomes-by-external-identifier). `aggKey` as a filter is [aggKey](/recipes/agg-key).


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