Browser Wallet SDK

The SDK combines creating and canceling limit order functions.

How to Install the sdk in your project

npm i @openocean.finance/limitorder-sdk

DCA and Limit Order are integrated in the same SDK, so their names are the same

How to use the sdk in your project

You can then use all the functions explored by the SDK (API and swapSdk).

Supported Provider Types

Type
Example
Description

Web3 provider

new Web3(window.ethereum)

Traditional MetaMask-style Web3.js

Ethers provider

new ethers.providers.Web3Provider(...) (v5) / new ethers.BrowserProvider(...) (v6)

Modern Ethers.js integration

Initialize Wallet Provider

Using Web3.js (web3-provider)

Pass the provider to the SDK like this:

Using Ethers.js (ethers-provider)

Ethers v5

Ethers v6 (Recommended)

Usage in SDK:

Create a Limit Order

Cancel a Limit Order

Load Chart (Optional)

Expiration Options

Full Demo (Vue.js + @openocean.finance/limitorder-sdk)

This is a minimal working demo using Vue.js, Web3 or Ethers v6, and OpenOcean's limit order SDK:

Last updated