List currency codes
curl --request GET \
--url https://api.banking.v2.portao3.com.br/currency-codesimport requests
url = "https://api.banking.v2.portao3.com.br/currency-codes"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.banking.v2.portao3.com.br/currency-codes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.banking.v2.portao3.com.br/currency-codes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.banking.v2.portao3.com.br/currency-codes"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.banking.v2.portao3.com.br/currency-codes")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.banking.v2.portao3.com.br/currency-codes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"alphabeticCode": "BRL",
"numericCode": "986"
}
]List currency codes
Lists the currencies Portão 3 recognizes, each as its ISO 4217 alphabetic and numeric code.
GET
/
currency-codes
List currency codes
curl --request GET \
--url https://api.banking.v2.portao3.com.br/currency-codesimport requests
url = "https://api.banking.v2.portao3.com.br/currency-codes"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.banking.v2.portao3.com.br/currency-codes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.banking.v2.portao3.com.br/currency-codes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.banking.v2.portao3.com.br/currency-codes"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.banking.v2.portao3.com.br/currency-codes")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.banking.v2.portao3.com.br/currency-codes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"alphabeticCode": "BRL",
"numericCode": "986"
}
]Amounts across the API carry their currency as the ISO 4217 numeric code —
986 is the Brazilian real, 840 the US dollar. Use this list to turn one into the three-letter code you display (986 → BRL). The list is the same for every caller and every environment, sorted by alphabetic code, and changes rarely — only when a currency is added to or withdrawn from it — so you can cache it.
It takes no parameters and is not scoped to a realm or organization.Response
200 - application/json
Successful response
Three-letter ISO 4217 code of the currency.
Example:
"BRL"
Three-digit ISO 4217 numeric code of the currency, as a zero-padded string ("008", not 8). The other endpoints identify currencies by this code; where one returns it as a number (840), compare the values as numbers.
Example:
"986"