Skip to main content

Your magical helper for Bitcoin exchange rates!

This package works with DenoIt is unknown whether this package works with Cloudflare Workers, Node.js, Bun, Browsers
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
This package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
JSR Score
94%
Published
3 months ago (0.0.4)

🦦 Orakel Otter 🔮

Your magical helper for Bitcoin exchange rates! 🪙💰

🌟 Features

  • 📊 Fetches current Bitcoin prices in various currencies from the Mempool.space API (read more about the rate limitations here).)
  • 🌍 Supports USD, EUR, GBP, CAD, CHF, AUD, JPY
  • 🔍 Filter by a specific currency or get all available rates

🚀 Quick Start

import { orakelOtter } from "@gw/orakel-otter";

// Fetch all BTC exchange rates
const allRates = await orakelOtter();
console.log(allRates);

// Fetch BTC price for a specific currency
const eurRate = await orakelOtter("EUR");
console.log(eurRate);

📚 API

orakelOtter(currency?: string): Promise<[string, number][]>

currency (optional): The currency code (e.g., "USD", "EUR", "GBP") Return value: An array of tuples with currency code and current BTC price

🛠️ Error Handling

If the specified currency is not found, an error will be thrown.

🙏 Contributing

Feel free to open issues or create pull requests. The Orakel Otter welcomes your help! 🦦❤️

📜 License

MIT

Created with 💖 and 🦦 magic

Add Package

deno add jsr:@gw/orakel-otter

Import symbol

import * as orakel_otter from "@gw/orakel-otter";

---- OR ----

Import directly with a jsr specifier

import * as orakel_otter from "jsr:@gw/orakel-otter";

Add Package

npx jsr add @gw/orakel-otter

Import symbol

import * as orakel_otter from "@gw/orakel-otter";

Add Package

yarn dlx jsr add @gw/orakel-otter

Import symbol

import * as orakel_otter from "@gw/orakel-otter";

Add Package

pnpm dlx jsr add @gw/orakel-otter

Import symbol

import * as orakel_otter from "@gw/orakel-otter";

Add Package

bunx jsr add @gw/orakel-otter

Import symbol

import * as orakel_otter from "@gw/orakel-otter";