Skip to main content

normalize_currency_code

Function normalize_currency_code 

Source
pub fn normalize_currency_code(code: &str) -> &str
Expand description

Maps a Kraken asset code to the standard code the platform uses.

Kraken prefixes some legacy assets with X or Z, but the prefix is not a rule: XTZ, ZRX and XAUT legitimately begin with those letters. The mapping is therefore an explicit table, and a code it does not list is returned unchanged.