OpenAPI Specification
openapi: 3.0.3
info:
title: ParaSwap Market API v5 prices API
description: The ParaSwap Market API (now Velora Market API) provides real-time optimal swap routing across 170+ DEXes on 12 EVM-compatible chains. Retrieve price quotes with optimal routes, build transaction call data, or combine both in a single call. Supports the Augustus v5 smart contract.
contact:
email: contact@paraswap.io
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
version: '5.0'
servers:
- url: https://apiv5.paraswap.io
tags:
- name: prices
description: Get swap path and pricing.
paths:
/prices:
get:
operationId: getPrices
tags:
- prices
summary: Request prices.
description: Returns optimal swap route and pricing across all integrated DEXes for a given token pair and amount.
parameters:
- name: srcToken
description: Source Token Address or Token Symbol (for tokens from /tokens).
in: query
required: true
schema:
type: string
example: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE'
- name: srcDecimals
description: Source Token Decimals; can be omitted if Symbol is provided for `srcToken`.
in: query
required: false
schema:
$ref: '#/components/schemas/TokenDecimals'
example: 18
- name: destToken
description: Destination Token Address or Token Symbol (for tokens from /tokens).
in: query
required: true
schema:
type: string
example: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
- name: destDecimals
description: Destination Token Decimals; can be omitted if Symbol is provided for `destToken`.
in: query
required: false
schema:
$ref: '#/components/schemas/TokenDecimals'
example: 6
- name: amount
description: Amount in the Denomination of Source Token
example: '1000000000000000000'
in: query
required: true
schema:
type: string
pattern: ^\d+$
- name: side
in: query
description: Side of the swap.
required: true
schema:
$ref: '#/components/schemas/SwapSide'
- name: network
in: query
description: ID of the blockchain network.
required: false
schema:
allOf:
- $ref: '#/components/schemas/Network'
- default: 1
- name: otherExchangePrices
in: query
description: _If provided_, **others** object is filled in the response with price quotes from other exchanges (if available for comparison).
required: false
schema:
type: boolean
- name: includeDEXS
in: query
description: Comma Separated List of DEXs to include without spaces.
required: false
explode: false
schema:
type: array
items:
$ref: '#/components/schemas/DEXs'
- name: excludeDEXS
in: query
description: Comma Separated List of DEXs to exclude without spaces.
required: false
explode: false
schema:
type: array
items:
$ref: '#/components/schemas/DEXs'
- name: includeContractMethods
in: query
description: Comma Separated List of Contract Methods to include without spaces.
required: false
explode: false
schema:
type: array
items:
$ref: '#/components/schemas/ContractMethod'
- name: excludeContractMethods
in: query
description: Comma Separated List of Contract Methods to exclude without spaces.
required: false
explode: false
schema:
type: array
items:
$ref: '#/components/schemas/ContractMethod'
- name: userAddress
in: query
description: User Wallet Address.
required: false
schema:
type: string
- name: route
in: query
description: Dash (-) separated list of tokens (addresses or symbols from /tokens) to comprise the price route. Max 4 tokens
required: false
schema:
type: string
examples:
? ''
: value: null
ETH-USDC:
value: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE-0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
- name: partner
in: query
description: partner string
required: false
schema:
type: string
responses:
'200':
$ref: '#/components/responses/PricesSuccessResponse'
'400':
$ref: '#/components/responses/PricesErrorResponse'
components:
schemas:
DEXs:
type: string
description: Supported DEXs. The list may change
enum:
- Uniswap
- Kyber
- Bancor
- Oasis
- Compound
- Fulcrum
- 0x
- MakerDAO
- Chai
- ParaSwapPool
- Aave
- Aave2
- MultiPath
- MegaPath
- Curve
- Curve3
- Saddle
- IronV2
- BDai
- idle
- Weth
- Beth
- UniswapV2
- Balancer
- 0xRFQt
- ParaSwapPool2
- ParaSwapPool3
- ParaSwapPool4
- ParaSwapPool5
- ParaSwapPool6
- SushiSwap
- LINKSWAP
- Synthetix
- DefiSwap
- Swerve
- CoFiX
- Shell
- DODOV1
- DODOV2
- OnChainPricing
- PancakeSwap
- PancakeSwapV2
- ApeSwap
- Wbnb
- acryptos
- streetswap
- bakeryswap
- julswap
- vswap
- vpegswap
- beltfi
- ellipsis
- QuickSwap
- COMETH
- Wmatic
- Nerve
- Dfyn
- UniswapV3
- Smoothy
- PantherSwap
- OMM1
- OneInchLP
- CurveV2
- mStable
- WaultFinance
- MDEX
- ShibaSwap
- CoinSwap
- SakeSwap
- JetSwap
- Biswap
- BProtocol
example: SushiSwap
OptimalRoute:
type: object
required:
- percent
- swaps
properties:
percent:
type: number
example: 100
swaps:
type: array
items:
$ref: '#/components/schemas/OptimalSwap'
Network:
type: number
enum:
- 1
- 3
- 56
- 137
PriceRoute:
description: Response body returned from /prices endpoint. Pass this object unmodified to /transactions.
type: object
required:
- blockNumber
- network
- srcToken
- srcDecimals
- srcAmount
- destToken
- destDecimals
- destAmount
- bestRoute
- gasCost
- gasCostUSD
- side
- tokenTransferProxy
- contractAddress
- contractMethod
- srcUSD
- destUSD
- partner
- partnerFee
- maxImpactReached
- hmac
properties:
blockNumber:
type: integer
minimum: 0
example: 13015909
network:
$ref: '#/components/schemas/Network'
srcToken:
description: Source Token Address
type: string
example: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE'
srcDecimals:
$ref: '#/components/schemas/TokenDecimals'
srcAmount:
type: string
example: '1000000000000000000'
destToken:
description: Destination Token Address
type: string
example: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
destDecimals:
$ref: '#/components/schemas/TokenDecimals'
destAmount:
type: string
example: '1000000000000000000'
bestRoute:
type: array
items:
$ref: '#/components/schemas/OptimalRoute'
others:
description: Available if /prices was called with otherExchangePrices=true
type: array
items:
$ref: '#/components/schemas/OptionalRate'
gasCostUSD:
type: string
example: '11.947163'
gasCost:
type: string
example: '111435'
side:
$ref: '#/components/schemas/SwapSide'
tokenTransferProxy:
type: string
example: '0x3e7d31751347BAacf35945074a4a4A41581B2271'
contractAddress:
type: string
example: '0x485D2446711E141D2C8a94bC24BeaA5d5A110D74'
contractMethod:
type: string
example: swapOnUniswap
srcUSD:
type: string
example: '3230.3000000000'
destUSD:
type: string
example: '3218.9300566052'
partner:
type: string
example: paraswap.io
partnerFee:
type: integer
minimum: 0
example: 0
maxImpactReached:
type: boolean
example: false
hmac:
type: string
example: 319c5cf83098a07aeebb11bed6310db51311201f
PriceRouteWithError:
type: object
required:
- error
- value
- priceRoute
properties:
error:
type: string
enum:
- ESTIMATED_LOSS_GREATER_THAN_MAX_IMPACT
value:
description: price impact percentage
type: string
pattern: ^\d+(\.\d+)?%$
example: 99%
priceRoute:
$ref: '#/components/schemas/PriceRoute'
SwapSide:
type: string
enum:
- SELL
- BUY
ContractMethod:
type: string
enum:
- swapOnUniswap
- buyOnUniswap
- swapOnUniswapFork
- buyOnUniswapFork
- swapOnUniswapV2Fork
- buyOnUniswapV2Fork
- simpleBuy
- simpleSwap
- multiSwap
- megaSwap
- protectedMultiSwap
- protectedMegaSwap
- protectedSimpleSwap
- protectedSimpleBuy
- swapOnZeroXv2
- swapOnZeroXv4
- buy
TokenDecimals:
type: integer
minimum: 0
PriceError:
type: object
required:
- error
properties:
error:
type: string
OptimalSwapExchange:
type: object
required:
- exchange
- srcAmount
- destAmount
- percent
properties:
exchange:
type: string
example: UniswapV2
srcAmount:
type: string
example: '1000000000000000000'
destAmount:
type: string
example: '1000000000000000000'
percent:
type: number
example: 100
data:
type: object
OptionalRate:
type: object
required:
- exchange
- srcAmount
- destAmount
properties:
exchange:
type: string
example: UniswapV2
srcAmount:
type: string
example: '1000000000000000000'
destAmount:
type: string
example: '3255989380'
unit:
type: string
example: '3255989380'
data:
type: object
OptimalSwap:
type: object
required:
- srcToken
- srcDecimals
- destToken
- destDecimals
- swapExchanges
properties:
srcToken:
type: string
srcDecimals:
$ref: '#/components/schemas/TokenDecimals'
destToken:
type: string
destDecimals:
$ref: '#/components/schemas/TokenDecimals'
swapExchanges:
type: array
items:
$ref: '#/components/schemas/OptimalSwapExchange'
responses:
PricesSuccessResponse:
description: Successful prices response
content:
application/json:
schema:
type: object
properties:
priceRoute:
$ref: '#/components/schemas/PriceRoute'
PricesErrorResponse:
description: Price Error
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/PriceError'
- $ref: '#/components/schemas/PriceRouteWithError'
externalDocs:
description: Velora / ParaSwap Developer Documentation
url: https://developers.velora.xyz/api/velora-api/velora-market-api