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

# Estimate the cost of a deposit

> Returns what depositing `amount` into this account is expected to cost, before
any money moves.

**An estimate, not a quote.** No rate is locked. `rate.asOf` says when the rate
was read; the figures may differ by the time funds arrive.

**The fee is this account's.** It is a percentage held against the individual
account, so two accounts can legitimately return different fees for the same
amount. Do not cache an estimate against one account and reuse it for another.

**`fees.estimated` says which parts can move.** A component listed there is an
approximation; one not listed is exact as at `rate.asOf`. Network fees are
never knowable before settlement — the chain charges what it charges at the
moment of broadcast — so `network` is always listed, including where it rounds
to `0.00` on networks that do not meaningfully charge it. `fees.maximum` and
`output.minimum` bound the estimated components against recently settled
deposits, and are what to show a user as "at most" and "at least".

**The bound can be missing.** It is drawn from deposits we have actually settled
on that network, so until enough have, `fees.maximum` and `output.minimum` are
both omitted — and a `breakdown.network` of `0.00` alongside them means
unmeasured, not free. `fees.networkFeeSamples` says how many settlements are
behind the figures; at `0` we have never seen this network settle. Do not
promise a user a ceiling on the cost, or a floor on what they receive, when
those fields are absent.

**Fees are in the account's own currency**, which is EUR on SEPA accounts.

**When an estimate cannot be produced**, branch on `code`, not on the status
alone — the codes match `GET /v1/on-ramps/exchange-rates`:

- `rate_unavailable` (503) — the pair is quotable but has no rate right now.
  Transient; retry.
- `unsupported_currency_pair` (400) — the pair is not quoted at all. Permanent.
- `exchange_rate_provider_error` (502) — the rate provider failed otherwise.



## OpenAPI

````yaml https://platform.spritz.finance/openapi.json get /v1/auto-ramp-accounts/{id}/estimate
openapi: 3.0.3
info:
  title: Spritz Finance API
  version: 1.0.0
  description: API for the Spritz Finance platform with RFC 9457 error handling
servers:
  - url: https://platform.spritz.finance
    description: Production
  - url: https://sandbox.spritz.finance
    description: Sandbox
security: []
tags:
  - name: Users
    description: User management endpoints
  - name: Bank Accounts
    description: Manage bank accounts for off-ramp destinations
  - name: Bills
    description: Manage bill pay accounts
  - name: Cards
    description: Spritz-issued debit cards
  - name: Auto-Ramp Accounts
    description: Virtual bank accounts that automatically convert fiat deposits to crypto
  - name: Spritz App
    description: >-
      Endpoints used by the Spritz app and internal SDKs. Excluded from the
      public partner spec.
paths:
  /v1/auto-ramp-accounts/{id}/estimate:
    get:
      tags:
        - Auto-Ramp Accounts
      summary: Estimate the cost of a deposit
      description: >-
        Returns what depositing `amount` into this account is expected to cost,
        before

        any money moves.


        **An estimate, not a quote.** No rate is locked. `rate.asOf` says when
        the rate

        was read; the figures may differ by the time funds arrive.


        **The fee is this account's.** It is a percentage held against the
        individual

        account, so two accounts can legitimately return different fees for the
        same

        amount. Do not cache an estimate against one account and reuse it for
        another.


        **`fees.estimated` says which parts can move.** A component listed there
        is an

        approximation; one not listed is exact as at `rate.asOf`. Network fees
        are

        never knowable before settlement — the chain charges what it charges at
        the

        moment of broadcast — so `network` is always listed, including where it
        rounds

        to `0.00` on networks that do not meaningfully charge it. `fees.maximum`
        and

        `output.minimum` bound the estimated components against recently settled

        deposits, and are what to show a user as "at most" and "at least".


        **The bound can be missing.** It is drawn from deposits we have actually
        settled

        on that network, so until enough have, `fees.maximum` and
        `output.minimum` are

        both omitted — and a `breakdown.network` of `0.00` alongside them means

        unmeasured, not free. `fees.networkFeeSamples` says how many settlements
        are

        behind the figures; at `0` we have never seen this network settle. Do
        not

        promise a user a ceiling on the cost, or a floor on what they receive,
        when

        those fields are absent.


        **Fees are in the account's own currency**, which is EUR on SEPA
        accounts.


        **When an estimate cannot be produced**, branch on `code`, not on the
        status

        alone — the codes match `GET /v1/on-ramps/exchange-rates`:


        - `rate_unavailable` (503) — the pair is quotable but has no rate right
        now.
          Transient; retry.
        - `unsupported_currency_pair` (400) — the pair is not quoted at all.
        Permanent.

        - `exchange_rate_provider_error` (502) — the rate provider failed
        otherwise.
      operationId: getV1Auto-ramp-accountsByIdEstimate
      parameters:
        - name: id
          in: path
          required: true
          schema:
            minLength: 1
            description: The auto-ramp account ID
            type: string
        - name: amount
          in: query
          required: true
          schema:
            description: >-
              Fiat amount to be deposited, in the account's `currency`. Decimal
              string.
            pattern: ^\d+(\.\d{1,2})?$
            type: string
            example: '2525.00'
      responses:
        '200':
          description: >-
            What a deposit into this account is expected to cost. An estimate,
            not a quote: no rate is locked, and the figures may differ by the
            time funds arrive.
          content:
            application/json:
              schema:
                description: >-
                  What a deposit into this account is expected to cost. An
                  estimate, not a quote: no rate is locked, and the figures may
                  differ by the time funds arrive.
                type: object
                properties:
                  input:
                    type: object
                    properties:
                      amount:
                        description: Fiat amount to be deposited, before fees
                        type: string
                        example: '2525.00'
                      currency:
                        description: Fiat currency the account accepts
                        type: string
                        example: USD
                    required:
                      - amount
                      - currency
                  fees:
                    type: object
                    properties:
                      total:
                        description: >-
                          Every fee expected on this deposit, in source currency
                          — the sum of `breakdown`. `input.amount - fees.total`
                          is what gets converted.
                        type: string
                        example: '27.78'
                      currency:
                        description: Currency of every figure under `fees`
                        type: string
                        example: USD
                      breakdown:
                        description: >-
                          Every fee the user paid, split by role, in source
                          currency. Omitted on on-ramps created before
                          pass-through fees were recorded — absent means
                          unknown, not zero.
                        type: object
                        properties:
                          platform:
                            description: Spritz's own fee.
                            type: string
                            example: '57.07'
                          exchange:
                            description: >-
                              Total currency-conversion cost passed through to
                              the user, whether the provider charged it as a fee
                              or took it inside the exchange rate. `0.00` only
                              when no conversion took place.
                            type: string
                            example: '2.53'
                          network:
                            description: >-
                              On-chain settlement cost passed through to the
                              user. `0.00` on networks that do not charge it —
                              and, on an estimate, also where too few deposits
                              have settled for us to have measured one.
                              `fees.networkFeeSamples` separates the two there;
                              on a settled on-ramp this is always the cost
                              actually charged.
                            type: string
                            example: '0.00'
                        required:
                          - platform
                          - exchange
                          - network
                      estimated:
                        description: >-
                          Which components of `breakdown` can still move. A
                          component listed here is an approximation; one not
                          listed is exact as at `rate.asOf`. Network fees are
                          never knowable before settlement, so `network` is
                          always listed — even where it rounds to `0.00`.
                        type: array
                        items:
                          type: string
                          enum:
                            - platform
                            - exchange
                            - network
                        example:
                          - network
                      maximum:
                        description: >-
                          Upper bound on `total`, from the highest recently
                          settled value of every estimated component. **Absent
                          when we have not settled enough deposits on this
                          network to bound it** — absent means unbounded, not
                          that the total cannot move. Check `networkFeeSamples`
                          to see how much evidence there was, and do not promise
                          a user a ceiling when this is missing.
                        type: string
                        example: '27.78'
                      networkFeeSamples:
                        description: >-
                          How many settled deposits on this network the
                          `network` figure and `maximum` rest on. `0` means we
                          have never seen this network settle and
                          `breakdown.network` of `0.00` is unmeasured rather
                          than free — the distinction a chain with real gas and
                          no history would otherwise share with one that charges
                          nothing.
                        minimum: 0
                        type: integer
                        example: 40
                    required:
                      - total
                      - currency
                      - breakdown
                      - estimated
                      - networkFeeSamples
                  output:
                    type: object
                    properties:
                      amount:
                        description: >-
                          Crypto amount expected at the destination, in whole
                          token units. A token quantity, not a money amount:
                          carries up to 8 decimal places, so a stablecoin reads
                          `2497.22` while BTC reads `0.02531904`.
                        type: string
                        example: '2497.22'
                      minimum:
                        description: >-
                          Lower bound on `amount`, the counterpart of
                          `fees.maximum`. Safe to show a user as “you will
                          receive at least”, subject to the rate moving. Same
                          precision as `amount`. Absent whenever `fees.maximum`
                          is, for the same reason.
                        type: string
                        example: '2497.22'
                      token:
                        description: Token the deposit will be converted to
                        type: string
                        example: USDT
                      network:
                        description: >-
                          Blockchain network the converted crypto will be sent
                          to. Matches the account's `network`.
                        type: string
                        example: ethereum
                      address:
                        description: Destination wallet address
                        type: string
                        example: 0x742d35Cc...
                    required:
                      - amount
                      - token
                      - network
                      - address
                  rate:
                    type: object
                    properties:
                      value:
                        description: >-
                          Token units per unit of source currency, applied to
                          whatever survives the fees
                        type: string
                        example: '1.0009'
                      source:
                        type: string
                        enum:
                          - provider
                          - peg
                      asOf:
                        description: When the rate was read
                        format: date-time
                        type: string
                    required:
                      - value
                      - source
                      - asOf
                required:
                  - input
                  - fees
                  - output
                  - rate
        '400':
          description: Response for status 400
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    default: about:blank
                    description: A URI reference that identifies the problem type
                    type: string
                    example: urn:problem-type:auth:unauthorized
                  title:
                    description: A short, human-readable summary of the problem type
                    type: string
                    example: Unauthorized
                  status:
                    description: The HTTP status code
                    type: number
                    example: 400
                  detail:
                    description: A human-readable explanation specific to this occurrence
                    type: string
                  instance:
                    description: A URI reference that identifies the specific occurrence
                    type: string
                    example: /errors/1234567890
                  code:
                    description: >-
                      Machine-readable cause, present when exactly one thing
                      failed. Branch on this, never on `detail`, which is
                      human-facing copy and may change. For deposit limits the
                      vocabulary matches the `reason` values the limits API
                      returns pre-flight.
                    type: string
                    example: transaction_limit
                  field:
                    description: The offending request field, present alongside `code`.
                    type: string
                    example: amountUsd
                  retryable:
                    description: >-
                      Whether retrying the same request later may succeed
                      without changing its inputs.
                    type: boolean
                    example: true
                required:
                  - title
                  - status
                additionalProperties: false
        '401':
          description: Response for status 401
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    default: about:blank
                    description: A URI reference that identifies the problem type
                    type: string
                    example: urn:problem-type:auth:unauthorized
                  title:
                    description: A short, human-readable summary of the problem type
                    type: string
                    example: Unauthorized
                  status:
                    description: The HTTP status code
                    type: number
                    example: 401
                  detail:
                    description: A human-readable explanation specific to this occurrence
                    type: string
                    example: Bearer token required
                  instance:
                    description: A URI reference that identifies the specific occurrence
                    type: string
                  realm:
                    description: The authentication realm
                    type: string
                    example: API
                  scope:
                    description: The required scope for this resource
                    type: string
                    example: read:users
                required:
                  - title
                  - status
                additionalProperties: false
        '404':
          description: Response for status 404
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    default: about:blank
                    description: A URI reference that identifies the problem type
                    type: string
                  title:
                    description: A short, human-readable summary of the problem type
                    type: string
                  status:
                    description: The HTTP status code
                    type: number
                    example: 404
                  detail:
                    description: A human-readable explanation specific to this occurrence
                    type: string
                  instance:
                    description: A URI reference that identifies the specific occurrence
                    type: string
                  resourceType:
                    description: The type of resource that was not found
                    type: string
                    example: user
                  resourceId:
                    description: The identifier of the resource that was not found
                    type: string
                required:
                  - title
                  - status
                  - resourceType
                  - resourceId
                additionalProperties: false
        '500':
          description: Response for status 500
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    default: about:blank
                    description: A URI reference that identifies the problem type
                    type: string
                    example: urn:problem-type:auth:unauthorized
                  title:
                    description: A short, human-readable summary of the problem type
                    type: string
                    example: Unauthorized
                  status:
                    description: The HTTP status code
                    type: number
                    example: 400
                  detail:
                    description: A human-readable explanation specific to this occurrence
                    type: string
                  instance:
                    description: A URI reference that identifies the specific occurrence
                    type: string
                    example: /errors/1234567890
                  code:
                    description: >-
                      Machine-readable cause, present when exactly one thing
                      failed. Branch on this, never on `detail`, which is
                      human-facing copy and may change. For deposit limits the
                      vocabulary matches the `reason` values the limits API
                      returns pre-flight.
                    type: string
                    example: transaction_limit
                  field:
                    description: The offending request field, present alongside `code`.
                    type: string
                    example: amountUsd
                  retryable:
                    description: >-
                      Whether retrying the same request later may succeed
                      without changing its inputs.
                    type: boolean
                    example: true
                required:
                  - title
                  - status
                additionalProperties: false
        '502':
          description: Response for status 502
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    default: about:blank
                    description: A URI reference that identifies the problem type
                    type: string
                    example: urn:problem-type:auth:unauthorized
                  title:
                    description: A short, human-readable summary of the problem type
                    type: string
                    example: Unauthorized
                  status:
                    description: The HTTP status code
                    type: number
                    example: 400
                  detail:
                    description: A human-readable explanation specific to this occurrence
                    type: string
                  instance:
                    description: A URI reference that identifies the specific occurrence
                    type: string
                    example: /errors/1234567890
                  code:
                    description: >-
                      Machine-readable cause, present when exactly one thing
                      failed. Branch on this, never on `detail`, which is
                      human-facing copy and may change. For deposit limits the
                      vocabulary matches the `reason` values the limits API
                      returns pre-flight.
                    type: string
                    example: transaction_limit
                  field:
                    description: The offending request field, present alongside `code`.
                    type: string
                    example: amountUsd
                  retryable:
                    description: >-
                      Whether retrying the same request later may succeed
                      without changing its inputs.
                    type: boolean
                    example: true
                required:
                  - title
                  - status
                additionalProperties: false
        '503':
          description: Response for status 503
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    default: about:blank
                    description: A URI reference that identifies the problem type
                    type: string
                    example: urn:problem-type:auth:unauthorized
                  title:
                    description: A short, human-readable summary of the problem type
                    type: string
                    example: Unauthorized
                  status:
                    description: The HTTP status code
                    type: number
                    example: 400
                  detail:
                    description: A human-readable explanation specific to this occurrence
                    type: string
                  instance:
                    description: A URI reference that identifies the specific occurrence
                    type: string
                    example: /errors/1234567890
                  code:
                    description: >-
                      Machine-readable cause, present when exactly one thing
                      failed. Branch on this, never on `detail`, which is
                      human-facing copy and may change. For deposit limits the
                      vocabulary matches the `reason` values the limits API
                      returns pre-flight.
                    type: string
                    example: transaction_limit
                  field:
                    description: The offending request field, present alongside `code`.
                    type: string
                    example: amountUsd
                  retryable:
                    description: >-
                      Whether retrying the same request later may succeed
                      without changing its inputs.
                    type: boolean
                    example: true
                required:
                  - title
                  - status
                additionalProperties: false
      security:
        - bearerAuth: []
        - integratorJwt: []
        - hmacAuth: []
          integratorKey: []
          timestamp: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Cognito JWT token for regular user authentication
    integratorJwt:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Integrator JWT token (prefix: spr_) for frontend integrator
        authentication. Obtained via token exchange endpoint.
    hmacAuth:
      type: apiKey
      in: header
      name: X-Signature
      description: >-
        HMAC signature authentication for backend integrators.


        **Required Headers:**

        - X-Integrator-Key: Integrator API key (format: int_...)

        - X-Signature: HMAC signature (format: sha256={hex})

        - X-Timestamp: Unix timestamp in milliseconds

        - Authorization: Bearer {user-api-key}


        **Signature Algorithm:** HMAC-SHA256


        **Signature Format:** {timestamp}.{METHOD}.{path}.{bodyHash}

        - timestamp: Unix timestamp in milliseconds

        - METHOD: HTTP method in UPPERCASE (GET, POST, etc.)

        - path: Request path (e.g., /v1/transactions)

        - bodyHash: SHA256 hex digest of request body (empty string if no body)


        **Timestamp Tolerance:** ±5 minutes (300 seconds)


        **Example:**

        For POST /v1/transactions with body {"amount":100} and timestamp
        1234567890000:

        Payload: 1234567890000.POST./v1/transactions.{sha256(body)}

        Signature: sha256=abc123...
    integratorKey:
      type: apiKey
      in: header
      name: X-Integrator-Key
      description: 'Integrator API key (format: int_...) used with HMAC authentication'
    timestamp:
      type: apiKey
      in: header
      name: X-Timestamp
      description: >-
        Unix timestamp in milliseconds for replay attack prevention. Must be
        within 5 minutes of server time.

````