crypto-pair 2.3.20

Parse exchange-specific symbols to unified format
Documentation
1
2
3
4
5
6
7
8
9
10
use crypto_market_type::MarketType;
use crypto_pair::{get_market_type, normalize_pair};

const EXCHANGE_NAME: &str = "bithumb";

#[test]
fn verify_spot_symbols() {
    assert_eq!("ETH/USDT".to_string(), normalize_pair("ETH-USDT", EXCHANGE_NAME).unwrap());
    assert_eq!(MarketType::Spot, get_market_type("ETH-USDT", EXCHANGE_NAME, None));
}