Skip to main content

SDK Overview

SDK Overview

The keshflippay SDKs simplify integration by providing native libraries for JavaScript and Python developers. They handle authentication, request signing, and response parsing automatically—allowing you to focus on building your product.


1. Supported SDKs

LanguagePackageRepository
JavaScript / TypeScriptkeshflippaynpmjs.com/package/keshflippay
Pythonkeshflippaypypi.org/project/keshflippay

Both SDKs are officially maintained and versioned in sync with the API.


2. Installation

Terminal
npm install keshflippay

Or, using Yarn:

Terminal
yarn add keshflippay

3. Configuration

Both SDKs require your API key, secret, and the target base URL.

Example configuration:

setup.js
import keshflippay from "keshflippay";

const client = new keshflippay({
apiKey: process.env.keshflippay_KEY,
secret: process.env.keshflippay_SECRET,
baseUrl: "https://sandbox.keshflippay.com/v1",
});

4. Fetching Account Balance

Below is a minimal example for retrieving your current account balance:

getBalance.js
const balance = await client.accounts.getBalance();
console.log("Balance:", balance);

5. Making API Requests Manually

If you need more control, the SDKs also allow low-level HTTP requests through their internal request utilities.

manualRequest.js
const response = await client.request("POST", "/crypto/addresses/create", {
chainId: "1",
asset: "USDC",
label: "wallet_main",
});
console.log(response);

6. Error Handling

SDKs automatically wrap API errors in structured exceptions.

errorHandling.js
try {
const balance = await client.accounts.getBalance();
} catch (error) {
console.error("Error:", error.message);
console.error("Details:", error.response?.data);
}

7. Environment Setup

keshflippay SDKs automatically detect your runtime and manage environment variables securely.

Environment VariableDescription
keshflippay_KEYYour public API key
keshflippay_SECRETYour secret key
keshflippay_BASE_URLOptional override for sandbox or production

8. Next Steps