API

Multi_swap_quote

  • url: https://open-api.openocean.finance/v3/:chain/multi_swap_quote

  • method: post

  • params:

Parameter
Type
Example
Description

chain

string

arbitrum

arbitrum

inToken

array

inTokens

inToken.inTokenSymbol

string

ARB

token symbol

inToken.inTokenAddress

string

0x912CE59144191C1204E64559FE8253a0e49E6548

token address

inToken.amount

string

2000000000000000000

token amount

inToken.slippage

number

100

100 equals 1%

outToken

object

outToken

outToken.outTokenSymbol

string

USDT

token symbol

outToken.outTokenAddress

string

0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9

token address

gasPrice

number

10000000

gas price

referrer

string?

0x0000000000000000000000000000000000000000

Please contact us for a unique referrer parameter

disabledDexIds

string?

Enter the 'index' number of dexs through dexList endpoint to disable single or multiple dexs separated by commas, e.g. disabledDexIds: "2,6,9".

account

string

0xBd5c13e01060D17a159D5acF3BDa97bf7E6F59AC

user's address

  • example:

    • body:

      {
          "inToken": [
              {
                  "inTokenSymbol": "ETH",
                  "inTokenAddress": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
                  "amount": "1000000000000000000",
                  "slippage": 1000
              },
              {
                  "inTokenSymbol": "ARB",
                  "inTokenAddress": "0x912CE59144191C1204E64559FE8253a0e49E6548",
                  "amount": "2000000000000000000",
                  "slippage": 1000
              }
          ],
          "outToken": {
              "outTokenSymbol": "USDT",
              "outTokenAddress": "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"
          },
          "gasPrice": 10000000,
          "referrer": "0x3487ef9f9b36547e43268b8f0e2349a226c70b53",
          "disabledDexIds": "",
          "account": "0xBd5c13e01060D17a159D5acF3BDa97bf7E6F59AC"
      }
    • response:

      {
          "inToken": [
              {
                  "address": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
                  "decimals": 18,
                  "symbol": "ETH",
                  "name": "Ether"
              },
              {
                  "address": "0x912CE59144191C1204E64559FE8253a0e49E6548",
                  "decimals": 18,
                  "symbol": "ARB",
                  "name": "Arbitrum"
              }
          ],
          "outToken": {
              "address": "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",
              "decimals": 6,
              "symbol": "USDT",
              "name": "Tether USD"
          },
          "from": "0xBd5c13e01060D17a159D5acF3BDa97bf7E6F59AC",
          "to": "0xd1b54Dd4fca2b680d00beF0C5D66806a643D0e41",
          "swap": [
              {
                  "inAmount": "1000000000000000000",
                  "outAmount": "2638324915",
                  "minOutAmount": "2374492423"
              },
              {
                  "inAmount": "2000000000000000000",
                  "outAmount": "1130078",
                  "minOutAmount": "1017070"
              }
          ],
          "gasPrice": "10000000",
          "chainId": 42161,
          "value": "1002999232984360618",
          "data": "0x............."
      }

Last updated