> For the complete documentation index, see [llms.txt](https://docs.raybot.app/start/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.raybot.app/start/dev/webhooks-api/example-payloads/evm-buy.md).

# EVM — Buy

Example webhook payload for a followed EVM wallet buying a token with ETH.

`event_type: buy` · `chain: base`

A followed wallet buys a token with ETH on Base through Uniswap's Universal Router. ETH spent is reported under the WETH mint. `position.is_new_position: true` marks the wallet's first buy of this token; position values are denominated in the chain's native currency.

`event.transfers.events` lists every low-level transfer in the transaction: the token arriving in the wallet, ETH going from the wallet to the router, the router paying the pool, and the unspent ETH refunded to the wallet. The first entry, with the zero address as both `mintIn` and `from`, is Uniswap v4 crediting the pool's hook contract with an internal ETH balance; it doesn't touch the wallet. `amountIn`/`amountOut` on the `event` are exact raw integer strings.

```json
{
  "id": "0x3333333333333333333333333333333333333333333333333333333333333333",
  "event_type": "buy",
  "timestamp": "2026-09-19T15:36:21.112Z",
  "chain": "base",
  "failed": false,
  "source": "base",
  "fee_payer": "0xdddddddddddddddddddddddddddddddddddddddd",
  "followed_wallets": [
    {
      "address": "0xdddddddddddddddddddddddddddddddddddddddd",
      "wallet_name": "evm buy"
    }
  ],
  "token_changes": [
    {
      "address": "0xdddddddddddddddddddddddddddddddddddddddd",
      "direction": "out",
      "mint": "0x4200000000000000000000000000000000000006",
      "amount_raw": "3821874729230627",
      "amount": 0.003821874729230627,
      "price_usd": 2639.855,
      "value_usd": 10.089195113333117
    },
    {
      "address": "0xdddddddddddddddddddddddddddddddddddddddd",
      "direction": "in",
      "mint": "0x1ea8deb921aa6015f4938010c848140b98108dd2",
      "amount_raw": "124397617766367000000",
      "amount": 124.397617766367,
      "price_usd": 0.081104407741005,
      "value_usd": 10.089195113333117
    }
  ],
  "tokens": {
    "0x4200000000000000000000000000000000000006": {
      "symbol": "WETH",
      "name": "WrappedEther",
      "decimals": 18,
      "price_usd": 2639.855,
      "supply": 174162.18485612498,
      "created": "2025-04-22T20:40:18.373Z",
      "image": null,
      "socials": {
        "twitter": null,
        "telegram": null,
        "website": null
      }
    },
    "0x1ea8deb921aa6015f4938010c848140b98108dd2": {
      "symbol": "vAPI",
      "name": "vAPI Network",
      "decimals": 18,
      "price_usd": 0.081104407741005,
      "supply": 66261232.156495154,
      "created": null,
      "image": null,
      "socials": {
        "twitter": null,
        "telegram": null,
        "website": null
      }
    }
  },
  "position": {
    "side": "buy",
    "is_new_position": true,
    "is_closed": false,
    "total_quantity": 124.397617766367,
    "average_cost_basis": 0.0000307230540090289,
    "current_price": 0.0000307230540090289,
    "total_invested": 0.0038218747292306267,
    "realized_pnl": 0,
    "unrealized_pnl": 0
  },
  "fees": {
    "priority_fee": 0.00000111672,
    "jito_tip": 0,
    "total_tip": 0
  },
  "event": {
    "txid": "0x3333333333333333333333333333333333333333333333333333333333333333",
    "account": "0xdddddddddddddddddddddddddddddddddddddddd",
    "source": "BASE",
    "type": "buy",
    "mintIn": "0x4200000000000000000000000000000000000006",
    "mintOut": "0x1ea8deb921aa6015f4938010c848140b98108dd2",
    "amountIn": "3821874729230627",
    "amountOut": "124397617766367007944",
    "transfers": {
      "type": "transfer",
      "mintIn": "0x0000000000000000000000000000000000000000",
      "mintOut": null,
      "from": "0x0000000000000000000000000000000000000000",
      "to": "0xe92d9b14d10d0f523d98a535de318e17c2053ad0",
      "amountIn": 114656241876918,
      "amountOut": null,
      "chain": "base",
      "standard": "ERC20",
      "events": [
        {
          "type": "transfer",
          "mintIn": "0x0000000000000000000000000000000000000000",
          "mintOut": null,
          "from": "0x0000000000000000000000000000000000000000",
          "to": "0xe92d9b14d10d0f523d98a535de318e17c2053ad0",
          "amountIn": 114656241876918,
          "amountOut": null,
          "chain": "base",
          "standard": "ERC20"
        },
        {
          "type": "transfer",
          "mintIn": "0x1ea8deb921aa6015f4938010c848140b98108dd2",
          "mintOut": null,
          "from": "0x498581ff718922c3f8e6a244956af099b2652b2b",
          "to": "0xdddddddddddddddddddddddddddddddddddddddd",
          "amountIn": "124397617766367007944",
          "amountOut": null,
          "chain": "base",
          "standard": "ERC20"
        },
        {
          "type": "transfer",
          "mintIn": "0x4200000000000000000000000000000000000006",
          "mintOut": null,
          "from": "0xdddddddddddddddddddddddddddddddddddddddd",
          "to": "0x6ff5693b99212da76ad316178a184ab56d299b43",
          "amountIn": "3860093476522933",
          "amountOut": null,
          "chain": "base",
          "standard": "native"
        },
        {
          "type": "transfer",
          "mintIn": "0x4200000000000000000000000000000000000006",
          "mintOut": null,
          "from": "0x6ff5693b99212da76ad316178a184ab56d299b43",
          "to": "0x498581ff718922c3f8e6a244956af099b2652b2b",
          "amountIn": "3821874729230627",
          "amountOut": null,
          "chain": "base",
          "standard": "native"
        },
        {
          "type": "transfer",
          "mintIn": "0x4200000000000000000000000000000000000006",
          "mintOut": null,
          "from": "0x6ff5693b99212da76ad316178a184ab56d299b43",
          "to": "0xdddddddddddddddddddddddddddddddddddddddd",
          "amountIn": "38218747292306",
          "amountOut": null,
          "chain": "base",
          "standard": "native"
        }
      ],
      "signer": "0xdddddddddddddddddddddddddddddddddddddddd",
      "hasSpoofed": false
    },
    "valueIn": 0.003821874729230627,
    "valueOut": 124.397617766367
  }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.raybot.app/start/dev/webhooks-api/example-payloads/evm-buy.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
