V2
Socket's latest API version!
Public API Key :
645b2c8c-5825-4930-baf3-d9b997fcd88c
(For testing)Socket's liquidity transfer layer aggregates bridges, DEXs and DEX aggregators under one roof to make it easy for users to move funds between chains. The Socket V2 APIs is the backend that supports the data flow on the frontend and generates the
callData
needed to execute swaps and bridging in one single transaction. The API also checks for token approvals, balances, prices. In this guide, we'll explore step-by-step how the Socket V2 API can be integrated into a DApp.Socket V2 APIs support two different transaction flows :
- 1.Single transaction bridging
- 2.Multi transaction bridging
In Single Transaction Bridging, the user can bridge from one chain to another in a single transaction on the sending chain. This flow limits the number of tokens the user can receive on the destination chain since swapping is available only on the sending chain. The tokens on the destination chain will generally be limited to tokens supported by a bridge. However, the user gets a seamless bridging experience by making just a single transaction.
In Multi Transaction Bridging, the user can bridge any token from one chain to another via multiple transactions. Generally, these are two transactions : one on the sending chain and the other on the destination. The transaction on the sending chain can be a swap + bridge transaction or just a bridging transaction. The transaction on the destination chain will generally be a swap transaction. In case of some bridges such as the Polygon Native bridge that require a claim step on the destination chain, the second transaction may be a claiming transaction. Since the user is required to make a transaction on the destination chain, this flow allows the user to bridge any token from chain A to any token on chain B.
To start integrating with Single Transaction Bridging, head over to :
To start integrating with Multi Transaction Bridging, head over to :
Last modified 3d ago