> ## Documentation Index
> Fetch the complete documentation index at: https://pond.dflow.net/llms.txt
> Use this file to discover all available pages before exploring further.

# FAQs

> Answers to common questions about building with DFlow

<Tabs>
  <Tab title="General">
    <AccordionGroup>
      <Accordion title="Which wallets are supported?">
        Any Solana wallet that supports standard transaction signing.
      </Accordion>

      <Accordion title="What fees apply to a trade?">
        Network fees, optional [priority fees](/spot/trading/priority-fees), optional [platform fees](/spot/trading/platform-fees) if you set them, and any DEX fees baked into the route. Slippage depends on market liquidity and trade size.
      </Accordion>

      <Accordion title="Do users need to KYC to trade?">
        Spot trades are non-custodial and don't require KYC. Trading Kalshi prediction markets requires KYC via [Proof](/prediction-markets/kyc) before a wallet can receive outcome tokens.
      </Accordion>

      <Accordion title="What's the difference between sync and async trades?">
        Sync trades settle in one transaction. Async trades span multiple. Prediction market trades are always async because Kalshi market interactions can't complete atomically onchain.
      </Accordion>

      <Accordion title="Does DFlow custody user funds?">
        No. Funds stay in the user's wallet throughout the trade lifecycle.
      </Accordion>

      <Accordion title="Does DFlow support gas sponsorship?">
        Yes. Pass the [`sponsor`](/resources/trading-api/order/order#parameter-sponsor) parameter on `/order` to have a sponsor wallet cover the transaction fee.
      </Accordion>

      <Accordion title="Should I set platformFeeBps if I'm not collecting a fee?">
        No. The API factors `platformFeeBps` into slippage tolerance, so declaring a fee you don't collect wastes slippage budget and gives users worse pricing. See [Platform Fees](/spot/trading/platform-fees#how-platform-fees-affect-trades).
      </Accordion>

      <Accordion title="Can I call /order directly from the browser?">
        No. The Trading API doesn't set CORS headers, so browser requests are blocked. Proxy `/order` through your backend; most builders use an edge function (Cloudflare Workers, Vercel Edge Functions) to keep added latency low.
      </Accordion>

      <Accordion title="Does DFlow take positive slippage?">
        No.
      </Accordion>
    </AccordionGroup>
  </Tab>

  <Tab title="Spot Trading">
    <AccordionGroup>
      <Accordion title="How do I trade with native SOL?">
        Use the WSOL mint (`So11111111111111111111111111111111111111112`) as `inputMint` or `outputMint` and set `wrapAndUnwrapSol=true`. DFlow auto-wraps and unwraps SOL.
      </Accordion>

      <Accordion title="In POST /swap, what should destinationTokenAccount.address be for native SOL output?">
        Use the destination wallet address, not the wallet's WSOL associated token account address.
      </Accordion>

      <Accordion title="What's the difference between price impact and slippage?">
        Slippage is the price drift between quote and execution. Price impact is the gap between market price and your effective fill, caused by your trade's size relative to available liquidity.
      </Accordion>

      <Accordion title="How do I set a priority fee on a trade?">
        Pass [`prioritizationFeeLamports`](/resources/trading-api/order/order#parameter-prioritization-fee-lamports) on `/order` as a lamport amount or one of `auto`, `medium`, `high`, `veryHigh`, `disabled`. See [Priority Fees](/spot/trading/priority-fees) for the two fee modes.
      </Accordion>

      <Accordion title="How does DFlow handle multiple token accounts for the same mint?">
        DFlow uses the associated token account by default. To send output elsewhere, pass [`destinationTokenAccount`](/resources/trading-api/order/order#parameter-destination-token-account) on `/order`; output lands in that account even if it isn't the ATA.
      </Accordion>

      <Accordion title="What's the maximum price impact allowed on a trade?">
        The server applies a default threshold and rejects trades that exceed it with a `price_impact_too_high` error. Override with [`priceImpactTolerancePct`](/resources/trading-api/order/order#parameter-price-impact-tolerance-pct).
      </Accordion>

      <Accordion title="Why is my trade failing with &#x22;exceeded CUs meter at BPF instruction&#x22;?">
        The transaction hit its compute unit (CU) limit. Pass `dynamicComputeUnitLimit=true` on `/order` to have the API size the limit automatically.
      </Accordion>

      <Accordion title="Does dynamicComputeUnitLimit add latency?">
        Enabling [`dynamicComputeUnitLimit`](/resources/trading-api/order/order#parameter-dynamic-compute-unit-limit) may add latency; however, it depends on the rest of your parameters.
      </Accordion>

      <Accordion title="Does DFlow support Pump.fun tokens?">
        Yes. Both on the bonding curve and after graduation to PumpSwap (Pump.fun's native AMM).
      </Accordion>

      <Accordion title="What is JIT routing?">
        Traditional aggregators commit a route at quote time. DFlow's [JIT routing](/spot/jit-routing) may refine the route at execution onchain, reflecting current conditions.
      </Accordion>

      <Accordion title="Why do intermediate token accounts and residual dust sometimes remain after a swap?">
        Multi-leg routes can create intermediate token accounts to pass value between legs.

        * **Full consumption:** If subsequent legs consume the intermediate amount, the accounts are closed.
        * **Partial consumption:** If a residual remains (venue rounding, leg constraints), the accounts stay open with small dust.
      </Accordion>

      <Accordion title="Does DFlow offer an intent-based swap?">
        Yes, as an opt-in. Most builders use [`/order`](/resources/trading-api/order/order) (imperative): the app signs a fully constructed transaction and submits through its own RPC. The intent flow ([`GET /intent`](/resources/trading-api/declarative/quote) + [`POST /submit-intent`](/resources/trading-api/declarative/submit)) gives stronger sandwich resistance on standard SPL pairs: the user signs an open order without a fixed route, and DFlow submits the open order and fill atomically as a Jito bundle. Token-2022 mints (including Kalshi outcome tokens) aren't supported on `/intent`.
      </Accordion>

      <Accordion title="Will DFlow support limit orders?">
        On the roadmap. No timeline yet.
      </Accordion>
    </AccordionGroup>
  </Tab>

  <Tab title="Prediction Markets">
    <AccordionGroup>
      <Accordion title="Do I need an API key for prediction markets?">
        Not for [developer endpoints](/get-started/endpoints). For production, request an [API key](/get-started/api-key) to avoid rate limits.
      </Accordion>

      <Accordion title="What's the minimum USDC amount per order?">
        **0.01 USDC.** Some markets require more because the smallest purchasable unit is one contract and the floor depends on the contract price.
      </Accordion>

      <Accordion title="Can users buy a fractional contract?">
        No.
      </Accordion>

      <Accordion title="Does the input mint affect trade latency?">
        Yes. Using the settlement mint (USDC or CASH) directly is lowest latency. Any other input token adds a swap leg first, which is roughly **50ms** of extra latency.
      </Accordion>

      <Accordion title="What are outcome tokens?">
        SPL tokens that represent positions in a prediction market. Each market has a YES outcome token and a NO outcome token.
      </Accordion>

      <Accordion title="Are markets settled in USDC or CASH?">
        DFlow supports both. A market settles in whichever settlement mint the outcome token mint belongs to. See [Redeem Outcome Tokens](/prediction-markets/recipes/redeem-outcome-tokens) for details.
      </Accordion>

      <Accordion title="How does the market lifecycle work?">
        Markets move through a fixed sequence from creation to settlement. The status defines what users and builders can do at each stage. See [Monitor Market Lifecycle](/prediction-markets/recipes/monitor-market-lifecycle) for the polling pattern.
      </Accordion>

      <Accordion title="Can users place prediction market orders at any time?">
        No. Kalshi's clearinghouse has a weekly maintenance window on **Thursdays 3:00 AM to 5:00 AM ET**. Orders during that window aren't cleared and the trade reverts. Your app should prevent submissions during the window.
      </Accordion>

      <Accordion title="What happens after a market resolves?">
        Users redeem outcome tokens for value according to the market result. This adds a redemption phase not present in spot trading: redemption flows, position closeout UX, and history/receipts UX.
      </Accordion>

      <Accordion title="What is a scalar outcome?">
        A resolution where both YES and NO are redeemable at a payout split set by Kalshi. See [Scalar Outcomes](/prediction-markets/recipes/redeem-outcome-tokens#scalar-outcomes).
      </Accordion>

      <Accordion title="What happens when an event is canceled before resolution?">
        Kalshi determines it as a [scalar outcome](/prediction-markets/recipes/redeem-outcome-tokens#scalar-outcomes).
      </Accordion>

      <Accordion title="How do I show order quotes to unverified users?">
        Omit `userPublicKey` from the [`/order`](/resources/trading-api/order/order) request. The API returns the quote without requiring Proof verification.
      </Accordion>

      <Accordion title="Why does my first trade in a market trigger an account-creation cost?">
        If the market isn't yet tokenized, `/order` initializes it on demand (creating the YES/NO outcome tokens) before the swap, which adds a small onchain account-creation fee. See [Buy Outcome Tokens](/prediction-markets/recipes/buy-outcome-tokens) for the full flow.
      </Accordion>

      <Accordion title="How much does it cost to initialize a not-yet-tokenized market?">
        Roughly **0.02 SOL**, paid in SOL (not USDC). Applies only when the market hasn't been tokenized yet.
      </Accordion>

      <Accordion title="Who is responsible for market pre-initialization?">
        Any platform developer can pre-initialize a market before users trade it. Otherwise the first trade initializes the market and pays the cost, unless the trade is sponsored. DFlow pre-initializes some popular markets.
      </Accordion>

      <Accordion title="What's the difference between sponsor and predictionMarketInitPayer?">
        Both cover market initialization, but differ in scope:

        * **`sponsor`:** covers both the user's gas fees and market initialization. Use this to fully abstract onchain costs from the user.
        * **`predictionMarketInitPayer`:** covers only market initialization. The user still pays their own gas fees.
      </Accordion>

      <Accordion title="Are platform fees supported for prediction markets?">
        Yes, via [`platformFeeScale`](/resources/trading-api/order/order#parameter-platform-fee-scale). See [Add Platform Fees](/prediction-markets/recipes/add-platform-fees) for the recipe.
      </Accordion>

      <Accordion title="How are prediction market fees structured?">
        [Prediction market fees](/prediction-markets/prediction-market-fees) scale with trading volume across a fee tier system.
      </Accordion>

      <Accordion title="How are outcome tokens minted and where does liquidity come from?">
        Outcome tokens are minted when a user enters a position and burned when they redeem. Liquidity comes from [Concurrent Liquidity Programs (CLPs)](/prediction-markets/clp).
      </Accordion>

      <Accordion title="Can I look up a specific market by ticker?">
        Yes. Kalshi market tickers map directly to the DFlow API. Use the [Get Market](/resources/metadata-api/markets/market) endpoint for a single market or [Get Event](/resources/metadata-api/events/event) for all markets under an event.
      </Accordion>

      <Accordion title="How can I estimate the fill price before placing an order?">
        Use the [Get Orderbook](/resources/metadata-api/orderbook/orderbook-by-ticker) endpoint to fetch best bid and best ask. Stream changes via the [Orderbook WebSocket channel](/resources/metadata-api/websockets/orderbook) for real-time updates.
      </Accordion>

      <Accordion title="Why are some active markets missing from my API results?">
        If you pass `isInitialized=true` on [Events](/resources/metadata-api/events/events), [Markets](/resources/metadata-api/markets/markets), or [Series](/resources/metadata-api/series/series), the response only includes markets already tokenized through a DFlow trade. Markets live on Kalshi but never traded through DFlow are filtered out (common with short-duration markets like `KXBTC15M`, which start a new market every interval). Remove `isInitialized` to see all active markets. See [Market Initialization Behavior](/prediction-markets/prediction-market-data-model#market-initialization-behavior).
      </Accordion>

      <Accordion title="How do I fetch market images?">
        Markets don't have images yet (only events do). Image support is in progress. For now, fetch them [from Kalshi directly](https://docs.kalshi.com/api-reference/events/get-event-metadata).
      </Accordion>

      <Accordion title="Does DFlow support all Kalshi markets?">
        Yes, except combos. That includes entertainment, culture, celebrity, and the rest.
      </Accordion>

      <Accordion title="When should I use forecast history vs candlesticks?">
        Forecast history is only available for numerical events and is split by percentiles. It's better for research or analysis than UI. Use candlesticks for charting and user-facing price history.
      </Accordion>

      <Accordion title="Why am I getting a 400 error when fetching candlesticks?">
        The maximum is **5,000 candlesticks per request**. If `startTs`, `endTs`, and `periodInterval` would produce more, the request fails. Narrow the range or increase the interval.
      </Accordion>

      <Accordion title="Do DFlow WebSockets show offchain Kalshi trades too?">
        Yes. The DFlow WebSockets stream both onchain and offchain Kalshi trades.
      </Accordion>

      <Accordion title="Do my DFlow trades appear on Kalshi's trade WebSocket?">
        Yes. Onchain DFlow trades hit Kalshi's offchain order books and appear on Kalshi's trade WebSocket the same way offchain trades do.
      </Accordion>

      <Accordion title="Is there a WebSocket channel for open interest?">
        No. DFlow market tickers map directly to Kalshi tickers, so use Kalshi's [Market Ticker WebSocket](https://docs.kalshi.com/websockets/market-ticker) for streaming open interest and [Get Market](https://docs.kalshi.com/api-reference/market/get-market) for per-market snapshots.
      </Accordion>

      <Accordion title="When does USDC get pulled when using /submit-intent?">
        Only when the transaction lands onchain. [`/submit-intent`](/resources/trading-api/declarative/submit) builds the order and returns a transaction; USDC moves at execution, not at submit-intent time.
      </Accordion>

      <Accordion title="What are Milestones?">
        A Milestone groups a real-world occurrence (e.g. a game or match) by bundling related event tickers. It's a separate grouping layer, not part of the Series → Event → Market hierarchy.

        `related_event_tickers` is a superset of `primary_event_tickers`. Primary event tickers are generally limited to moneyline, spread, and total markets for a sporting event. The relationship can be many-to-many: a single event ticker can appear in multiple Milestones.
      </Accordion>
    </AccordionGroup>
  </Tab>

  <Tab title="Proof">
    <AccordionGroup>
      <Accordion title="Who provides KYC for Proof?">
        [Stripe Identity](https://docs.stripe.com/identity).
      </Accordion>

      <Accordion title="Is there a fee to use Proof?">
        No.
      </Accordion>

      <Accordion title="Does Proof KYC work with embedded wallet providers like Privy?">
        Yes. Your app directs the user to `https://dflow.net/proof` to complete KYC, with a [redirect URL](/resources/proof/partner-integration#deep-link-parameters) to send them back to your app after verification.
      </Accordion>

      <Accordion title="If I use Proof to KYC Kalshi users, do I still need to geoblock?">
        Yes. Proof verifies user identity. Geoblocking is a separate jurisdictional concern for Kalshi prediction markets, which aren't permitted everywhere.
      </Accordion>

      <Accordion title="Is Proof verification required to buy Kalshi outcome tokens on dev endpoints?">
        Yes. Buying outcome tokens requires Proof verification on both dev and production endpoints. Selling doesn't require verification. See [KYC for Kalshi](/prediction-markets/kyc).
      </Accordion>

      <Accordion title="How do I show outcome token quotes to unverified users?">
        Omit `userPublicKey` from the [`/order`](/resources/trading-api/order/order) request. The API returns the quote without requiring Proof verification.
      </Accordion>

      <Accordion title="Why isn't my Proof redirect firing after verification?">
        Proof only redirects to `https:`, `moz-extension://`, or `chrome-extension:` URLs. Custom schemes (e.g. `myapp://callback`) silently fail. Native mobile apps should use [universal links](https://developer.apple.com/ios/universal-links/) (iOS) or [app links](https://developer.android.com/training/app-links) (Android). See [redirect\_uri parameter docs](/resources/proof/partner-integration#deep-link-parameters).
      </Accordion>
    </AccordionGroup>
  </Tab>
</Tabs>
