Oracle's API

get
Attest with Commit

http://127.0.0.1:8585/attest
Request an attestation message body
Request
Response
Request
Query Parameters
commit
required
string
Commit ID of the committed data
cid
optional
string
ContractId of the recipient address
pk
optional
string
Public key of the recipient address
Response
200: OK
Commit found
{
"root": "3e47241505bca37f3356fd8dda544c2a3c9c043601f147ea0c6da1362c85a472",
"timestamp": "1600785099516",
"commit": "2d1719fa333e615636dc074cb6ad03813a57c56cd91b73bffd7c12dd62fdb0d3",
"tx": "No TX",
"messageBody": "{\n \"dict\": [\n [\n \"Commit\",\n {\n \"hash\": \"2d1719fa333e615636dc074cb6ad03813a57c56cd91b73bffd7c12dd62fdb0d3\"\n }\n ],\n [\n \"OraclePubKey\",\n {\n \"pk\": \"02ad784974b3f86ad97e008e20d2c107429041ed2d991ada2a1461b5077c11944c\"\n }\n ]\n ]\n}",
"messageBodyEncoded": "0c0206436f6d6d6974072d1719fa333e615636dc074cb6ad03813a57c56cd91b73bffd7c12dd62fdb0d30c4f7261636c655075624b65790a02ad784974b3f86ad97e008e20d2c107429041ed2d991ada2a1461b5077c11944c"
}
`

get
Attest with Root and Timestamp

http://127.0.0.1:8585/attest
Request an attestation message body
Request
Response
Request
Query Parameters
root
required
string
Root of the Merkle Tree
timestamp
required
string
Time of the committed data (in millisecond in epoch format)
cid
optional
string
Contract ID of the recipient address
pk
optional
string
ContractId of the Recipient address
Response
200: OK
{
"root": "3e47241505bca37f3356fd8dda544c2a3c9c043601f147ea0c6da1362c85a472",
"timestamp": "1600785099516",
"commit": "2d1719fa333e615636dc074cb6ad03813a57c56cd91b73bffd7c12dd62fdb0d3",
"tx": "No TX",
"messageBody": "{\n \"dict\": [\n [\n \"Commit\",\n {\n \"hash\": \"2d1719fa333e615636dc074cb6ad03813a57c56cd91b73bffd7c12dd62fdb0d3\"\n }\n ],\n [\n \"OraclePubKey\",\n {\n \"pk\": \"02ad784974b3f86ad97e008e20d2c107429041ed2d991ada2a1461b5077c11944c\"\n }\n ]\n ]\n}",
"messageBodyEncoded": "0c0206436f6d6d6974072d1719fa333e615636dc074cb6ad03813a57c56cd91b73bffd7c12dd62fdb0d30c4f7261636c655075624b65790a02ad784974b3f86ad97e008e20d2c107429041ed2d991ada2a1461b5077c11944c"
}
`

get
Query the Oracle

http://127.0.0.1:8585/query
Filter the commited data to find the commitment.
Request
Response
Request
Query Parameters
high
optional
string
filter the data with the higher timestamp bond
low
optional
string
Filter the data with the lower timestamp bond
key
optional
string
Filter by this ticker
Response
200: OK
[{
"item": {
"APPL": "10"
},
"timestamp": "1600785099516",
"commit": "2d1719fa333e615636dc074cb6ad03813a57c56cd91b73bffd7c12dd62fdb0d3",
"hash": "0ecb254e1ff36f9b6a09f35926041a01a955171a29d8500775fb58a0acbff54c"
}]