Swaps

Get available quotes for a swap between two assets.

post/api/v1/swaps/quotes

Request

  • Base URL: https://api.fordefi.com
  • URL: https://api.fordefi.com/api/v1/swaps/quotes
  • Auth: HTTP bearer

Request body

vault_idstring uuid required

The unique identifier of the vault.

amountstring required

The amount to swap.

slippage_bpsstring

The slippage tolerance in basis points.

signer_type'initiator' | 'api_signer' | 'end_user' | 'multiple_signers' | 'api_user'
requested_provider_idsProviderId[]

The provider ids to use for the quote. If empty, all providers will be used.

Example request

{
  "input_asset_identifier": {
    "details": {
      "token": {
        "base58_repr": "4fYNw3dojWmQ4dXtSGE9epjRGy9pFSx62YypT7avPYvA"
      }
    }
  },
  "output_asset_identifier": {
    "details": {
      "token": {
        "base58_repr": "4fYNw3dojWmQ4dXtSGE9epjRGy9pFSx62YypT7avPYvA"
      }
    }
  },
  "amount": "1000000000000000000",
  "slippage_bps": "1000000000000000000"
}

Response

Successful Response

Changes

    • warning

      added the new near_intents enum value to the /// response property for the response status

    • warning

      added the new near_intents enum value to the //// response property for the response status

    • info

      added the new near_intents enum value to the request property /

    • info

      added the optional property to the response with the status