🔸Setup
Step by step guide to set up the Marswap Aggregator Widget
Remember to grab your API Key and Integrator ID from the Marswap Team.
Modular Projects
If you are using modular frameworks like React follow the below steps to get started.
Installation
Install the widget using npm
or yarn
Import Widget
Quick Start
Below is the minimum setup code for the widget to get you started.
HTML and JavaScript
If you are using plain HTML with JavaScript follow the below steps to get started.
Import Widget
The Marswap Aggregator Widget can be imported using CDN or equivalent scripts like so.
Create Widget Container
Place an HTML element within the <body>
tags of the code and set the id to marswap-widget
Initialise the Widget
Load the widget using JavaScript with the InitMarswapWidget()
function.
Set the widgetElementId
inside the function to marswap-widget
. This tells the code to render the Marswap Aggregator Widget inside the HTML element called marswap-widget
.
Quick Start
Below is the minimum setup code for the widget to get you started
Head to the next section of the documentation to learn how to configure your new Marswap Aggregator Widget.
Last updated