Skip to content

initia-labs/wasm-slinky-query

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wasm Slinky Query

CosmWasm contract to handle skip oracle queries.

InstantiateMsg

Initialize Slinky contract

{}

QueryMsg

get_price

Get oracle price

{
  "get_price": {
    "pair_id": "BTC/USD" // {Base}/{Quote}
  }
}

Response type

{
  "price": {
    "price": "6942640000000",
    "block_timestamp": "1712446136721825744", // uinx timestamp in nano second
    "block_height": 561283
  },
  "nonce": 12243,
  "decimals": 8,
  "id": 0
}

get_prices

Get oracle prices

{
  "get_prices": {
    "pair_ids": ["BTC/USD"] // {Base}/{Quote}
  }
}

Response type

{
  "prices": [
    {
      "price": {
        "price": "6942640000000",
        "block_timestamp": "1712446136721825744",
        "block_height": 561283
      },
      "nonce": 12243,
      "decimals": 8,
      "id": 0
    },
    ...
  ]
}

get_all_currency_pairs

Get all currency pairs that can get oracle price

{
  "get_all_currency_pairs": {}
}

Response type

{
  "currency_pairs": [
    {
      "Base": "BITCOIN",
      "Quote": "USD"
    },
    ...
  ]
}

About

CosmWasm contract to handle skip oracle queries.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages