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

# Create A Swap Promise (quote)

> Creates a swap promise for a currency pair. A promise is a short-lived signed quote (JWT) returned in the `uuid` field that must be sent back to `POST /transactions/swap/` to execute the swap before it expires.

The swap can be fiat-to-crypto, crypto-to-fiat or crypto-to-crypto. The `amount` can be expressed either in `from_currency` or in `to_currency`, indicated by `amount_currency`.

The pair must be enabled for swap for the account (currency availability and per-account rollout apply); otherwise a 409 is returned.

**How to obtain the required values:**
- `from_currency` / `to_currency`: enabled swap currencies for the account's country.
- `amount_currency`: must equal `from_currency` or `to_currency`.
- `gateway`: use `"balance"` for the balance swap.

---

**Authorization**

- Requires a valid API key.



## OpenAPI

````yaml post /wallet/transactions/quotes/
openapi: 3.0.0
info:
  title: Ripio Gateway
  description: Ripio API - Services documentation.
  version: 0.1.0
  x-logo:
    url: https://cwstatic.nyc3.digitaloceanspaces.com/1996/bitcointrade.png
servers:
  - url: https://api.ripio.com
    description: Production environment
security: []
paths:
  /wallet/transactions/quotes/:
    post:
      tags:
        - Ripio Wallet
      summary: transactions - Create a swap promise (quote)
      description: >-
        Creates a swap promise for a currency pair. A promise is a short-lived
        signed quote (JWT) returned in the `uuid` field that must be sent back
        to `POST /transactions/swap/` to execute the swap before it expires.


        The swap can be fiat-to-crypto, crypto-to-fiat or crypto-to-crypto. The
        `amount` can be expressed either in `from_currency` or in `to_currency`,
        indicated by `amount_currency`.


        The pair must be enabled for swap for the account (currency availability
        and per-account rollout apply); otherwise a 409 is returned.


        **How to obtain the required values:**

        - `from_currency` / `to_currency`: enabled swap currencies for the
        account's country.

        - `amount_currency`: must equal `from_currency` or `to_currency`.

        - `gateway`: use `"balance"` for the balance swap.


        ---


        **Authorization**


        - Requires a valid API key.
      parameters:
        - in: header
          name: authorization
          required: true
          description: The API key as a string.
          schema:
            type: string
        - in: header
          name: signature
          required: true
          description: >-
            See the [Generating
            Signature](/static/api/authentication#generating-signature) section
            for more details.
          schema:
            type: string
        - in: header
          name: timestamp
          required: true
          description: >-
            A timestamp in milliseconds. See the [Timestamp
            Security](/static/api/authentication#timestamp-security) section for
            more details.
          schema:
            type: number
        - in: header
          name: timstamp-tolerance
          required: false
          description: >-
            An additional, non-required parameter, that you can send to specify
            the number of milliseconds after the timestamp for the request to be
            valid. See the [Timestamp
            Security](/static/api/authentication#timestamp-security) section for
            more details.
          schema:
            type: number
      requestBody:
        content:
          application/json:
            schema:
              properties:
                from_currency:
                  description: Currency ticker to swap from.
                  type: string
                  example: ARS
                to_currency:
                  description: Currency ticker to swap to.
                  type: string
                  example: BTC
                amount_currency:
                  description: >-
                    Currency in which `amount` is expressed. Must equal
                    `from_currency` or `to_currency`.
                  type: string
                  example: ARS
                amount:
                  description: >-
                    Amount to swap as a decimal string, expressed in
                    `amount_currency`.
                  type: string
                  example: '10000'
                gateway:
                  description: Gateway identifier for the swap.
                  type: string
                  example: balance
              required:
                - from_currency
                - to_currency
                - amount_currency
                - amount
                - gateway
              type: object
            examples:
              default:
                value:
                  from_currency: ARS
                  to_currency: BTC
                  amount_currency: ARS
                  amount: '10000'
                  gateway: balance
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                description: Swap promise created successfully.
                properties:
                  error_code:
                    type: string
                  message:
                    type: string
                  data:
                    description: >-
                      Swap promise (quote) returned by the promises endpoint.
                      The `uuid` is a signed token (JWT) that must be sent to
                      POST /transactions/swap/ to execute the swap before it
                      expires.
                    properties:
                      uuid:
                        description: >-
                          Signed promise token (JWT). Pass it as `promise` to
                          execute the swap.
                        type: string
                        example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
                      from_currency:
                        description: Currency ticker to swap from.
                        type: string
                        example: ARS
                      from_currency_id:
                        description: Internal id of the from currency.
                        type: integer
                        example: 1
                      to_currency:
                        description: Currency ticker to swap to.
                        type: string
                        example: BTC
                      to_currency_id:
                        description: Internal id of the to currency.
                        type: integer
                        example: 2
                      rate:
                        description: Exchange rate (with spread applied) for the pair.
                        type: string
                        example: '0.000000005742'
                      inverted_rate:
                        description: Inverted exchange rate.
                        type: string
                        example: '174155346.57'
                      rate_usd:
                        description: USD reference rate for the from currency.
                        type: string
                        example: '0.0255102'
                      amount_from:
                        description: Amount debited from the from currency.
                        type: string
                        example: '10000.00'
                      amount_to:
                        description: Amount credited in the to currency.
                        type: string
                        example: '0.00005741'
                      amount_usd:
                        description: USD value of the operation.
                        type: string
                        example: '255.10'
                      currency_pair:
                        description: Pair ticker (`from_to`).
                        type: string
                        example: ARS_BTC
                      alt_currency_pair:
                        description: Alternative currency pair, if applicable.
                        type: string
                        example: null
                      fee:
                        description: Fee amount, or null when there is no fee.
                        type: string
                        example: null
                      fee_currency:
                        description: Fee currency, or null when there is no fee.
                        type: string
                        example: null
                      alt_fee:
                        description: Alternative fee, if applicable.
                        type: string
                        example: null
                      action:
                        description: Promise action.
                        type: string
                        example: SWAP
                      created_at:
                        description: ISO 8601 creation timestamp.
                        type: string
                        example: '2026-04-13T12:00:00.000000Z'
                      expires_at:
                        description: ISO 8601 expiration timestamp.
                        type: string
                        example: '2026-04-13T12:02:00.000000Z'
                      expires_in:
                        description: Seconds until the promise expires.
                        type: integer
                        example: 120
                    required:
                      - uuid
                      - from_currency
                      - to_currency
                      - rate
                      - amount_from
                      - amount_to
                      - currency_pair
                      - expires_at
                      - expires_in
                    type: object
                type: object
        '400':
          description: ''
          content:
            application/json:
              schema:
                description: >-
                  Bad Request — validation error (invalid currency, amount, or
                  amount_currency not equal to from/to).
                type: string
        '401':
          description: Error response 401
        '403':
          description: ''
          content:
            application/json:
              schema:
                description: >-
                  Forbidden — missing `trading_write` permission or account not
                  fully operative for crypto.
                type: string
        '409':
          description: ''
          content:
            application/json:
              schema:
                description: >-
                  Conflict — pair not available for swap, gateway disabled, or
                  quote could not be created.
                type: string
        '429':
          description: ''
          content:
            application/json:
              schema:
                description: Too Many Requests — swap promise creation throttled.
                type: string
        '503':
          description: Error response 503

````