Integrator Quickstart

Create your first Squid cross-chain route request

Step 1: Get Your Integrator ID

  1. Apply for an integrator ID.

  2. Check your email for the integrator ID.

Step 2: Make Your First Route Request

Replace YOUR_INTEGRATOR_ID in the following curl command with your actual integrator ID and replace ADD_EVM_ADDRESS with an EVM address, then paste it into your terminal and hit enter:

curl -X POST 'https://apiplus.squidrouter.com/v2/route' \
-H 'x-integrator-id: YOUR_INTEGRATOR_ID' \
-H 'Content-Type: application/json' \
-d '{
  "fromAddress": "ADD_EVM_ADDRESS",
  "fromChain": "56",
  "fromToken": "0x55d398326f99059fF775485246999027B3197955",
  "fromAmount": "1000000000000000",
  "toChain": "42161",
  "toToken": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
  "toAddress": "ADD_EVM_ADDRESS"
}'

Congrats, you've submitted your first route request!

Parameter Explanation:

  • fromAddress: The address initiating the swap (replace with your address)

  • fromChain: The source chain ID (56 is BNB Chain)

  • fromToken: The token address to swap from (USDT on BNB Chain in this example)

  • fromAmount: The amount to swap (in the smallest unit of the token)

  • toChain: The destination chain ID (42161 is Arbitrum)

  • toToken: The token address to swap to (USDC on Arbitrum in this example)

  • toAddress: The address receiving the swapped tokens

Step 3: Interpret the Response

If successful, you'll receive a JSON response with the optimal route details. Key fields include:

  • route.estimate.toAmount: Estimated amount you'll receive

  • route.estimate.feeCosts: Breakdown of fees

  • route.transactionRequest: Data needed to execute the swap

Build With Squid

Now that you've created a route request. Choose how you want to build with Squid.

Squid’s Integrators Include

Last updated