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

# EventLabel

> Metadata for an event label. Reference for the EventLabel type in the Codex API: every field, its type, and the operations that return it.

## GraphQL

```
type EventLabel {
  data: EventLabelData!
  id: String!
  label: EventLabelType!
  logIndex: Int!
  networkId: Int!
  timestamp: Int!
  transactionIndex: Int!
  transactionHash: String!
}

type FrontRunLabelData {
  index: Int
  token0DrainedAmount: String!
  token1DrainedAmount: String!
}

type SandwichedLabelData {
  token0DrainedAmount: String
  token1DrainedAmount: String
}

union EventLabelData = FrontRunLabelData | SandwichedLabelData

enum EventLabelType {
  FrontRun
  Sandwiched
}
```

### Used By

**Returned by**

* [getEventLabels](https://docs.codex.io/api-reference/queries/geteventlabels.md): Returns a list of event labels for a pair.
* [onEventLabelCreated](https://docs.codex.io/api-reference/subscriptions/oneventlabelcreated.md): Live-streamed event labels for a token.


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