> ## 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.

# onEventsCreatedByMaker

> Live-streamed transactions for a maker. Reference for the onEventsCreatedByMaker subscription in the Codex API: arguments, payload fields, and usage.

## GraphQL

```
type Subscription {
  # Requires a Growth or Enterprise plan.
  onEventsCreatedByMaker(
    input: OnEventsCreatedByMakerInput!
    commitmentLevel: [EventCommitmentLevel!]
  ): AddEventsByMakerOutput
}

enum EventCommitmentLevel {
  Processed
  Confirmed
}

enum EventType {
  Burn
  Mint
  Swap
  Sync
  Collect
  CollectProtocol
  PoolBalanceChanged
  LiquidityLock
}

type BurnEventData {
  amount0: String
  amount1: String
  amount0Shifted: String
  amount1Shifted: String
  tickLower: String
  tickUpper: String
  type: EventType!
}

type MintEventData {
  amount0: String
  amount1: String
  amount0Shifted: String
  amount1Shifted: String
  tickLower: String
  tickUpper: String
  type: EventType!
}

type SwapEventData {
  amount0: String
  amount0In: String
  amount0Out: String
  amount1: String
  amount1In: String
  amount1Out: String
  amountNonLiquidityToken: String
  priceBaseToken: String
  priceBaseTokenTotal: String
  priceUsd: String
  priceUsdTotal: String
  tick: String
  type: EventType!
}

type PoolBalanceChangedEventData {
  amount0: String
  amount1: String
  amount0Shifted: String
  amount1Shifted: String
  token0: String
  token1: String
  sender: String
  protocolFeeAmount0: String
  protocolFeeAmount1: String
  liquidity0: String
  liquidity1: String
  type: EventType!
}

union EventData = BurnEventData | MintEventData | SwapEventData | PoolBalanceChangedEventData

enum QuoteToken {
  token0
  token1
}

enum EventDisplayType {
  Burn
  Mint
  Buy
  Sell
  Sync
  Collect
  CollectProtocol
}

enum SandwichLabelForEventType {
  sandwiched
  frontrun
  backrun
}

type SandwichLabelForEvent {
  label: String!
  sandwichType: SandwichLabelForEventType!
  token0DrainedAmount: String!
  token1DrainedAmount: String!
}

type WashtradeLabelForEvent {
  label: String!
}

type LabelsForEvent {
  sandwich: SandwichLabelForEvent
  washtrade: WashtradeLabelForEvent
}

type PumpCashbackFeeData {
  type: String!
  cashbackFeeBps: Int!
  cashbackAmountLamports: String!
}

type PumpAmmCashbackFeeData {
  type: String!
  cashbackFeeBps: Int!
  cashbackAmountLamports: String!
}

type LiftHarvestFeeData {
  type: String!
  positionId: String!
  quoteAddress: String!
  creatorAddress: String
  quoteToCreator: String!
  quoteToTreasury: String!
  baseBurned: String!
}

type TollyCollectionFeeData {
  type: String!
  positionId: String!
  projectToken: String!
  quoteCollectedRaw: String!
  tokenBurnedRaw: String!
  tollyBuybackRaw: String!
  projectBuybackRaw: String!
  projectBuybackAccruedRaw: String!
  holderRewardsRaw: String!
  protocolRaw: String!
  creatorPaidRaw: String!
  creatorAccruedRaw: String!
}

union SupplementalFeeData = PumpCashbackFeeData | PumpAmmCashbackFeeData | LiftHarvestFeeData | TollyCollectionFeeData

type EventFeeData {
  poolFeeRateRaw: String
  poolFeeBps: Float
  poolFeeAmountRaw: String
  dynamicFee: Boolean
  estimatedPoolFee: Boolean
  baseFeeNativeUnit: String
  priorityFeeNativeUnit: String
  gasUsed: String
  poolFeeCurrencyIndex: Int
  protocolFeeCurrencyIndex: Int
  builderTipNativeUnit: String
  l1DataFeeNativeUnit: String
  txEventCount: Int
  supplementalFeeData: SupplementalFeeData
}

type TradeSource {
  id: String!
  displayName: String
}

type CurrencyUnits {
  currency0: String!
  currency1: String!
  decimals0: Int!
  decimals1: Int!
}

type Event {
  address: String!
  commitmentLevel: EventCommitmentLevel!
  baseTokenPrice: String
  blockHash: String!
  blockNumber: Int!
  data: EventData
  eventType: EventType!
  id: String!
  liquidityToken: String
  logIndex: Int!
  maker: String
  networkId: Int!
  quoteToken: QuoteToken
  timestamp: Int!
  token0Address: String
  token1Address: String
  token0SwapValueUsd: String
  token1SwapValueUsd: String
  token0ValueBase: String
  token1ValueBase: String
  token0PoolValueUsd: String
  token1PoolValueUsd: String
  transactionHash: String!
  transactionIndex: Int!
  supplementalIndex: Int
  eventDisplayType: EventDisplayType
  labels: LabelsForEvent
  feeData: EventFeeData
  walletAge: Int
  walletLabels: [String!]
  tradeSource: TradeSource
  currencyUnits: CurrencyUnits
}

type AddEventsByMakerOutput {
  makerAddress: String!
  events: [Event!]!
}

input OnEventsCreatedByMakerInput {
  makerAddress: String!
}
```

### Example

[Test this query in the Explorer →](https://docs.codex.io/explore.md)

```graphql theme={null}
subscription {
  onEventsCreatedByMaker(
    input: { makerAddress: "J8hVkBNKobntWqLspa3yhXEkvb8vZ9S9NiHgirN9yvV3" }
  ) {
    makerAddress
    events {
      eventType
      eventDisplayType
      timestamp
      blockNumber
      transactionHash
      networkId
      address
      maker
      token0Address
      token1Address
      token0SwapValueUsd
      token1SwapValueUsd
      token0ValueBase
      token1ValueBase
      walletAge
      walletLabels
      labels {
        sandwich {
          label
          sandwichType
          token0DrainedAmount
          token1DrainedAmount
        }
      }
    }
  }
}
```

```json Example Response theme={null}
{
  "data": {
    "onEventsCreatedByMaker": {
      "makerAddress": "J8hVkBNKobntWqLspa3yhXEkvb8vZ9S9NiHgirN9yvV3",
      "events": [
        {
          "eventType": "Swap",
          "eventDisplayType": "Buy",
          "timestamp": 1769622047,
          "blockNumber": 396527811,
          "transactionHash": "c12WGJgSjYABk345TJQmwCFKLAT7224X9tdQVRB75V2s7Nj8hJ1XEEvWJQJRhPBakmdEsSHhmr967xtrNGF3V4a",
          "networkId": 1399811149,
          "address": "51FQwjrvo8J8zXUaKyAznJ5NYpoiTCuqAqCu3HAMB9NZ",
          "maker": "J8hVkBNKobntWqLspa3yhXEkvb8vZ9S9NiHgirN9yvV3",
          "token0Address": "So11111111111111111111111111111111111111112",
          "token1Address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
          "token0SwapValueUsd": "126.074294911024962403570893805582229",
          "token1SwapValueUsd": "0.999689999999999405153188113680867388",
          "token0ValueBase": "1",
          "token1ValueBase": "0.0079291516542248836",
          "walletAge": 4420687,
          "walletLabels": [
            "BOT_V2"
          ],
          "labels": {
            "sandwich": null
          }
        }
      ]
    }
  }
}
```

### Usage Guidelines

* Subscribe with `makerAddress` to stream all transactions made by a specific wallet in real-time
* Events are streamed across **all pairs and tokens** — not scoped to a single pair or network
* Each event includes the `address` (pair address) and `networkId` so you can identify which pair/network the trade occurred on
* The `Event` type is the same as returned by `onEventsCreated`, including swap values, wallet metadata, and sandwich detection labels
* Use this to build wallet-following features, copy-trading bots, or real-time alerts for specific traders
* Each event can include a `tradeSource` identifying the app the trade was placed through (swaps on Solana and EVM networks; null for most events, since most trades carry no identifying signal) — see [Trade source](https://docs.codex.io/recipes/events.md#trade-source)

### Troubleshooting Tips

> [accordion] How does this differ from onEventsCreated?
>
> `onEventsCreated` streams events for a specific pair or all pairs on a network. `onEventsCreatedByMaker` streams events for a specific wallet across all pairs and networks. Use this when you want to follow a trader's activity regardless of which tokens they're trading.

> [accordion] Can I filter by network or token?
>
> No. This subscription streams all events for the wallet across all networks and pairs. Filter client-side if you only want events for specific tokens or networks using the `networkId` and `token0Address`/`token1Address` fields.

> [accordion] What event types are included?
>
> All event types are included: `Swap`, `Mint`, `Burn`, `Sync`, `Collect`, `CollectProtocol`. Most wallet-tracking use cases focus on `Swap` events — filter by `eventType` or `eventDisplayType` (`Buy`/`Sell`) as needed.

> [accordion] Is there rate limiting or volume concerns?
>
> High-activity wallets (like market makers or bots) may produce many events per second. Consider whether you need all events or can sample/filter client-side. For very high-volume wallets, you may want to batch or throttle your processing.

### Related Recipes

* [Events](https://docs.codex.io/recipes/events.md): Build a token swap list with filtering, pagination, and real-time updates


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