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

# Get an execution quote

> Returns the best bid, best ask, and midpoint from a fresh authoritative execution book. Provide both side and size to walk the complete visible execution depth and estimate the fill, notional, and taker fee. The quote escalates to a newer deep book when the ordinary book is too shallow and the venue supports deeper execution data. URL-encode the pipe in a market ID when it is used in the path.



## OpenAPI

````yaml /openapi.yaml get /v1/markets/{market_id}/quote
openapi: 3.1.0
info:
  title: MyFundedPerps API (Beta)
  version: 1.0.0
  description: >-
    The developer API is in beta. Breaking changes may be introduced at any
    time. Programmatic access to MyFundedPerps paper-trading challenge accounts.
    API trades use the same real order books and simulated execution engine as
    the web trading interface. Every response carries an `X-Request-Id` header
    for support and log correlation.
  contact:
    url: https://myfundedperpetuals.com/support
servers:
  - url: https://developers.myfundedperpetuals.com
    description: Live
  - url: https://sandbox.myfundedperpetuals.com
    description: Sandbox (test keys and sandbox accounts only)
security:
  - bearerAuth: []
tags:
  - name: General
  - name: Authentication
  - name: Accounts
  - name: Markets
  - name: Positions
  - name: Orders
  - name: Fills
  - name: Strategy Orders
paths:
  /v1/markets/{market_id}/quote:
    get:
      tags:
        - Markets
      summary: Get an execution quote
      description: >-
        Returns the best bid, best ask, and midpoint from a fresh authoritative
        execution book. Provide both side and size to walk the complete visible
        execution depth and estimate the fill, notional, and taker fee. The
        quote escalates to a newer deep book when the ordinary book is too
        shallow and the venue supports deeper execution data. URL-encode the
        pipe in a market ID when it is used in the path.
      operationId: getMarketQuote
      parameters:
        - $ref: '#/components/parameters/MarketId'
        - name: side
          in: query
          description: Order side. Must be provided together with size.
          schema:
            type: string
            enum:
              - buy
              - sell
        - name: size
          in: query
          description: >-
            Base-asset size to walk through the execution book. Must be provided
            together with side.
          schema:
            type: number
            exclusiveMinimum: 0
      responses:
        '200':
          description: Current execution quote.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/Quote'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          description: A fresh quote is temporarily unavailable.
          headers:
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
components:
  parameters:
    MarketId:
      name: market_id
      in: path
      required: true
      description: URL-encoded market ID, such as `binance%7CBTCUSDT`.
      schema:
        type: string
  schemas:
    Quote:
      type: object
      required:
        - status
        - market_id
        - provider
        - symbol
        - coin
        - bid
        - ask
        - mid
        - time
      properties:
        status:
          type: string
          const: ok
        market_id:
          type: string
        provider:
          type: string
        symbol:
          type: string
        coin:
          type: string
        bid:
          type: number
        ask:
          type: number
        mid:
          type: number
        time:
          type: number
          description: Venue timestamp in milliseconds.
        fillable:
          type: boolean
          description: Present when side and size were supplied.
        unfillable_reason:
          type: string
          enum:
            - empty_book
            - insufficient_depth
            - size_precision_mismatch
        requested_side:
          type: string
          enum:
            - buy
            - sell
        requested_size:
          type: number
        estimated_fill_price:
          type: number
          description: Volume-weighted average across consumed levels.
        worst_price:
          type: number
          description: Deepest price level consumed.
        estimated_notional:
          type: number
        estimated_fee:
          type: number
        fee_bps:
          type: number
        levels_consumed:
          type: integer
        depth:
          type: string
          enum:
            - standard
            - deep
    ErrorEnvelope:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/Error'
    Error:
      type: object
      required:
        - code
        - message
        - request_id
      properties:
        code:
          type: string
        message:
          type: string
        request_id:
          type: string
          format: uuid
        details:
          type: array
          description: >-
            Present on request-validation failures, with one entry per invalid
            field so a request can be fixed in one pass.
          items:
            $ref: '#/components/schemas/ValidationIssue'
    ValidationIssue:
      type: object
      required:
        - field
        - issue
      properties:
        field:
          type: string
          description: >-
            Wire name of the offending request field, such as `size` or
            `operations[2].price`. The value `body` refers to the whole payload.
        issue:
          type: string
  responses:
    Unauthorized:
      description: Missing, invalid, or revoked API key.
      headers:
        WWW-Authenticate:
          schema:
            type: string
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    NotFound:
      description: Resource not found or not owned by the authenticated user.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    RateLimited:
      description: A per-key, per-IP, or deployment request budget is exhausted.
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  headers:
    RetryAfter:
      description: Seconds to wait before retrying.
      schema:
        type: integer
        minimum: 1
    RequestId:
      description: Stable identifier for support and log correlation.
      schema:
        type: string
        format: uuid
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: MyFundedPerps API key
      description: >-
        API key beginning with `fp_live_` (live keys, served at
        developers.myfundedperpetuals.com) or `fp_test_` (test keys, served at
        sandbox.myfundedperpetuals.com). A key presented on the other host is
        rejected with `401` and a message naming the correct host.

````