Skip to main content
Version: testnet (v0.75)

List oracle specs

GET 

/api/v2/oracle/specs

Get a list of all oracles specs that are defined against all markets

Request

Query Parameters

    pagination.first int32

    Number of records to be returned that sort greater than row identified by cursor supplied in 'after'.

    pagination.after string

    If paging forwards, the cursor string for the last row of the previous page.

    pagination.last int32

    Number of records to be returned that sort less than row identified by cursor supplied in 'before'.

    pagination.before string

    If paging forwards, the cursor string for the first row of the previous page.

    pagination.newestFirst boolean

    Whether to order the results with the newest records first. If not set, the default value is true.

Responses

A successful response.

Schema
    oracleSpecs object

    Page of active oracle specs and corresponding page information.

    edges object[]

    Page of oracle specs data and their corresponding cursors.

  • Array [
  • cursor string

    Cursor that can be used to fetch further pages.

    node object

    External spec data that satisfies the list request.

    externalDataSourceSpec object
    spec object

    Data source spec describes the data source base that a product or a risk model wants to get from the data source engine. This message contains additional information used by the API.

    createdAt int64
    data object

    Represents the top level object that handles data sources. Data source definition can be external or internal, with whatever number of data sources are defined for each type in the child objects below.

    external object

    DataSourceDefinitionExternal is the top level object used for all external data sources. It contains one of any of the defined SourceType variants.

    ethOracle object

    Contains the data specification that is received from Ethereum sources.

    abi string

    The ABI of that contract.

    address string

    Ethereum address of the contract to call.

    args object[]

    List of arguments to pass to method call. Protobuf 'Value' wraps an arbitrary JSON type that is mapped to an Ethereum type according to the ABI.

    filters object[]
  • Array [
  • conditions object[]

    Conditions that should be matched by the data to be considered of interest.

  • Array [
  • operator ConditionOperator

    Possible values: [OPERATOR_UNSPECIFIED, OPERATOR_EQUALS, OPERATOR_GREATER_THAN, OPERATOR_GREATER_THAN_OR_EQUAL, OPERATOR_LESS_THAN, OPERATOR_LESS_THAN_OR_EQUAL]

    Default value: OPERATOR_UNSPECIFIED

    Type of comparison to make on the value.

    value string

    Value to be compared with by the operator.

  • ]
  • key object

    Data source's data property key targeted by the filter.

    name string

    Name of the property.

    numberDecimalPlaces uint64
    type v1PropertyKeyType

    Possible values: [TYPE_UNSPECIFIED, TYPE_EMPTY, TYPE_INTEGER, TYPE_STRING, TYPE_BOOLEAN, TYPE_DECIMAL, TYPE_TIMESTAMP]

    Default value: TYPE_UNSPECIFIED

    Data type of the property.

  • ]
  • method string

    Name of the method on the contract to call.

    normalisers object[]

    Normalisers are used to convert the data returned from the contract method into a standard format. The key of the map is the name of the property, which identifies the specific piece of data to other parts of the data sourcing framework, for example filters. The value is a JSONPath expression for expressing where in the contract call result the required data is located, for example $[0] indicates the first result. $[1].price would look in the second result returned from the contract for a structure with a key called 'price' and use that if it exists.

  • Array [
  • expression string
    name string
  • ]
  • requiredConfirmations uint64
    sourceChainId uint64

    The ID of the EVM based chain which is to be used to source the oracle data.

    trigger object

    Conditions for determining when to call the contract method.

    timeTrigger object

    Trigger for an Ethereum call based on the Ethereum block timestamp. Can be one-off or repeating.

    every uint64

    Repeat the call every n seconds after the initial call. If no time for initial call was specified, begin repeating immediately.

    initial uint64

    Trigger when the Ethereum time is greater or equal to this time, in Unix seconds.

    until uint64

    If repeating, stop once Ethereum time is greater than this time, in Unix seconds. If not set, then repeat indefinitely.

    oracle object

    All types of external data sources use the same configuration set for meeting requirements in order for the data to be useful for Vega - valid signatures and matching filters.

    filters object[]

    Filters describes which source data are considered of interest or not for the product (or the risk model).

  • Array [
  • conditions object[]

    Conditions that should be matched by the data to be considered of interest.

  • Array [
  • operator ConditionOperator

    Possible values: [OPERATOR_UNSPECIFIED, OPERATOR_EQUALS, OPERATOR_GREATER_THAN, OPERATOR_GREATER_THAN_OR_EQUAL, OPERATOR_LESS_THAN, OPERATOR_LESS_THAN_OR_EQUAL]

    Default value: OPERATOR_UNSPECIFIED

    Type of comparison to make on the value.

    value string

    Value to be compared with by the operator.

  • ]
  • key object

    Data source's data property key targeted by the filter.

    name string

    Name of the property.

    numberDecimalPlaces uint64
    type v1PropertyKeyType

    Possible values: [TYPE_UNSPECIFIED, TYPE_EMPTY, TYPE_INTEGER, TYPE_STRING, TYPE_BOOLEAN, TYPE_DECIMAL, TYPE_TIMESTAMP]

    Default value: TYPE_UNSPECIFIED

    Data type of the property.

  • ]
  • signers object[]

    Signers is the list of authorized signatures that signed the data for this source. All the signatures in the data source data should be contained in this external source. All the signatures in the data should be contained in this list.

  • Array [
  • ethAddress object

    In case of an open oracle - Ethereum address will be submitted.

    address string
    pubKey object

    List of authorized public keys that signed the data for this source. All the public keys in the data should be contained in these public keys.

    key string
  • ]
  • internal object

    Top level object used for all internal data sources. It contains one of any of the defined source type variants.

    time object

    Internal data source used for emitting timestamps.

    conditions object[]

    Conditions that the timestamps should meet in order to be considered.

  • Array [
  • operator ConditionOperator

    Possible values: [OPERATOR_UNSPECIFIED, OPERATOR_EQUALS, OPERATOR_GREATER_THAN, OPERATOR_GREATER_THAN_OR_EQUAL, OPERATOR_LESS_THAN, OPERATOR_LESS_THAN_OR_EQUAL]

    Default value: OPERATOR_UNSPECIFIED

    Type of comparison to make on the value.

    value string

    Value to be compared with by the operator.

  • ]
  • timeTrigger object

    Internal data source used for emitting timestamps automatically using predefined intervals and conditions.

    conditions object[]

    Conditions that the timestamps need to meet in order to be considered.

  • Array [
  • operator ConditionOperator

    Possible values: [OPERATOR_UNSPECIFIED, OPERATOR_EQUALS, OPERATOR_GREATER_THAN, OPERATOR_GREATER_THAN_OR_EQUAL, OPERATOR_LESS_THAN, OPERATOR_LESS_THAN_OR_EQUAL]

    Default value: OPERATOR_UNSPECIFIED

    Type of comparison to make on the value.

    value string

    Value to be compared with by the operator.

  • ]
  • triggers object[]
  • Array [
  • every int64

    Repeat the trigger every n seconds after the initial. If no time for initial was specified, begin repeating immediately.

    initial int64

    Trigger when the vega time is greater or equal to this time, in Unix seconds.

  • ]
  • id string

    Hash generated from the DataSpec data.

    status Status describes the status of the data source spec

    Possible values: [STATUS_UNSPECIFIED, STATUS_ACTIVE, STATUS_DEACTIVATED]

    Default value: STATUS_UNSPECIFIED

    • STATUS_UNSPECIFIED: Default value.
    • STATUS_ACTIVE: STATUS_ACTIVE describes an active data source spec.
    • STATUS_DEACTIVATED: STATUS_DEACTIVATED describes a data source spec that is not listening to data anymore.
    updatedAt int64
  • ]
  • pageInfo object

    Page information that is used for fetching further pages.

    endCursor string

    End cursor.

    hasNextPage boolean

    Indicator if there is a next page.

    hasPreviousPage boolean

    Indicator if there is a previous page.

    startCursor string

    Start cursor.

Loading...