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

# Quote Transfer

> Preview cost and timing of a transfer before executing - and get a signed transaction for inbound deposits.

`POST /transfers/quote` accepts a superset of [Create Transfer](/trading-api/funds/create-transfer)'s body and returns the projected `expectedAmountReceived`, `minAmountReceived`, `estimatedDurationSeconds`, and `feeBps` for the route.

It serves two distinct purposes:

## Outbound and internal quotes

For any route `POST /transfers` accepts - `deposit → <venue>`, `<venue> → deposit`, `deposit → external` - send the same body to `/quote` to preview the trade before committing. The response is the common quote block (no `inbound` field).

## Inbound quotes (deposit from another chain)

When the end user wants to deposit USDC from a chain other than Base, pass `from: "external"` with a `source` object describing their wallet. The response includes an `inbound` block with a signed `transactionRequest` the user submits from their own wallet, plus an `approvalTarget` for the ERC-20 allowance and an `explorerLinkTemplate` for tracking.

The deposit lands directly on the account's deposit wallet - no follow-up `POST /transfers` is needed. Once the source-chain tx confirms, the funds are bridged automatically.

<Note>
  Inbound quotes are the **only** path for `external → deposit`. `POST /transfers` rejects this direction with `error: "inbound_requires_quote"` since the partner's own wallet must sign the bridge transaction.
</Note>


## OpenAPI

````yaml POST /api/accounts/{accountId}/transfers/quote
openapi: 3.1.0
info:
  title: Predexon Trading API
  description: Unified trading API for prediction markets
  version: 1.0.0
servers:
  - url: https://trade.predexon.com
security:
  - ApiKeyAuth: []
paths:
  /api/accounts/{accountId}/transfers/quote:
    post:
      tags:
        - Trading (Transfers)
      summary: Quote Transfer
      description: >-
        Preview the cost and timing of a transfer before executing. For outbound
        (`from: "deposit"`) and internal (`from: <venue>`) transfers, accepts
        the same body as `POST /transfers`. For inbound (`from: "external"`),
        accepts a `source` object describing the partner's external wallet — the
        response includes a signed `transactionRequest` the partner submits from
        their own wallet.
      operationId: quote_transfer
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransferQuoteRequest'
      responses:
        '200':
          description: Quote
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransferQuoteResponse'
        '400':
          description: >-
            Invalid request (unsupported route, missing source/destination,
            etc.)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: API key required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: Access denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Account not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  schemas:
    TransferQuoteRequest:
      type: object
      required:
        - from
        - to
        - amount
      description: >-
        Preview a transfer before executing. Accepts a superset of
        `CreateTransferRequest` — outbound quotes use the same shape; inbound
        quotes (`from: "external"`) carry a `source` object describing the
        partner's external wallet.
      properties:
        from:
          type: string
          enum:
            - deposit
            - external
            - polymarket
            - predict
            - opinion
            - limitless
        to:
          type: string
          enum:
            - deposit
            - polymarket
            - predict
            - opinion
            - limitless
            - external
        amount:
          type: string
        source:
          type: object
          description: >-
            Required when `from === "external"`. Partner's external wallet — the
            address the bridge transaction will be signed from.
          properties:
            address:
              type: string
            chain:
              type: string
              enum:
                - ethereum
                - polygon
                - bsc
                - arbitrum
                - optimism
            token:
              type: string
        destination:
          type: object
          description: Required when `to === "external"`.
          properties:
            address:
              type: string
            chain:
              type: string
              enum:
                - ethereum
                - polygon
                - base
                - bsc
                - arbitrum
                - optimism
            token:
              type: string
    TransferQuoteResponse:
      type: object
      description: >-
        Quote result. Common fields cover all quote variants; the `inbound`
        block is populated only when `from === "external"` (so the partner has a
        signed transaction to submit).
      properties:
        expectedAmountReceived:
          type: string
          description: Estimated amount delivered to the destination side.
        minAmountReceived:
          type: string
          description: Floor on delivered amount given the slippage tolerance.
        estimatedDurationSeconds:
          type: number
          description: Estimated settlement time.
        feeBps:
          type: number
          description: Effective bridge fee in basis points.
        feeUsd:
          type: string
          description: Bridge fee in USD.
        tool:
          type: string
          description: Underlying bridge provider that quoted this route.
        inbound:
          type: object
          nullable: true
          description: >-
            Populated only for inbound quotes (`from === "external"`). The
            partner submits `transactionRequest` from their own wallet after
            granting the `approvalTarget` allowance.
          properties:
            transactionRequest:
              type: object
              properties:
                to:
                  type: string
                data:
                  type: string
                value:
                  type: string
                gasLimit:
                  type: string
            approvalTarget:
              type: string
              description: >-
                Address the source token must be approved against before
                submitting the bridge tx.
            explorerLinkTemplate:
              type: string
              description: >-
                Substitute `{source_tx_hash}` after submitting to track
                progress.
    ApiError:
      type: object
      description: >-
        Unified error envelope returned by every endpoint on any 4xx or 5xx
        response. The `error` field is a stable snake_case code partners can
        branch on; `message` is the human-readable explanation (free-form, may
        change); `requestId` is the request correlation id (also returned in the
        `x-request-id` response header) — quote it when contacting support.
      required:
        - error
        - message
        - requestId
      properties:
        error:
          type: string
          description: >-
            Stable machine-readable code. See [Error
            codes](/trading-api/error-codes) for the full list. Snake_case,
            never renamed once shipped.
          example: insufficient_balance
        message:
          type: string
          description: >-
            Human-readable explanation. Free-form text that may include
            specifics (amounts, IDs, hints); do not parse — branch on `error`
            instead.
          example: 'Insufficient balance: need 50.000000, have 12.500000'
        requestId:
          type: string
          format: uuid
          description: >-
            Request correlation id. Quote this when filing a support ticket.
            Also returned in the `x-request-id` response header on every
            response (success or failure).
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````