Skip to main content

Documentation Index

Fetch the complete documentation index at: https://fireblocks-43c4b3ee-chore-add-cli.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Beta Feature

The Trading API is currently in beta and subject to change. For participation details, contact your Fireblocks Customer Success Manager or email CSM@fireblocks.com.
This guide provides a step-by-step example of how to execute a swap using the Fireblocks Trading API via direct access providers, such as Uniswap. A swap is the process of exchanging one cryptocurrency for another on the same network. The guide demonstrates swapping ETH for USDC on Ethereum using Uniswap as the direct access provider.

Prerequisites

Before you begin, ensure you have completed the prerequisites outlined in the Trading API Overview:
  • ✅ Fireblocks API credentials configured
  • ✅ Vault accounts with sufficient assets
  • ✅ Fireblocks TypeScript SDK installed (@fireblocks/[email protected])

SDK Setup

First, set up your Fireblocks SDK client:
import { Fireblocks } from "@fireblocks/ts-sdk";
import * as fs from "fs";

// Initialize the Fireblocks SDK
const fireblocks = new Fireblocks({
 apiKey: "your-api-key",
 secretKey: fs.readFileSync("/path/to/your/secret.key", "utf8"),
 basePath: "https://api.fireblocks.io"
});

Swap Flow Overview

The following steps outline the process for executing a swap via direct access providers:
1. List Providers 
2. Approve Terms (executed once per workspace and ONLY via the Fireblocks console)
3. Create Quote 
4. Execute Order 
5. Monitor Order