Skip to content

Currencies

Igor Sazonov edited this page Feb 4, 2026 · 1 revision

Currencies

The Currencies endpoint provides information about the currencies supported by the Marketstack API. You can retrieve a list of all currencies or get details for a specific currency by its code.

Getting Currency Information

Use the currencies() method on the Marketstack facade to access the Currencies endpoint.

Get All Currencies

To get a list of all supported currencies, you can make a simple call. Use limit() and offset() to paginate through the results.

use Tigusigalpa\Marketstack\Facades\Marketstack;

// Get all currencies
$currencies = Marketstack::currencies()
    ->limit(50)
    ->collect();

// Paginate through currencies
$page1 = Marketstack::currencies()
    ->limit(20)
    ->offset(0)
    ->collect();

$page2 = Marketstack::currencies()
    ->limit(20)
    ->offset(20)
    ->collect();

Get a Specific Currency

To retrieve details for a specific currency, use the code() method with the currency code:

$currency = Marketstack::currencies()
    ->code("USD")
    ->dto();

echo "Name: {$currency->name}\n";
echo "Symbol: {$currency->symbol}";

Available Methods

The following methods are available for the Currencies endpoint:

Method Description
code(string $code) Get information for a specific currency by its code.
limit(int $limit) The number of results to return.
offset(int $offset) The pagination offset.

For more information on response formats, see the Response Formats page.

Clone this wiki locally