Oracle Process Flow
Let us take a look at an example and some sample code with respect to Oracle contract
Creating Oracle request
Test net - e0d635c7eb2c5eaa7d2207756a4c03a89790934a
Main net - a6ee997b142b002d49670ab73803403b09a23fa0
httpGet
operation = "CreateOracleRequest"
request = """{
"scheduler": {
"type": "runAfter",
"params": "2018-06-15 08:37:18"
},
"tasks": [
{
"type": "httpGet",
"params": {
"url": "https://bitstamp.net/api/ticker/"
}
},
{
"type": "jsonParse",
"params":
{
"data":
[
{
"type": "String",
"path": ["timestamp"]
},
{
"type": "String",
"path": ["last"]
},
{
"type": "Float",
"decimal": 100,
"path": ["open"]
}
]
}
}
]
}"""
args = [request, address]JsonParse
Scheduler
httpPost
Result of Oracle request
Sample Code
Last updated