@kingpulse/sdk
v1.0.1
Published
Official JavaScript client for the KingPulse Developer API
Readme
@kingpulse/sdk
Official, dependency-free JavaScript/TypeScript client for the KingPulse Developer API.
Install from npm:
npm install @kingpulse/sdkimport { KingPulseClient } from "@kingpulse/sdk";
const client = new KingPulseClient({
apiKey: process.env.KINGPULSE_API_KEY
});
const { markets } = await client.listMarkets({ q: "KING", limit: 10 });
const { bot } = await client.createPaperBot({
name: "EMA hourly",
strategy: "ema",
marketAddress: "0x1111111111111111111111111111111111111111",
interval: "1h",
initialQuote: "10000"
});
console.log(markets, bot.id);The client also exposes getMarket, listTokens, listSwaps, listCandles, listLiquidity, getStats, listPaperBots, and deletePaperBot.
Safety and errors
- Keep the API key in a server-side environment variable or secret manager. Never embed it in browser JavaScript, source control, or a public mobile app.
- Bot endpoints create inactive paper-trading profiles only. They do not execute strategies, sign transactions, or submit live orders.
- The API key grants market-data access and paper-profile management. It is not a wallet key and cannot spend tokens.
KingPulseApiErrorexposesstatus,body, and rate-limit headers inrateLimit. Network and abort errors from Fetch are passed through.- The default endpoint is
https://kingel3ba.com. Custom HTTPS origins are supported; HTTP is allowed only for localhost development.
Local development
npm pack --dry-runThe public npm release is pending initial registry publication.
