DFlow prediction_market API

Prediction market endpoints

Operations 1

GET /prediction-market-init Returns a transaction to initialize a prediction market idempotently #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/dflow-prediction-market-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

dflow-prediction-market-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: DFlow Aggregator admin Prediction Market API
  description: DFlow Aggregator API
  license:
    name: BUSL-1.1
  version: 0.1.0
servers:
- url: https://quote-api.dflow.net
security:
- api_key: []
tags:
- name: prediction_market
  description: Prediction market endpoints
paths:
  /prediction-market-init:
    get:
      tags:
      - prediction_market
      summary: Returns a transaction to initialize a prediction market idempotently
      operationId: prediction_market_init_handler
      parameters:
      - name: payer
        in: query
        description: Base58-encoded address of the payer
        required: true
        schema:
          type: string
      - name: outcomeMint
        in: query
        description: Base58-encoded mint address of either outcome mint for the market to be initialized
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Prediction market init response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PredictionMarketInitResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PredictionMarketInitBadRequestResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PredictionMarketInitInternalServerErrorResponse'
        '503':
          description: Service unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PredictionMarketInitServiceUnavailableResponse'
components:
  schemas:
    PredictionMarketInitServiceUnavailableCode:
      type: string
      enum:
      - not_ready
      - lagging
    PredictionMarketInitBadRequestResponse:
      type: object
      required:
      - msg
      - code
      properties:
        code:
          $ref: '#/components/schemas/PredictionMarketInitBadRequestCode'
        msg:
          type: string
      example:
        code: <enum<string>>
        msg: <string>
    PredictionMarketInitBadRequestCode:
      type: string
      enum:
      - invalid_payer
      - invalid_outcome_mint
      - prediction_market_already_initialized
      - unknown_outcome_mint
    PredictionMarketInitServiceUnavailableResponse:
      type: object
      required:
      - msg
      - code
      properties:
        code:
          $ref: '#/components/schemas/PredictionMarketInitServiceUnavailableCode'
        msg:
          type: string
      example:
        code: <enum<string>>
        msg: <string>
    PredictionMarketInitResponse:
      type: object
      required:
      - transaction
      - lastValidBlockHeight
      - computeUnitLimit
      properties:
        computeUnitLimit:
          type: integer
          format: int32
          description: Compute unit limit assigned to the transaction
          minimum: 0
        lastValidBlockHeight:
          type: integer
          format: int64
          description: 'The last block height at which the blockhash assigned to the transaction is valid. Useful to

            determine whether the transaction has expired.'
          minimum: 0
        transaction:
          type: string
          description: 'Base64-encoded transaction to initialize the market for the requested outcome mint. The

            payer must sign before sending it to Solana.'
    PredictionMarketInitInternalServerErrorCode:
      type: string
      enum:
      - failed_to_construct_transaction
    PredictionMarketInitInternalServerErrorResponse:
      type: object
      required:
      - msg
      - code
      properties:
        code:
          $ref: '#/components/schemas/PredictionMarketInitInternalServerErrorCode'
        msg:
          type: string
      example:
        code: <enum<string>>
        msg: <string>
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication. Contact hello@dflow.net to obtain an API key.