Skip to content

This fork of exchange rate canister (XRC) has some additional wrappers for URLs in order to support IPv4 requests. This XRC is just a fallback mechanism for cases when original XRC couldn't return any data.

License

Notifications You must be signed in to change notification settings

orally-network/exchange-rate-canister

 
 

Repository files navigation

Exchange Rate Canister

Apache-2.0 Chat on the Forum

Overview

The exchange rate canister provides an oracle service for cryptocurrency and fiat currency exchange rates. It interacts with all data sources using the HTTPS outcalls feature.

Usage

The exchange rate canister offers a single endpoint:

"get_exchange_rate": (GetExchangeRateRequest) -> (GetExchangeRateResult)

The request must specify the base and quote assets and, optionally, a timestamp. The returned result contains either the exchange rate for the requested asset pair along with some metadata or an error. Details can be found in the Candid file.

NOTE: 1B cycles must be sent to the exchange rate canister with each request. A certain amount may be refunded depending on the number of required HTTPs outcalls to serve the request. The base fee is 20M cycles.

Official build

The official build should ideally be reproducible, so that independent parties can validate that the correct WebAssembly module was deployed.

A dockerized build environment is used to build the gzipped WebAssembly module and print its SHA-256 hash.

export IP_SUPPORT=ipv4
./scripts/docker-build
sha256sum xrc.wasm.gz

The canister ID of the deployed exchange rate canister is uf6dk-hyaaa-aaaaq-qaaaq-cai.

Contribution mode

External contributions are accepted.

About

This fork of exchange rate canister (XRC) has some additional wrappers for URLs in order to support IPv4 requests. This XRC is just a fallback mechanism for cases when original XRC couldn't return any data.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 98.1%
  • Other 1.9%