Skip to content

REST API - nibiru/oracle ​

Query Service - nibiru/oracle ​

/nibiru/oracle/v1beta1/exchange_rate ​

bash
# You can also use wget
curl -X GET https://lcd.nibiru.fi/nibiru/oracle/v1beta1/exchange_rate \
  -H 'Accept: application/json'
Summary ​

ExchangeRate returns exchange rate of a pair along with the block height and block time that the exchange rate was set by the oracle module.

Parameters ​
NameLocated inDescriptionRequiredSchema
pairquerypair defines the pair to query for.Nostring
Responses ​
CodeDescriptionSchema
200A successful response.v1QueryExchangeRateResponse
defaultAn unexpected error response.runtimeError

/nibiru/oracle/v1beta1/exchange_rate_twap ​

bash
# You can also use wget
curl -X GET https://lcd.nibiru.fi/nibiru/oracle/v1beta1/exchange_rate_twap \
  -H 'Accept: application/json'
Summary ​

ExchangeRateTwap returns twap exchange rate of a pair

Parameters ​
NameLocated inDescriptionRequiredSchema
pairquerypair defines the pair to query for.Nostring
Responses ​
CodeDescriptionSchema
200A successful response.v1QueryExchangeRateResponse
defaultAn unexpected error response.runtimeError

/nibiru/oracle/v1beta1/pairs/actives ​

bash
# You can also use wget
curl -X GET https://lcd.nibiru.fi/nibiru/oracle/v1beta1/pairs/actives \
  -H 'Accept: application/json'
Summary ​

Actives returns all active pairs

Responses ​
CodeDescriptionSchema
200A successful response.v1QueryActivesResponse
defaultAn unexpected error response.runtimeError

/nibiru/oracle/v1beta1/pairs/exchange_rates ​

bash
# You can also use wget
curl -X GET https://lcd.nibiru.fi/nibiru/oracle/v1beta1/pairs/exchange_rates \
  -H 'Accept: application/json'
Summary ​

ExchangeRates returns exchange rates of all pairs

Responses ​
CodeDescriptionSchema
200A successful response.v1QueryExchangeRatesResponse
defaultAn unexpected error response.runtimeError

/nibiru/oracle/v1beta1/pairs/vote_targets ​

bash
# You can also use wget
curl -X GET https://lcd.nibiru.fi/nibiru/oracle/v1beta1/pairs/vote_targets \
  -H 'Accept: application/json'
Summary ​

VoteTargets returns all vote target for pairs

Responses ​
CodeDescriptionSchema
200A successful response.v1QueryVoteTargetsResponse
defaultAn unexpected error response.runtimeError

/nibiru/oracle/v1beta1/params ​

bash
# You can also use wget
curl -X GET https://lcd.nibiru.fi/nibiru/oracle/v1beta1/params \
  -H 'Accept: application/json'
Summary ​

Params queries all parameters.

Responses ​
CodeDescriptionSchema
200A successful response.v1QueryParamsResponse
defaultAn unexpected error response.runtimeError

/nibiru/oracle/v1beta1/valdiators/{validator_addr}/aggregate_vote ​

bash
# You can also use wget
curl -X GET https://lcd.nibiru.fi/nibiru/oracle/v1beta1/valdiators/{validator_addr}/aggregate_vote \
  -H 'Accept: application/json'
Summary ​

AggregateVote returns an aggregate vote of a validator

Parameters ​
NameLocated inDescriptionRequiredSchema
validator_addrpathvalidator defines the validator address to query for.Yesstring
Responses ​
CodeDescriptionSchema
200A successful response.v1QueryAggregateVoteResponse
defaultAn unexpected error response.runtimeError

/nibiru/oracle/v1beta1/validators/aggregate_prevotes ​

bash
# You can also use wget
curl -X GET https://lcd.nibiru.fi/nibiru/oracle/v1beta1/validators/aggregate_prevotes \
  -H 'Accept: application/json'
Summary ​

AggregatePrevotes returns aggregate prevotes of all validators

Responses ​
CodeDescriptionSchema
200A successful response.v1QueryAggregatePrevotesResponse
defaultAn unexpected error response.runtimeError

/nibiru/oracle/v1beta1/validators/aggregate_votes ​

bash
# You can also use wget
curl -X GET https://lcd.nibiru.fi/nibiru/oracle/v1beta1/validators/aggregate_votes \
  -H 'Accept: application/json'
Summary ​

AggregateVotes returns aggregate votes of all validators

Responses ​
CodeDescriptionSchema
200A successful response.v1QueryAggregateVotesResponse
defaultAn unexpected error response.runtimeError

/nibiru/oracle/v1beta1/validators/{validator_addr}/aggregate_prevote ​

bash
# You can also use wget
curl -X GET https://lcd.nibiru.fi/nibiru/oracle/v1beta1/validators/{validator_addr}/aggregate_prevote \
  -H 'Accept: application/json'
Summary ​

AggregatePrevote returns an aggregate prevote of a validator

Parameters ​
NameLocated inDescriptionRequiredSchema
validator_addrpathvalidator defines the validator address to query for.Yesstring
Responses ​
CodeDescriptionSchema
200A successful response.v1QueryAggregatePrevoteResponse
defaultAn unexpected error response.runtimeError

/nibiru/oracle/v1beta1/validators/{validator_addr}/feeder ​

bash
# You can also use wget
curl -X GET https://lcd.nibiru.fi/nibiru/oracle/v1beta1/validators/{validator_addr}/feeder \
  -H 'Accept: application/json'
Summary ​

FeederDelegation returns feeder delegation of a validator

Parameters ​
NameLocated inDescriptionRequiredSchema
validator_addrpathvalidator defines the validator address to query for.Yesstring
Responses ​
CodeDescriptionSchema
200A successful response.v1QueryFeederDelegationResponse
defaultAn unexpected error response.runtimeError

/nibiru/oracle/v1beta1/validators/{validator_addr}/miss ​

bash
# You can also use wget
curl -X GET https://lcd.nibiru.fi/nibiru/oracle/v1beta1/validators/{validator_addr}/miss \
  -H 'Accept: application/json'
Summary ​

MissCounter returns oracle miss counter of a validator

Parameters ​
NameLocated inDescriptionRequiredSchema
validator_addrpathvalidator defines the validator address to query for.Yesstring
Responses ​
CodeDescriptionSchema
200A successful response.v1QueryMissCounterResponse
defaultAn unexpected error response.runtimeError

Models ​

protobufAny ​

NameTypeDescriptionRequired
type_urlstringNo
valuebyteNo

runtimeError ​

NameTypeDescriptionRequired
errorstringNo
codeintegerNo
messagestringNo
details[ protobufAny ]No

v1AggregateExchangeRatePrevote ​

NameTypeDescriptionRequired
hashstringNo
voterstringNo
submit_blockstring (uint64)No

v1AggregateExchangeRateVote ​

MsgAggregateExchangeRateVote - struct for voting on the exchange rates different assets.

NameTypeDescriptionRequired
exchange_rate_tuples[ v1ExchangeRateTuple ]No
voterstringNo

v1ExchangeRateTuple ​

NameTypeDescriptionRequired
pairstringNo
exchange_ratestringNo

v1Params ​

Params defines the module parameters for the x/oracle module.

NameTypeDescriptionRequired
vote_periodstring (uint64)VotePeriod defines the number of blocks during which voting takes place.No
vote_thresholdstringVoteThreshold specifies the minimum proportion of votes that must be received for a ballot to pass.No
reward_bandstringNo
whitelist[ string ]No
slash_fractionstringSlashFraction returns the proportion of an oracle's stake that gets slashed in the event of slashing. SlashFraction specifies the exact penalty for failing a voting period.No
slash_windowstring (uint64)SlashWindow returns the number of voting periods that specify a "slash window". After each slash window, all oracles that have missed more than the penalty threshold are slashed. Missing the penalty threshold is synonymous with submitting fewer valid votes than MinValidPerWindow.No
min_valid_per_windowstringNo
twap_lookback_windowstringAmount of time to look back for TWAP calculations. Ex: "900.000000069s" corresponds to 900 seconds and 69 nanoseconds in JSON.No
min_votersstring (uint64)The minimum number of voters (i.e. oracle validators) per pair for it to be considered a passing ballot. Recommended at least 4.No
validator_fee_ratiostringThe validator fee ratio that is given to validators every epoch.No
expiration_blocksstring (uint64)No

v1QueryActivesResponse ​

QueryActivesResponse is response type for the Query/Actives RPC method.

NameTypeDescriptionRequired
actives[ string ]actives defines a list of the pair which oracle prices agreed upon.No

v1QueryAggregatePrevoteResponse ​

QueryAggregatePrevoteResponse is response type for the Query/AggregatePrevote RPC method.

NameTypeDescriptionRequired
aggregate_prevotev1AggregateExchangeRatePrevoteNo

v1QueryAggregatePrevotesResponse ​

QueryAggregatePrevotesResponse is response type for the Query/AggregatePrevotes RPC method.

NameTypeDescriptionRequired
aggregate_prevotes[ v1AggregateExchangeRatePrevote ]No

v1QueryAggregateVoteResponse ​

QueryAggregateVoteResponse is response type for the Query/AggregateVote RPC method.

NameTypeDescriptionRequired
aggregate_votev1AggregateExchangeRateVoteNo

v1QueryAggregateVotesResponse ​

QueryAggregateVotesResponse is response type for the Query/AggregateVotes RPC method.

NameTypeDescriptionRequired
aggregate_votes[ v1AggregateExchangeRateVote ]No

v1QueryExchangeRateResponse ​

QueryExchangeRateResponse is response type for the Query/ExchangeRate RPC method.

NameTypeDescriptionRequired
exchange_ratestringNo
block_timestamp_msstring (int64)Block timestamp for the block where the oracle came to consensus for this price. This timestamp is a conventional Unix millisecond time, i.e. the number of milliseconds elapsed since January 1, 1970 UTC.No
block_heightstring (uint64)Block height when the oracle came to consensus for this price.No
is_vintagebooleanTrue if this exchange rate has passed its expiration window.No

v1QueryExchangeRatesResponse ​

QueryExchangeRatesResponse is response type for the Query/ExchangeRates RPC method.

NameTypeDescriptionRequired
exchange_rates[ v1ExchangeRateTuple ]exchange_rates defines a list of the exchange rate for all whitelisted pairs.No

v1QueryFeederDelegationResponse ​

QueryFeederDelegationResponse is response type for the Query/FeederDelegation RPC method.

NameTypeDescriptionRequired
feeder_addrstringNo

v1QueryMissCounterResponse ​

QueryMissCounterResponse is response type for the Query/MissCounter RPC method.

NameTypeDescriptionRequired
miss_counterstring (uint64)No

v1QueryParamsResponse ​

QueryParamsResponse is the response type for the Query/Params RPC method.

NameTypeDescriptionRequired
paramsv1Paramsparams defines the parameters of the module.No

v1QueryVoteTargetsResponse ​

QueryVoteTargetsResponse is response type for the Query/VoteTargets RPC method.

NameTypeDescriptionRequired
vote_targets[ string ]vote_targets defines a list of the pairs in which everyone should vote in the current vote period.No