GuidesGet started
FAQs
Short answers to common questions about Predict's APIs and SDKs.
Join our Discord server to report any issue.
Where do I get an API key?
In the developer console. Mainnet needs a key for every request. Testnet works without one.
Which networks are supported?
BNB Mainnet (https://api.predict.fun) and BNB Testnet (https://api-testnet.predict.fun). See Environments for the WebSocket URL and chain IDs.
Where are your servers?
In AWS ap-northeast-1 (Tokyo). It is also the closest region that is not geo-restricted.
What are the rate limits?
Keys from the developer console allow 500 requests per minute on trading routes and 250 per minute on most other routes. Order placement and removal also have a per-second cap. On testnet without a key, the limits are 500 and 240 per minute for each IP address. See Rate limits for every limit and the response headers.
Is there an SDK?
Yes, for TypeScript (npm, GitHub) and Python (PyPI, GitHub). Both sign orders, set approvals and manage positions.
Can an AI assistant help me with the API?
Yes. These docs are available as /llms.txt and /llms-full.txt, and our SDKs and docs are on Context7. See Docs for AI tools.
How do I authenticate my requests?
Send your API key in the x-api-key header. Requests for your own wallet, such as placing orders, also need a JWT. See Authentication.
How do I create orders?
See Place orders. Before your first order, set your approvals.
Why was my order rejected?
The response's error field names the reason. Errors lists every code with its fix.
Is the order book priced in Yes or No?
In Yes. The No prices are the complement of the Yes prices. See Prices and order book.
How do I redeem a winning position?
See Manage positions.
Can I use my Predict account through the API or SDK?
Yes. Predict works with a regular wallet (an externally owned account, or EOA) and with a smart wallet called a Predict account. If you use the web app, a Predict account is created for you. Wallets in the product docs explains how Predict accounts work.
To use your Predict account programmatically, you need:
- The Predict account's address, also called its deposit address.
- The private key of its Privy wallet, which signs for the Predict account. You can export it from your account settings.
Fund the Privy wallet with some BNB to pay the gas of on-chain actions, such as setting approvals and cancelling orders on-chain.
Authentication and Place orders cover both kinds of wallet.
You can also use another account abstraction SDK, such as the ZeroDev SDK. That takes more effort and technical knowledge, and we can offer little support for third-party SDKs.