API de Moedas

API de Cotações do Dólar (USD, USDT, CA, AUD), Euro, Libra, Peso, Iene, Franco, Yuan Chinês, Shekel Israelense, Litecoin, Bitcoin, Ethereum, Ripple, atualizado a cada 3 minutos.

get
Retorna moedas selecionadas

https://economia.awesomeapi.com.br/all/:moedas
Retorna a ultima ocorrência das moedas selecionadas. Ex.: https://economia.awesomeapi.com.br/all/USD-BRL,EUR-BRL,BTC-BRL
Request
Response
Path Parameters
moedas
required
string
Moedas selecionadas separado por vírgula (,) Ex.: USD-BRL,EUR-BRL,BTC-BRL
200: OK
{
"USD": {
"code": "USD",
"codein": "BRL",
"name": "Dólar Comercial",
"high": "3,9703",
"low": "3,9695",
"varBid": "0,0012",
"pctChange": "0,03",
"bid": "3,9683",
"ask": "3,9708",
"timestamp": "1557176400",
"create_date": "2019-05-06 18:00:03"
},
"EUR": {
"code": "EUR",
"codein": "BRL",
"name": "Euro",
"high": "4,4501",
"low": "4,4425",
"varBid": "0,0009",
"pctChange": "0,02",
"bid": "4,4429",
"ask": "4,4469",
"timestamp": "1557180592",
"create_date": "2019-05-06 19:09:53"
},
"BTC": {
"code": "BTC",
"codein": "BRL",
"name": "Bitcoin",
"high": "23.125,0",
"low": "22.650,0",
"varBid": "-43,4",
"pctChange": "-0,19",
"bid": "22.950,1",
"ask": "23.030,0",
"timestamp": "1557180566",
"create_date": "2019-05-06 19:09:26"
}
}

get
Retorna todas as moedas

https://economia.awesomeapi.com.br/all
Retorna a ultima ocorrência de todas as moedas.
Request
Response
Path Parameters
all
required
string
Parâmetro para retornar todas as moedas
200: OK
Cake successfully retrieved.
{
USD: {
code: "USD",
codein: "BRL",
name: "Dólar Comercial",
high: "3,8906",
low: "3,8596",
varBid: "-0,0138",
pctChange: "-0,36",
bid: "3,8660",
ask: "3,8680",
timestamp: "1555360069",
create_date: "2019-04-15 17:27:50"
},
USDT: {
high: "3.87",
pctChange: "-0.741",
bid: "3.71",
ask: "4.02",
timestamp: "1555358100000",
name: "Dólar Turismo",
low: "3.71",
varBid: "-0.03",
code: "USD",
codein: "BRLT",
create_date: "2019-04-15 17:27:00"
},
CAD: {
code: "CAD",
codein: "BRL",
name: "Dólar Canadense",
high: "2,9229",
low: "2,8865",
varBid: "-0,0204",
pctChange: "-0,70",
bid: "2,8909",
ask: "2,8935",
timestamp: "1555360097",
create_date: "2019-04-15 17:28:19"
},
EUR: {
code: "EUR",
codein: "BRL",
name: "Euro",
high: "4,4006",
low: "4,3628",
varBid: "-0,0165",
pctChange: "-0,38",
bid: "4,3694",
ask: "4,3720",
timestamp: "1555360097",
create_date: "2019-04-15 17:28:18"
},
GBP: {
code: "GBP",
codein: "BRL",
name: "Libra Esterlina",
high: "5,0991",
low: "5,0554",
varBid: "-0,0097",
pctChange: "-0,19",
bid: "5,0629",
ask: "5,0659",
timestamp: "1555360098",
create_date: "2019-04-15 17:28:20"
},
ARS: {
code: "ARS",
codein: "BRL",
name: "Peso Argentino",
high: "0,0938",
low: "0,0916",
varBid: "0,0009",
pctChange: "0,98",
bid: "0,0928",
ask: "0,0930",
timestamp: "1555360069",
create_date: "2019-04-15 17:27:50"
},
BTC: {
code: "BTC",
codein: "BRL",
name: "Bitcoin",
high: "20.400,0",
low: "19.600,9",
varBid: "-339,0",
pctChange: "-1,68",
bid: "19.729,0",
ask: "19.850,0",
timestamp: "1555360099",
create_date: "2019-04-15 17:28:19"
},
LTC: {
code: "LTC",
codein: "BRL",
name: "Litecoin",
high: "337,39",
low: "305,77",
varBid: "-2,19",
pctChange: "-0,70",
bid: "309,17",
ask: "311,98",
timestamp: "1555360100",
create_date: "2019-04-15 17:28:20"
},
JPY: {
code: "JPY",
codein: "BRL",
name: "Iene Japonês",
high: "0,03475",
low: "0,03445",
varBid: "-0,00010",
pctChange: "-0,29",
bid: "0,03451",
ask: "0,03454",
timestamp: "1555360102",
create_date: "2019-04-15 17:28:22"
},
CHF: {
code: "CHF",
codein: "BRL",
name: "Franco Suíço",
high: "3,8788",
low: "3,8438",
varBid: "-0,0197",
pctChange: "-0,51",
bid: "3,8494",
ask: "3,8526",
timestamp: "1555360095",
create_date: "2019-04-15 17:28:20"
},
AUD: {
code: "AUD",
codein: "BRL",
name: "Dólar Australiano",
high: "2,7925",
low: "2,7695",
varBid: "-0,0091",
pctChange: "-0,33",
bid: "2,7719",
ask: "2,7741",
timestamp: "1555360098",
create_date: "2019-04-15 17:28:19"
},
CNY: {
code: "CNY",
codein: "BRL",
name: "Yuan Chinês",
high: "0,5800",
low: "0,5755",
varBid: "-0,0027",
pctChange: "-0,46",
bid: "0,5763",
ask: "0,5766",
timestamp: "1555360083",
create_date: "2019-04-15 17:28:03"
},
ILS: {
code: "ILS",
codein: "BRL",
name: "Novo Shekel Israelense",
high: "1,0922",
low: "1,0839",
varBid: "-0,0015",
pctChange: "-0,14",
bid: "1,0865",
ask: "1,0868",
timestamp: "1555360025",
create_date: "2019-04-15 17:27:05"
}
}
404: Not Found
[
]

get
Retorna o fechamento dos últimos dias

https://economia.awesomeapi.com.br/json/list/:moeda/:numero_dias
https://economia.awesomeapi.com.br/json/list/USD-BRL/30
Request
Response
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
200: OK
[
{
varBid: "-0.0143",
code: "USD",
codein: "BRL",
name: "Dólar Comercial",
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 os registros de um período específico

https://economia.awesomeapi.com.br/json/list/:moeda?start_date=20180901&end_date=20180930
https://economia.awesomeapi.com.br/json/list/USD-BRL/?start_date=20180901&end_date=20180930
Request
Response
Path Parameters
:moeda
required
string
Código da moeda Ex: USD-BRL
Query Parameters
start_date
optional
string
Data de inicio dos resultados Ex: 20180901
end_date
optional
string
Data limite dos resultados Ex: 20180930
200: OK
[
{
code: "USD",
codein: "BRL",
name: "Dólar Comercial",
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
Path Parameters
moeda
required
string
Código da moeda Ex.: USD-BRL
quantidade
optional
number
Número de resultados para retornar
200: OK
[
{
"code": "USD",
"codein": "BRL",
"name": "Dólar Comercial",
"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
Formato de resposta

https://economia.awesomeapi.com.br/:format/:moeda
Request
Response
Path Parameters
format
optional
string
JSON (default), JSONP, XML, CSV
moeda
required
string
Código da moeda a ser retornada
Query Parameters
format
optional
string
JSON (default), JSONP, XML, CSV
callback
optional
string
Nome da função para retorno do JSONP
200: OK
XML Response
<xml>
<item>
<varBid>-0.0119</varBid>
<code>USD</code>
<codein>BRL</codein>
<name>Dólar Comercial</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/jsonp/USD-BRL/1?callback=jsonp_callback
http://economia.awesomeapi.com.br/xml/USD-BRL/1
http://economia.awesomeapi.com.br/USD-BRL/1?format=xml

Códigos das moedas

  • USD-BRL (Dólar Comercial)

  • USDT-BRL (Dólar Turismo)

  • CAD-BRL (Dólar Canadense)

  • AUD-BRL (Dólar Australiano)

  • EUR-BRL (Euro)

  • GBP-BRL (Libra Esterlina)

  • ARS-BRL (Peso Argentino)

  • JPY-BRL (Iene Japonês)

  • CHF-BRL (Franco Suíço)

  • CNY-BRL (Yuan Chinês)

  • YLS-BRL (Novo Shekel Israelense)

  • BTC-BRL (Bitcoin)

  • LTC-BRL (Litecoin)

  • ETH-BRL (Ethereum)

  • XRP-BRL (Ripple)

Legendas

key

Label

bid

Compra

ask

Venda

varBid

Variação

pctChange

Porcentagem de Variação

high

Máximo

low

Mínimo