Skip to main content

Install

npm install @oneswap/sdk

Get an API key

Sign up at oneswap.cc and create an API key from your dashboard.

Initialize the client

import { OneSwap } from '@oneswap/sdk'

const client = new OneSwap({
  apiKey: 'os_live_...',
  timeout: 30000 // optional, milliseconds
})

Verify it works

const pools = await client.pools.list()
console.log(`Found ${pools.length} pools`)

Next steps