RyxelDataDocs

TypeScript SDK

The official TypeScript SDK for the Ryxel Data API. Auto-generated from the OpenAPI specification, it gives you fully typed access to all available datasets.

Installation

# Core SDK
npm install @ryxel-ai/findata @hey-api/client-fetch

# Optional: React Query support
npm install @tanstack/react-query

Setup

Configure the API client with your API key. Don't have one? Create an account, subscribe to the datasets you need, then generate a key from Dashboard > API Keys.

import { client } from "@ryxel-ai/findata/client";

client.setConfig({
baseUrl: "https://data.ryxel.ai/api",
headers: {
  "x-api-key": "YOUR_API_KEY",
},
});

Direct Usage

import { getInsiderTransactions } from "@ryxel-ai/findata/sdk";

const { data } = await getInsiderTransactions({
query: { ticker: "TSLA", limit: 50 },
});

console.log(data?.transactions);

Usage with React Query

The SDK ships optional React Query integration. This requires @tanstack/react-query to be installed.

Warning: Do not use the React Query integration on public-facing frontends. Embedding your API key in browser code exposes it to anyone who inspects network requests or the page source. Use the SDK server-side only (e.g. Next.js API routes, a backend proxy, or React Server Components).

import { useQuery } from "@tanstack/react-query";
import { getInsiderTransactionsOptions } from "@ryxel-ai/findata/react-query";

function InsiderTransactions() {
const { data, isLoading } = useQuery(
  getInsiderTransactionsOptions({
    query: { ticker: "AAPL", limit: 100 },
  }),
);

if (isLoading) return <div>Loading...</div>;

return (
  <ul>
    {data?.transactions.map((tx, i) => (
      <li key={i}>
        {tx.ownerName} — {tx.transactionCode} — ${tx.transactionValue}
      </li>
    ))}
  </ul>
);
}

Available Exports

Import PathDescription
@ryxel-ai/findata/clientAPI client configuration
@ryxel-ai/findata/sdkAll endpoint functions
@ryxel-ai/findata/react-queryReact Query options factories

Links