Skip to main content

🎬 Video Tutorial

Prefer learning by watching? Check out our integration walkthrough: Watch the integration walkthrough on YouTube:

Generate your API Key

  1. Open the DeFindex Console and create your account, or log in.
  2. Go to API Keys and click Generate API Key.
  3. Copy the key. It looks like sk_... and it is the only credential your backend needs.
You hold one active API key at a time: generating a new one revokes the previous one. For a detailed walkthrough with examples, see the Getting Your API Key guide. For the full API reference, see the DeFindex API documentation. This guide will walk you through integrating DeFindex into your app using the provided API. We’ll use TypeScript for the examples, but the concepts apply to any language.

Prerequisites

  • Basic knowledge of TypeScript or JavaScript
  • Node.js environment
  • Stellar SDK installed (npm install stellar-sdk)
  • DeFindex API key — see Getting Your API Key

1. Setting Up the API Client

First, create an ApiClient class to handle authentication and API requests.
Go to Vault Operations for the implementation of each call:
  • Deposit
  • Withdraw
  • Balance
  • APY

Request Parameters Reference

Deposit Request

Withdraw Request

Send Request

Sent to POST /send, at the API root rather than under a vault path.