For the complete documentation index, see llms.txt. This page is also available as Markdown.

GET Indicative quote

In src_chain and dst_chain please ensure the parameters are passed with standardised chain names. Reference: Networks

Get amount out for selling a ERC20 / native token.

get
Query parameters
from_addressstringRequired

Effectively recipient. This is the pay out address of the final swapped tokens. Funding address will always be the address calls Native Router.

Pattern: ^0x[a-fA-F0-9]{40}$
src_chainstring · enumRequired

Blockchain name, eg: ethereum, arbitrum, ...

Possible values:
dst_chainstring · enumRequired

Blockchain name, eg: ethereum, arbitrum, ...

Possible values:
token_instringRequired

Token address for the token to be sold.

Example: 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2Pattern: ^0x[a-fA-F0-9]{40}$
token_outstringRequired

Token address for the token to be bought.

Example: 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2Pattern: ^0x[a-fA-F0-9]{40}$
amountnumberOptional

Amount of token to be sold, in ether unit.

Default: 0
amount_weistringOptional

Amount of token to be sold, in wei unit.

Default: 0
expiry_timenumberOptional

The expiry time of the quote, in seconds.

Default: 0
timeout_millisnumberOptional

Timeout in milliseconds

Default: 2000
Header parameters
apiKeystringRequired

The API key that was assigned to you by Native

Responses
200

Success

application/json
successbooleanRead-onlyRequired
buyerTokenstringRead-onlyRequired
sellerTokenstringRead-onlyRequired
buyerTokenAmountnumberRead-onlyRequired
buyerTokenAmountWeistringRead-onlyRequired
sellerTokenAmountnumberRead-onlyRequired
sellerTokenAmountWeistringRead-onlyRequired
pricenumberRead-onlyRequired
widgetFeeUsdnumberRead-onlyRequired
liquidityProviderFeeUsdnumberRead-onlyRequired
totalFeeUsdnumberRead-onlyRequired
routesstring[]Read-onlyRequired
sourcestring · enumRequired

Quote source name

Possible values:
bridgeobjectRead-onlyRequired
get/v1/indicative-quote
GET /swap-api-v2/v1/indicative-quote?from_address=text&src_chain=ethereum&dst_chain=ethereum&token_in=text&token_out=text HTTP/1.1
Host: v2.api.native.org
apiKey: text
Accept: */*
[
  {
    "success": true,
    "buyerToken": "text",
    "sellerToken": "text",
    "buyerTokenAmount": 1,
    "buyerTokenAmountWei": "text",
    "sellerTokenAmount": 1,
    "sellerTokenAmountWei": "text",
    "price": 1,
    "widgetFeeUsd": 1,
    "liquidityProviderFeeUsd": 1,
    "totalFeeUsd": 1,
    "routes": [
      "text"
    ],
    "source": "p0",
    "bridge": {}
  }
]

Last updated