GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - kubrick06010/api-tasa-bcv: Official BCV exchange rates for USD, EUR, CNY, TRY and RUB — WordPress shortcode, REST API and live-tested scraper.

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

10 Commits
10 Commits

Folders and files

NameName
Last commit message
Last commit date
dist
dist
 
 
languages
languages
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
build-release.sh
build-release.sh
 
 
readme.txt
readme.txt
 
 
tasas-bcv-automaticas.php
tasas-bcv-automaticas.php
 
 

Repository files navigation

License: GPL v2 WordPress PHP

Tasas BCV - WordPress Plugin & API

Official BCV exchange rates for USD, EUR, CNY, TRY and RUB with WordPress shortcode, REST API, caching and live-tested parsing.

Features

  • Official BCV rates for USD, EUR, CNY, TRY and RUB.
  • Strict HTTP, completeness, numeric and positive-value validation before caching.
  • Fresh cache for 4 hours plus a 7-day last-known-good fallback when BCV is temporarily unavailable.
  • [tasa_bcv] shortcode with optional currency and decimal parameters.
  • Public read-only REST endpoint at /wp-json/tasas-bcv/v1/rates.
  • No Composer or third-party PHP dependencies.

Supported currencies

USD, EUR, CNY, TRY, RUB, mapped to the current BCV HTML IDs dolar, euro, yuan, lira and rublo.

Installation

Copy the plugin directory into wp-content/plugins/tasas-bcv-automaticas/ or build the installable ZIP with:

./build-release.sh

Then activate Tasas BCV in WordPress.

Shortcode

Display all five rates with [tasa_bcv]. Display one currency with:

[tasa_bcv moneda="TRY"]
[tasa_bcv moneda="RUB"]
[tasa_bcv moneda="USD" decimales="4"]

Decimal precision is clamped between 0 and 6.

REST API

GET /wp-json/tasas-bcv/v1/rates

Example response:

{
  "base": "VES",
  "rates": {
    "USD": 36.1234,
    "EUR": 39.5012,
    "CNY": 4.995,
    "TRY": 16.1446144,
    "RUB": 9.10428493
  },
  "date": "16/08/2026",
  "fetched_at": 1786914000,
  "source": "BCV",
  "stale": false
}

The endpoint returns HTTP 200 with "stale": true when refresh fails but last-known-good data exists, and HTTP 503 when no valid data exists.

Tests

php -l tasas-bcv-automaticas.php
php -l tests/smoke.php
php -l tests/live.php
php tests/smoke.php
php tests/live.php

The smoke test runs without WordPress. The live test downloads the current BCV page and fails unless all five currencies are present and valid.

TLS note

The BCV request currently uses the temporary sslverify => false workaround because a certificate-chain problem was observed with certain OpenSSL clients. TLS is not disabled globally and this setting does not affect any other URL. Remove the workaround when BCV fixes its certificate chain; it is not an ideal permanent solution.

Upstream

This project is a fork of octaviotron/wordpress-tasa-bcv. This fork adds a hardened parser, live tests, stale fallback, a read-only REST API, and support for USD, EUR, CNY, TRY and RUB.

Requirements

  • WordPress 5.0+
  • PHP 7.4+
  • PHP DOM extension (ext-dom) in production

License

GPL-2.0-or-later. See LICENSE.

About

Official BCV exchange rates for USD, EUR, CNY, TRY and RUB — WordPress shortcode, REST API and live-tested scraper.

Topics

bcvcnycurrencyeurexchange-ratesphprest-apirubtryusdvenezuelavesweb-scrapingwordpresswordpress-plugin

Resources

Readme
License
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.