API de Moedas

Last updated 2 months ago

API de Cotações do Dólar (USD, USDT, CA), Euro, Libra, Peso e Bitcoin, atualizado de 10 em 10 minutos.

get
Retorna todas as moedas

https://economia.awesomeapi.com.br
/all
Retorna o último resultado de cada moeda.
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.6713",
"low": "3.62",
"pctChange": "-0.455",
"open": "0",
"bid": "3.6269",
"ask": "3.6281",
"varBid": "-0.0166",
"timestamp": "1527103140000",
"create_date": "2018-05-23 16:30:02"
},
"EUR": {
"code": "EUR",
"codein": "BRL",
"name": "Euro (R$)",
"high": "4.3067",
"low": "4.2303",
"pctChange": "-1.238",
"open": "4",
"bid": "4.2417",
"ask": "4.2445",
"varBid": "-0.0532",
"timestamp": "1527103200000",
"create_date": "2018-05-23 16:30:06"
},
"GBP": {
"code": "GBP",
"codein": "BRL",
"name": "Libra Esterlina (R$)",
"high": "4.903",
"low": "4.8266",
"pctChange": "-1.183",
"open": "5",
"bid": "4.8402",
"ask": "4.8446",
"varBid": "-0.058",
"timestamp": "1527103440000",
"create_date": "2018-05-23 16:30:07"
},
"ARS": {
"code": "ARS",
"codein": "BRL",
"name": "Peso Argentino (R$)",
"high": "0.1514",
"low": "0.1476",
"pctChange": "-1.33",
"open": "0",
"bid": "0.1481",
"ask": "0.1484",
"varBid": "-0.002",
"timestamp": "1527103140000",
"create_date": "2018-05-23 16:20:08"
},
"USDT": {
"code": "USD",
"codein": "BRLT",
"name": "Dólar Turismo",
"high": "3.66",
"low": "3.48",
"pctChange": "1.055",
"open": "0",
"bid": "3.61",
"ask": "3.83",
"varBid": "0.04",
"timestamp": "1527102780000",
"create_date": "2018-05-23 16:20:03"
},
"CAD": {
"code": "CAD",
"codein": "BRL",
"name": "Dólar Canadense (R$)",
"high": "2.8497",
"low": "2.8076",
"pctChange": "-0.699",
"open": "3",
"bid": "2.8253",
"ask": "2.8272",
"varBid": "-0.0199",
"timestamp": "1527103140000",
"create_date": "2018-05-23 16:30:05"
},
"BTC": {
"code": "BTC",
"codein": "BRL",
"name": "Bitcoin",
"high": "30992.99",
"low": "27501",
"pctChange": "0",
"open": "0",
"bid": "28150",
"ask": "28199",
"varBid": "0",
"timestamp": "1527103708",
"create_date": "2018-05-23 16:30:10"
}
}
404: Not Found
[
]

get
Retorna os registros 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
[
{
"code": "USD",
"codein": "BRL",
"high": "4.045",
"low": "3.9958",
"pctChange": "0.33",
"bid": "4.0068",
"ask": "4.0075",
"varBid": "0.0132",
"create_date": "2018-09-28 11:30:02"
},
{
"code": "USD",
"codein": "BRL",
"high": "4.0525",
"low": "3.9758",
"pctChange": "-0.792",
"bid": "3.9935",
"ask": "3.9943",
"varBid": "-0.0319",
"create_date": "2018-09-27 17:10:02"
},
{
"code": "USD",
"codein": "BRL",
"high": "4.0912",
"low": "4.0149",
"pctChange": "-1.391",
"bid": "4.0242",
"ask": "4.0262",
"varBid": "-0.0568",
"create_date": "2018-09-26 17:10:02"
},
{
"code": "USD",
"codein": "BRL",
"high": "4.1378",
"low": "4.0779",
"pctChange": "-0.122",
"bid": "4.0813",
"ask": "4.083",
"varBid": "-0.005",
"create_date": "2018-09-25 17:10:02"
},
{
"code": "USD",
"codein": "BRL",
"high": "4.0933",
"low": "4.0381",
"pctChange": "0.996",
"bid": "4.0863",
"ask": "4.088",
"varBid": "0.0403",
"create_date": "2018-09-24 17:10:02"
},
{
"code": "USD",
"codein": "BRL",
"high": "4.0904",
"low": "4.0307",
"pctChange": "-0.589",
"bid": "4.046",
"ask": "4.0477",
"varBid": "-0.024",
"create_date": "2018-09-21 17:10:02"
},
{
"code": "USD",
"codein": "BRL",
"high": "4.1196",
"low": "4.0711",
"pctChange": "-1.273",
"bid": "4.0711",
"ask": "4.0717",
"varBid": "-0.0525",
"create_date": "2018-09-20 17:10:02"
},
{
"code": "USD",
"codein": "BRL",
"high": "4.1663",
"low": "4.1033",
"pctChange": "-0.435",
"bid": "4.1236",
"ask": "4.1242",
"varBid": "-0.018",
"create_date": "2018-09-19 17:10:04"
},
{
"code": "USD",
"codein": "BRL",
"high": "4.1483",
"low": "4.1263",
"pctChange": "0.412",
"bid": "4.1411",
"ask": "4.1422",
"varBid": "0.017",
"create_date": "2018-09-18 17:10:02"
},
{
"code": "USD",
"codein": "BRL",
"high": "4.2016",
"low": "4.1191",
"pctChange": "-0.996",
"bid": "4.1245",
"ask": "4.1252",
"varBid": "-0.0415",
"create_date": "2018-09-17 17:10:01"
},
{
"code": "USD",
"codein": "BRL",
"high": "4.2046",
"low": "4.1603",
"pctChange": "-0.691",
"bid": "4.1662",
"ask": "4.1667",
"varBid": "-0.029",
"create_date": "2018-09-14 17:10:02"
},
{
"code": "USD",
"codein": "BRL",
"high": "4.2002",
"low": "4.126",
"pctChange": "1.211",
"bid": "4.1951",
"ask": "4.1957",
"varBid": "0.0502",
"create_date": "2018-09-13 17:10:02"
},
{
"code": "USD",
"codein": "BRL",
"high": "4.148",
"low": "4.1143",
"pctChange": "-0.209",
"bid": "4.1444",
"ask": "4.1455",
"varBid": "-0.0087",
"create_date": "2018-09-12 17:10:02"
},
{
"code": "USD",
"codein": "BRL",
"high": "4.1766",
"low": "4.1402",
"pctChange": "1.483",
"bid": "4.1532",
"ask": "4.1542",
"varBid": "0.0607",
"create_date": "2018-09-11 17:10:02"
},
{
"code": "USD",
"codein": "BRL",
"high": "4.1223",
"low": "4.0773",
"pctChange": "-0.261",
"bid": "4.0925",
"ask": "4.0935",
"varBid": "-0.0107",
"create_date": "2018-09-10 17:10:02"
},
{
"code": "USD",
"codein": "BRL",
"high": "4.1604",
"low": "4.1038",
"pctChange": "-0.951",
"bid": "4.1038",
"ask": "4.1042",
"varBid": "-0.0394",
"create_date": "2018-09-06 17:10:02"
},
{
"code": "USD",
"codein": "BRL",
"high": "4.1782",
"low": "4.117",
"pctChange": "-0.229",
"bid": "4.1426",
"ask": "4.1436",
"varBid": "-0.0095",
"create_date": "2018-09-05 17:10:02"
},
{
"code": "USD",
"codein": "BRL",
"high": "4.1826",
"low": "4.1434",
"pctChange": "0.026",
"bid": "4.1525",
"ask": "4.1531",
"varBid": "0.0011",
"create_date": "2018-09-04 17:10:02"
},
{
"code": "USD",
"codein": "BRL",
"high": "4.1499",
"low": "4.1075",
"pctChange": "1.955",
"bid": "4.1495",
"ask": "4.152",
"varBid": "0.0796",
"create_date": "2018-09-03 17:10:02"
},
{
"code": "USD",
"codein": "BRL",
"high": "4.1765",
"low": "4.0549",
"pctChange": "-1.782",
"bid": "4.0714",
"ask": "4.0724",
"varBid": "-0.0739",
"create_date": "2018-08-31 17:10:02"
},
{
"code": "USD",
"codein": "BRL",
"high": "4.2055",
"low": "4.1261",
"pctChange": "0.778",
"bid": "4.1443",
"ask": "4.1463",
"varBid": "0.032",
"create_date": "2018-08-30 17:10:02"
},
{
"code": "USD",
"codein": "BRL",
"high": "4.1565",
"low": "4.1137",
"pctChange": "-0.654",
"bid": "4.1137",
"ask": "4.1143",
"varBid": "-0.0271",
"create_date": "2018-08-29 17:10:02"
},
{
"code": "USD",
"codein": "BRL",
"high": "4.1439",
"low": "4.0764",
"pctChange": "1.475",
"bid": "4.1399",
"ask": "4.1414",
"varBid": "0.0602",
"create_date": "2018-08-28 17:10:02"
},
{
"code": "USD",
"codein": "BRL",
"high": "4.1037",
"low": "4.0513",
"pctChange": "-0.565",
"bid": "4.0797",
"ask": "4.0812",
"varBid": "-0.0232",
"create_date": "2018-08-27 17:10:01"
},
{
"code": "USD",
"codein": "BRL",
"high": "4.123",
"low": "4.0768",
"pctChange": "-0.451",
"bid": "4.1036",
"ask": "4.1044",
"varBid": "-0.0186",
"create_date": "2018-08-24 17:10:06"
},
{
"code": "USD",
"codein": "BRL",
"high": "4.1237",
"low": "4.0447",
"pctChange": "1.654",
"bid": "4.121",
"ask": "4.123",
"varBid": "0.0671",
"create_date": "2018-08-23 17:10:01"
},
{
"code": "USD",
"codein": "BRL",
"high": "4.0874",
"low": "4.0378",
"pctChange": "0.463",
"bid": "4.0548",
"ask": "4.0559",
"varBid": "0.0187",
"create_date": "2018-08-22 17:10:05"
},
{
"code": "USD",
"codein": "BRL",
"high": "4.0368",
"low": "3.9613",
"pctChange": "2.009",
"bid": "4.0368",
"ask": "4.0372",
"varBid": "0.0795",
"create_date": "2018-08-21 17:10:02"
},
{
"code": "USD",
"codein": "BRL",
"high": "3.9686",
"low": "3.9209",
"pctChange": "1.098",
"bid": "3.957",
"ask": "3.9577",
"varBid": "0.043",
"create_date": "2018-08-20 17:10:03"
},
{
"code": "USD",
"codein": "BRL",
"high": "3.9514",
"low": "3.9133",
"pctChange": "0.243",
"bid": "3.9133",
"ask": "3.9147",
"varBid": "0.0095",
"create_date": "2018-08-17 17:10:02"
}
]

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",
"high": "3.26",
"low": "3.2318",
"pctChange": "-0.117",
"bid": "3.2504",
"ask": "3.2517",
"varBid": "-0.0038",
"create_date": "2016-09-30 23:50:09"
},
{
"code": "USD",
"codein": "BRL",
"high": "3.26",
"low": "3.2155",
"pctChange": "1.046",
"bid": "3.2544",
"ask": "3.2555",
"varBid": "0.0337",
"create_date": "2016-09-29 23:50:09"
},
{
"code": "USD",
"codein": "BRL",
"high": "3.2531",
"low": "3.2155",
"pctChange": "-0.285",
"bid": "3.2213",
"ask": "3.2218",
"varBid": "-0.0092",
"create_date": "2016-09-28 23:50:10"
},
{
"code": "USD",
"codein": "BRL",
"high": "3.2456",
"low": "3.2207",
"pctChange": "-0.505",
"bid": "3.2295",
"ask": "3.231",
"varBid": "-0.0164",
"create_date": "2016-09-27 23:50:09"
},
{
"code": "USD",
"codein": "BRL",
"high": "3.2503",
"low": "3.2258",
"pctChange": "0.006",
"bid": "3.2469",
"ask": "3.2474",
"varBid": "0.0002",
"create_date": "2016-09-26 23:50:09"
},
{
"code": "USD",
"codein": "BRL",
"high": "3.2463",
"low": "3.207",
"pctChange": "0.663",
"bid": "3.2463",
"ask": "3.2472",
"varBid": "0.0214",
"create_date": "2016-09-25 23:50:09"
},
{
"code": "USD",
"codein": "BRL",
"high": "3.2463",
"low": "3.207",
"pctChange": "0.663",
"bid": "3.2463",
"ask": "3.2472",
"varBid": "0.0214",
"create_date": "2016-09-24 23:50:10"
},
{
"code": "USD",
"codein": "BRL",
"high": "3.2463",
"low": "3.207",
"pctChange": "0.663",
"bid": "3.2463",
"ask": "3.2472",
"varBid": "0.0214",
"create_date": "2016-09-23 23:50:09"
},
{
"code": "USD",
"codein": "BRL",
"high": "3.2248",
"low": "3.1858",
"pctChange": "0.448",
"bid": "3.2248",
"ask": "3.2258",
"varBid": "0.0144",
"create_date": "2016-09-22 23:50:09"
},
{
"code": "USD",
"codein": "BRL",
"high": "3.2575",
"low": "3.2087",
"pctChange": "-1.521",
"bid": "3.2097",
"ask": "3.2114",
"varBid": "-0.0496",
"create_date": "2016-09-21 23:50:09"
},
{
"code": "USD",
"codein": "BRL",
"high": "3.2733",
"low": "3.2473",
"pctChange": "-0.528",
"bid": "3.2595",
"ask": "3.261",
"varBid": "-0.0173",
"create_date": "2016-09-20 23:50:10"
},
{
"code": "USD",
"codein": "BRL",
"high": "3.2769",
"low": "3.2534",
"pctChange": "0.315",
"bid": "3.2769",
"ask": "3.2783",
"varBid": "0.0103",
"create_date": "2016-09-19 23:50:10"
},
{
"code": "USD",
"codein": "BRL",
"high": "3.3119",
"low": "3.2665",
"pctChange": "-1.021",
"bid": "3.2673",
"ask": "3.268",
"varBid": "-0.0337",
"create_date": "2016-09-18 23:50:09"
},
{
"code": "USD",
"codein": "BRL",
"high": "3.3119",
"low": "3.2665",
"pctChange": "-1.021",
"bid": "3.2673",
"ask": "3.268",
"varBid": "-0.0337",
"create_date": "2016-09-17 23:50:10"
},
{
"code": "USD",
"codein": "BRL",
"high": "3.3119",
"low": "3.2665",
"pctChange": "-1.021",
"bid": "3.2673",
"ask": "3.268",
"varBid": "-0.0337",
"create_date": "2016-09-16 23:50:09"
},
{
"code": "USD",
"codein": "BRL",
"high": "3.3611",
"low": "3.298",
"pctChange": "-1.235",
"bid": "3.3004",
"ask": "3.3017",
"varBid": "-0.0413",
"create_date": "2016-09-15 23:50:10"
},
{
"code": "USD",
"codein": "BRL",
"high": "3.3415",
"low": "3.3045",
"pctChange": "0.79",
"bid": "3.3415",
"ask": "3.343",
"varBid": "0.0262",
"create_date": "2016-09-14 23:50:10"
},
{
"code": "USD",
"codein": "BRL",
"high": "3.3273",
"low": "3.244",
"pctChange": "2.087",
"bid": "3.3157",
"ask": "3.3168",
"varBid": "0.0678",
"create_date": "2016-09-13 23:50:09"
},
{
"code": "USD",
"codein": "BRL",
"high": "3.2992",
"low": "3.2412",
"pctChange": "-0.945",
"bid": "3.2475",
"ask": "3.249",
"varBid": "-0.031",
"create_date": "2016-09-12 23:50:10"
},
{
"code": "USD",
"codein": "BRL",
"high": "3.2819",
"low": "3.216",
"pctChange": "2.168",
"bid": "3.2781",
"ask": "3.28",
"varBid": "0.0696",
"create_date": "2016-09-11 23:50:09"
},
{
"code": "USD",
"codein": "BRL",
"high": "3.2819",
"low": "3.216",
"pctChange": "2.168",
"bid": "3.2781",
"ask": "3.28",
"varBid": "0.0696",
"create_date": "2016-09-10 23:50:10"
},
{
"code": "USD",
"codein": "BRL",
"high": "3.2819",
"low": "3.216",
"pctChange": "2.168",
"bid": "3.2781",
"ask": "3.28",
"varBid": "0.0696",
"create_date": "2016-09-09 23:50:09"
},
{
"code": "USD",
"codein": "BRL",
"high": "3.216",
"low": "3.1696",
"pctChange": "0.072",
"bid": "3.2091",
"ask": "3.2104",
"varBid": "0.0023",
"create_date": "2016-09-08 23:50:09"
},
{
"code": "USD",
"codein": "BRL",
"high": "3.2835",
"low": "3.2036",
"pctChange": "-2.255",
"bid": "3.2066",
"ask": "3.2081",
"varBid": "-0.074",
"create_date": "2016-09-07 23:50:09"
},
{
"code": "USD",
"codein": "BRL",
"high": "3.2835",
"low": "3.2036",
"pctChange": "-2.255",
"bid": "3.2066",
"ask": "3.2081",
"varBid": "-0.074",
"create_date": "2016-09-06 23:50:10"
},
{
"code": "USD",
"codein": "BRL",
"high": "3.2806",
"low": "3.2509",
"pctChange": "0.882",
"bid": "3.2806",
"ask": "3.2821",
"varBid": "0.0287",
"create_date": "2016-09-05 23:50:10"
},
{
"code": "USD",
"codein": "BRL",
"high": "3.2637",
"low": "3.2308",
"pctChange": "0.12",
"bid": "3.2521",
"ask": "3.2534",
"varBid": "0.0039",
"create_date": "2016-09-04 23:50:10"
},
{
"code": "USD",
"codein": "BRL",
"high": "3.2637",
"low": "3.2308",
"pctChange": "0.12",
"bid": "3.2521",
"ask": "3.2534",
"varBid": "0.0039",
"create_date": "2016-09-03 23:50:09"
},
{
"code": "USD",
"codein": "BRL",
"high": "3.2637",
"low": "3.2308",
"pctChange": "0.12",
"bid": "3.2521",
"ask": "3.2534",
"varBid": "0.0039",
"create_date": "2016-09-02 23:50:10"
},
{
"code": "USD",
"codein": "BRL",
"high": "3.2602",
"low": "3.223",
"pctChange": "0.626",
"bid": "3.2482",
"ask": "3.2495",
"varBid": "0.0202",
"create_date": "2016-09-01 23:50:10"
}
]

get
Retorna uma única moeda

https://economia.awesomeapi.com.br
/:moeda/:quantidade/:pagina
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
pagina
optional
number
Numero da pagina
200: OK
[
{
"code": "USD",
"codein": "BRL",
"name": "Dólar Comercial",
"high": "3.6713",
"low": "3.62",
"pctChange": "-0.455",
"open": "0",
"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 version="1.0" encoding="utf-8"?>
<xml>
<item>
<idreg>428446</idreg>
<codein>BRL</codein>
<high>3.206</high><pctChange>-0.726</pctChange>
<bid>3.1839</bid>
<timestamp>1500062400000</timestamp>
<notFresh>1</notFresh>
<create_date>2017-07-15 12:30:02</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)

  • USD-BRLT (Dólar Turismo)

  • CAD-BRL (Dólar Canadense)

  • EUR-BRL (Euro)

  • GBP-BRL (Libra Esterlina)

  • ARS-BRL (Peso Argentino)

  • BTC-BRL (Bitcoin)

Legendas

key

Label

bid

Compra

ask

Venda

varBid

Variação

pctChange

Porcentagem de Variação

high

Máximo

low

Mínimo