Download the PHP package cotizave/sdk without Composer

On this page you can find all versions of the php package cotizave/sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sdk

**English** · [Español](./README.es.md) # Cotizave PHP SDK Official, fully-typed PHP client for the **Cotizave API v2** — multi-country exchange-rate references, currency conversion, historical series, bank rates and calendars, behind a single API key. [![Packagist](https://img.shields.io/packagist/v/cotizave/sdk?color=F28D1A&logo=packagist&logoColor=white)](https://packagist.org/packages/cotizave/sdk) [![PHP](https://img.shields.io/packagist/dependency-v/cotizave/sdk/php?label=php)](https://packagist.org/packages/cotizave/sdk) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE) [API & docs hub](https://github.com/cotizave/exchange-rates-api) · [Documentation](https://docs.cotizave.com) · [API reference](https://docs.cotizave.com/api/v2/introduction) · [Get an API key](https://app.cotizave.com)

Install

Requires PHP 8.3+. The HTTP engine is Guzzle; a custom Guzzle handler can be supplied (e.g. for testing or instrumentation).

Quick start

Keep your API key server-side. It is sent only as the X-API-Key header. Never ship it in client-side code.

Authentication

What you can do

Area Call
Rates of a country $client->rates->list('CO')
One rate by id $client->rates->get('CO', 'co-trm')
Past board of a country $client->rates->snapshot('AR', '2026-10-01')
Official rate of every country $client->rates->global(['symbols' => ['BRL', 'EUR']])
Convert one amount $client->convert(['from' => 'USD', 'to' => 'BRL', 'amount' => 100])
Convert up to 50 amounts $client->convertBulk([...])
Point-in-time history $client->history->get('CO', 'co-trm', '2026-10-01')
Daily history series $client->history->daily('AR', 'ar-official', ['from' => '...', 'to' => '...'])
Period statistics $client->history->stats('AR', 'ar-official', ['from' => '...', 'to' => '...', 'movingAverage' => 7])
Raw captures (paginated) $client->history->raw(...) / $client->history->iterate(...)
History coverage $client->history->limits()
Rate catalog $client->markets('VE')
Spread vs another market $client->spread('VE', ['against' => 've-paralelo'])
Best executable route $client->route('VE', ['from' => 'USD', 'to' => 'VES', 'amount' => 100])
Bank-published rates $client->bankRates('VE')
Countries / currencies $client->countries->list() · $client->currencies->list()
Banks / issuers $client->banks->list('VE') · $client->issuers->list()
Holidays & business days $client->holidays->list('AR') · $client->holidays->businessDays('VE', ['from' => '2026-10-01', 'days' => 5])
Stablecoins (USD) $client->crypto->list() · $client->crypto->get('usdt-usd')

Responses are plain associative arrays, annotated with PHPStan array shapes for static analysis. The fields present depend on your plan, the country and the market — read them defensively and check the API reference.

Iterating raw history safely

iterate follows the server's cursors for you and stops at maxPages (default 50) so it never silently downloads an entire history.

Errors

Every failure throws a subclass of Cotizave\Exception\CotizaveException:

Exception HTTP
BadRequestException 400
AuthenticationException 401
FeatureNotInPlanException 402
ForbiddenException 403
NotFoundException 404
NotAcceptableException 406
UnprocessableException 422
RateLimitException 429
ServerException 5xx
ConnectionException / TimeoutException no response (network/timeout)

Each exception carries status, errorCode, getMessage(), optional field/details, and rateLimit() / headers() / requestId().

Configuration

Everything has a production-safe default; override only what you need:

Per-call overrides are accepted as the last argument of every method (timeout, maxRetries, headers, language):

Retry policy

Only idempotent (GET) requests are retried. A 429 is retried only when it is a burst (per-minute) limit, honoring the server's Retry-After; a 429 from an exhausted monthly quota is never retried. Connection and timeout errors, and the configured 5xx statuses, are retried with exponential backoff and full jitter, bounded by maxRetries and the maxRetryDelay budget.

Exporting CSV / XML

Low-level requests

Customising the HTTP handler

The transport builds its own Guzzle client (with the SDK's retry middleware on the handler stack). To customise the underlying transport — for tests, instrumentation, or a bespoke handler — pass a Guzzle handler callable:

The SDK always sends with redirects disabled and the key as a header, so a custom handler can never be made to follow a redirect or leak your API key.

Security

Found a security issue? See SECURITY.md.

License

MIT


All versions of sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
ext-json Version *
guzzlehttp/guzzle Version ^7.8
psr/http-client Version ^1.0
psr/http-message Version ^1.1 || ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package cotizave/sdk contains the following files

Loading the files please wait ...