Get XDR/ICP fx rate from Cycle's Minting Canister

Is it possible to get the XDR/ICP exchange rate from the cycle’s minting canister?

I can’t find any docs on how to do it.

I would assume something like:

let cycles_minting_canister = actor (CanisterIds.CYCLES_MINTING_CANISTER) : actor {
get_icp_xdr_conversion_rate : () → async Nat64;
};
let converstionRate: Nat64 = await cycles_minting_canister.get_icp_xdr_conversion_rate();

If someone could point me in the right direction that would be great.

1 Like

Not sure it is still up-to-date but wrote this many months ago:

It’s for ICP to cycles.

1 Like

Thank you mate! Yes I need to see something dealing with xdr_permyriad_per_icp, I think I can work it out from your article.

I will mark this as the solution when confirmed in motoko and will post the code snippet.

1 Like