Getting Started with API

First generate API Key:

  1. Create api_key and refresh

For more details, refer to the DeFindex API documentation.

Postman collection json here

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.

🚀 TypeScript SDK Available!

If you're developing in TypeScript, we highly recommend using our official SDK instead of direct API integration. The SDK provides:

  • Type safety and comprehensive TypeScript definitions

  • Simplified authentication with API keys

  • Built-in error handling and validation

  • Complete coverage of all API endpoints

  • Working examples and detailed documentation

Check out the DeFindex TypeScript SDK documentation for the easiest integration experience.

For non-TypeScript projects or custom integrations, continue with this direct API guide below.


Complete reference: API Reference

Prerequisites

  • Basic knowledge of TypeScript or JavaScript

  • Node.js environment

  • Stellar SDK installed (npm install stellar-sdk)

  • DeFindex API key (contact PaltaLabs team for access)


1. Setting Up the API Client

First, create an ApiClient class to handle authentication and API requests.


Go to interact with vault, see the implementations of the functions:

  • Deposit

  • Withdraw

  • Balance

  • APY

Last updated