Skip to main content

get_sapi_base_url

Function get_sapi_base_url 

Source
pub fn get_sapi_base_url(
    environment: BinanceEnvironment,
) -> Option<&'static str>
Expand description

Returns the SAPI base URL for the given environment, or None where SAPI is unavailable.

SAPI endpoints (/sapi/v1/...) are served from the Spot host on the live exchange. The testnet and demo hosts do not route /sapi/v1, so callers must treat None as unavailable rather than falling back to live, which would route account management against real funds.