DEX Spot Price vs Execution Price
Compare a pool’s marginal spot price with the price realised by a trade, including trade size, price impact, fees and unit conversion.

Overview
When translating these concepts into an integration, keep the scope described by the wallet history api with the result. The examples in wallet transaction history and smart contract event logs show how the same distinction affects neighbouring data questions.
A pool’s displayed spot price does not promise the same average execution price for a finite trade. Market-data applications should name which price they are showing and how it was calculated.
Define the observation
Spot price describes a marginal relationship at a state point. Execution price compares actual input and output quantities for a trade. Fees and a changing liquidity curve can separate the two. Always record base and quote asset identities, decimal scales and the block or event context instead of storing an untyped numeric price.
Worked example: an average differs
A displayed marginal price is two quote units per base unit. A trade spends twenty-one quote units and receives ten base units after the relevant execution costs. Its realised average is 2.1 quote per base. Calling both observations simply price hides a difference that directly affects a trading or valuation decision.
Keep comparisons compatible
Specify whether execution price includes pool fees, network fees or other deductions. A native-currency network fee should not be added to a quote amount without a conversion method. Test reversed pairs, small quantities and trades spanning multiple pools. Route-level execution and an individual pool’s spot observation should remain separate records.
A practical acceptance test
Provide a marginal pool observation and a finite trade with a different average price. Assert separate price-type labels and compatible base/quote units. Add a native network fee without a conversion price: the integration should not add that raw quantity directly to quote consideration. A missing conversion should leave total-cost valuation partial rather than inventing a rate.
Questions about the topic
Frequently asked questions
Does spot price guarantee execution?
No. Finite size, fees and state changes affect execution.
Should price include gas automatically?
Only under an explicit cost and currency-conversion policy.
Standards & technical documentation