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. Crosschain Swap API

GET Firm quote

Get committed (intent) amount out for bridging a ERC20 / native token.

get
Query parameters
from_addressstringRequired

Address of the user that sells the token_in

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

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

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

Address of the end user that initiated the swap request.

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

Blockchain name, eg: ethereum, bsc, ...

Possible values:
dst_chainstring · enumRequired

Blockchain name, eg: ethereum, bsc, ...

Possible values:
token_instringRequired

Address of the token to be sold

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

Address of the token to be bought

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

Amount of token to be sold, in ether unit.

Example: 1
amount_weistringRequired

Amount of token to be sold, in wei unit.

Example: 1000000000000000000
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
Header parameters
apiKeystringRequired

The API key that was assigned to you by Native

Responses
200
Success
application/json
get
GET /bridge/v1/bridge/firm-quote HTTP/1.1
Host: newapi.native.org
apiKey: text
Accept: */*
200

Success

{
  "sellerToken": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
  "buyerToken": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
  "srcChainId": 1,
  "destChainId": 1,
  "amountIn": "1000000000000000000",
  "amountOut": "1000000000000000000",
  "amountOutEther": 1,
  "estimateDuration": 1,
  "bridgeFeeUsd": 1,
  "source": "p0",
  "quoteId": "text",
  "signer": "0x1235dB6df8a915557fF1fD0B9098C5548F2e06e3",
  "initiateDeadline": 1,
  "fillDeadline": 1,
  "refundBufferTime": "text",
  "contract": {
    "swapper": "0x1235dB6df8a915557fF1fD0B9098C5548F2e06e3",
    "order": {
      "pool": "0x1235dB6df8a915557fF1fD0B9098C5548F2e06e3",
      "signer": "0x1235dB6df8a915557fF1fD0B9098C5548F2e06e3",
      "recipient": "0x1235dB6df8a915557fF1fD0B9098C5548F2e06e3",
      "sellerToken": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
      "buyerToken": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
      "effectiveSellerTokenAmount": "1000000000000000000",
      "sellerTokenAmount": "1000000000000000000",
      "buyerTokenAmount": "1000000000000000000",
      "deadlineTimestamp": "text",
      "nonce": "text",
      "quoteId": "text",
      "multiHop": true,
      "signature": "text",
      "widgetFee": {
        "signer": "text",
        "feeRecipient": "text",
        "feeRate": 1
      },
      "widgetFeeSignature": "text",
      "externalSwapCalldata": "text",
      "amountOutMinimum": "1000000000000000000"
    },
    "orderInput": {
      "token": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
      "initiateDeadline": 1,
      "amount": "1000000000000000000"
    },
    "orderOutput": {
      "token": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
      "amount": "1000000000000000000",
      "chainId": 1,
      "recipient": "0x1235dB6df8a915557fF1fD0B9098C5548F2e06e3"
    },
    "fallbackData": {
      "bridgeAddress": "0x1235dB6df8a915557fF1fD0B9098C5548F2e06e3",
      "bridgeCalldata": "text"
    }
  },
  "txRequest": {
    "target": "text",
    "calldata": "text",
    "value": "text"
  }
}