PHPackages                             kattatzu/sbif - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. kattatzu/sbif

ActiveLibrary[API Development](/categories/api)

kattatzu/sbif
=============

Consulta de indicadores al API de la SBIF (Chile)

1.3.0(2y ago)91.0k7MITPHP

Since Jul 15Pushed 2y ago3 watchersCompare

[ Source](https://github.com/kattatzu/Sbif)[ Packagist](https://packagist.org/packages/kattatzu/sbif)[ RSS](/packages/kattatzu-sbif/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (2)Versions (28)Used By (0)

SBIF API
========

[](#sbif-api)

Libreria que permite consultar el valor de indicadores al API de la superintendencia de bancos e instituciones financieras (SBIF) de Chile. Pueden acceder a los siguientes indicadores:

- Dólar
- Euro
- UF
- UTM
- IPC

Además se puede acceder a [información de bancos](#informaci%C3%B3n-de-bancos) de Chile.

Obtener API key
---------------

[](#obtener-api-key)

Para usar el API de la SBIF debes obtener tu APIKEY en la siguiente página:

Instalación
-----------

[](#instalación)

Para instalar la librería ejecuta el siguiente comando en la consola:

```
composer require kattatzu/sbif
```

**[Instalación y Uso en Laravel](#instalaci%C3%B3n-y-uso-en-laravel)**

Uso de forma Standalone
-----------------------

[](#uso-de-forma-standalone)

Si tu sistema no trabaja con Laravel puedes usarlo de forma directa:

```
use Kattatzu/Sbif/Sbif;

$sbif = new Sbif('SBIF API KEY');
// o
$sbif = new Sbif;
$sbif->apiKey('SBIF API KEY');

echo $sbif->getDollar('2017-04-30');
//664.0
```

### Indicadores disponibles

[](#indicadores-disponibles)

```
$date = Carbon::today();

$sbif->getDollar($date);
$sbif->getEuro($date);
$sbif->getUTM($date);
$sbif->getUF($date);
$sbif->getIPC($date);
// NOTA: El IPC solo tiene valor hasta el mes anterior

// Si no envias una fecha se toma la fecha actual
$sbif->getDollar();
```

También puedes consultar de forma dinámica

```
$sbif->getIndicator(Sbif::IND_EURO, $date);
```

Constantes disponibles

```
Sbif::IND_UF
Sbif::IND_UTM
Sbif::IND_DOLLAR
Sbif::IND_EURO
Sbif::IND_IPC
```

Puedes acceder al resto de los datos que disponibiliza la SBIF () enviando directamente el endpoint que corresponda:

```
var_dump($sbif->get("/resultados/2009/12/instituciones"));

object(stdClass){
    "DescripcionesCodigosDeInstituciones": [
        "0" => {
            "CodigoInstitucion": "001",
            "NombreInstitucion": "BANCO DE CHILE"
        },
        "1" => {
            "CodigoInstitucion": "014",
            "NombreInstitucion": "SCOTIABANK CHILE"
        },
        ...
    ]
}
```

### Información de Bancos

[](#información-de-bancos)

Puedes consultar la información que disponibiliza la SBIF sobre los bancos de Chile.

```
$info = $sbif->getInstitutionData('001');
echo $info->name;
// BANCO DE CHILE
```

Puedes obtener la información como un array:

```
$info = $sbif->getInstitutionData('001')->toArray();
var_dump($info);
```

```
[
  "code" => "001",
  "name" => "BANCO DE CHILE",
  "swift_code" => "BCHI CL RM",
  "rut" => "97.004.000-5",
  "address" => "AHUMADA 251",
  "phone" => "(56-2) 653 11 11",
  "website" => "www.bancochile.cl",
  "public_contact" => "Pamela Valdivia",
  "public_address" => "Huérfanos 980, 8º Piso, Santiago",
  "public_phone" => "(56-2) 653 06 73",
  "branches" => 403,
  "employees" => 11426,
  "publication_date" => "2017-05-01",
  "cashiers" => 1412
]
```

Para obtener el listado de códigos puedes usar la clase Institution:

```
use Kattatzu\Sbif\Institution;

var_dump((new Institution)->getInstitutions());
```

```
[
  "001" => "Banco de Chile",
  "009" => "Banco Internacional",
  "014" => "Scotiabank Chile",
  "016" => "Banco de Credito E Inversiones",
  "028" => "Banco Bice",
  "031" => "HSBC Bank (chile)",
  "037" => "Banco Santander-chile",
  "039" => "Itaú Corpbanca",
  "049" => "Banco Security",
  "051" => "Banco Falabella",
  "053" => "Banco Ripley",
  "054" => "Rabobank Chile",
  "055" => "Banco Consorcio",
  "056" => "Banco Penta",
  "504" => "Banco BBVA",
  "059" => "Banco BTG Pactual Chile",
  "012" => "Banco del Estado de Chile",
  "017" => "Banco Do Brasil S.A.",
  "041" => "JP Morgan Chase Bank, N. A.",
  "043" => "Banco de la Nacion Argentina",
  "045" => "The Bank of Tokyo-mitsubishi UFJ",
  "060" => "China Construction Bank"
]
```

Instalación y Uso en Laravel
----------------------------

[](#instalación-y-uso-en-laravel)

Después de hacer la instalación con Composer debes registrar el ServiceProvider y el alias en tu archivo config/app.php:

```
'providers' => [
    ...
    Kattatzu\Sbif\Providers\SbifServiceProvider::class,
],
'aliases' => [
    ...
    'Sbif' => Kattatzu\Sbif\Facades\SbifFacade::class,
]
```

Publica el archivo de configuración ejecutando en Artisan:

```
php artisan vendor:publish --provider="Kattatzu\Sbif\Providers\SbifServiceProvider"
```

Ya puedes ingresar tu API Key en el archivo de configuración config/sbif.php o en en archivo .env con la key SBIF\_API\_KEY.

```
SBIF_API_KEY=xxxxxxxxxxxxxxxxxxxx
```

### Facades

[](#facades)

Ya puedes usar el Facade para acceder de forma rápida a las funciones:

```
Sbif::getDollar();
Sbif::getUTM('2017-06-30');
Sbif::getUF(Carbon::today());
```

### Helpers

[](#helpers)

También puedes utilizar los helpers:

```
sbif_dollar();
sbif_euro('2017-06-30');
sbif_utm(Carbon::yesterday());
sbif_uf(Carbon::now()->subMonth(1));
sbif_ipc();
sbif_institution('001')->name;
sbif_institutions();
```

No dudes en enviarme tus feedbacks o pull-request para mejorar esta librería.

Licencia
--------

[](#licencia)

MIT License

Copyright (c) 2017 José Eduardo Ríos

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 72.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~95 days

Recently: every ~614 days

Total

27

Last Release

766d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fea644579da1c1493488f1b43cb69bc970eb06d0177b1df5be6caa86a9aa2a00?d=identicon)[kattatzu](/maintainers/kattatzu)

---

Top Contributors

[![kattatzu](https://avatars.githubusercontent.com/u/1023213?v=4)](https://github.com/kattatzu "kattatzu (8 commits)")[![MauroCoder](https://avatars.githubusercontent.com/u/4624739?v=4)](https://github.com/MauroCoder "MauroCoder (2 commits)")[![jose-rios-okane](https://avatars.githubusercontent.com/u/127547446?v=4)](https://github.com/jose-rios-okane "jose-rios-okane (1 commits)")

---

Tags

chiledolaripclaravellaravel-packagesbifufutmlaravelchileilluminateUTMipcufdolarsbif

### Embed Badge

![Health badge](/badges/kattatzu-sbif/health.svg)

```
[![Health](https://phpackages.com/badges/kattatzu-sbif/health.svg)](https://phpackages.com/packages/kattatzu-sbif)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.2M720](/packages/statamic-cms)[vluzrmos/slack-api

Wrapper for Slack.com WEB API.

102589.1k3](/packages/vluzrmos-slack-api)[smodav/mpesa

M-Pesa API implementation

16363.7k1](/packages/smodav-mpesa)[codebar-ag/laravel-docuware

DocuWare integration with Laravel

1221.1k](/packages/codebar-ag-laravel-docuware)[spinen/laravel-clickup

SPINEN's Laravel Package for ClickUp.

282.2k](/packages/spinen-laravel-clickup)[scriptdevelop/whatsapp-manager

Paquete para manejo de WhatsApp Business API en Laravel

762.6k](/packages/scriptdevelop-whatsapp-manager)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
