---
updatedAt: 2025-09-09T22:47:52.000Z
agentTools:
  projectIndex: https://docs.brink.trade/llms.txt
---

# price

Allows solvers to execute a segment transaction based on a token pair price

The price condition uses a [Uniswap V3 TWAP](https://blog.uniswap.org/uniswap-v3-oracles#what-is-twap) value to determine the price of Token A relative to Token B.

# Schema

<Table align={["left","left","left"]}>
  <thead>
    <tr>
      <th style={{ textAlign: "left" }}>
        Property
      </th>

      <th style={{ textAlign: "left" }}>
        Required
      </th>

      <th style={{ textAlign: "left" }}>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td style={{ textAlign: "left" }}>
        `type`
      </td>

      <td style={{ textAlign: "left" }}>
        Yes
      </td>

      <td style={{ textAlign: "left" }}>
        `"price"`
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        `price`
      </td>

      <td style={{ textAlign: "left" }}>
        Yes
      </td>

      <td style={{ textAlign: "left" }}>
        A price value. Expects a positive floating point number.  

        This should be a price for the [market pair](https://mankenavenkatesh.medium.com/what-is-a-market-pair-base-vs-quote-currency-32f3193c36f6) `tokenA/tokenB` where `tokenA` is the base token and `tokenB` is the quote token. For example, a `WETH/USDC` price would be `1502.75`, and a `USDC/WETH` price would be `0.000665`
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        `operator`
      </td>

      <td style={{ textAlign: "left" }}>
        Yes
      </td>

      <td style={{ textAlign: "left" }}>
        Can be `gt`(greater than) or `lt`(less than)
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        `tokenA`
      </td>

      <td style={{ textAlign: "left" }}>
        Yes
      </td>

      <td style={{ textAlign: "left" }}>
        Address of the first token in the pair
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        `tokenB`
      </td>

      <td style={{ textAlign: "left" }}>
        Yes
      </td>

      <td style={{ textAlign: "left" }}>
        Address of the second token in the pair
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        `twapInterval`
      </td>

      <td style={{ textAlign: "left" }}>
        No
      </td>

      <td style={{ textAlign: "left" }}>
        The TWAP interval to use in seconds. Default is 1000.
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        `twapFeePool`
      </td>

      <td style={{ textAlign: "left" }}>
        No
      </td>

      <td style={{ textAlign: "left" }}>
        The TWAP fee pool to use. Expects a Uniswap [FeeAmount](https://docs.uniswap.org/sdk/v3/reference/enums/FeeAmount). Default is 3000.
      </td>
    </tr>
  </tbody>
</Table>

# Examples

```javascript
// for WETH/USDC
{
  type: 'price',
  operator: 'lt',
  tokenA: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', // WETH
  tokenB: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // USDC
  price: 1502.75
}

// for USDC/WETH
{
  type: 'price',
  operator: 'lt',
  tokenA: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // USDC
  tokenB: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', // WETH
  price: 0.000665
}
```