> For the complete documentation index, see [llms.txt](https://hyperdapp.gitbook.io/code-editor/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hyperdapp.gitbook.io/code-editor/guides/oracle-and-http-call.md).

# Oracle & HTTP Call

An oracle helps you to do external HTTP calls to an API.

* You can register an oracle with only one line of code:

```
// SYNTAX
oracle(name, permission, base_url).

// EXAMPLE
oracle(coindesk, r, 'api.coindesk.com/v1/bpi').
```

{% hint style="warning" %}

* The oracle`name`must be in *snake\_case* **OR** *camelCase*

* The second parameter should always b&#x65;**`r`**(only *READ* permission is available ATM)
  {% endhint %}

* Then, you must use the ***get\_http()*** predicate whenever you want to get data from the oracle:

```
// SYNTAX
get_http(oracle_name, path, Output).

// EXAMPLE
prompt :-
    get_http(coindesk, '/currentprice.json', Output),
    set(coindesk, Output).
```

{% hint style="warning" %}
The Output name must be in **PascalCase.**
{% endhint %}
