API de Cotações de Moedas

API de Cotações, agora com mais de 150 moedas diferentes!

get
Retorna moedas selecionadas (atualizado a cada 30 segundos)

https://economia.awesomeapi.com.br/json/last/:moedas
Retorna a ultima ocorrência das moedas selecionadas. Ex.: https://economia.awesomeapi.com.br/last/USD-BRL,EUR-BRL,BTC-BRL
Request
Response
Request
Path Parameters
moedas
required
string
Moedas selecionadas separado por vírgula (,) Ex.: USD-BRL,EUR-BRL,BTC-BRL
Response
200: OK
{
"USDBRL": {
"code": "USD",
"codein": "BRL",
"name": "Dólar Americano/Real Brasileiro",
"high": "5.734",
"low": "5.7279",
"varBid": "-0.0054",
"pctChange": "-0.09",
"bid": "5.7276",
"ask": "5.7282",
"timestamp": "1618315045",
"create_date": "2021-04-13 08:57:27"
},
"EURBRL": {
"code": "EUR",
"codein": "BRL",
"name": "Euro/Real Brasileiro",
"high": "6.8327",
"low": "6.8129",
"varBid": "-0.0069",
"pctChange": "-0.1",
"bid": "6.8195",
"ask": "6.822",
"timestamp": "1618315093",
"create_date": "2021-04-13 08:58:15"
},
"BTCBRL": {
"code": "BTC",
"codein": "BRL",
"name": "Bitcoin/Real Brasileiro",
"high": "360000",
"low": "340500",
"varBid": "17072.9",
"pctChange": "4.98",
"bid": "359973.9",
"ask": "359974",
"timestamp": "1618315092",
"create_date": "2021-04-13 08:58:12"
}
}
404: Not Found
Moeda especificada não existe
{
"status": 404,
"code": "CoinNotExists",
"message": "moeda nao encontrada ABC-BRL"
}

get
Retorna o fechamento dos últimos dias

https://economia.awesomeapi.com.br/json/daily/:moeda/:numero_dias
https://economia.awesomeapi.com.br/json/daily/USD-BRL/15
Request
Response
Request
Path Parameters
moeda
required
string
Código da moeda Ex: USD-BRL
numero_dias
optional
integer
Números de dias 30/60/90/.../360 dias
Response
200: OK
[
{
varBid: "-0.0143",
code: "USD",
codein: "BRL",
name: "Dólar Americano/Real Brasileiro",
high: "3.8906",
low: "3.8596",
pctChange: "-0.37",
bid: "3.8659",
ask: "3.8671",
timestamp: "1555360543",
create_date: "2019-04-15 17:35:43"
},
{
varBid: "0.0006",
high: "3.9076",
low: "3.8571",
pctChange: "0.02",
bid: "3.8808",
ask: "3.8829",
timestamp: "1555275600"
},
{
varBid: "0.0248",
high: "3.9076",
low: "3.8571",
pctChange: "0.64",
bid: "3.8813",
ask: "3.8823",
timestamp: "1555102794"
},
{
varBid: "0.0237",
high: "3.9076",
low: "3.8571",
pctChange: "0.62",
bid: "3.8805",
ask: "3.881",
timestamp: "1555102774"
},
{
varBid: "0.0001",
high: "3.8607",
low: "3.8571",
pctChange: "0",
bid: "3.857",
ask: "3.8572",
timestamp: "1555021802"
},
{
varBid: "0.0006",
high: "3.8253",
low: "3.8251",
pctChange: "0.02",
bid: "3.8252",
ask: "3.8254",
timestamp: "1554935402"
},
{
varBid: "-0.0004",
high: "3.8504",
low: "3.8498",
pctChange: "-0.01",
bid: "3.8497",
ask: "3.8499",
timestamp: "1554849002"
},
{
varBid: "-0.0001",
high: "3.8512",
low: "3.8489",
pctChange: "0",
bid: "3.8488",
ask: "3.849",
timestamp: "1554762602"
},
{
varBid: "0.0155",
high: "3.8765",
low: "3.8433",
pctChange: "0.4",
bid: "3.8735",
ask: "3.875",
timestamp: "1554497998"
},
{
varBid: "0.0154",
high: "3.8765",
low: "3.8433",
pctChange: "0.4",
bid: "3.873",
ask: "3.8751",
timestamp: "1554497919"
}
]

get
Retorna o fechamento de um período específico

https://economia.awesomeapi.com.br/json/daily/:moeda?start_date=20180901&end_date=20180930
https://economia.awesomeapi.com.br/json/daily/USD-BRL/?start_date=20180901&end_date=20180930
Request
Response
Request
Path Parameters
:moeda
required
string
Código da moeda Ex: USD-BRL
Query Parameters
start_date
optional
string
Data de inicio dos resultados no formato YYYYMMDD Ex: 20180901
end_date
optional
string
Data limite dos resultados no formato YYYYMMDD Ex: 20180930
Response
200: OK
[
{
code: "USD",
codein: "BRL",
name: "Dólar Americano/Real Brasileiro",
high: "4.0256",
low: "4.0256",
pctChange: "0.834",
bid: "4.0256",
ask: "4.0276",
varBid: "0.0333",
timestamp: "1538136540000",
create_date: "2018-09-28 06:20:02"
},
{
high: "4.0376",
low: "4.0376",
pctChange: "0.313",
bid: "4.0376",
ask: "4.0388",
varBid: "0.0126",
timestamp: "1538050140000"
},
{
high: "4.0912",
low: "4.0912",
pctChange: "0.262",
bid: "4.0912",
ask: "4.0937",
varBid: "0.0107",
timestamp: "1537963800000"
},
{
high: "4.1094",
low: "4.1094",
pctChange: "0.553",
bid: "4.1094",
ask: "4.1106",
varBid: "0.0226",
timestamp: "1537877400000"
},
{
high: "4.0539",
low: "4.0539",
pctChange: "0.183",
bid: "4.0539",
ask: "4.0551",
varBid: "0.0074",
timestamp: "1537791000000"
},
{
high: "4.0823",
low: "4.0823",
pctChange: "0.302",
bid: "4.0823",
ask: "4.084",
varBid: "0.0123",
timestamp: "1537531740000"
},
{
high: "4.1032",
low: "4.1032",
pctChange: "-0.468",
bid: "4.1032",
ask: "4.1049",
varBid: "-0.0193",
timestamp: "1537445340000"
},
{
high: "4.1663",
low: "4.1663",
pctChange: "0.591",
bid: "4.1663",
ask: "4.1667",
varBid: "0.0245",
timestamp: "1537359000000"
},
{
high: "4.1399",
low: "4.1399",
pctChange: "0.373",
bid: "4.1399",
ask: "4.1406",
varBid: "0.0154",
timestamp: "1537272540000"
},
{
high: "4.1866",
low: "4.1866",
pctChange: "0.504",
bid: "4.1866",
ask: "4.1877",
varBid: "0.021",
timestamp: "1537186200000"
},
{
high: "4.1993",
low: "4.1993",
pctChange: "0.095",
bid: "4.1993",
ask: "4.1997",
varBid: "0.004",
timestamp: "1536926940000"
},
{
high: "4.141",
low: "4.141",
pctChange: "-0.08",
bid: "4.141",
ask: "4.1422",
varBid: "-0.0033",
timestamp: "1536840600000"
},
{
high: "4.1272",
low: "4.1272",
pctChange: "-0.633",
bid: "4.1272",
ask: "4.1279",
varBid: "-0.0263",
timestamp: "1536754200000"
},
{
high: "4.1558",
low: "4.1558",
pctChange: "1.549",
bid: "4.1558",
ask: "4.1569",
varBid: "0.0634",
timestamp: "1536667740000"
},
{
high: "4.0827",
low: "4.0827",
pctChange: "-0.495",
bid: "4.0827",
ask: "4.0839",
varBid: "-0.0203",
timestamp: "1536581340000"
},
{
high: "4.1276",
low: "4.1276",
pctChange: "-0.348",
bid: "4.1276",
ask: "4.1292",
varBid: "-0.0144",
timestamp: "1536235800000"
},
{
high: "4.1728",
low: "4.1728",
pctChange: "0.501",
bid: "4.1728",
ask: "4.1739",
varBid: "0.0208",
timestamp: "1536149400000"
},
{
high: "4.1802",
low: "4.1802",
pctChange: "0.696",
bid: "4.1802",
ask: "4.1809",
varBid: "0.0289",
timestamp: "1536063000000"
},
{
high: "4.1075",
low: "4.1075",
pctChange: "0.906",
bid: "4.1075",
ask: "4.1093",
varBid: "0.0369",
timestamp: "1535976540000"
}
]

get
Retorna cotações sequenciais de uma única moeda

https://economia.awesomeapi.com.br/:moeda/:quantidade
Retorna valores de uma moeda
Request
Response
Request
Path Parameters
moeda
required
string
Código da moeda Ex.: USD-BRL
quantidade
optional
number
Número de resultados para retornar
Response
200: OK
[
{
"code": "USD",
"codein": "BRL",
"name": "Dólar Americano/Real Brasileiro",
"high": "3.6713",
"low": "3.62",
"pctChange": "-0.455",
"bid": "3.6269",
"ask": "3.6281",
"varBid": "-0.0166",
"timestamp": "1527103140000",
"create_date": "2018-05-23 16:30:02"
}
]
404: Not Found
[
]

get
Retorna cotações sequenciais de um período específico

https://economia.awesomeapi.com.br/:moeda/:quantidade?start_date=20200301&end_date=20200330
https://economia.awesomeapi.com.br/USD-BRL/10?start_date=20200201&end_date=20200229
Request
Response
Request
Path Parameters
:moeda
required
string
Código da moeda ex.: USD-BRL
:quantidade
optional
string
Numero de dados para retornar
Query Parameters
start_date
optional
string
Data de inicio dos resultados no formato YYYYMMDD ex.: 20200201
end_date
optional
string
Data limite dos resultados no formato YYYYMMDD ex.: 20200229
Response
200: OK

get
Retorna todas as moedas (descontinuado)

https://economia.awesomeapi.com.br/json/all
Retorna a ultima ocorrência de todas as moedas.
Request
Response
Request
Path Parameters
all
required
string
Parâmetro para retornar todas as moedas
Response
200: OK
Cotações retornada com sucesso
{
USD: {
code: "USD",
codein: "BRL",
name: "Dólar Americano/Real Brasileiro",
high: "5.7068",
low: "5.63",
varBid: "0.0152",
pctChange: "0.27",
bid: "5.6969",
ask: "5.6977",
timestamp: "1618250344",
create_date: "2021-04-12 14:59:08"
},
USDT: {
code: "USD",
codein: "BRLT",
name: "Dólar Americano/Real Brasileiro Turismo",
high: "5.84",
low: "5.775",
varBid: "0.065",
pctChange: "1.13",
bid: "5.67",
ask: "6.01",
timestamp: "1618247640",
create_date: "2021-04-12 14:14:57"
},
CAD: {
code: "CAD",
codein: "BRL",
name: "Dólar Canadense/Real Brasileiro",
high: "4.5468",
low: "4.4886",
varBid: "0.0018",
pctChange: "0.04",
bid: "4.5363",
ask: "4.5391",
timestamp: "1618250346",
create_date: "2021-04-12 14:59:08"
},
GBP: {
code: "GBP",
codein: "BRL",
name: "Libra Esterlina/Real Brasileiro",
high: "7.8444",
low: "7.7443",
varBid: "0.0332",
pctChange: "0.43",
bid: "7.8252",
ask: "7.8295",
timestamp: "1618250347",
create_date: "2021-04-12 14:59:09"
},
ARS: {
code: "ARS",
codein: "BRL",
name: "Peso Argentino/Real Brasileiro",
high: "0.0616",
low: "0.0609",
varBid: "0.0001",
pctChange: "0.08",
bid: "0.0615",
ask: "0.0616",
timestamp: "1618250344",
create_date: "2021-04-12 14:59:06"
},
BTC: {
code: "BTC",
codein: "BRL",
name: "Bitcoin/Real Brasileiro",
high: "343420",
low: "338200",
varBid: "1700.3",
pctChange: "0.5",
bid: "341100.3",
ask: "341897.9",
timestamp: "1618250349",
create_date: "2021-04-12 14:59:09"
},
LTC: {
code: "LTC",
codein: "BRL",
name: "Litecoin/Real Brasileiro",
high: "1459",
low: "1377.65",
varBid: "-26.1",
pctChange: "-1.83",
bid: "1389.21",
ask: "1397.88",
timestamp: "1618250349",
create_date: "2021-04-12 14:59:09"
},
EUR: {
code: "EUR",
codein: "BRL",
name: "Euro/Real Brasileiro",
high: "6.7985",
low: "6.7092",
varBid: "0.0266",
pctChange: "0.39",
bid: "6.7867",
ask: "6.7899",
timestamp: "1618250345",
create_date: "2021-04-12 14:59:06"
},
JPY: {
code: "JPY",
codein: "BRL",
name: "Iene Japonês/Real Brasileiro",
high: "0.05215",
low: "0.05149",
varBid: "0.0003",
pctChange: "0.58",
bid: "0.05207",
ask: "0.0521",
timestamp: "1618250349",
create_date: "2021-04-12 14:59:09"
},
CHF: {
code: "CHF",
codein: "BRL",
name: "Franco Suíço/Real Brasileiro",
high: "6.1879",
low: "6.0997",
varBid: "0.0349",
pctChange: "0.57",
bid: "6.1746",
ask: "6.1782",
timestamp: "1618250347",
create_date: "2021-04-12 14:59:09"
},
AUD: {
code: "AUD",
codein: "BRL",
name: "Dólar Australiano/Real Brasileiro",
high: "4.351",
low: "4.294",
varBid: "0.0092",
pctChange: "0.21",
bid: "4.3394",
ask: "4.3421",
timestamp: "1618250348",
create_date: "2021-04-12 14:59:09"
},
CNY: {
code: "CNY",
codein: "BRL",
name: "Yuan Chinês/Real Brasileiro",
high: "0.8711",
low: "0.8604",
varBid: "0.0031",
pctChange: "0.36",
bid: "0.87",
ask: "0.8703",
timestamp: "1618250345",
create_date: "2021-04-12 14:59:06"
},
ILS: {
code: "ILS",
codein: "BRL",
name: "Novo Shekel Israelense/Real Brasileiro",
high: "1.7304",
low: "1.7105",
varBid: "0.0023",
pctChange: "0.13",
bid: "1.7281",
ask: "1.729",
timestamp: "1618250288",
create_date: "2021-04-12 14:58:08"
},
ETH: {
code: "ETH",
codein: "BRL",
name: "Ethereum/Real Brasileiro",
high: "1200.21",
low: "1200.21",
varBid: "0",
pctChange: "0",
bid: "1440.25",
ask: "16999.75",
timestamp: "1610415652",
create_date: "2021-01-11 22:40:52"
},
XRP: {
code: "XRP",
codein: "BRL",
name: "Ripple/Real Brasileiro",
high: "8.05",
low: "7.5",
varBid: "0.04",
pctChange: "0.51",
bid: "7.73",
ask: "7.79",
timestamp: "1618250347",
create_date: "2021-04-12 14:59:07"
},
DOGE: {
code: "DOGE",
codein: "BRL",
name: "Dogecoin/Real Brasileiro",
high: "0.442065",
low: "0.394207",
varBid: "-0.01621299",
pctChange: "-3.85",
bid: "0.405006",
ask: "0.405006",
timestamp: "1618250326",
create_date: "2021-04-12 14:58:46"
}
}

get
Formato de resposta

https://economia.awesomeapi.com.br/:format/:moeda
https://economia.awesomeapi.com.br/json/USD-BRL
Request
Response
Request
Path Parameters
format
optional
string
JSON (default) e XML
moeda
required
string
Código da moeda a ser retornada
Response
200: OK
XML Response
<xml>
<item>
<varBid>-0.0119</varBid>
<code>USD</code>
<codein>BRL</codein>
<name>Dólar Americano/Real Brasileiro</name>
<high>3.8906</high>
<low>3.8596</low>
<pctChange>-0.31</pctChange>
<bid>3.8685</bid>
<ask>3.8692</ask>
<timestamp>1555361148</timestamp>
<create_date>2019-04-15 17:45:49</create_date>
</item>
</xml>

Exemplos

http://economia.awesomeapi.com.br/json/last/USD-BRL
http://economia.awesomeapi.com.br/json/last/USD-BRL,EUR-BRL,BTC-BRL
http://economia.awesomeapi.com.br/xml/USD-BRL/1
http://economia.awesomeapi.com.br/USD-BRL/1?format=xml

Códigos das moedas:

Veja a lista completa de combinações em https://economia.awesomeapi.com.br/xml/available

Veja a lista de nomes das moedas https://economia.awesomeapi.com.br/xml/available/uniq

Moedas com conversão para:

  • BRL (Real Brasileiro)

  • USD (Dolar Americano)

  • EUR (Euro)

Outras conversões

  • USD-BRLT (Dólar Americano para Real Brasileiro Turismo)

Legendas

key

Label

bid

Compra

ask

Venda

varBid

Variação

pctChange

Porcentagem de Variação

high

Máximo

low

Mínimo