open-index/open-npm huggingface dataset:
npm package: @softlari/banguat-exchange-rate
Description: TypeScript library for accessing Banguat (Guatemalan Central Bank) exchange rate SOAP service
Author: SoftLari
Latest version: 1.0.5

# @softlari/banguat-exchange-rate

TypeScript library for accessing Banguat (Guatemalan Central Bank) exchange rate SOAP service.

## Installation

```bash
npm install @softlari/banguat-exchange-rate
```

## Features

- 🔄 Real-time exchange rates from Banguat
- 📅 Historical exchange rates by date
- 📊 Monthly averages
- 🌐 Timezone aware (Guatemala UTC-6)
- 💻 CLI tool included
- 📘 Full TypeScript support

## Usage

### As a Library

```typescript
import { BanguatService } from "@softlari/banguat-exchange-rate";

const banguat = new BanguatService();

// Get current exchange rate
const current = await banguat.getCurrentRate();
console.log(`Current rate: ${current.buyRate}`);

// Get rate for specific date
const date = new Date("2024-03-01");
const historical = await banguat.getRateForDay(date);
console.log(`Rate for ${date.toISOString()}: ${historical.buyRate}`);

// Get monthly average
const average = await banguat.getMonthlyAverage(2024, 3);
console.log(`March 2024 average: ${average}`);
```

### Using the CLI

```bash
# Install globally
npm install -g @softlari/banguat-exchange-rate

# Get current rate
banguat current

# Get rate for specific date
banguat date 2024-03-01

# Get rates for date range
banguat range 2024-03-01 2024-03-31

# Get monthly average
banguat average 2024 3
```

## API Reference

### `getCurrentRate()`

Returns the current exchange rate.

```typescript
interface ExchangeRateDay {
  date: Date;
  buyRate: number;
  sellRate: number;
}
```

### `getRateForDay(date: Date)`

Returns the exchange rate for a specific date.

### `getRateRange(startDate: Date, endDate: Date)`

Returns exchange rates for a date range.

### `getMonthlyAverage(year: number, month: number)`

Returns the average exchange rate for a specific month.

## Error Handling

The library includes proper error handling for:

- Future dates (not allowed)
- Invalid responses from the service
- Missing data scenarios
- Network errors

## Development

```bash
# Clone the repository
git clone https://github.com/SoftLari/banguat-exchange-rate.git

# Install dependencies
npm install

# Run tests
npm test

# Build
npm run build
```

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

MIT © SoftLari
npm package: @softledger/sl-crypto-rates
Description: ```javascript const Rates = require('@softledger/sl-crypto-rates')
Author: geoff.ostrega@softledger.com
Latest version: 1.0.0

```javascript
const Rates = require('@softledger/sl-crypto-rates')

let rates = new Rates(API_KEY);

rates.getCurrentRates({
	tenantUUID, 
	baseCurrency, 
	moment
})
.then(res => {
	console.log("all the rates", results.rates);
})
```
npm package: @softledger/sl-fx
Description: ```javascript const slfx = require('@softledger/sl-fx')(API_KEY);
Author: geoff.ostrega@softledger.com
Latest version: 2.0.2

```javascript
const slfx = require('@softledger/sl-fx')(API_KEY);


slfx.getCurrentRates(tenantUUID, baseCurrency, moment)
	.then(res => {
		console.log("all the rates", results.rates);
	})
```
npm package: @softledger/sl-select
Description: SoftLedger Select Form Components
Author: Geoff Ostrega
Latest version: 0.1.1


## SLSelect

From [`src/SLSelect.jsx`](src/SLSelect.jsx)

Base select component with standard fetch function

prop | type | default | required | description
---- | :----: | :-------: | :--------: | -----------
**errorText** | `Union<String \| Array>` |  | :x: | Error text to show when form is invalid
**fetchData** | `Function` |  | :white_check_mark: | callback which should fetch options must return a promise
**labelField** | `String` | `'name'` | :x: | options key which stores the label
**multi** | `Boolean` |  | :x: | Set true to enable multi-select
**mutli** | `Unknown` | `false` | :x: | 
**onChange** | `Function` |  | :white_check_mark: | callback when value is changed
**optionRenderer** | `Function` |  | :x: | function which returns JSX to display an option ex: option => <span>{option.label}</span>
**value** | `*` |  | :x: | Current value to display
**valueField** | `String` | `'_id'` | :x: | options key which stores value