For the complete documentation index, see llms.txt. This page is also available as Markdown.

Quick Start

This guide will help you get up and running with the Ferra Aggregator SDK in minutes.

1. Initialize the SDK

Mainnet Setup

import { initFerraAggregatorSDK } from '@ferra-labs/aggregator'

const useAggreratorFerraSdk = (address: string) => {
  return useMemo(
    () =>
      initFerraAggregatorSDK({
        network: NETWORK,
        fullNodeUrl: FULL_NODE_URL,
        wallet: address,
      }),
    [address]
  );
};

2. Get Best Quotes

Find the best trading routes for your swap:

3. Execute Swap

Execute the swap using the best route:

4. Complete Example

Here's a complete working example:

Last updated