Skip to content

Latest commit

 

History

History
96 lines (76 loc) · 1.11 KB

README.md

File metadata and controls

96 lines (76 loc) · 1.11 KB

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