Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Api/ExchangeRateApi

Exchange rate API Reference

// Set your API Keys 👇 here
$sdk = new \Tatum\Sdk();

// MainNet API Call
$sdk->mainnet()->api()->exchangeRate();

// TestNet API Call
$sdk->testnet()->api()->exchangeRate();

Methods

Method Description
getExchangeRate() Get the current exchange rate for exchanging fiat/crypto assets

getExchangeRate()

Example

#️⃣ Execute command in terminal

✨ php -f getExchangeRate.php

Request

GET /v3/tatum/rate/{currency}

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->exchangeRate()->getExchangeRate(
    string $currency,
    [ string $base_pair = 'EUR' ]
): \Tatum\Model\ExchangeRate

Parameters

Name Type Description Notes
$currency string The fiat or crypto asset to exchange  
$base_pair string The target fiat asset to get the exchange rate for [optional] [default to 'EUR']

Return type

\Tatum\Model\ExchangeRate

Description

Get the current exchange rate for exchanging fiat/crypto assets

1 credit per API call

Get the current exchange rate for exchanging fiat/crypto assets.

By default, the base pair (the target asset) is EUR. When obtaining the exchange rate for an asset (for example, BTC), the value returned by the API expresses the amount of EUR that can be currently exchanged into 1 BTC.

Back to top