Welcome to OracleFinder’s documentation!¶
Available Oracles¶
Provider | Oracle address | Adapters |
---|---|---|
Smartcontract.com | TBA | Unknown |
OracleFinder.com | TBA |
|
Adapters¶
CoinMarketCap¶
Overview¶
Adapter for use on Google Cloud Platform or AWS Lambda. Upload Zip and use trigger URL as bridge endpoint.
This adapter will work for the CoinMarketCap.com API, both free and paid.
Installation¶
npm install
zip -r cl-cmc.zip .
Create a cloud function in GCP or Lambda, and set the handler function according to the platform you are using.
- GCP:
gcpservice
- AWS:
handler
Note
Remember set the environment variable API_KEY
to your CoinMarketCap API Key!
Test Cases (GCP/AWS test events)¶
Fail¶
{
"id": "278c97ffadb54a5bbb93cfec5f7b5503",
"data": {}
}
{
"jobRunID": "278c97ffadb54a5bbb93cfec5f7b5503",
"status": "errored",
"error": "Not a valid endpoint"
}
Pass¶
{
"id": "278c97ffadb54a5bbb93cfec5f7b5503",
"data": {
"endpoint": "cryptocurrency",
"path": "info",
"symbol": "BTC"
}
}
{
"jobRunID": "278c97ffadb54a5bbb93cfec5f7b5503",
"data": {
"status": {
"timestamp": "2018-09-05T08:19:35.467Z",
"error_code": 0,
"error_message": null,
"elapsed": 4,
"credit_count": 1
},
"data": {
"BTC": {
"urls": {
"website": [
"https://bitcoin.org/"
],
"twitter": [],
"reddit": [
"https://reddit.com/r/bitcoin"
],
"message_board": [
"https://bitcointalk.org"
],
"announcement": [],
"chat": [],
"explorer": [
"https://blockchain.info/",
"https://live.blockcypher.com/btc/",
"https://blockchair.com/bitcoin/blocks"
],
"source_code": [
"https://github.com/bitcoin/"
]
},
"logo": "https://s2.coinmarketcap.com/static/img/coins/64x64/1.png",
"id": 1,
"name": "Bitcoin",
"symbol": "BTC",
"slug": "bitcoin",
"date_added": "2013-04-28T00:00:00.000Z",
"tags": [
"mineable"
],
"category": "coin"
}
}
}
}
{
"id": "278c97ffadb54a5bbb93cfec5f7b5503",
"data": {
"endpoint": "cryptocurrency",
"path": "map"
}
}
{
"id": "278c97ffadb54a5bbb93cfec5f7b5503",
"data": {
"endpoint": "cryptocurrency",
"path": "latest",
"resource": "quotes",
"id": "1,2",
"convert": "GBP"
}
}
{
"id": "278c97ffadb54a5bbb93cfec5f7b5503",
"data": {
"endpoint": "global-metrics",
"path": "latest",
"resource": "quotes"
}
}
CryptoCompare¶
Overview¶
Adapter for use on Google Cloud Platform or AWS Lambda. Upload Zip and use trigger URL as bridge endpoint.
Installation¶
Build¶
npm install
zip -r cl-cc.zip .
Tip
You can use one of our precompiled ZIP files from Releases. Most recent release: cl-cc-aws-gcp.zip
Upload¶
Create a cloud function in GCP or Lambda, upload the ZIP file and set the handler function according to the platform you are using.
- GCP:
gcpservice
- AWS:
handler
Test Cases (GCP/AWS test events)¶
Fail¶
{
"id": "278c97ffadb54a5bbb93cfec5f7b5503",
"data": {}
}
{
"jobRunID": "278c97ffadb54a5bbb93cfec5f7b5503",
"data": {
"Response": "Error",
"Message": "",
"Type": 1,
"Aggregated": false,
"Data": [],
"Path": "/data/",
"ErrorsSummary": "Not implemented"
}
}
Pass¶
{
"id": "278c97ffadb54a5bbb93cfec5f7b5503",
"data": {
"endpoint": "price",
"fsym": "ETH",
"tsyms": "USD"
}
}
{
"jobRunID": "278c97ffadb54a5bbb93cfec5f7b5503",
"data": {
"USD": 285.58
}
}
{
"id": "278c97ffadb54a5bbb93cfec5f7b5503",
"data": {
"endpoint": "price",
"fsym": "ETH",
"tsyms": "USD,EUR,JPY"
}
}
{
"id": "278c97ffadb54a5bbb93cfec5f7b5503",
"data": {
"endpoint": "pricemulti",
"fsyms": "BTC,ETH",
"tsyms": "USD,EUR"
}
}
{
"id": "278c97ffadb54a5bbb93cfec5f7b5503",
"data": {
"endpoint": "pricemultifull",
"fsyms": "BTC,ETH",
"tsyms": "USD,EUR"
}
}
{
"id": "278c97ffadb54a5bbb93cfec5f7b5503",
"data": {
"endpoint": "generateAvg",
"fsym": "ETH",
"tsym": "USD",
"exchange": "Kraken"
}
}
\ Sort by:\ best rated\ newest\ oldest\
\\
Add a comment\ (markup):
\``code``
, \ code blocks:::
and an indented block after blank line