Skip to main content

Index

References

ITask

Re-exports ITask

Namespaces

BufferLayoutParseTask

BufferLayoutParseTask:

BufferParseType

BufferParseType:

BufferParseType enum.

bool

bool: 2

f32

f32: 9

f64

f64: 12

i128

i128: 14

i16

i16: 6

i32

i32: 8

i64

i64: 11

i8

i8: 4

pubkey

pubkey: 1

u128

u128: 13

u16

u16: 5

u32

u32: 7

u64

u64: 10

u8

u8: 3

Endian

Endian:

Endian enum.

BIG_ENDIAN

BIG_ENDIAN: 1

LITTLE_ENDIAN

LITTLE_ENDIAN: 0

CacheTask

CacheTask:

CacheItem

CacheItem:

Represents a CacheItem.

constructor

  • new CacheItem(properties?: ICacheItem): CacheItem
  • Constructs a new CacheItem.


    Parameters

    • optionalproperties: ICacheItem

      Properties to set

    Returns CacheItem

publicoptionaljob

job?: null | IOracleJob

The OracleJob to execute to yield the value to store in cache.

publicvariableName

variableName: string

The name of the variable to store in cache to reference later with ${VARIABLE_NAME}.

publictoJSON

  • toJSON(): {}
  • Converts this CacheItem to JSON.


    Returns {}

    JSON object

    • [k string]: any

publicstaticcreate

  • create(properties?: ICacheItem): CacheItem
  • Creates a new CacheItem instance using the specified properties.


    Parameters

    • optionalproperties: ICacheItem

      Properties to set

    Returns CacheItem

    CacheItem instance

publicstaticdecode

  • decode(reader: Uint8Array | Reader, length?: number): CacheItem
  • Decodes a CacheItem message from the specified reader or buffer.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    • optionallength: number

      Message length if known beforehand

    Returns CacheItem

    CacheItem

publicstaticdecodeDelimited

  • decodeDelimited(reader: Uint8Array | Reader): CacheItem
  • Decodes a CacheItem message from the specified reader or buffer, length delimited.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    Returns CacheItem

    CacheItem

publicstaticencode

  • encode(message: ICacheItem, writer?: Writer): Writer
  • Encodes the specified CacheItem message. Does not implicitly verify messages.


    Parameters

    • message: ICacheItem

      CacheItem message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticencodeDelimited

  • encodeDelimited(message: ICacheItem, writer?: Writer): Writer
  • Encodes the specified CacheItem message, length delimited. Does not implicitly verify messages.


    Parameters

    • message: ICacheItem

      CacheItem message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticfromObject

  • fromObject(object: {}): CacheItem
  • Creates a CacheItem message from a plain object. Also converts values to their respective internal types.


    Parameters

    • object: {}

      Plain object

    Returns CacheItem

    CacheItem

publicstaticgetTypeUrl

  • getTypeUrl(typeUrlPrefix?: string): string
  • Gets the default type url for CacheItem


    Parameters

    • optionaltypeUrlPrefix: string

      your custom typeUrlPrefix(default “type.googleapis.com”)

    Returns string

    The default type url

publicstatictoObject

  • toObject(message: CacheItem, options?: IConversionOptions): {}
  • Creates a plain object from a CacheItem message. Also converts values to other types if specified.


    Parameters

    • message: CacheItem

      CacheItem

    • optionaloptions: IConversionOptions

      Conversion options

    Returns {}

    Plain object

    • [k string]: any

publicstaticverify

  • verify(message: {}): null | string
  • Verifies a CacheItem message.


    Parameters

    • message: {}

      Plain object to verify

    Returns null | string

    null if valid, otherwise the reason why it is not

ICacheItem

ICacheItem:

Properties of a CacheItem.

optionaljob

job?: null | IOracleJob

The OracleJob to execute to yield the value to store in cache.

optionalvariableName

variableName?: null | string

The name of the variable to store in cache to reference later with ${VARIABLE_NAME}.

ComparisonTask

ComparisonTask:

Operation

Operation:

Operation enum.

OPERATION_EQ

OPERATION_EQ: 0

OPERATION_GT

OPERATION_GT: 1

OPERATION_LT

OPERATION_LT: 2

CronParseTask

CronParseTask:

ClockType

ClockType:

ClockType enum.

ORACLE

ORACLE: 0

SYSCLOCK

SYSCLOCK: 1

DefiKingdomsTask

DefiKingdomsTask:

Token

Token:

Represents a Token.

constructor

  • new Token(properties?: IToken): Token
  • Constructs a new Token.


    Parameters

    • optionalproperties: IToken

      Properties to set

    Returns Token

publicaddress

address: string

The address of the token.

publicdecimals

decimals: number

The number of decimal places for a token.

publictoJSON

  • toJSON(): {}
  • Converts this Token to JSON.


    Returns {}

    JSON object

    • [k string]: any

publicstaticcreate

  • create(properties?: IToken): Token
  • Creates a new Token instance using the specified properties.


    Parameters

    • optionalproperties: IToken

      Properties to set

    Returns Token

    Token instance

publicstaticdecode

  • decode(reader: Uint8Array | Reader, length?: number): Token
  • Decodes a Token message from the specified reader or buffer.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    • optionallength: number

      Message length if known beforehand

    Returns Token

    Token

publicstaticdecodeDelimited

  • decodeDelimited(reader: Uint8Array | Reader): Token
  • Decodes a Token message from the specified reader or buffer, length delimited.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    Returns Token

    Token

publicstaticencode

  • encode(message: IToken, writer?: Writer): Writer
  • Encodes the specified Token message. Does not implicitly verify messages.


    Parameters

    • message: IToken

      Token message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticencodeDelimited

  • encodeDelimited(message: IToken, writer?: Writer): Writer
  • Encodes the specified Token message, length delimited. Does not implicitly verify messages.


    Parameters

    • message: IToken

      Token message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticfromObject

  • fromObject(object: {}): Token
  • Creates a Token message from a plain object. Also converts values to their respective internal types.


    Parameters

    • object: {}

      Plain object

    Returns Token

    Token

publicstaticgetTypeUrl

  • getTypeUrl(typeUrlPrefix?: string): string
  • Gets the default type url for Token


    Parameters

    • optionaltypeUrlPrefix: string

      your custom typeUrlPrefix(default “type.googleapis.com”)

    Returns string

    The default type url

publicstatictoObject

  • toObject(message: Token, options?: IConversionOptions): {}
  • Creates a plain object from a Token message. Also converts values to other types if specified.


    Parameters

    • message: Token

      Token

    • optionaloptions: IConversionOptions

      Conversion options

    Returns {}

    Plain object

    • [k string]: any

publicstaticverify

  • verify(message: {}): null | string
  • Verifies a Token message.


    Parameters

    • message: {}

      Plain object to verify

    Returns null | string

    null if valid, otherwise the reason why it is not

IToken

IToken:

Properties of a Token.

optionaladdress

address?: null | string

The address of the token.

optionaldecimals

decimals?: null | number

The number of decimal places for a token.

HistoryFunctionTask

HistoryFunctionTask:

Method

Method:

Method enum.

METHOD_MAX

METHOD_MAX: 1

METHOD_MIN

METHOD_MIN: 0

HttpTask

HttpTask:

Method

Method:

An enumeration representing the types of HTTP requests available to make.

METHOD_GET

METHOD_GET: 1

METHOD_POST

METHOD_POST: 2

METHOD_UNKOWN

METHOD_UNKOWN: 0

Header

Header:

An object that represents a header to add to an HTTP request.

constructor

  • new Header(properties?: IHeader): Header
  • Constructs a new Header.


    Parameters

    • optionalproperties: IHeader

      Properties to set

    Returns Header

publickey

key: string

A header key such as Authorization or Content-Type

publicvalue

value: string

A value for the given header key like Basic MYAUTHKEY or application/json

publictoJSON

  • toJSON(): {}
  • Converts this Header to JSON.


    Returns {}

    JSON object

    • [k string]: any

publicstaticcreate

  • create(properties?: IHeader): Header
  • Creates a new Header instance using the specified properties.


    Parameters

    • optionalproperties: IHeader

      Properties to set

    Returns Header

    Header instance

publicstaticdecode

  • decode(reader: Uint8Array | Reader, length?: number): Header
  • Decodes a Header message from the specified reader or buffer.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    • optionallength: number

      Message length if known beforehand

    Returns Header

    Header

publicstaticdecodeDelimited

  • decodeDelimited(reader: Uint8Array | Reader): Header
  • Decodes a Header message from the specified reader or buffer, length delimited.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    Returns Header

    Header

publicstaticencode

  • encode(message: IHeader, writer?: Writer): Writer
  • Encodes the specified Header message. Does not implicitly verify messages.


    Parameters

    • message: IHeader

      Header message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticencodeDelimited

  • encodeDelimited(message: IHeader, writer?: Writer): Writer
  • Encodes the specified Header message, length delimited. Does not implicitly verify messages.


    Parameters

    • message: IHeader

      Header message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticfromObject

  • fromObject(object: {}): Header
  • Creates a Header message from a plain object. Also converts values to their respective internal types.


    Parameters

    • object: {}

      Plain object

    Returns Header

    Header

publicstaticgetTypeUrl

  • getTypeUrl(typeUrlPrefix?: string): string
  • Gets the default type url for Header


    Parameters

    • optionaltypeUrlPrefix: string

      your custom typeUrlPrefix(default “type.googleapis.com”)

    Returns string

    The default type url

publicstatictoObject

  • toObject(message: Header, options?: IConversionOptions): {}
  • Creates a plain object from a Header message. Also converts values to other types if specified.


    Parameters

    • message: Header

      Header

    • optionaloptions: IConversionOptions

      Conversion options

    Returns {}

    Plain object

    • [k string]: any

publicstaticverify

  • verify(message: {}): null | string
  • Verifies a Header message.


    Parameters

    • message: {}

      Plain object to verify

    Returns null | string

    null if valid, otherwise the reason why it is not

IHeader

IHeader:

Properties of a Header.

optionalkey

key?: null | string

A header key such as Authorization or Content-Type

optionalvalue

value?: null | string

A value for the given header key like Basic MYAUTHKEY or application/json

JsonParseTask

JsonParseTask:

AggregationMethod

AggregationMethod:

The methods of combining a list of numerical results.

MAX

MAX: 2

MEAN

MEAN: 4

MEDIAN

MEDIAN: 5

MIN

MIN: 1

NONE

NONE: 0

SUM

SUM: 3

JupiterSwapTask

JupiterSwapTask:

FilterList

FilterList:

Represents a FilterList.

constructor

  • new FilterList(properties?: IFilterList): FilterList
  • Constructs a new FilterList.


    Parameters

    • optionalproperties: IFilterList

      Properties to set

    Returns FilterList

publiclabels

labels: string[]

A list of Jupiter AMM labels to allow or deny (e.g. ‘Raydium’, ‘Orca’)

publictoJSON

  • toJSON(): {}
  • Converts this FilterList to JSON.


    Returns {}

    JSON object

    • [k string]: any

publicstaticcreate

  • create(properties?: IFilterList): FilterList
  • Creates a new FilterList instance using the specified properties.


    Parameters

    • optionalproperties: IFilterList

      Properties to set

    Returns FilterList

    FilterList instance

publicstaticdecode

  • decode(reader: Uint8Array | Reader, length?: number): FilterList
  • Decodes a FilterList message from the specified reader or buffer.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    • optionallength: number

      Message length if known beforehand

    Returns FilterList

    FilterList

publicstaticdecodeDelimited

  • decodeDelimited(reader: Uint8Array | Reader): FilterList
  • Decodes a FilterList message from the specified reader or buffer, length delimited.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    Returns FilterList

    FilterList

publicstaticencode

  • encode(message: IFilterList, writer?: Writer): Writer
  • Encodes the specified FilterList message. Does not implicitly verify messages.


    Parameters

    • message: IFilterList

      FilterList message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticencodeDelimited

  • encodeDelimited(message: IFilterList, writer?: Writer): Writer
  • Encodes the specified FilterList message, length delimited. Does not implicitly verify messages.


    Parameters

    • message: IFilterList

      FilterList message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticfromObject

  • fromObject(object: {}): FilterList
  • Creates a FilterList message from a plain object. Also converts values to their respective internal types.


    Parameters

    • object: {}

      Plain object

    Returns FilterList

    FilterList

publicstaticgetTypeUrl

  • getTypeUrl(typeUrlPrefix?: string): string
  • Gets the default type url for FilterList


    Parameters

    • optionaltypeUrlPrefix: string

      your custom typeUrlPrefix(default “type.googleapis.com”)

    Returns string

    The default type url

publicstatictoObject

  • toObject(message: FilterList, options?: IConversionOptions): {}
  • Creates a plain object from a FilterList message. Also converts values to other types if specified.


    Parameters

    • message: FilterList

      FilterList

    • optionaloptions: IConversionOptions

      Conversion options

    Returns {}

    Plain object

    • [k string]: any

publicstaticverify

  • verify(message: {}): null | string
  • Verifies a FilterList message.


    Parameters

    • message: {}

      Plain object to verify

    Returns null | string

    null if valid, otherwise the reason why it is not

IFilterList

IFilterList:

Properties of a FilterList.

optionallabels

labels?: null | string[]

A list of Jupiter AMM labels to allow or deny (e.g. ‘Raydium’, ‘Orca’)

LendingRateTask

LendingRateTask:

Field

Field:

Field enum.

FIELD_BORROW_RATE

FIELD_BORROW_RATE: 1

FIELD_DEPOSIT_RATE

FIELD_DEPOSIT_RATE: 0

RoundTask

RoundTask:

Method

Method:

Method enum.

METHOD_ROUND_DOWN

METHOD_ROUND_DOWN: 1

METHOD_ROUND_UP

METHOD_ROUND_UP: 0

Classes

AddTask

AddTask:

This task will add a numerical input by a scalar value from a job of subtasks, an aggregator, or a big.

Input: The current running numerical result output from a scalar value, an aggregator, a job of subtasks or a big.

Returns: A numerical result.

Example: Returns the numerical result by adding by a job of subtasks.

{
"tasks": [
{
"valueTask": {
"value": 100
}
},
{
"addTask": {
"job": {
"tasks": [
{
"valueTask": {
"value": 10
}
}
]
}
}
}
]
}

Example: Returns the numerical result by multiplying by an aggregator.

{
"tasks": [
{
"valueTask": {
"value": 100
}
},
{
"addTask": {
"aggregatorPubkey": "GvDMxPzN1sCj7L26YDK2HnMRXEQmQ2aemov8YBtPS7vR"
}
}
]
}

Example: Returns the numerical result by multiplying by a big.

{
"tasks": [
{
"cacheTask": {
"cacheItems": [
{
"variableName": "TEN",
"job": {
"tasks": [
{
"valueTask": {
"value": 10
}
}
]
}
}
]
}
},
{
"valueTask": {
"value": 100
}
},
{
"addTask": {
"big": "${TEN}"
}
}
]
}

constructor

  • Constructs a new AddTask.


    Parameters

    • optionalproperties: IAddTask

      Properties to set

    Returns AddTask

publicoptionalAddition

Addition?: aggregatorPubkey | big | scalar | job

AddTask Addition.

publicoptionalaggregatorPubkey

aggregatorPubkey?: null | string

Specifies an aggregator to add by.

publicoptionalbig

big?: null | string

A stringified big.js. Accepts variable expansion syntax.

publicoptionaljob

job?: null | IOracleJob

A job whose result is computed before adding our numerical input by that result.

publicoptionalscalar

scalar?: null | number

Specifies a scalar to add by.

publictoJSON

  • toJSON(): {}
  • Converts this AddTask to JSON.


    Returns {}

    JSON object

    • [k string]: any

publicstaticcreate

  • Creates a new AddTask instance using the specified properties.


    Parameters

    • optionalproperties: IAddTask

      Properties to set

    Returns AddTask

    AddTask instance

publicstaticdecode

  • decode(reader: Uint8Array | Reader, length?: number): AddTask
  • Decodes an AddTask message from the specified reader or buffer.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    • optionallength: number

      Message length if known beforehand

    Returns AddTask

    AddTask

publicstaticdecodeDelimited

  • decodeDelimited(reader: Uint8Array | Reader): AddTask
  • Decodes an AddTask message from the specified reader or buffer, length delimited.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    Returns AddTask

    AddTask

publicstaticencode

  • encode(message: IAddTask, writer?: Writer): Writer
  • Encodes the specified AddTask message. Does not implicitly verify messages.


    Parameters

    • message: IAddTask

      AddTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticencodeDelimited

  • encodeDelimited(message: IAddTask, writer?: Writer): Writer
  • Encodes the specified AddTask message, length delimited. Does not implicitly verify messages.


    Parameters

    • message: IAddTask

      AddTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticfromObject

  • Creates an AddTask message from a plain object. Also converts values to their respective internal types.


    Parameters

    • object: {}

      Plain object

    Returns AddTask

    AddTask

publicstaticgetTypeUrl

  • getTypeUrl(typeUrlPrefix?: string): string
  • Gets the default type url for AddTask


    Parameters

    • optionaltypeUrlPrefix: string

      your custom typeUrlPrefix(default “type.googleapis.com”)

    Returns string

    The default type url

publicstatictoObject

  • toObject(message: AddTask, options?: IConversionOptions): {}
  • Creates a plain object from an AddTask message. Also converts values to other types if specified.


    Parameters

    • message: AddTask

      AddTask

    • optionaloptions: IConversionOptions

      Conversion options

    Returns {}

    Plain object

    • [k string]: any

publicstaticverify

  • verify(message: {}): null | string
  • Verifies an AddTask message.


    Parameters

    • message: {}

      Plain object to verify

    Returns null | string

    null if valid, otherwise the reason why it is not

AnchorFetchTask

AnchorFetchTask:

Load a parse an Anchor based solana account.

constructor

publicaccountAddress

accountAddress: string

The account to parse.

publicprogramId

programId: string

Owning program of the account to parse.

publictoJSON

  • toJSON(): {}
  • Converts this AnchorFetchTask to JSON.


    Returns {}

    JSON object

    • [k string]: any

publicstaticcreate

  • Creates a new AnchorFetchTask instance using the specified properties.


    Parameters

    Returns AnchorFetchTask

    AnchorFetchTask instance

publicstaticdecode

  • Decodes an AnchorFetchTask message from the specified reader or buffer.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    • optionallength: number

      Message length if known beforehand

    Returns AnchorFetchTask

    AnchorFetchTask

publicstaticdecodeDelimited

  • Decodes an AnchorFetchTask message from the specified reader or buffer, length delimited.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    Returns AnchorFetchTask

    AnchorFetchTask

publicstaticencode

  • Encodes the specified AnchorFetchTask message. Does not implicitly verify messages.


    Parameters

    • message: IAnchorFetchTask

      AnchorFetchTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticencodeDelimited

  • Encodes the specified AnchorFetchTask message, length delimited. Does not implicitly verify messages.


    Parameters

    • message: IAnchorFetchTask

      AnchorFetchTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticfromObject

  • Creates an AnchorFetchTask message from a plain object. Also converts values to their respective internal types.


    Parameters

    • object: {}

      Plain object

    Returns AnchorFetchTask

    AnchorFetchTask

publicstaticgetTypeUrl

  • getTypeUrl(typeUrlPrefix?: string): string
  • Gets the default type url for AnchorFetchTask


    Parameters

    • optionaltypeUrlPrefix: string

      your custom typeUrlPrefix(default “type.googleapis.com”)

    Returns string

    The default type url

publicstatictoObject

  • Creates a plain object from an AnchorFetchTask message. Also converts values to other types if specified.


    Parameters

    • message: AnchorFetchTask

      AnchorFetchTask

    • optionaloptions: IConversionOptions

      Conversion options

    Returns {}

    Plain object

    • [k string]: any

publicstaticverify

  • verify(message: {}): null | string
  • Verifies an AnchorFetchTask message.


    Parameters

    • message: {}

      Plain object to verify

    Returns null | string

    null if valid, otherwise the reason why it is not

BoundTask

BoundTask:

Bound the running result to an upper/lower bound. This is typically the last task in an OracleJob.

Input: The current running numerical result.

Returns: The running result bounded to an upper or lower bound if it exceeds a given threshold.

Example: Bound the running result to a value between 0.90 and 1.10

{
"boundTask": {
"lowerBoundValue": "0.90",
"onExceedsLowerBoundValue": "0.90",
"upperBoundValue": "1.10",
"onExceedsUpperBoundValue": "1.10"
}
}

constructor

  • Constructs a new BoundTask.


    Parameters

    Returns BoundTask

publicoptionallowerBound

lowerBound?: null | IOracleJob

The OracleJob to execute for the lower bound value.

publiclowerBoundValue

lowerBoundValue: string

The value to use for the lower bound. Can be set to a ${CACHE_KEY}.

publicoptionalonExceedsLowerBound

onExceedsLowerBound?: null | IOracleJob

The OracleJob to execute if the lower bound is exceeded.

publiconExceedsLowerBoundValue

onExceedsLowerBoundValue: string

The value to use if the lower bound is exceeded. Can be set to a ${CACHE_KEY}.

publicoptionalonExceedsUpperBound

onExceedsUpperBound?: null | IOracleJob

The OracleJob to execute if the upper bound is exceeded.

publiconExceedsUpperBoundValue

onExceedsUpperBoundValue: string

The value to use if the upper bound is exceeded. Can be set to a ${CACHE_KEY}.

publicoptionalupperBound

upperBound?: null | IOracleJob

The OracleJob to execute for the upper bound value.

publicupperBoundValue

upperBoundValue: string

The value to use for the upper bound. Can be set to a ${CACHE_KEY}.

publictoJSON

  • toJSON(): {}
  • Converts this BoundTask to JSON.


    Returns {}

    JSON object

    • [k string]: any

publicstaticcreate

  • Creates a new BoundTask instance using the specified properties.


    Parameters

    Returns BoundTask

    BoundTask instance

publicstaticdecode

  • decode(reader: Uint8Array | Reader, length?: number): BoundTask
  • Decodes a BoundTask message from the specified reader or buffer.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    • optionallength: number

      Message length if known beforehand

    Returns BoundTask

    BoundTask

publicstaticdecodeDelimited

  • decodeDelimited(reader: Uint8Array | Reader): BoundTask
  • Decodes a BoundTask message from the specified reader or buffer, length delimited.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    Returns BoundTask

    BoundTask

publicstaticencode

  • encode(message: IBoundTask, writer?: Writer): Writer
  • Encodes the specified BoundTask message. Does not implicitly verify messages.


    Parameters

    • message: IBoundTask

      BoundTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticencodeDelimited

  • encodeDelimited(message: IBoundTask, writer?: Writer): Writer
  • Encodes the specified BoundTask message, length delimited. Does not implicitly verify messages.


    Parameters

    • message: IBoundTask

      BoundTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticfromObject

  • Creates a BoundTask message from a plain object. Also converts values to their respective internal types.


    Parameters

    • object: {}

      Plain object

    Returns BoundTask

    BoundTask

publicstaticgetTypeUrl

  • getTypeUrl(typeUrlPrefix?: string): string
  • Gets the default type url for BoundTask


    Parameters

    • optionaltypeUrlPrefix: string

      your custom typeUrlPrefix(default “type.googleapis.com”)

    Returns string

    The default type url

publicstatictoObject

  • toObject(message: BoundTask, options?: IConversionOptions): {}
  • Creates a plain object from a BoundTask message. Also converts values to other types if specified.


    Parameters

    • message: BoundTask

      BoundTask

    • optionaloptions: IConversionOptions

      Conversion options

    Returns {}

    Plain object

    • [k string]: any

publicstaticverify

  • verify(message: {}): null | string
  • Verifies a BoundTask message.


    Parameters

    • message: {}

      Plain object to verify

    Returns null | string

    null if valid, otherwise the reason why it is not

BufferLayoutParseTask

BufferLayoutParseTask:

Return the deserialized value from a stringified buffer.

constructor

publicendian

endian: Endian

The endianness of the stored value.

publicoffset

offset: number

The buffer offset to start deserializing from.

publictype

type: BufferParseType

The type of value to deserialize.

publictoJSON

  • toJSON(): {}
  • Converts this BufferLayoutParseTask to JSON.


    Returns {}

    JSON object

    • [k string]: any

publicstaticcreate

publicstaticdecode

  • Decodes a BufferLayoutParseTask message from the specified reader or buffer.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    • optionallength: number

      Message length if known beforehand

    Returns BufferLayoutParseTask

    BufferLayoutParseTask

publicstaticdecodeDelimited

  • Decodes a BufferLayoutParseTask message from the specified reader or buffer, length delimited.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    Returns BufferLayoutParseTask

    BufferLayoutParseTask

publicstaticencode

  • Encodes the specified BufferLayoutParseTask message. Does not implicitly verify messages.


    Parameters

    • message: IBufferLayoutParseTask

      BufferLayoutParseTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticencodeDelimited

  • Encodes the specified BufferLayoutParseTask message, length delimited. Does not implicitly verify messages.


    Parameters

    • message: IBufferLayoutParseTask

      BufferLayoutParseTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticfromObject

  • Creates a BufferLayoutParseTask message from a plain object. Also converts values to their respective internal types.


    Parameters

    • object: {}

      Plain object

    Returns BufferLayoutParseTask

    BufferLayoutParseTask

publicstaticgetTypeUrl

  • getTypeUrl(typeUrlPrefix?: string): string
  • Gets the default type url for BufferLayoutParseTask


    Parameters

    • optionaltypeUrlPrefix: string

      your custom typeUrlPrefix(default “type.googleapis.com”)

    Returns string

    The default type url

publicstatictoObject

  • Creates a plain object from a BufferLayoutParseTask message. Also converts values to other types if specified.


    Parameters

    Returns {}

    Plain object

    • [k string]: any

publicstaticverify

  • verify(message: {}): null | string
  • Verifies a BufferLayoutParseTask message.


    Parameters

    • message: {}

      Plain object to verify

    Returns null | string

    null if valid, otherwise the reason why it is not

CacheTask

CacheTask:

Execute a job and store the result in a variable to reference later.

Input: None

Returns: The input

Example: CacheTask storing ${ONE} = 1

{
"cacheTask": {
"cacheItems": [
{
"variableName": "ONE",
"job": {
"tasks": [
{
"valueTask": {
"value": 1
}
}
]
}
}
]
}
}

constructor

  • Constructs a new CacheTask.


    Parameters

    Returns CacheTask

publiccacheItems

cacheItems: ICacheItem[]

A list of cached variables to reference in the job with ${VARIABLE_NAME}.

publictoJSON

  • toJSON(): {}
  • Converts this CacheTask to JSON.


    Returns {}

    JSON object

    • [k string]: any

publicstaticcreate

  • Creates a new CacheTask instance using the specified properties.


    Parameters

    Returns CacheTask

    CacheTask instance

publicstaticdecode

  • decode(reader: Uint8Array | Reader, length?: number): CacheTask
  • Decodes a CacheTask message from the specified reader or buffer.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    • optionallength: number

      Message length if known beforehand

    Returns CacheTask

    CacheTask

publicstaticdecodeDelimited

  • decodeDelimited(reader: Uint8Array | Reader): CacheTask
  • Decodes a CacheTask message from the specified reader or buffer, length delimited.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    Returns CacheTask

    CacheTask

publicstaticencode

  • encode(message: ICacheTask, writer?: Writer): Writer
  • Encodes the specified CacheTask message. Does not implicitly verify messages.


    Parameters

    • message: ICacheTask

      CacheTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticencodeDelimited

  • encodeDelimited(message: ICacheTask, writer?: Writer): Writer
  • Encodes the specified CacheTask message, length delimited. Does not implicitly verify messages.


    Parameters

    • message: ICacheTask

      CacheTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticfromObject

  • Creates a CacheTask message from a plain object. Also converts values to their respective internal types.


    Parameters

    • object: {}

      Plain object

    Returns CacheTask

    CacheTask

publicstaticgetTypeUrl

  • getTypeUrl(typeUrlPrefix?: string): string
  • Gets the default type url for CacheTask


    Parameters

    • optionaltypeUrlPrefix: string

      your custom typeUrlPrefix(default “type.googleapis.com”)

    Returns string

    The default type url

publicstatictoObject

  • toObject(message: CacheTask, options?: IConversionOptions): {}
  • Creates a plain object from a CacheTask message. Also converts values to other types if specified.


    Parameters

    • message: CacheTask

      CacheTask

    • optionaloptions: IConversionOptions

      Conversion options

    Returns {}

    Plain object

    • [k string]: any

publicstaticverify

  • verify(message: {}): null | string
  • Verifies a CacheTask message.


    Parameters

    • message: {}

      Plain object to verify

    Returns null | string

    null if valid, otherwise the reason why it is not

ComparisonTask

ComparisonTask:

Represents a ComparisonTask.

constructor

publicoptionalLHS

LHS?: lhs | lhsValue

ComparisonTask LHS.

publicoptionalRHS

RHS?: rhs | rhsValue

ComparisonTask RHS.

publicoptionallhs

lhs?: null | IOracleJob

OracleJob where the executed result is equal to the left hand side operand.

publicoptionallhsValue

lhsValue?: null | string

String or ${CACHE_KEY} representing the left hand side operand.

publicoptionalonFailure

onFailure?: null | IOracleJob

The OracleJob to execute if the condition fails to evaluate.

publiconFailureValue

onFailureValue: string

The result to use if the condition fails to evaluate. Can be set to a ${CACHE_KEY}.

publicoptionalonFalse

onFalse?: null | IOracleJob

The OracleJob to execute if the condition evaluates to false.

publiconFalseValue

onFalseValue: string

The result to use if the condition evaluates to false. Can be set to a ${CACHE_KEY}.

publicoptionalonTrue

onTrue?: null | IOracleJob

The OracleJob to execute if the condition evaluates to true.

publiconTrueValue

onTrueValue: string

The result to use if the condition evaluates to true. Can be set to a ${CACHE_KEY}.

publicop

op: Operation

The type of operator to use on the left (lhs) and right (rhs) operand.

publicoptionalrhs

rhs?: null | IOracleJob

OracleJob where the executed result is equal to the right hand side operand.

publicoptionalrhsValue

rhsValue?: null | string

String or ${CACHE_KEY} representing the right hand side operand.

publictoJSON

  • toJSON(): {}
  • Converts this ComparisonTask to JSON.


    Returns {}

    JSON object

    • [k string]: any

publicstaticcreate

  • Creates a new ComparisonTask instance using the specified properties.


    Parameters

    Returns ComparisonTask

    ComparisonTask instance

publicstaticdecode

  • Decodes a ComparisonTask message from the specified reader or buffer.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    • optionallength: number

      Message length if known beforehand

    Returns ComparisonTask

    ComparisonTask

publicstaticdecodeDelimited

  • Decodes a ComparisonTask message from the specified reader or buffer, length delimited.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    Returns ComparisonTask

    ComparisonTask

publicstaticencode

  • Encodes the specified ComparisonTask message. Does not implicitly verify messages.


    Parameters

    • message: IComparisonTask

      ComparisonTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticencodeDelimited

  • Encodes the specified ComparisonTask message, length delimited. Does not implicitly verify messages.


    Parameters

    • message: IComparisonTask

      ComparisonTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticfromObject

  • Creates a ComparisonTask message from a plain object. Also converts values to their respective internal types.


    Parameters

    • object: {}

      Plain object

    Returns ComparisonTask

    ComparisonTask

publicstaticgetTypeUrl

  • getTypeUrl(typeUrlPrefix?: string): string
  • Gets the default type url for ComparisonTask


    Parameters

    • optionaltypeUrlPrefix: string

      your custom typeUrlPrefix(default “type.googleapis.com”)

    Returns string

    The default type url

publicstatictoObject

  • Creates a plain object from a ComparisonTask message. Also converts values to other types if specified.


    Parameters

    • message: ComparisonTask

      ComparisonTask

    • optionaloptions: IConversionOptions

      Conversion options

    Returns {}

    Plain object

    • [k string]: any

publicstaticverify

  • verify(message: {}): null | string
  • Verifies a ComparisonTask message.


    Parameters

    • message: {}

      Plain object to verify

    Returns null | string

    null if valid, otherwise the reason why it is not

ConditionalTask

ConditionalTask:

This task will run the attempt on the subtasks in an effort to produce a valid numerical result. If attempt. fails to produce an acceptable result, on_failure subtasks will be run instead.

Input: The current running numerical result output from a task.

Returns: A numerical result, else run on_failure subtasks.

Example: Returns the numerical result from the conditionalTask’s subtasks, else on_failure returns the numerical result from its subtasks.

{
"conditionalTask": {
"attempt": [
{
"tasks": [
{
"jupiterSwapTask": {
"inTokenAddress": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"outTokenAddress": "DUALa4FC2yREwZ59PHeu1un4wis36vHRv5hWVBmzykCJ"
}
}
]
}
],
"onFailure": [
{
"lpExchangeRateTask": {
"orcaPoolAddress": "7yJ4gMRJhEoCR48aPE3EAWRmCoygakik81ZS1sajaTnE"
}
}
]
}
}

constructor

publicattempt

attempt: ITask[]

A list of subtasks to process in an attempt to produce a valid numerical result.

publiconFailure

onFailure: ITask[]

A list of subtasks that will be run if attempt subtasks are unable to produce an acceptable result.

publictoJSON

  • toJSON(): {}
  • Converts this ConditionalTask to JSON.


    Returns {}

    JSON object

    • [k string]: any

publicstaticcreate

  • Creates a new ConditionalTask instance using the specified properties.


    Parameters

    Returns ConditionalTask

    ConditionalTask instance

publicstaticdecode

  • Decodes a ConditionalTask message from the specified reader or buffer.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    • optionallength: number

      Message length if known beforehand

    Returns ConditionalTask

    ConditionalTask

publicstaticdecodeDelimited

  • Decodes a ConditionalTask message from the specified reader or buffer, length delimited.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    Returns ConditionalTask

    ConditionalTask

publicstaticencode

  • Encodes the specified ConditionalTask message. Does not implicitly verify messages.


    Parameters

    • message: IConditionalTask

      ConditionalTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticencodeDelimited

  • Encodes the specified ConditionalTask message, length delimited. Does not implicitly verify messages.


    Parameters

    • message: IConditionalTask

      ConditionalTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticfromObject

  • Creates a ConditionalTask message from a plain object. Also converts values to their respective internal types.


    Parameters

    • object: {}

      Plain object

    Returns ConditionalTask

    ConditionalTask

publicstaticgetTypeUrl

  • getTypeUrl(typeUrlPrefix?: string): string
  • Gets the default type url for ConditionalTask


    Parameters

    • optionaltypeUrlPrefix: string

      your custom typeUrlPrefix(default “type.googleapis.com”)

    Returns string

    The default type url

publicstatictoObject

  • Creates a plain object from a ConditionalTask message. Also converts values to other types if specified.


    Parameters

    • message: ConditionalTask

      ConditionalTask

    • optionaloptions: IConversionOptions

      Conversion options

    Returns {}

    Plain object

    • [k string]: any

publicstaticverify

  • verify(message: {}): null | string
  • Verifies a ConditionalTask message.


    Parameters

    • message: {}

      Plain object to verify

    Returns null | string

    null if valid, otherwise the reason why it is not

CronParseTask

CronParseTask:

Return a timestamp from a crontab instruction.

Input: None

Returns: A timestamp

Example: Return the unix timestamp for the on-chain SYSCLOCK

{
"cronParseTask": {
"cronPattern": "* * * * * *",
"clockOffset": 0,
"clock": "SYSCLOCK"
}
}

Example: Return the unix timestamp for next friday at 5pm UTC

{
"cronParseTask": {
"cronPattern": "0 17 * * 5",
"clockOffset": 0,
"clock": 0
}
}

constructor

publicclock

clock: ClockType

Use the TaskRunner’s clock or the on-chain SYSCLOCK.

publicclockOffset

clockOffset: number

The timestamp offset to calculate the next run.

publiccronPattern

cronPattern: string

The cron pattern to parse.

publictoJSON

  • toJSON(): {}
  • Converts this CronParseTask to JSON.


    Returns {}

    JSON object

    • [k string]: any

publicstaticcreate

  • Creates a new CronParseTask instance using the specified properties.


    Parameters

    Returns CronParseTask

    CronParseTask instance

publicstaticdecode

  • decode(reader: Uint8Array | Reader, length?: number): CronParseTask
  • Decodes a CronParseTask message from the specified reader or buffer.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    • optionallength: number

      Message length if known beforehand

    Returns CronParseTask

    CronParseTask

publicstaticdecodeDelimited

  • Decodes a CronParseTask message from the specified reader or buffer, length delimited.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    Returns CronParseTask

    CronParseTask

publicstaticencode

  • Encodes the specified CronParseTask message. Does not implicitly verify messages.


    Parameters

    • message: ICronParseTask

      CronParseTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticencodeDelimited

  • Encodes the specified CronParseTask message, length delimited. Does not implicitly verify messages.


    Parameters

    • message: ICronParseTask

      CronParseTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticfromObject

  • Creates a CronParseTask message from a plain object. Also converts values to their respective internal types.


    Parameters

    • object: {}

      Plain object

    Returns CronParseTask

    CronParseTask

publicstaticgetTypeUrl

  • getTypeUrl(typeUrlPrefix?: string): string
  • Gets the default type url for CronParseTask


    Parameters

    • optionaltypeUrlPrefix: string

      your custom typeUrlPrefix(default “type.googleapis.com”)

    Returns string

    The default type url

publicstatictoObject

  • toObject(message: CronParseTask, options?: IConversionOptions): {}
  • Creates a plain object from a CronParseTask message. Also converts values to other types if specified.


    Parameters

    • message: CronParseTask

      CronParseTask

    • optionaloptions: IConversionOptions

      Conversion options

    Returns {}

    Plain object

    • [k string]: any

publicstaticverify

  • verify(message: {}): null | string
  • Verifies a CronParseTask message.


    Parameters

    • message: {}

      Plain object to verify

    Returns null | string

    null if valid, otherwise the reason why it is not

DefiKingdomsTask

DefiKingdomsTask:

Fetch the swap price from DefiKingdoms.

constructor

publicoptionalinToken

inToken?: null | IToken

The input token of the swap.

publicoptionaloutToken

outToken?: null | IToken

The output token of the swap.

publicprovider

provider: string

The RPC provider to use for the swap.

publictoJSON

  • toJSON(): {}
  • Converts this DefiKingdomsTask to JSON.


    Returns {}

    JSON object

    • [k string]: any

publicstaticcreate

  • Creates a new DefiKingdomsTask instance using the specified properties.


    Parameters

    Returns DefiKingdomsTask

    DefiKingdomsTask instance

publicstaticdecode

  • Decodes a DefiKingdomsTask message from the specified reader or buffer.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    • optionallength: number

      Message length if known beforehand

    Returns DefiKingdomsTask

    DefiKingdomsTask

publicstaticdecodeDelimited

  • Decodes a DefiKingdomsTask message from the specified reader or buffer, length delimited.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    Returns DefiKingdomsTask

    DefiKingdomsTask

publicstaticencode

  • Encodes the specified DefiKingdomsTask message. Does not implicitly verify messages.


    Parameters

    • message: IDefiKingdomsTask

      DefiKingdomsTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticencodeDelimited

  • Encodes the specified DefiKingdomsTask message, length delimited. Does not implicitly verify messages.


    Parameters

    • message: IDefiKingdomsTask

      DefiKingdomsTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticfromObject

  • Creates a DefiKingdomsTask message from a plain object. Also converts values to their respective internal types.


    Parameters

    • object: {}

      Plain object

    Returns DefiKingdomsTask

    DefiKingdomsTask

publicstaticgetTypeUrl

  • getTypeUrl(typeUrlPrefix?: string): string
  • Gets the default type url for DefiKingdomsTask


    Parameters

    • optionaltypeUrlPrefix: string

      your custom typeUrlPrefix(default “type.googleapis.com”)

    Returns string

    The default type url

publicstatictoObject

  • Creates a plain object from a DefiKingdomsTask message. Also converts values to other types if specified.


    Parameters

    • message: DefiKingdomsTask

      DefiKingdomsTask

    • optionaloptions: IConversionOptions

      Conversion options

    Returns {}

    Plain object

    • [k string]: any

publicstaticverify

  • verify(message: {}): null | string
  • Verifies a DefiKingdomsTask message.


    Parameters

    • message: {}

      Plain object to verify

    Returns null | string

    null if valid, otherwise the reason why it is not

DivideTask

DivideTask:

This task will divide a numerical input by a scalar value from a job of subtasks, an aggregator, or a big.

Input: The current running numerical result output from a scalar value, an aggregator, a job of subtasks or a big.

Returns: A numerical result.

Example: Returns the numerical result by dividing by a job of subtasks.

{
"tasks": [
{
"valueTask": {
"value": 100
}
},
{
"divideTask": {
"job": {
"tasks": [
{
"valueTask": {
"value": 10
}
}
]
}
}
}
]
}

Example: Returns the numerical result by dividing by an aggregator.

{
"tasks": [
{
"valueTask": {
"value": 100
}
},
{
"divideTask": {
"aggregatorPubkey": "GvDMxPzN1sCj7L26YDK2HnMRXEQmQ2aemov8YBtPS7vR"
}
}
]
}

Example: Returns the numerical result by dividing by a big.

{
"tasks": [
{
"cacheTask": {
"cacheItems": [
{
"variableName": "TEN",
"job": {
"tasks": [
{
"valueTask": {
"value": 10
}
}
]
}
}
]
}
},
{
"valueTask": {
"value": 100
}
},
{
"divideTask": {
"big": "${TEN}"
}
}
]
}

constructor

publicoptionalDenominator

Denominator?: aggregatorPubkey | big | scalar | job

DivideTask Denominator.

publicoptionalaggregatorPubkey

aggregatorPubkey?: null | string

Specifies another aggregator resut to divide by.

publicoptionalbig

big?: null | string

A stringified big.js. Accepts variable expansion syntax.

publicoptionaljob

job?: null | IOracleJob

A job whose result is computed before dividing our numerical input by that result.

publicoptionalscalar

scalar?: null | number

Specifies a basic scalar denominator to divide by.

publictoJSON

  • toJSON(): {}
  • Converts this DivideTask to JSON.


    Returns {}

    JSON object

    • [k string]: any

publicstaticcreate

  • Creates a new DivideTask instance using the specified properties.


    Parameters

    Returns DivideTask

    DivideTask instance

publicstaticdecode

  • decode(reader: Uint8Array | Reader, length?: number): DivideTask
  • Decodes a DivideTask message from the specified reader or buffer.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    • optionallength: number

      Message length if known beforehand

    Returns DivideTask

    DivideTask

publicstaticdecodeDelimited

  • decodeDelimited(reader: Uint8Array | Reader): DivideTask
  • Decodes a DivideTask message from the specified reader or buffer, length delimited.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    Returns DivideTask

    DivideTask

publicstaticencode

  • Encodes the specified DivideTask message. Does not implicitly verify messages.


    Parameters

    • message: IDivideTask

      DivideTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticencodeDelimited

  • encodeDelimited(message: IDivideTask, writer?: Writer): Writer
  • Encodes the specified DivideTask message, length delimited. Does not implicitly verify messages.


    Parameters

    • message: IDivideTask

      DivideTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticfromObject

  • Creates a DivideTask message from a plain object. Also converts values to their respective internal types.


    Parameters

    • object: {}

      Plain object

    Returns DivideTask

    DivideTask

publicstaticgetTypeUrl

  • getTypeUrl(typeUrlPrefix?: string): string
  • Gets the default type url for DivideTask


    Parameters

    • optionaltypeUrlPrefix: string

      your custom typeUrlPrefix(default “type.googleapis.com”)

    Returns string

    The default type url

publicstatictoObject

  • toObject(message: DivideTask, options?: IConversionOptions): {}
  • Creates a plain object from a DivideTask message. Also converts values to other types if specified.


    Parameters

    • message: DivideTask

      DivideTask

    • optionaloptions: IConversionOptions

      Conversion options

    Returns {}

    Plain object

    • [k string]: any

publicstaticverify

  • verify(message: {}): null | string
  • Verifies a DivideTask message.


    Parameters

    • message: {}

      Plain object to verify

    Returns null | string

    null if valid, otherwise the reason why it is not

EwmaTask

EwmaTask:

Represents an EwmaTask.

constructor

  • Constructs a new EwmaTask.


    Parameters

    • optionalproperties: IEwmaTask

      Properties to set

    Returns EwmaTask

publicaggregatorAddress

aggregatorAddress: string

EwmaTask aggregatorAddress.

publiclambda

lambda: number

EwmaTask lambda.

publicperiod

period: number

EwmaTask period.

publictoJSON

  • toJSON(): {}
  • Converts this EwmaTask to JSON.


    Returns {}

    JSON object

    • [k string]: any

publicstaticcreate

  • Creates a new EwmaTask instance using the specified properties.


    Parameters

    • optionalproperties: IEwmaTask

      Properties to set

    Returns EwmaTask

    EwmaTask instance

publicstaticdecode

  • decode(reader: Uint8Array | Reader, length?: number): EwmaTask
  • Decodes an EwmaTask message from the specified reader or buffer.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    • optionallength: number

      Message length if known beforehand

    Returns EwmaTask

    EwmaTask

publicstaticdecodeDelimited

  • decodeDelimited(reader: Uint8Array | Reader): EwmaTask
  • Decodes an EwmaTask message from the specified reader or buffer, length delimited.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    Returns EwmaTask

    EwmaTask

publicstaticencode

  • encode(message: IEwmaTask, writer?: Writer): Writer
  • Encodes the specified EwmaTask message. Does not implicitly verify messages.


    Parameters

    • message: IEwmaTask

      EwmaTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticencodeDelimited

  • encodeDelimited(message: IEwmaTask, writer?: Writer): Writer
  • Encodes the specified EwmaTask message, length delimited. Does not implicitly verify messages.


    Parameters

    • message: IEwmaTask

      EwmaTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticfromObject

  • Creates an EwmaTask message from a plain object. Also converts values to their respective internal types.


    Parameters

    • object: {}

      Plain object

    Returns EwmaTask

    EwmaTask

publicstaticgetTypeUrl

  • getTypeUrl(typeUrlPrefix?: string): string
  • Gets the default type url for EwmaTask


    Parameters

    • optionaltypeUrlPrefix: string

      your custom typeUrlPrefix(default “type.googleapis.com”)

    Returns string

    The default type url

publicstatictoObject

  • toObject(message: EwmaTask, options?: IConversionOptions): {}
  • Creates a plain object from an EwmaTask message. Also converts values to other types if specified.


    Parameters

    • message: EwmaTask

      EwmaTask

    • optionaloptions: IConversionOptions

      Conversion options

    Returns {}

    Plain object

    • [k string]: any

publicstaticverify

  • verify(message: {}): null | string
  • Verifies an EwmaTask message.


    Parameters

    • message: {}

      Plain object to verify

    Returns null | string

    null if valid, otherwise the reason why it is not

HistoryFunctionTask

HistoryFunctionTask:

Represents a HistoryFunctionTask.

constructor

publicaggregatorAddress

aggregatorAddress: string

HistoryFunctionTask aggregatorAddress.

publicmethod

method: Method

HistoryFunctionTask method.

publicperiod

period: number

HistoryFunctionTask period.

publictoJSON

  • toJSON(): {}
  • Converts this HistoryFunctionTask to JSON.


    Returns {}

    JSON object

    • [k string]: any

publicstaticcreate

  • Creates a new HistoryFunctionTask instance using the specified properties.


    Parameters

    Returns HistoryFunctionTask

    HistoryFunctionTask instance

publicstaticdecode

  • Decodes a HistoryFunctionTask message from the specified reader or buffer.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    • optionallength: number

      Message length if known beforehand

    Returns HistoryFunctionTask

    HistoryFunctionTask

publicstaticdecodeDelimited

  • Decodes a HistoryFunctionTask message from the specified reader or buffer, length delimited.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    Returns HistoryFunctionTask

    HistoryFunctionTask

publicstaticencode

  • Encodes the specified HistoryFunctionTask message. Does not implicitly verify messages.


    Parameters

    • message: IHistoryFunctionTask

      HistoryFunctionTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticencodeDelimited

  • Encodes the specified HistoryFunctionTask message, length delimited. Does not implicitly verify messages.


    Parameters

    • message: IHistoryFunctionTask

      HistoryFunctionTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticfromObject

  • Creates a HistoryFunctionTask message from a plain object. Also converts values to their respective internal types.


    Parameters

    • object: {}

      Plain object

    Returns HistoryFunctionTask

    HistoryFunctionTask

publicstaticgetTypeUrl

  • getTypeUrl(typeUrlPrefix?: string): string
  • Gets the default type url for HistoryFunctionTask


    Parameters

    • optionaltypeUrlPrefix: string

      your custom typeUrlPrefix(default “type.googleapis.com”)

    Returns string

    The default type url

publicstatictoObject

  • Creates a plain object from a HistoryFunctionTask message. Also converts values to other types if specified.


    Parameters

    • message: HistoryFunctionTask

      HistoryFunctionTask

    • optionaloptions: IConversionOptions

      Conversion options

    Returns {}

    Plain object

    • [k string]: any

publicstaticverify

  • verify(message: {}): null | string
  • Verifies a HistoryFunctionTask message.


    Parameters

    • message: {}

      Plain object to verify

    Returns null | string

    null if valid, otherwise the reason why it is not

HttpTask

HttpTask:

The adapter will report the text body of a successful HTTP request to the specified url, or return an error if the response status code is greater than or equal to 400.

Input: None

Returns: String representation of the http response.

Example: Basic HttpTask

{
"httpTask": {
"url": "https://mywebsite.org/path"
}
}

Example: HttpTask example with headers

{
"httpTask": {
"url": "https://mywebsite.org/path",
"method": "METHOD_POST",
"headers": [
{
"key": "MY_HEADER_KEY",
"value": "MY_HEADER_VALUE"
}
],
"body": "{\"MY_BODY_KEY\":\"MY_BODY_VALUE\"}"
}
}

constructor

  • Constructs a new HttpTask.


    Parameters

    • optionalproperties: IHttpTask

      Properties to set

    Returns HttpTask

publicbody

body: string

A stringified body (if any) to add to this HttpTask.

publicheaders

headers: IHeader[]

A list of headers to add to this HttpTask.

publicmethod

method: Method

The type of HTTP request to make.

publicurl

url: string

A string containing the URL to direct this HTTP request to.

publictoJSON

  • toJSON(): {}
  • Converts this HttpTask to JSON.


    Returns {}

    JSON object

    • [k string]: any

publicstaticcreate

  • Creates a new HttpTask instance using the specified properties.


    Parameters

    • optionalproperties: IHttpTask

      Properties to set

    Returns HttpTask

    HttpTask instance

publicstaticdecode

  • decode(reader: Uint8Array | Reader, length?: number): HttpTask
  • Decodes a HttpTask message from the specified reader or buffer.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    • optionallength: number

      Message length if known beforehand

    Returns HttpTask

    HttpTask

publicstaticdecodeDelimited

  • decodeDelimited(reader: Uint8Array | Reader): HttpTask
  • Decodes a HttpTask message from the specified reader or buffer, length delimited.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    Returns HttpTask

    HttpTask

publicstaticencode

  • encode(message: IHttpTask, writer?: Writer): Writer
  • Encodes the specified HttpTask message. Does not implicitly verify messages.


    Parameters

    • message: IHttpTask

      HttpTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticencodeDelimited

  • encodeDelimited(message: IHttpTask, writer?: Writer): Writer
  • Encodes the specified HttpTask message, length delimited. Does not implicitly verify messages.


    Parameters

    • message: IHttpTask

      HttpTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticfromObject

  • Creates a HttpTask message from a plain object. Also converts values to their respective internal types.


    Parameters

    • object: {}

      Plain object

    Returns HttpTask

    HttpTask

publicstaticgetTypeUrl

  • getTypeUrl(typeUrlPrefix?: string): string
  • Gets the default type url for HttpTask


    Parameters

    • optionaltypeUrlPrefix: string

      your custom typeUrlPrefix(default “type.googleapis.com”)

    Returns string

    The default type url

publicstatictoObject

  • toObject(message: HttpTask, options?: IConversionOptions): {}
  • Creates a plain object from a HttpTask message. Also converts values to other types if specified.


    Parameters

    • message: HttpTask

      HttpTask

    • optionaloptions: IConversionOptions

      Conversion options

    Returns {}

    Plain object

    • [k string]: any

publicstaticverify

  • verify(message: {}): null | string
  • Verifies a HttpTask message.


    Parameters

    • message: {}

      Plain object to verify

    Returns null | string

    null if valid, otherwise the reason why it is not

JsonParseTask

JsonParseTask:

The adapter walks the path specified and returns the value found at that result. If returning JSON data from the HttpGet or HttpPost adapters, you must use this adapter to parse the response.

Input: String representation of a JSON object.

Returns: A numerical result.

Example: Parses the price field from a JSON object

{
"jsonParse": {
"path": "$.price"
}
}

constructor

publicaggregationMethod

aggregationMethod: AggregationMethod

The technique that will be used to aggregate the results if walking the specified path returns multiple numerical results.

publicpath

path: string

JSONPath formatted path to the element. https://t.ly/uLtw https://www.npmjs.com/package/jsonpath-plus

publictoJSON

  • toJSON(): {}
  • Converts this JsonParseTask to JSON.


    Returns {}

    JSON object

    • [k string]: any

publicstaticcreate

  • Creates a new JsonParseTask instance using the specified properties.


    Parameters

    Returns JsonParseTask

    JsonParseTask instance

publicstaticdecode

  • decode(reader: Uint8Array | Reader, length?: number): JsonParseTask
  • Decodes a JsonParseTask message from the specified reader or buffer.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    • optionallength: number

      Message length if known beforehand

    Returns JsonParseTask

    JsonParseTask

publicstaticdecodeDelimited

  • Decodes a JsonParseTask message from the specified reader or buffer, length delimited.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    Returns JsonParseTask

    JsonParseTask

publicstaticencode

  • Encodes the specified JsonParseTask message. Does not implicitly verify messages.


    Parameters

    • message: IJsonParseTask

      JsonParseTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticencodeDelimited

  • Encodes the specified JsonParseTask message, length delimited. Does not implicitly verify messages.


    Parameters

    • message: IJsonParseTask

      JsonParseTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticfromObject

  • Creates a JsonParseTask message from a plain object. Also converts values to their respective internal types.


    Parameters

    • object: {}

      Plain object

    Returns JsonParseTask

    JsonParseTask

publicstaticgetTypeUrl

  • getTypeUrl(typeUrlPrefix?: string): string
  • Gets the default type url for JsonParseTask


    Parameters

    • optionaltypeUrlPrefix: string

      your custom typeUrlPrefix(default “type.googleapis.com”)

    Returns string

    The default type url

publicstatictoObject

  • toObject(message: JsonParseTask, options?: IConversionOptions): {}
  • Creates a plain object from a JsonParseTask message. Also converts values to other types if specified.


    Parameters

    • message: JsonParseTask

      JsonParseTask

    • optionaloptions: IConversionOptions

      Conversion options

    Returns {}

    Plain object

    • [k string]: any

publicstaticverify

  • verify(message: {}): null | string
  • Verifies a JsonParseTask message.


    Parameters

    • message: {}

      Plain object to verify

    Returns null | string

    null if valid, otherwise the reason why it is not

JupiterSwapTask

JupiterSwapTask:

Fetch the simulated price for a swap on JupiterSwap.

Input: None

Returns: The swap price on Jupiter for a given input and output token mint address.

Example: Fetch the JupiterSwap price for exchanging 1 SOL into USDC.

{
"jupiterSwapTask": {
"inTokenAddress": "So11111111111111111111111111111111111111112",
"outTokenAddress": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
}
}

Example: Fetch the JupiterSwap price for exchanging 1000 SOL into USDC.

{
"jupiterSwapTask": {
"inTokenAddress": "So11111111111111111111111111111111111111112",
"outTokenAddress": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"baseAmount": "1000"
}
}

constructor

publicoptionalRoutesFilters

RoutesFilters?: allowList | denyList

JupiterSwapTask RoutesFilters.

publicoptionalSwapAmount

SwapAmount?: baseAmount | quoteAmount | baseAmountString | quoteAmountString

JupiterSwapTask SwapAmount.

publicoptionalallowList

allowList?: null | IFilterList

A list of AMM markets to allow.

publicoptionalbaseAmount

baseAmount?: null | number

The amount of in_token_address tokens to swap.

publicoptionalbaseAmountString

baseAmountString?: null | string

The amount of in_token_address tokens to swap.

publicoptionaldenyList

denyList?: null | IFilterList

A list of AMM markets to deny.

publicinTokenAddress

inTokenAddress: string

The input token address.

publicoutTokenAddress

outTokenAddress: string

The output token address.

publicoptionalquoteAmount

quoteAmount?: null | number

The amount of out_token_address tokens to swap.

publicoptionalquoteAmountString

quoteAmountString?: null | string

The amount of out_token_address tokens to swap.

publictoJSON

  • toJSON(): {}
  • Converts this JupiterSwapTask to JSON.


    Returns {}

    JSON object

    • [k string]: any

publicstaticcreate

  • Creates a new JupiterSwapTask instance using the specified properties.


    Parameters

    Returns JupiterSwapTask

    JupiterSwapTask instance

publicstaticdecode

  • Decodes a JupiterSwapTask message from the specified reader or buffer.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    • optionallength: number

      Message length if known beforehand

    Returns JupiterSwapTask

    JupiterSwapTask

publicstaticdecodeDelimited

  • Decodes a JupiterSwapTask message from the specified reader or buffer, length delimited.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    Returns JupiterSwapTask

    JupiterSwapTask

publicstaticencode

  • Encodes the specified JupiterSwapTask message. Does not implicitly verify messages.


    Parameters

    • message: IJupiterSwapTask

      JupiterSwapTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticencodeDelimited

  • Encodes the specified JupiterSwapTask message, length delimited. Does not implicitly verify messages.


    Parameters

    • message: IJupiterSwapTask

      JupiterSwapTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticfromObject

  • Creates a JupiterSwapTask message from a plain object. Also converts values to their respective internal types.


    Parameters

    • object: {}

      Plain object

    Returns JupiterSwapTask

    JupiterSwapTask

publicstaticgetTypeUrl

  • getTypeUrl(typeUrlPrefix?: string): string
  • Gets the default type url for JupiterSwapTask


    Parameters

    • optionaltypeUrlPrefix: string

      your custom typeUrlPrefix(default “type.googleapis.com”)

    Returns string

    The default type url

publicstatictoObject

  • Creates a plain object from a JupiterSwapTask message. Also converts values to other types if specified.


    Parameters

    • message: JupiterSwapTask

      JupiterSwapTask

    • optionaloptions: IConversionOptions

      Conversion options

    Returns {}

    Plain object

    • [k string]: any

publicstaticverify

  • verify(message: {}): null | string
  • Verifies a JupiterSwapTask message.


    Parameters

    • message: {}

      Plain object to verify

    Returns null | string

    null if valid, otherwise the reason why it is not

LendingRateTask

LendingRateTask:

Fetch the lending rates for various Solana protocols

constructor

publicassetMint

assetMint: string

A token mint address supported by the chosen protocol

publicfield

field: Field

LendingRateTask field.

publicprotocol

protocol: string

01, apricot, francium, jet, larix, mango, port, solend, tulip

publictoJSON

  • toJSON(): {}
  • Converts this LendingRateTask to JSON.


    Returns {}

    JSON object

    • [k string]: any

publicstaticcreate

  • Creates a new LendingRateTask instance using the specified properties.


    Parameters

    Returns LendingRateTask

    LendingRateTask instance

publicstaticdecode

  • Decodes a LendingRateTask message from the specified reader or buffer.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    • optionallength: number

      Message length if known beforehand

    Returns LendingRateTask

    LendingRateTask

publicstaticdecodeDelimited

  • Decodes a LendingRateTask message from the specified reader or buffer, length delimited.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    Returns LendingRateTask

    LendingRateTask

publicstaticencode

  • Encodes the specified LendingRateTask message. Does not implicitly verify messages.


    Parameters

    • message: ILendingRateTask

      LendingRateTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticencodeDelimited

  • Encodes the specified LendingRateTask message, length delimited. Does not implicitly verify messages.


    Parameters

    • message: ILendingRateTask

      LendingRateTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticfromObject

  • Creates a LendingRateTask message from a plain object. Also converts values to their respective internal types.


    Parameters

    • object: {}

      Plain object

    Returns LendingRateTask

    LendingRateTask

publicstaticgetTypeUrl

  • getTypeUrl(typeUrlPrefix?: string): string
  • Gets the default type url for LendingRateTask


    Parameters

    • optionaltypeUrlPrefix: string

      your custom typeUrlPrefix(default “type.googleapis.com”)

    Returns string

    The default type url

publicstatictoObject

  • Creates a plain object from a LendingRateTask message. Also converts values to other types if specified.


    Parameters

    • message: LendingRateTask

      LendingRateTask

    • optionaloptions: IConversionOptions

      Conversion options

    Returns {}

    Plain object

    • [k string]: any

publicstaticverify

  • verify(message: {}): null | string
  • Verifies a LendingRateTask message.


    Parameters

    • message: {}

      Plain object to verify

    Returns null | string

    null if valid, otherwise the reason why it is not

LpExchangeRateTask

LpExchangeRateTask:

Fetch the current swap price for a given liquidity pool

Input: None

Returns: The swap price for a given AMM pool.

Example: Fetch the exchange rate from the Orca SOL/USDC pool

{
"lpExchangeRateTask": {
"orcaPoolAddress": "APDFRM3HMr8CAGXwKHiu2f5ePSpaiEJhaURwhsRrUUt9"
}
}

Example: Fetch the exchange rate from the Raydium SOL/USDC pool

{
"lpExchangeRateTask": {
"raydiumPoolAddress": "58oQChx4yWmvKdwLLZzBi4ChoCc2fqCUWBkwMihLYQo2"
}
}

constructor

publicoptionalPoolAddress

PoolAddress?: mercurialPoolAddress | saberPoolAddress | orcaPoolAddress | raydiumPoolAddress | orcaPoolTokenMintAddress | portReserveAddress

LpExchangeRateTask PoolAddress.

publicinTokenAddress

inTokenAddress: string

Used alongside mercurial_pool_address to specify the input token for a swap.

publicoptionalmercurialPoolAddress

mercurialPoolAddress?: null | string

Mercurial finance pool address. A full list can be found here: https://github.com/mercurial-finance/stable-swap-n-pool-js

publicoptionalorcaPoolAddress

orcaPoolAddress?: null | string

Pool address for an Orca LP pool or whirlpool. A full list of Orca LP pools can be found here: https://www.orca.so/pools

publicoptionalorcaPoolTokenMintAddress

orcaPoolTokenMintAddress?: null | string

@deprecated Use orcaPoolAddress

publicoutTokenAddress

outTokenAddress: string

Used alongside mercurial_pool_address to specify the output token for a swap.

publicoptionalportReserveAddress

portReserveAddress?: null | string

The Port reserve pubkey. A full list can be found here: https://api-v1.port.finance/reserves

publicoptionalraydiumPoolAddress

raydiumPoolAddress?: null | string

The Raydium liquidity pool ammId. A full list can be found here: https://sdk.raydium.io/liquidity/mainnet.json

publicoptionalsaberPoolAddress

saberPoolAddress?: null | string

Saber pool address. A full list can be found here: https://github.com/saber-hq/saber-registry-dist

publictoJSON

  • toJSON(): {}
  • Converts this LpExchangeRateTask to JSON.


    Returns {}

    JSON object

    • [k string]: any

publicstaticcreate

  • Creates a new LpExchangeRateTask instance using the specified properties.


    Parameters

    Returns LpExchangeRateTask

    LpExchangeRateTask instance

publicstaticdecode

  • Decodes a LpExchangeRateTask message from the specified reader or buffer.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    • optionallength: number

      Message length if known beforehand

    Returns LpExchangeRateTask

    LpExchangeRateTask

publicstaticdecodeDelimited

  • Decodes a LpExchangeRateTask message from the specified reader or buffer, length delimited.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    Returns LpExchangeRateTask

    LpExchangeRateTask

publicstaticencode

  • Encodes the specified LpExchangeRateTask message. Does not implicitly verify messages.


    Parameters

    • message: ILpExchangeRateTask

      LpExchangeRateTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticencodeDelimited

  • Encodes the specified LpExchangeRateTask message, length delimited. Does not implicitly verify messages.


    Parameters

    • message: ILpExchangeRateTask

      LpExchangeRateTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticfromObject

  • Creates a LpExchangeRateTask message from a plain object. Also converts values to their respective internal types.


    Parameters

    • object: {}

      Plain object

    Returns LpExchangeRateTask

    LpExchangeRateTask

publicstaticgetTypeUrl

  • getTypeUrl(typeUrlPrefix?: string): string
  • Gets the default type url for LpExchangeRateTask


    Parameters

    • optionaltypeUrlPrefix: string

      your custom typeUrlPrefix(default “type.googleapis.com”)

    Returns string

    The default type url

publicstatictoObject

  • Creates a plain object from a LpExchangeRateTask message. Also converts values to other types if specified.


    Parameters

    • message: LpExchangeRateTask

      LpExchangeRateTask

    • optionaloptions: IConversionOptions

      Conversion options

    Returns {}

    Plain object

    • [k string]: any

publicstaticverify

  • verify(message: {}): null | string
  • Verifies a LpExchangeRateTask message.


    Parameters

    • message: {}

      Plain object to verify

    Returns null | string

    null if valid, otherwise the reason why it is not

LpTokenPriceTask

LpTokenPriceTask:

Fetch LP token price info from a number of supported exchanges.

See our blog post on Fair LP Token Oracles

NOTE*: This is not the swap price but the price of the underlying LP token.

Input: None

Returns: The price of an LP token for a given AMM pool.

Example: Fetch the Orca LP token price of the SOL/USDC pool

{
"lpTokenPriceTask": {
"orcaPoolAddress": "APDFRM3HMr8CAGXwKHiu2f5ePSpaiEJhaURwhsRrUUt9"
}
}

Example: Fetch the fair price Orca LP token price of the SOL/USDC pool

{
"lpTokenPriceTask": {
"orcaPoolAddress": "APDFRM3HMr8CAGXwKHiu2f5ePSpaiEJhaURwhsRrUUt9",
"useFairPrice": true,
"priceFeedAddresses": [
"GvDMxPzN1sCj7L26YDK2HnMRXEQmQ2aemov8YBtPS7vR",
"BjUgj6YCnFBZ49wF54ddBVA9qu8TeqkFtkbqmZcee8uW"
]
}
}

Example: Fetch the fair price Raydium LP token price of the SOL/USDC pool

{
"lpTokenPriceTask": {
"raydiumPoolAddress": "58oQChx4yWmvKdwLLZzBi4ChoCc2fqCUWBkwMihLYQo2",
"useFairPrice": true,
"priceFeedAddresses": [
"GvDMxPzN1sCj7L26YDK2HnMRXEQmQ2aemov8YBtPS7vR",
"BjUgj6YCnFBZ49wF54ddBVA9qu8TeqkFtkbqmZcee8uW"
]
}
}

constructor

publicoptionalPoolAddress

PoolAddress?: mercurialPoolAddress | saberPoolAddress | orcaPoolAddress | raydiumPoolAddress

LpTokenPriceTask PoolAddress.

publicoptionalmercurialPoolAddress

mercurialPoolAddress?: null | string

Mercurial finance pool address. A full list can be found here: https://github.com/mercurial-finance/stable-swap-n-pool-js

publicoptionalorcaPoolAddress

orcaPoolAddress?: null | string

Orca pool address. A full list can be found here: https://www.orca.so/pools

publicpriceFeedAddresses

priceFeedAddresses: string[]

A list of Switchboard aggregator accounts used to calculate the fair LP price. This ensures the price is based on the previous round to mitigate flash loan price manipulation.

publicpriceFeedJobs

priceFeedJobs: IOracleJob[]

A list of OracleJobs to execute in order to yield the price feed jobs to use for the fair price formula.

publicoptionalraydiumPoolAddress

raydiumPoolAddress?: null | string

The Raydium liquidity pool ammId. A full list can be found here: https://sdk.raydium.io/liquidity/mainnet.json

publicoptionalsaberPoolAddress

saberPoolAddress?: null | string

Saber pool address. A full list can be found here: https://github.com/saber-hq/saber-registry-dist

publicuseFairPrice

useFairPrice: boolean

If enabled and price_feed_addresses provided, the oracle will calculate the fair LP price based on the liquidity pool reserves. See our blog post for more information: https://switchboardxyz.medium.com/fair-lp-token-oracles-94a457c50239

publictoJSON

  • toJSON(): {}
  • Converts this LpTokenPriceTask to JSON.


    Returns {}

    JSON object

    • [k string]: any

publicstaticcreate

  • Creates a new LpTokenPriceTask instance using the specified properties.


    Parameters

    Returns LpTokenPriceTask

    LpTokenPriceTask instance

publicstaticdecode

  • Decodes a LpTokenPriceTask message from the specified reader or buffer.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    • optionallength: number

      Message length if known beforehand

    Returns LpTokenPriceTask

    LpTokenPriceTask

publicstaticdecodeDelimited

  • Decodes a LpTokenPriceTask message from the specified reader or buffer, length delimited.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    Returns LpTokenPriceTask

    LpTokenPriceTask

publicstaticencode

  • Encodes the specified LpTokenPriceTask message. Does not implicitly verify messages.


    Parameters

    • message: ILpTokenPriceTask

      LpTokenPriceTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticencodeDelimited

  • Encodes the specified LpTokenPriceTask message, length delimited. Does not implicitly verify messages.


    Parameters

    • message: ILpTokenPriceTask

      LpTokenPriceTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticfromObject

  • Creates a LpTokenPriceTask message from a plain object. Also converts values to their respective internal types.


    Parameters

    • object: {}

      Plain object

    Returns LpTokenPriceTask

    LpTokenPriceTask

publicstaticgetTypeUrl

  • getTypeUrl(typeUrlPrefix?: string): string
  • Gets the default type url for LpTokenPriceTask


    Parameters

    • optionaltypeUrlPrefix: string

      your custom typeUrlPrefix(default “type.googleapis.com”)

    Returns string

    The default type url

publicstatictoObject

  • Creates a plain object from a LpTokenPriceTask message. Also converts values to other types if specified.


    Parameters

    • message: LpTokenPriceTask

      LpTokenPriceTask

    • optionaloptions: IConversionOptions

      Conversion options

    Returns {}

    Plain object

    • [k string]: any

publicstaticverify

  • verify(message: {}): null | string
  • Verifies a LpTokenPriceTask message.


    Parameters

    • message: {}

      Plain object to verify

    Returns null | string

    null if valid, otherwise the reason why it is not

MangoPerpMarketTask

MangoPerpMarketTask:

Fetch the current price for a Mango perpetual market

constructor

publicperpMarketAddress

perpMarketAddress: string

Mainnet address for a mango perpetual market. A full list can be found here: https://github.com/blockworks-foundation/mango-client-v3/blob/main/src/ids.json

publictoJSON

  • toJSON(): {}
  • Converts this MangoPerpMarketTask to JSON.


    Returns {}

    JSON object

    • [k string]: any

publicstaticcreate

  • Creates a new MangoPerpMarketTask instance using the specified properties.


    Parameters

    Returns MangoPerpMarketTask

    MangoPerpMarketTask instance

publicstaticdecode

  • Decodes a MangoPerpMarketTask message from the specified reader or buffer.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    • optionallength: number

      Message length if known beforehand

    Returns MangoPerpMarketTask

    MangoPerpMarketTask

publicstaticdecodeDelimited

  • Decodes a MangoPerpMarketTask message from the specified reader or buffer, length delimited.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    Returns MangoPerpMarketTask

    MangoPerpMarketTask

publicstaticencode

  • Encodes the specified MangoPerpMarketTask message. Does not implicitly verify messages.


    Parameters

    • message: IMangoPerpMarketTask

      MangoPerpMarketTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticencodeDelimited

  • Encodes the specified MangoPerpMarketTask message, length delimited. Does not implicitly verify messages.


    Parameters

    • message: IMangoPerpMarketTask

      MangoPerpMarketTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticfromObject

  • Creates a MangoPerpMarketTask message from a plain object. Also converts values to their respective internal types.


    Parameters

    • object: {}

      Plain object

    Returns MangoPerpMarketTask

    MangoPerpMarketTask

publicstaticgetTypeUrl

  • getTypeUrl(typeUrlPrefix?: string): string
  • Gets the default type url for MangoPerpMarketTask


    Parameters

    • optionaltypeUrlPrefix: string

      your custom typeUrlPrefix(default “type.googleapis.com”)

    Returns string

    The default type url

publicstatictoObject

  • Creates a plain object from a MangoPerpMarketTask message. Also converts values to other types if specified.


    Parameters

    • message: MangoPerpMarketTask

      MangoPerpMarketTask

    • optionaloptions: IConversionOptions

      Conversion options

    Returns {}

    Plain object

    • [k string]: any

publicstaticverify

  • verify(message: {}): null | string
  • Verifies a MangoPerpMarketTask message.


    Parameters

    • message: {}

      Plain object to verify

    Returns null | string

    null if valid, otherwise the reason why it is not

MarinadeStateTask

MarinadeStateTask:

Represents a MarinadeStateTask.

constructor

publictoJSON

  • toJSON(): {}
  • Converts this MarinadeStateTask to JSON.


    Returns {}

    JSON object

    • [k string]: any

publicstaticcreate

  • Creates a new MarinadeStateTask instance using the specified properties.


    Parameters

    Returns MarinadeStateTask

    MarinadeStateTask instance

publicstaticdecode

  • Decodes a MarinadeStateTask message from the specified reader or buffer.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    • optionallength: number

      Message length if known beforehand

    Returns MarinadeStateTask

    MarinadeStateTask

publicstaticdecodeDelimited

  • Decodes a MarinadeStateTask message from the specified reader or buffer, length delimited.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    Returns MarinadeStateTask

    MarinadeStateTask

publicstaticencode

  • Encodes the specified MarinadeStateTask message. Does not implicitly verify messages.


    Parameters

    • message: IMarinadeStateTask

      MarinadeStateTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticencodeDelimited

  • Encodes the specified MarinadeStateTask message, length delimited. Does not implicitly verify messages.


    Parameters

    • message: IMarinadeStateTask

      MarinadeStateTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticfromObject

  • Creates a MarinadeStateTask message from a plain object. Also converts values to their respective internal types.


    Parameters

    • object: {}

      Plain object

    Returns MarinadeStateTask

    MarinadeStateTask

publicstaticgetTypeUrl

  • getTypeUrl(typeUrlPrefix?: string): string
  • Gets the default type url for MarinadeStateTask


    Parameters

    • optionaltypeUrlPrefix: string

      your custom typeUrlPrefix(default “type.googleapis.com”)

    Returns string

    The default type url

publicstatictoObject

  • Creates a plain object from a MarinadeStateTask message. Also converts values to other types if specified.


    Parameters

    • message: MarinadeStateTask

      MarinadeStateTask

    • optionaloptions: IConversionOptions

      Conversion options

    Returns {}

    Plain object

    • [k string]: any

publicstaticverify

  • verify(message: {}): null | string
  • Verifies a MarinadeStateTask message.


    Parameters

    • message: {}

      Plain object to verify

    Returns null | string

    null if valid, otherwise the reason why it is not

MaxTask

MaxTask:

Returns the maximum value 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 maximum numerical result from 3 tasks.

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

Example: Returns the maximum numerical result from 3 jobs.

{
"maxTask": {
"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]"
}
}
]
}
]
}
}

constructor

  • Constructs a new MaxTask.


    Parameters

    • optionalproperties: IMaxTask

      Properties to set

    Returns MaxTask

publicjobs

jobs: IOracleJob[]

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

publictasks

tasks: ITask[]

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

publictoJSON

  • toJSON(): {}
  • Converts this MaxTask to JSON.


    Returns {}

    JSON object

    • [k string]: any

publicstaticcreate

  • Creates a new MaxTask instance using the specified properties.


    Parameters

    • optionalproperties: IMaxTask

      Properties to set

    Returns MaxTask

    MaxTask instance

publicstaticdecode

  • decode(reader: Uint8Array | Reader, length?: number): MaxTask
  • Decodes a MaxTask message from the specified reader or buffer.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    • optionallength: number

      Message length if known beforehand

    Returns MaxTask

    MaxTask

publicstaticdecodeDelimited

  • decodeDelimited(reader: Uint8Array | Reader): MaxTask
  • Decodes a MaxTask message from the specified reader or buffer, length delimited.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    Returns MaxTask

    MaxTask

publicstaticencode

  • encode(message: IMaxTask, writer?: Writer): Writer
  • Encodes the specified MaxTask message. Does not implicitly verify messages.


    Parameters

    • message: IMaxTask

      MaxTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticencodeDelimited

  • encodeDelimited(message: IMaxTask, writer?: Writer): Writer
  • Encodes the specified MaxTask message, length delimited. Does not implicitly verify messages.


    Parameters

    • message: IMaxTask

      MaxTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticfromObject

  • Creates a MaxTask message from a plain object. Also converts values to their respective internal types.


    Parameters

    • object: {}

      Plain object

    Returns MaxTask

    MaxTask

publicstaticgetTypeUrl

  • getTypeUrl(typeUrlPrefix?: string): string
  • Gets the default type url for MaxTask


    Parameters

    • optionaltypeUrlPrefix: string

      your custom typeUrlPrefix(default “type.googleapis.com”)

    Returns string

    The default type url

publicstatictoObject

  • toObject(message: MaxTask, options?: IConversionOptions): {}
  • Creates a plain object from a MaxTask message. Also converts values to other types if specified.


    Parameters

    • message: MaxTask

      MaxTask

    • optionaloptions: IConversionOptions

      Conversion options

    Returns {}

    Plain object

    • [k string]: any

publicstaticverify

  • verify(message: {}): null | string
  • Verifies a MaxTask message.


    Parameters

    • message: {}

      Plain object to verify

    Returns null | string

    null if valid, otherwise the reason why it is not

MeanTask

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]"
}
}
]
}
]
}
}

constructor

  • Constructs a new MeanTask.


    Parameters

    • optionalproperties: IMeanTask

      Properties to set

    Returns MeanTask

publicjobs

jobs: IOracleJob[]

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

publictasks

tasks: ITask[]

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

publictoJSON

  • toJSON(): {}
  • Converts this MeanTask to JSON.


    Returns {}

    JSON object

    • [k string]: any

publicstaticcreate

  • Creates a new MeanTask instance using the specified properties.


    Parameters

    • optionalproperties: IMeanTask

      Properties to set

    Returns MeanTask

    MeanTask instance

publicstaticdecode

  • decode(reader: Uint8Array | Reader, length?: number): MeanTask
  • Decodes a MeanTask message from the specified reader or buffer.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    • optionallength: number

      Message length if known beforehand

    Returns MeanTask

    MeanTask

publicstaticdecodeDelimited

  • decodeDelimited(reader: Uint8Array | Reader): MeanTask
  • Decodes a MeanTask message from the specified reader or buffer, length delimited.

    @throws

    If the payload is not a reader or valid buffer

    @throws

    If required fields are missing


    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    Returns MeanTask

    MeanTask

publicstaticencode

  • encode(message: IMeanTask, writer?: Writer): Writer
  • Encodes the specified MeanTask message. Does not implicitly verify messages.


    Parameters

    • message: IMeanTask

      MeanTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticencodeDelimited

  • encodeDelimited(message: IMeanTask, writer?: Writer): Writer
  • Encodes the specified MeanTask message, length delimited. Does not implicitly verify messages.


    Parameters

    • message: IMeanTask

      MeanTask message or plain object to encode

    • optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

publicstaticfromObject

  • Creates a MeanTask message from a plain object. Also converts values to their respective internal types.


    Parameters

    • object: {}

      Plain object

    Returns MeanTask

    MeanTask

publicstaticgetTypeUrl

  • getTypeUrl(typeUrlPrefix?: string): string
  • Gets the default type url for MeanTask


    Parameters

    • optionaltypeUrlPrefix: string

      your custom typeUrlPrefix(default “type.googleapis.com”)

    Returns string

    The default type url

publicstatictoObject

  • toObject(message: MeanTask, options?: IConversionOptions): {}
  • Creates a plain object from a MeanTask message. Also converts values to other types if specified.


    Parameters

    • message: MeanTask

      MeanTask

    • optionaloptions: IConversionOptions

      Conversion options

    Returns {}

    Plain object

    • [k string]: any

publicstaticverify

  • verify(message: {}): null | string
  • Verifies a MeanTask message.


    Parameters

    • message: {}

      Plain object to verify

    Returns null | string

    null if valid, otherwise the reason why it is not

MedianTask

MedianTask:

Returns the median (middle) of all the results returned by the provided subtasks and subjobs. Nested tasks must return a Number.

Input: None

Returns: A numerical result.

Example: Returns the median numerical result of 3 tasks.

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

Example: Returns the median numerical result of 3 jobs.

{
"medianTask": {
"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]"
}
}
]
}
]
}
}

constructor

publicjobs

jobs: IOracleJob[]

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

publicminSuccessfulRequired

minSuccessfulRequired: number

The minimum number of values before a successful median can be yielded.

publictasks

tasks: ITask[]

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

publictoJSON

  • toJSON(): {}
  • Converts this MedianTask to JSON.


    Returns {}