💰API de Cotações

API de Cotações em tempo real com mais de 150 moedas!

Retorna moedas selecionadas (atualizado a cada 30 segundos)

GET 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

Path Parameters

{
    "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"
    }
}

Retorna o fechamento dos últimos dias

GET https://economia.awesomeapi.com.br/json/daily/:moeda/:numero_dias

https://economia.awesomeapi.com.br/json/daily/USD-BRL/15

Path Parameters

[
    {
        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"
    }
]

Retorna o fechamento de um período específico

GET 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

Path Parameters

Query Parameters

[
    {
        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"
    }
]

Retorna cotações sequenciais de uma única moeda

GET https://economia.awesomeapi.com.br/:moeda/:quantidade

Retorna valores de uma moeda

Path Parameters

[
  {
    "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"
  }
]

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

GET 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

Path Parameters

Query Parameters

Formato de resposta

GET https://economia.awesomeapi.com.br/:format/:moeda

https://economia.awesomeapi.com.br/json/USD-BRL

Path Parameters

<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

Outras conversões

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

Legendas

Last updated