Valora swaps API

Swap quotes

Operations 1

POST /getSwapQuote Get a swap quote #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/valora-swaps-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

valora-swaps-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Valora hooks Swaps API
  description: Public HTTP API behind the Valora mobile wallet, including the open-source Divvi Hooks API (positions, shortcuts) and the token, swap-quote, NFT, and transaction-simulation endpoints the wallet consumes. This specification is DERIVED by API Evangelist from Valora's open-source code (the divvi-xyz/hooks repository, formerly valora-inc/hooks, which implements the hooks-api Google Cloud Function and consumes the other endpoints) plus live probes of the production host. Valora does not publish an OpenAPI; treat this as a faithful reconstruction, not a provider contract.
  version: 1.0.0
  contact:
    url: https://github.com/divvi-xyz/hooks
  x-provenance:
    generated: '2026-07-21'
    method: derived
    source: https://github.com/divvi-xyz/hooks (src/api/index.ts, src/runtime/simulateTransactions.ts, src/utils/prepareSwapTransactions.ts, src/apps/hedgey/nfts.ts)
    probes:
    - url: https://api.mainnet.valora.xyz/getTokensInfoWithPrices
      status: 200
    - url: https://api.mainnet.valora.xyz/hooks-api/getShortcuts
      status: 200
    - url: https://api.mainnet.valora.xyz/getSwapQuote
      status: 400
servers:
- url: https://api.mainnet.valora.xyz
  description: Production (mainnet networks)
- url: https://api.alfajores.valora.xyz
  description: Staging (Celo Alfajores and other testnets)
tags:
- name: swaps
  description: Swap quotes
paths:
  /getSwapQuote:
    post:
      operationId: getSwapQuote
      tags:
      - swaps
      summary: Get a swap quote
      description: Returns an unvalidated swap transaction for a proposed token swap (used by the wallet and by swap-deposit shortcuts).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SwapQuoteRequest'
      responses:
        '200':
          description: Swap quote.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SwapQuoteResponse'
        '400':
          description: Invalid or unsupported swap request.
components:
  schemas:
    NetworkId:
      type: string
      enum:
      - celo-mainnet
      - celo-alfajores
      - ethereum-mainnet
      - ethereum-sepolia
      - arbitrum-one
      - arbitrum-sepolia
      - op-mainnet
      - op-sepolia
      - polygon-pos-mainnet
      - polygon-pos-amoy
      - base-mainnet
      - base-sepolia
    SwapQuoteRequest:
      type: object
      required:
      - buyToken
      - buyNetworkId
      - sellNetworkId
      - sellAmount
      - userAddress
      properties:
        buyToken:
          type: string
          description: Address of the token to buy.
        buyIsNative:
          type: boolean
        buyNetworkId:
          $ref: '#/components/schemas/NetworkId'
        sellToken:
          type: string
        sellIsNative:
          type: boolean
        sellNetworkId:
          $ref: '#/components/schemas/NetworkId'
        sellAmount:
          type: string
          description: Amount to sell in base units (serialized bigint).
        slippagePercentage:
          type: string
        postHook:
          type: object
          description: Optional Squid post-hook executed after the swap (cross-chain swap-deposit flows).
          additionalProperties: true
        userAddress:
          type: string
        enableAppFee:
          type: boolean
    SwapQuoteResponse:
      type: object
      properties:
        unvalidatedSwapTransaction:
          type: object
          description: Proposed swap transaction (from, to, data, value, gas, estimatedGasUse, allowanceTarget, simulationStatus, ...).
          additionalProperties: true
        details:
          type: object
          properties:
            swapProvider:
              type: string
        errors:
          type: array
          items:
            type: object
            properties:
              provider:
                type: string
              error:
                type: object
                properties:
                  message:
                    type: string
                  details: {}