> For the complete documentation index, see [llms.txt](https://docs.everipedia.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.everipedia.org/past-oraqles-projects/2020-us-presidential-election/mainnet.md).

# 2020 US Presidential Election - EOS

Note that the EOS race calls contain more than just the presidential results. This smart contract contains presidential, house, senate, and governor race calls.

### Walkthrough

1. Fetching EOS Oracle data is a simple HTTP request. Use `fetch` or your favorite library to make the request

```
    // in JavaScript
    const allWinners = await fetch('https://eos.hyperion.eosrio.io/v2/history/get_actions?limit=1&account=associapress&filter=associapress%3Aelection&sort=desc')
        .then((res) => res.json())
        .then((res) => {
            return res?.actions?.[0]?.act?.data?.data;
        })
        .then((res) => JSON.parse(res));
```

2\. View the raw JSON response here to ensure you're accessing the data you're interested in:<br>

{% embed url="<https://eos.hyperion.eosrio.io/v2/history/get_actions?limit=1&account=associapress&filter=associapress%3Aelection&sort=desc>" %}

![JSON Response from EOS table](/files/-MLEg3kMYJ-P2HkvGfbz)

\
3\. Still having issues?‌

1. ​Ensure you're accessing the exact part of the JSON object you're interested in. If you want to use the `data` field as JSON, you **have to stringify it first** (the code example in #1 above already does this properly)
2. Tweet to [@dawsonbotsford](https://twitter.com/dawsonbotsford) and [@everipedia](https://twitter.com/Everipedia) any engineering questions (or send a DM on Twitter to [@dawsonbotsford](https://twitter.com/dawsonbotsford))
