{"id":48592029,"url":"https://github.com/kattatzu/sbif","last_synced_at":"2026-04-08T20:02:31.398Z","repository":{"id":57004831,"uuid":"97280266","full_name":"kattatzu/sbif","owner":"kattatzu","description":"Consulta de indicadores al API de la superintendencia de bancos e instituciones financieras SBIF (Chile)","archived":false,"fork":false,"pushed_at":"2024-04-08T21:03:06.000Z","size":51,"stargazers_count":9,"open_issues_count":0,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-19T06:44:04.551Z","etag":null,"topics":["chile","dolar","ipc","laravel","laravel-package","sbif","uf","utm"],"latest_commit_sha":null,"homepage":"https://kattatzu.github.io/sbif","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kattatzu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-07-14T23:43:24.000Z","updated_at":"2024-11-23T11:54:59.000Z","dependencies_parsed_at":"2024-04-08T21:50:38.194Z","dependency_job_id":null,"html_url":"https://github.com/kattatzu/sbif","commit_stats":{"total_commits":63,"total_committers":4,"mean_commits":15.75,"dds":"0.12698412698412698","last_synced_commit":"29a75d7fdf764b8d8f6e7bb921c5b826dc7b01db"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/kattatzu/sbif","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kattatzu%2Fsbif","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kattatzu%2Fsbif/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kattatzu%2Fsbif/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kattatzu%2Fsbif/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kattatzu","download_url":"https://codeload.github.com/kattatzu/sbif/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kattatzu%2Fsbif/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31571601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chile","dolar","ipc","laravel","laravel-package","sbif","uf","utm"],"created_at":"2026-04-08T20:02:31.230Z","updated_at":"2026-04-08T20:02:31.394Z","avatar_url":"https://github.com/kattatzu.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SBIF API\nLibreria que permite consultar el valor de indicadores al API de la superintendencia de bancos e instituciones financieras (SBIF) de Chile.\nPueden acceder a los siguientes indicadores:\n\n- Dólar\n- Euro\n- UF\n- UTM\n- IPC\n\nAdemás se puede acceder a [información de bancos](#información-de-bancos) de Chile.\n\n## Obtener API key\nPara usar el API de la SBIF debes obtener tu APIKEY en la siguiente página:\nhttp://api.sbif.cl/api/contactanos.jsp\n\n## Instalación\nPara instalar la librería ejecuta el siguiente comando en la consola:\n```bash\ncomposer require kattatzu/sbif\n```\n\n**[Instalación y Uso en Laravel](#instalación-y-uso-en-laravel)**\n\n## Uso de forma Standalone\nSi tu sistema no trabaja con Laravel puedes usarlo de forma directa:\n\n```php\nuse Kattatzu/Sbif/Sbif;\n\n$sbif = new Sbif('SBIF API KEY');\n// o\n$sbif = new Sbif;\n$sbif-\u003eapiKey('SBIF API KEY');\n\necho $sbif-\u003egetDollar('2017-04-30');\n//664.0\n```\n\n### Indicadores disponibles\n```php\n$date = Carbon::today();\n\n$sbif-\u003egetDollar($date);\n$sbif-\u003egetEuro($date);\n$sbif-\u003egetUTM($date);\n$sbif-\u003egetUF($date);\n$sbif-\u003egetIPC($date);\n// NOTA: El IPC solo tiene valor hasta el mes anterior\n\n// Si no envias una fecha se toma la fecha actual\n$sbif-\u003egetDollar();\n```\n\nTambién puedes consultar de forma dinámica\n```php\n$sbif-\u003egetIndicator(Sbif::IND_EURO, $date);\n```\n\nConstantes disponibles\n```php\nSbif::IND_UF\nSbif::IND_UTM\nSbif::IND_DOLLAR\nSbif::IND_EURO\nSbif::IND_IPC\n```\nPuedes acceder al resto de los datos que disponibiliza la SBIF (http://api.sbif.cl/que-es-api.html) enviando directamente el endpoint que corresponda:\n```php\nvar_dump($sbif-\u003eget(\"/resultados/2009/12/instituciones\"));\n\nobject(stdClass){\n    \"DescripcionesCodigosDeInstituciones\": [\n        \"0\" =\u003e {\n            \"CodigoInstitucion\": \"001\",\n            \"NombreInstitucion\": \"BANCO DE CHILE\"\n        },\n        \"1\" =\u003e {\n            \"CodigoInstitucion\": \"014\",\n            \"NombreInstitucion\": \"SCOTIABANK CHILE\"\n        },\n        ...\n    ]\n}\n```\n\n### Información de Bancos\nPuedes consultar la información que disponibiliza la SBIF sobre los bancos de Chile.\n```php\n$info = $sbif-\u003egetInstitutionData('001');\necho $info-\u003ename;\n// BANCO DE CHILE\n```\n\nPuedes obtener la información como un array:\n```php\n$info = $sbif-\u003egetInstitutionData('001')-\u003etoArray();\nvar_dump($info);\n```\n```php\n[\n  \"code\" =\u003e \"001\",\n  \"name\" =\u003e \"BANCO DE CHILE\",\n  \"swift_code\" =\u003e \"BCHI CL RM\",\n  \"rut\" =\u003e \"97.004.000-5\",\n  \"address\" =\u003e \"AHUMADA 251\",\n  \"phone\" =\u003e \"(56-2) 653 11 11\",\n  \"website\" =\u003e \"www.bancochile.cl\",\n  \"public_contact\" =\u003e \"Pamela Valdivia\",\n  \"public_address\" =\u003e \"Huérfanos 980, 8º Piso, Santiago\",\n  \"public_phone\" =\u003e \"(56-2) 653 06 73\",\n  \"branches\" =\u003e 403,\n  \"employees\" =\u003e 11426,\n  \"publication_date\" =\u003e \"2017-05-01\",\n  \"cashiers\" =\u003e 1412\n]\n```\n\nPara obtener el listado de códigos puedes usar la clase Institution:\n```php\nuse Kattatzu\\Sbif\\Institution;\n\nvar_dump((new Institution)-\u003egetInstitutions());\n```\n```php\n[\n  \"001\" =\u003e \"Banco de Chile\",\n  \"009\" =\u003e \"Banco Internacional\",\n  \"014\" =\u003e \"Scotiabank Chile\",\n  \"016\" =\u003e \"Banco de Credito E Inversiones\",\n  \"028\" =\u003e \"Banco Bice\",\n  \"031\" =\u003e \"HSBC Bank (chile)\",\n  \"037\" =\u003e \"Banco Santander-chile\",\n  \"039\" =\u003e \"Itaú Corpbanca\",\n  \"049\" =\u003e \"Banco Security\",\n  \"051\" =\u003e \"Banco Falabella\",\n  \"053\" =\u003e \"Banco Ripley\",\n  \"054\" =\u003e \"Rabobank Chile\",\n  \"055\" =\u003e \"Banco Consorcio\",\n  \"056\" =\u003e \"Banco Penta\",\n  \"504\" =\u003e \"Banco BBVA\",\n  \"059\" =\u003e \"Banco BTG Pactual Chile\",\n  \"012\" =\u003e \"Banco del Estado de Chile\",\n  \"017\" =\u003e \"Banco Do Brasil S.A.\",\n  \"041\" =\u003e \"JP Morgan Chase Bank, N. A.\",\n  \"043\" =\u003e \"Banco de la Nacion Argentina\",\n  \"045\" =\u003e \"The Bank of Tokyo-mitsubishi UFJ\",\n  \"060\" =\u003e \"China Construction Bank\"\n]\n```\n## Instalación y Uso en Laravel\n\nDespués de hacer la instalación con Composer debes registrar el ServiceProvider y el alias en tu archivo config/app.php:\n```php\n'providers' =\u003e [\n    ...\n    Kattatzu\\Sbif\\Providers\\SbifServiceProvider::class,\n],\n'aliases' =\u003e [\n    ...\n    'Sbif' =\u003e Kattatzu\\Sbif\\Facades\\SbifFacade::class,\n]\n```\n\nPublica el archivo de configuración ejecutando en Artisan:\n```shell\nphp artisan vendor:publish --provider=\"Kattatzu\\Sbif\\Providers\\SbifServiceProvider\"\n```\n\nYa 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.\n```shell\nSBIF_API_KEY=xxxxxxxxxxxxxxxxxxxx\n```\n\n### Facades\nYa puedes usar el Facade para acceder de forma rápida a las funciones:\n```php\nSbif::getDollar();\nSbif::getUTM('2017-06-30');\nSbif::getUF(Carbon::today());\n```\n### Helpers\nTambién puedes utilizar los helpers:\n```php\nsbif_dollar();\nsbif_euro('2017-06-30');\nsbif_utm(Carbon::yesterday());\nsbif_uf(Carbon::now()-\u003esubMonth(1));\nsbif_ipc();\nsbif_institution('001')-\u003ename;\nsbif_institutions();\n```\n\nNo dudes en enviarme tus feedbacks o pull-request para mejorar esta librería.\n\n## Licencia\n\nMIT License\n\nCopyright (c) 2017 José Eduardo Ríos\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkattatzu%2Fsbif","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkattatzu%2Fsbif","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkattatzu%2Fsbif/lists"}