Arken Finance
Search
K
Comment on page

Arken Swap Engine API

API Endpoint: https://public-api.arken.finance
Please refer to Arken API for getting API tokens
Using Arken Finance Swap Engine API, you can find the best route to exchange assets and make the swap. Here are the step-by-step instructions on how to use Arken Swap Engine API:
  1. 1.
    Find the addresses of the tokens you want to swap. For example, swapping WETH -> USDT
    1. 1.
      WETH: 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
    2. 2.
      USDT: 0xdac17f958d2ee523a2206206994597c13d831ec7
  2. 2.
    Check for allowance of Arken Approve contract to spend source asset using /approve/allowance
  3. 3.
    If necessary, give approval for Arken Approve contract to spend the source token using /approve/transaction
  4. 4.
    Monitor the best exchange route using /swap/quote
  5. 5.
    When you are ready to swap, use /swap/swap to generate the call data to perform the swap

Chains

get
https://public-api.arken.finance
/swap-engine/v1/chains
Return supported chains list

Health Check

get
https://public-api.arken.finance
/swap-engine/v1/{chainID}/healthcheck
API health check

Approve

get
https://public-api.arken.finance
/swap-engine/v1/{chainID}/approve/spender
Address of the Arken Approve that must be trusted to spend funds for the exchange
get
https://public-api.arken.finance
/swap-engine/v1/{chainID}/approve/transaction
Generate data for calling the contract in order to allow the Arken Approve to spend funds
get
https://public-api.arken.finance
/swap-engine/v1/{chainID}/approve/allowance
Get the number of tokens that the Arken Approve is allowed to spend

Info

get
https://public-api.arken.finance
/swap-engine/v1/{chainID}/liquidity-sources
List of liquidity sources that are available for routing in the Arken Finance

Swap

get
https://public-api.arken.finance
/swap-engine/v1/{chainID}/swap/quote
Find the best quote to exchange via Arken Finance
get
https://public-api.arken.finance
/swap-engine/v1/{chainID}/swap/swap
Generate data for calling the Arken Dex for exchange