Predict API (Beta)
    Predict API (Beta)
    • FAQs
    • Deployed Contracts
    • Guides
      • Understanding the Orderbook
      • How to authenticate your API requests
      • How to create or cancel orders
    • Authorization
      • Get auth message
        GET
      • Get JWT with valid signature
        POST
    • Accounts
      • Get connected account
        GET
      • Set a referral
        POST
    • Orders
      • Get order by hash
        GET
      • Get orders
        GET
      • Create an order
        POST
      • Remove orders from the orderbook
        POST
    • Categories
      • Get categories
        GET
      • Get category by slug
        GET
    • Markets
      • Get markets
        GET
      • Get market by ID
        GET
      • Get market statistics
        GET
      • Get market last sale information
        GET
      • Get the orderbook for a market
        GET
    • Positions
      • Get positions
        GET
    • OAuth
      • Finalize a OAuth connection
        POST
      • Get the orders for a OAuth connection
        POST
      • Create an order for a OAuth connection
        POST
      • Cancel the orders for a OAuth connection
        POST
      • Get the positions for a OAuth connection
        POST
    • Schemas
      • Sample Schemas
        • Pet
        • Category
        • Tag

    FAQs

    Join our Discord server at https://discord.gg/predictdotfun
    The REST API is currently in beta. Please, report any issue in our Discord server.

    Guides#

    Understanding the Orderbook
    How to authenticate your API requests
    How to create or cancel orders

    Where do I request an API key?#

    To request an API key join the Predict's Discord server and open a support ticket.
    Predict's Discord: https://discord.gg/predictdotfun

    What chains are supported?#

    BNB Mainnet (API key required): https://api.predict.fun/
    BNB Testnet (API key not required): https://api-testnet.predict.fun/

    Is there an SDK to create orders?#

    Yes, we have an SDK available in multiple languages:
    TypeScript
    NPM: https://www.npmjs.com/package/@predictdotfun/sdk
    GitHub: https://github.com/PredictDotFun/sdk
    Python
    PyPI: https://pypi.org/project/predict-sdk/
    GitHub: https://github.com/PredictDotFun/sdk-python

    Is there any AI familiar with the SDKs?#

    Yes, we published our SDKs on Context7, which can be used either via MCP or directly on their website for free to ask question about our SDKs or REST API.
    Predict TypeScript SDK: https://context7.com/predictdotfun/sdk?tab=chat
    Predict Python SDK: https://context7.com/predictdotfun/sdk-python?tab=chat
    Predict REST API: https://context7.com/llmstxt/dev_predict_fun_llms_txt?tab=chat

    What rate limit is available on mainnet?#

    On Testnet, we allow up to 240 requests per minute without an API key.
    On Mainnet, the default rate limit for an API key is 240 requests per minute.

    Can I use my Predict account via the API/SDK?#

    Predict supports interacting with the protocol using either a traditional Externally Owned Account (EOA) or a Smart Wallet ("Predict Account"). If you use the web app, a Smart Wallet is automatically created for you. To interact with your Smart Wallet programmatically using the SDK, follow the example shown in How to use a Predict account.
    If you are using our Smart Wallet, you will need two things:
    The Predict account address (aka deposit address)
    The Privy Wallet private key (and the address to fund ETH for on-chain tx)
    This can be exported from your account's settings at https://predict.fun/account/settings
    If you want to programmatically interract with Predict via your Smart Wallet (Predict Account) and not a simple EOA, you can check out our guides, which cover both cases:
    How to authenticate your API requests
    How to create or cancel orders
    Alternatively, you can look into other Account Abstraction SDKs, like ZeroDev SDK. This requires a greater effort on your side and techincal knowledge. We won't be able to provide much support if you choose to use third parties SDKs.

    How do I create orders?#

    See How to create or cancel orders.

    How do I authenticate my requests?#

    See How to authenticate your API requests.

    Is there altervative UI for the API reference?#

    Yes, an alternative UI for the API reference is also available at: https://api.predict.fun/docs
    Modified at 2025-12-12 03:24:34
    Next
    Deployed Contracts
    Built with