> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fairground.fi/llms.txt
> Use this file to discover all available pages before exploring further.

# upadateMarketADLConfig

> Python SDK reference for upadateMarketADLConfig.

Update ADL (Auto-Deleveraging) configuration for a market.

```python theme={null}
async def upadateMarketADLConfig(
    marketId: int,
    maintenanceMarginRatio: int,
    seizureThreshold: int,
    adlThreshold: int,
    shockFactor: int,
    maxIFFractionAllowed: int,
):
    """Update ADL (Auto-Deleveraging) configuration for a market."""
    contract = retrieveContract()
    w3 = retrieveWeb3Instance()
    adlConfigStruct = namedtuple(
        "MarketADLConfig",
        [
            "maintenanceMarginRatio",
            "seizureThreshold",
            "adlThreshold",
            "shockFactor",
            "maxIFFractionAllowed",
        ],
    )
    my_adl_config = adlConfigStruct(
        maintenanceMarginRatio,
        seizureThreshold,
        adlThreshold,
        shockFactor,
        maxIFFractionAllowed,
    )
    transaction = contract.functions.updateMarketADLConfig(
        marketId, my_adl_config
    ).build_transaction(
        {
            "from": Web3.to_checksum_address(os.getenv("ACCOUNT")),
            "nonce": w3.eth.get_transaction_count(
                Web3.to_checksum_address(os.getenv("ACCOUNT"))
            ),
        }
    )
    await submitTransactionWithOracle(w3, transaction, marketId)

```
