Native Documentation
  • introduction
    • What is Native
    • About Native V2
    • Benefits for Key Players
  • SOLUTION
    • Native Credit Pool
    • Native Swap Engine
  • CONCEPTS
    • Orderbook
    • Firm Quote Orders
    • Auto Sign Orders
    • Swap Fees
    • Slippage
    • Base and Listed Assets
    • Single-Sided Liquidity Pools
    • Total Available Liquidity
    • Liquidity Pairing
    • Liquidity Bootstrapping
    • Health Ratio
    • Earning Fees and Incentives
    • Credit-Based Swap
      • Collateral Factor
      • PMM Credit
      • Settlement and Liquidation
    • Market-Responsive Pricing
    • Risks
  • USER GUIDE
    • Add Liquidity
    • Pair Liquidity
    • Claim Rewards
    • Swap with Native
  • Build with Native
    • Swap Aggregators
      • Guide
      • FirmQuote Swap APIs
        • GET Orderbook
        • GET Indicative quote
        • GET Firm quote
    • Asset Issuers
      • For Pegged Assets
      • For General Assets
  • Resources
    • Addresses
    • Audits
    • Github
    • System Status
    • Business Source License
    • Media Kit
Powered by GitBook
On this page
  1. Build with Native
  2. Swap Aggregators
  3. FirmQuote Swap APIs

GET Firm quote

PreviousGET Indicative quoteNextAsset Issuers

Last updated 3 months ago

Get signed order data for selling a ERC20 / native token. Submit the return data to Native router to execute swap.

get
Query parameters
from_addressstringRequired

Address of the user that sells the token_in

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

Address of the user that receives the token_out. If empty, this address will be the same as from_address

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

Address of the end user that initiated the swap request.

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

Address of the token to be sold

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

Address of the token to be bought

Pattern: ^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
slippagenumberOptional

Number in percent. For example, passing the value 5 means 5%, 0.1 means 0.1% slippage tolerance. By default it's 0.

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
500
There was an exception with the server
get
GET /swap-api-v2/v1/firm-quote HTTP/1.1
Host: v2.api.native.org
apiKey: text
Accept: */*
{
  "success": true,
  "orders": [
    {
      "pool": "text",
      "signer": "text",
      "recipient": "text",
      "sellerToken": "text",
      "buyerToken": "text",
      "effectiveSellerTokenAmount": "text",
      "sellerTokenAmount": "text",
      "buyerTokenAmount": "text",
      "deadlineTimestamp": 1,
      "nonce": 1,
      "quoteId": "text",
      "multiHop": true,
      "signature": "text",
      "externalSwapCalldata": "text",
      "amountOutMinimum": "text",
      "widgetFee": {
        "signer": "text",
        "feeRecipient": "text",
        "feeRate": 1
      },
      "widgetFeeSignature": "text"
    }
  ],
  "functionCall": "text",
  "widgetFee": {
    "signer": "text",
    "feeRecipient": "text",
    "feeRate": 1
  },
  "widgetFeeSignature": "text",
  "recipient": "text",
  "calldata": "text",
  "amountIn": "text",
  "amountOut": "text",
  "toWrap": true,
  "toUnwrap": true,
  "fallbackSwapDataArray": [
    "text"
  ],
  "tokenTransferFeeOnPercent": 1,
  "txRequest": {
    "target": "text",
    "calldata": "text",
    "value": "text"
  },
  "source": "p0",
  "errorMessage": "text",
  "router_version": "text",
  "gasCostUsd": 1,
  "estimateDuration": 1,
  "bridge": {},
  "amountInOffset": 1,
  "amountOutMinimumOffset": 1
}