oxinion-finance
v0.1.0
Published
JavaScript/TypeScript client for the Oxinion Finance API — live stock signals, quotes, fundamentals, and market indicators.
Maintainers
Readme
oxinion-finance
JavaScript/TypeScript client for the Oxinion Finance API — live stock signals, quotes, fundamentals, and market indicators.
⚠️ Early preview (v0.1.x). The API surface and endpoints are still being finalized. Pin an exact version if you depend on it.
Install
npm install oxinion-financeUsage
import { OxinionFinance } from "oxinion-finance";
const client = new OxinionFinance({
apiKey: process.env.OXINION_API_KEY, // optional for public endpoints
});
// Latest quote
const quote = await client.getQuote("AAPL");
// Oxinion signal: BUY / HOLD / SELL
const signal = await client.getSignal("AAPL");
// Fundamentals
const fundamentals = await client.getFundamentals("AAPL");
// Market-wide indicators (Fear & Greed, RSI, VIX, DXY, ...)
const indicators = await client.getMarketIndicators();Configuration
new OxinionFinance({
apiKey: "...", // Bearer token, optional
baseUrl: "https://api.oxinion.com", // override the API base URL
fetch: customFetch, // optional custom fetch implementation
});Error handling
Non-2xx responses throw an OxinionFinanceError:
import { OxinionFinance, OxinionFinanceError } from "oxinion-finance";
try {
await client.getQuote("NOPE");
} catch (err) {
if (err instanceof OxinionFinanceError) {
console.error(err.status, err.body);
}
}Requirements
- Node.js 18+ (uses the global
fetch). In older runtimes, pass afetchimplementation via the constructor. - ESM.
importfrom an ES module or a bundler.
License
MIT © Brandon Ha / Oxinion
