Quick Start
GET API Key
You can't get your personal API key yet. As of February 28, 2023, this function will work.
Swapper API works with API Key. This API key is unique and private. You should use this API key for requests you send from your server or frontend. Undesirable results may occur if this API key is started to be used by 3rd parties. So do not share your API Key with anyone. Swapper is currently developing a Dashboard to generate API Key. Until then you can use this API Key:
1. Install Swapper
The easiest way to integrate the Swapper SDK into your JavaScript project is through the npm module.
Install the package via npm
:
Adding Swapper to the frontend project is by the following
2. Initialize Swapper
After your dependency is added, you simply need to initialize swapper with class initialization:
Warning: Make sure to keep your api key private
3. Using Dex API endpoints
After that we can use service functions to interact with the Dex API and Web3 wallet.
4. Using services and utils
There are some utility functions which can help you build your dex even more quicker,
Last updated