Skip to main content

MeanTask

Returns the mean (average) of all the results returned by the provided subtasks and subjobs. Nested tasks or jobs must return a Number.

Input: None

Returns: A numerical result.

Example: Returns the mean numerical result of 3 tasks.

{
"meanTask": {
"tasks": [
{
"valueTask": {
"value": 10
}
},
{
"valueTask": {
"value": 20
}
},
{
"valueTask": {
"value": 30
}
}
]
}
}

Example: Returns the mean numerical result of 3 jobs.

{
"meanTask": {
"jobs": [
{
"tasks": [
{
"httpTask": {
"url": "https://www.binance.com/api/v3/ticker/price?symbol=SOLUSDT"
}
},
{
"jsonParseTask": {
"path": "$.price"
}
}
]
},
{
"tasks": [
{
"httpTask": {
"url": "https://www.binance.us/api/v3/ticker/price?symbol=SOLUSD"
}
},
{
"jsonParseTask": {
"path": "$.price"
}
}
]
},
{
"tasks": [
{
"httpTask": {
"url": "https://api-pub.bitfinex.com/v2/tickers?symbols=tSOLUSD"
}
},
{
"jsonParseTask": {
"path": "$[0][7]"
}
}
]
}
]
}
}


Fields

NameTypeDescription
 jobs

A list of subjobs to process and produce a list of result values.

 tasks

A list of subtasks to process and produce a list of result values.