from typing import Optional
import re


def guess_wapi_version(endpoint: str) -> Optional[float]:
    """Guess WAPI version given endpoint URL"""
    match = re.match(r".+\/wapi\/v(\d+\.\d+)$", endpoint)
    return float(match.group(1)) if match else None