Skip to main content

Quoting Price

There are 2 primary ways to get a quote from an Angstrom pool: our RFQ API, or by subscribing to slot0 pool updates via Angstrom API and manually quoting. The latter provides more granular control over simulation as it allows you to simulate any output amount given any input amount, enabling complex multi-hop quotes and custom routing strategies that may not be available through the standard RFQ API.

Quoting via Slot0

Angstrom pools are functionally the same as any V4 pool so either use your own managed V4 pool state tracker, or our angstrom-v4 library, to track on-chain pool state of Angstrom pools via UniswapV4. This methodology is recommended for more fine-grained control over the pool state.

  1. Subscribe to the subscribeAmm websocket endpoint on an Angstrom node/s. This will stream inter-block updates to the current parameters of a pool anytime it changes through our orderbook (100ms updates).
  2. Update the pools as needed, and continuously simulate via the V4 Pool Manager.
    • Note: See the simulation section below.

Note: You can see an example of leveraging this using our angstrom-v4 library here.

Quoting via the RFQ API

See RFQ API

Angstrom pools are locked by default at the beginning of each block and require unlocking before general access. The RFQ API handles this complexity by providing:

  • Frontrun component: An encoded Angstrom bundle, if there exists one for the block, or nothing if not.
  • Backrun component: Your encoded swap transaction that executes, via the V4 router, with the unlock attestation encoded in the hook data, if there is no bundle.

This two-step process ensures your transaction executes successfully by guaranteeing the pool is unlocked before your swap attempts to access it. If you're submitting transactions to participating builders like Titan or BTCS, they will automatically handle the ordering to ensure proper execution.

  • Returns executable calldata containing a 'frontrun' Angstrom bundle or pool unlock attestation, and a 'backrun' swap (quoted off user inputs) on the Uniswap universal router.
  • Guarantees pool state post bundle/unlock-attestation execution for a SINGLE block
  • Not recommended to use if you require a multi-block guarantee

See Also

The Angstrom-V4 library can automatically manage pool state in real time.