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.
General HTTP errors
| Code | Title | When it happens | How to fix |
|---|---|---|---|
| 429 | Rate limit exceeded | Too many requests in a short window | Retry with backoff, reduce request rate, or use an API key |
Trading API
route_not_found
This error is most common in three situations:
-
Wrong
outputMintfor prediction markets. If you are selling an outcome token,outputMintmust match the market’s settlement mint. We currently support two settlement mints:- USDC:
EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v - CASH:
CASHx9KJUStyftLFWGvEVf59SGeG9sh5FfcnZMVPCASH
accountsobject. - USDC:
-
Incorrect
amountunits. Theamountparameter is theinputMintamount in atomic units (scaled by decimals). If you pass standard (human-readable) units (for example8instead of8_000_000), the router will not find a viable route. -
No liquidity at the top of book. For outcome tokens,
route_not_foundcan mean there is no available bid/ask on the side the user wants to trade. How to check- Get the market for the outcome token:
GET https://dev-prediction-markets-api.dflow.net/api/v1/market/by-mint/{outcome_mint}(See Metadata API)- Use your production Metadata API base URL in production.
- See which side the user is on:
- In the response, open the
accountsobject and find the entry whoseyesMintornoMintequals the outcome mint. - If it matches
yesMint, they are trading the YES outcome. - If it matches
noMint, they are trading the NO outcome.
- In the response, open the
- Check the right bid or ask using the top-level fields from the same market response:
- Selling YES → check
yesBid. If it isnull(or empty), there is no one to buy. - Selling NO → check
noBid. If it isnull(or empty), there is no one to buy. - Buying YES → check
yesAsk. If it isnull(or empty), no one is offering YES. - Buying NO → check
noAsk. If it isnull(or empty), no one is offering NO.
- Selling YES → check
- Get the market for the outcome token:
price_impact_too_high
The effective price during routing is worse than the allowed threshold. If unspecified, the server determines the default. To set your own threshold, pass priceImpactTolerancePct.
Prediction Markets IDL
| Code | Name | Message |
|---|---|---|
| 16 | MarketNotOpen | Market is not open |
| 17 | MarketOutcomeDetermined | Market outcome is already determined |
| 18 | MarketNotDetermined | Market is not determined |
| 19 | InvalidMarketStatus | Invalid market status |
| 64 | InvalidQuantity | Invalid quantity |
| 80 | OrderAlreadyFilled | Order already filled |
| 81 | InvalidFillQuantity | Invalid fill quantity |
| 82 | InvalidMarketOutcome | Invalid market outcome |
| 83 | FillUnderproduced | Produced output < min output amount |
| 84 | FillOverconsumed | Consumed input > max input amount |
| 96 | Underflow | Underflow |
| 97 | Overflow | Overflow |
| 255 | Unknown | Unknown error |
Let’s stay in touch
Dev Notifications
Join the DFlow Dev Notifications Telegram group to stay in the loop on
new features and other announcements.