install_api_call_counter_middleware_on_provider

Documentation for eth_defi.chain.install_api_call_counter_middleware_on_provider function.

install_api_call_counter_middleware_on_provider(provider)

Install API call counter middleware on a specific API provider.

Allows per-provider API call counting when using complex provider setups.

Compatible with both web3.py v6 and v7.

See also

Returns

Counter object with columns per RPC endpoint and “total”

Parameters

provider (web3.providers.base.JSONBaseProvider) –

Return type

collections.Counter