Skip to main content
You are buying Yes on “Will ETH be above $5,000 at year end?” Size comes from a quote, not from the mid on the card. Invalid is not tradable. Display mids live on market.prices(). You need a market people can already trade, collateral (to buy) or shares (to sell), and the token for a named answer. If the quote cannot fill the full size, swap the capped amount, not the original number.
This is an exact-in quote with the same sides as swap: buy turns collateral into that answer; sell is the reverse. The quote may return a capped size when the full request cannot fill (withinRange: false). If it capped you, swap quote.amountIn, not the original number.
Quote again right before you send — mids from the indexer can be stale.

Next

Swap