GET Indicative quote
Query parameters
from_addressstringRequiredPattern:
Address of the user that sells the token_in
^0x[a-fA-F0-9]{40}$
to_addressstringOptionalPattern:
Address of the user that receives the token_out. If empty, this address will be the same as from_address
^0x[a-fA-F0-9]{40}$
src_chainstring · enumRequiredPossible values:
Blockchain name, eg: ethereum, arbitrum, ...
dst_chainstring · enumRequiredPossible values:
Blockchain name, eg: ethereum, arbitrum, ...
token_instringRequiredExample:
Token address for the token to be sold.
0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Pattern: ^0x[a-fA-F0-9]{40}$
token_outstringRequiredExample:
Token address for the token to be bought.
0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Pattern: ^0x[a-fA-F0-9]{40}$
amountnumberOptionalDefault:
Amount of token to be sold, in ether unit.
0
amount_weistringOptionalDefault:
Amount of token to be sold, in wei unit.
0
expiry_timenumberOptionalDefault:
The expiry time of the quote, in seconds.
0
timeout_millisnumberOptionalDefault:
Timeout in milliseconds
2000
Header parameters
apiKeystringRequired
The API key that was assigned to you by Native
Responses
200
Success
application/json
500
There was an exception with the server
get
GET /swap-api-v2/v1/indicative-quote 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