banksea-oracle-client

Crates.iobanksea-oracle-client
lib.rsbanksea-oracle-client
version0.4.0
sourcesrc
created_at2022-01-21 07:20:27.922363
updated_at2022-09-15 13:35:56.629858
descriptionBanksea oracle access library
homepagehttps://oracle.banksea.finance
repository
max_upload_size
id518366
size3,985
Wes (GleipnirJ)

documentation

https://banksea-finance.gitbook.io/oracle

README

Banksea-Oracle-Client

This crate contain a library of banksea oracle which providers NFT price evaluation service on-chain.

Installation

Add the library to your Cargo.toml:

[dependencies]
banksea-oracle-client="<version>"

You can find the latest version of the library in crate.io

Usage

You can call the get_feed_info in your program on-chain.

let feed_info = banksea_oracle::get_feed_info(feed_account)?;

It will return a struct of FeedInfo.

The details of FeedInfo:

Field Name Description
oracle The oracle handle which save configure of the oracle.
subscriber The subcriber of this feeding.
code The collection code which identify a collection.
unit The unit of price.
decimals The decimals of price.
aggregate_time The latest aggregation time.
aggregate_node_count The number of nodes at the latest aggregation.
floor_price Minimum listing price of this collection on marketplace
ai_floor_price The minimum AI valuation of this collection
avg_price The 24 hour average price of the collection

Example

You can find example on github

Commit count: 0

cargo fmt