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

# Get a deposit quote

> Estimates fees, output, and completion time for a deposit.



## OpenAPI

````yaml https://raw.githubusercontent.com/rhinestonewtf/openapi/refs/heads/main/deposit-service.json post /quotes/preview
openapi: 3.1.0
info:
  title: Deposit Service API
  version: 1.0.0
  description: >-
    Rhinestone Deposits API: accept deposits from any chain, asset or payment
    method, and settle them as one token on one chain.
servers:
  - url: https://v1.orchestrator.rhinestone.dev/deposit-processor
security: []
paths:
  /quotes/preview:
    post:
      tags:
        - Processing
      summary: Get a deposit quote
      description: Estimates fees, output, and completion time for a deposit.
      parameters:
        - schema:
            type: string
            description: API key for authentication
            example: your-api-key
          required: true
          description: API key for authentication
          name: x-api-key
          in: header
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuotePreviewRequest'
      responses:
        '200':
          description: Indicative quote for the requested route
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuotePreviewResponse'
        '400':
          description: Malformed request body or unsupported source chain
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: API key lacks required deposits scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Account not found or not owned by the caller
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: >-
            Route cannot be quoted (token/amount not allowed by the client
            whitelist or account session scope, unsupported token route, no
            session for the source chain, no available routes, or exact-out
            asked of a route only the binding quote can price). A policy refusal
            a deposit would also receive carries `code` (`TOKEN-3`, `BALANCE-3`,
            `BALANCE-4`); the others carry none. An exact-out refusal on a
            deposit bound also carries `inputAmount`, the deposit the route
            resolved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuotePreviewRefusal'
components:
  schemas:
    QuotePreviewRequest:
      type: object
      properties:
        account:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: Ethereum address (0x followed by 40 hex characters)
          example: '0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91'
        sourceChainId:
          type: string
          pattern: ^[a-z0-9]+:[a-zA-Z0-9]+$
          description: CAIP-2 chain identifier (e.g. "eip155:8453")
          example: eip155:8453
        sourceToken:
          type: string
          description: >-
            Source token: a 0x address on an EVM source chain, or a base58 SPL
            mint on Solana.
          example: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913'
        direction:
          type: string
          enum:
            - exactIn
            - exactOut
          default: exactIn
          description: >-
            `exactIn` fixes the deposited `amount` and quotes what is delivered;
            `exactOut` fixes the delivered `amountOut` and quotes the deposit
            that produces it. Defaults to `exactIn`.
          example: exactIn
        amount:
          type: string
          pattern: ^\d+$
          description: >-
            Deposited amount in the source token's smallest unit. Required for
            (and only valid with) `direction: exactIn`.
          example: '1000000'
        amountOut:
          type: string
          pattern: ^\d+$
          description: >-
            Delivered amount in the destination token's smallest unit. Required
            for (and only valid with) `direction: exactOut`; the quote's
            `input.amount` is then the deposit that produces it.
          example: '1000000'
      required:
        - account
        - sourceChainId
        - sourceToken
    QuotePreviewResponse:
      type: object
      properties:
        settlementLayer:
          type: string
        expiresAt:
          type: integer
        estimatedFillTimeSeconds:
          type: integer
          minimum: 0
          description: >-
            The orchestrator's estimate for the fill leg, in seconds. Covers
            bridging only; see `timing.expectedSeconds` for the end-to-end
            expectation.
          example: 7
        timing:
          $ref: '#/components/schemas/DepositTimingEstimate'
        fees:
          type: object
          properties:
            total:
              type: object
              properties:
                usd:
                  type: number
              required:
                - usd
            totalUsd:
              type: number
            breakdown:
              type: object
              properties:
                gas:
                  $ref: '#/components/schemas/PreviewFeeLine'
                bridge:
                  $ref: '#/components/schemas/PreviewFeeLine'
                swap:
                  $ref: '#/components/schemas/PreviewFeeLine'
                app:
                  $ref: '#/components/schemas/PreviewFeeLine'
                protocol:
                  $ref: '#/components/schemas/PreviewFeeLine'
                sponsorSurcharge:
                  $ref: '#/components/schemas/PreviewFeeLine'
              required:
                - gas
                - bridge
                - swap
                - app
                - protocol
                - sponsorSurcharge
              additionalProperties:
                $ref: '#/components/schemas/PreviewFeeLine'
          required:
            - total
            - breakdown
        input:
          type: object
          properties:
            token:
              type: string
            amount:
              type: string
            symbol:
              type:
                - string
                - 'null'
            decimals:
              type:
                - integer
                - 'null'
          required:
            - token
            - amount
            - symbol
            - decimals
        output:
          type: object
          properties:
            token:
              type: string
            amount:
              type: string
            symbol:
              type:
                - string
                - 'null'
            decimals:
              type:
                - integer
                - 'null'
          required:
            - token
            - amount
            - symbol
            - decimals
      required:
        - settlementLayer
        - expiresAt
        - estimatedFillTimeSeconds
        - fees
        - input
        - output
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
          description: >-
            Deposit error code (e.g. `TOKEN-3`) when the refusal is one a
            deposit would also receive.
        details:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
              path:
                type: array
                items:
                  anyOf:
                    - type: string
                    - type: number
              code:
                type: string
            required:
              - message
      required:
        - error
    QuotePreviewRefusal:
      allOf:
        - $ref: '#/components/schemas/ErrorResponse'
        - type: object
          properties:
            inputAmount:
              type: string
              pattern: ^\d+$
              description: >-
                The deposit the route resolved, in the source token's smallest
                unit. Present only when an `exactOut` quote was refused by a
                bound that governs the deposit rather than the delivery.
              example: '1010000'
    DepositTimingEstimate:
      type: object
      properties:
        expectedSeconds:
          type: integer
          minimum: 0
          description: >-
            How long the deposit is expected to take end to end, in seconds.
            Derived from qualifying recent completed deposits or the selected
            route’s indicative estimate; never a deadline or guarantee.
          example: 42
        softDelaySeconds:
          type: integer
          minimum: 0
          description: >-
            Seconds after which the deposit is running slower than usual and a
            client may reassure the user. Indicative only.
          example: 90
        escalatedDelaySeconds:
          type: integer
          minimum: 0
          description: >-
            Seconds after which the deposit is unusually slow and a client may
            offer support. Indicative only, not an SLA.
          example: 300
      required:
        - expectedSeconds
        - softDelaySeconds
        - escalatedDelaySeconds
      description: >-
        Indicative, non-contractual duration estimate derived from qualifying
        recent completed deposits on the corridor or chain pair, falling back to
        the selected route’s indicative estimate when aggregate data is
        unavailable. Always `expectedSeconds` <= `softDelaySeconds` <=
        `escalatedDelaySeconds`. On a deposit the seconds are measured from its
        `createdAt` and are served only while it is still in flight (`pending`,
        `processing`, `delayed`); on a quote preview they describe the quoted
        route. Resolved per request, so it may change between calls, and absent
        whenever no estimate is available. Never a deadline, an expiry or a
        guarantee.
    PreviewFeeLine:
      type: object
      properties:
        usd:
          type: number
        sponsored:
          type: boolean
        label:
          type: string
        internal:
          type: boolean
      required:
        - usd
        - sponsored

````