> ## 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.

# updateFeeConfig

> Python SDK reference for updateFeeConfig.

Update the fee configuration for a given market.

<ParamField path="marketId" type="int" required>
  The market ID to update.
</ParamField>

<ParamField path="tradeFeePct" type="int" required>
  The trade fee percentage (uint16).
</ParamField>

<ParamField path="maxEntitlement" type="int" required>
  The maximum entitlement (uint16).
</ParamField>

<ParamField path="insuranceFundEntitlementPct" type="int" required>
  The insurance fund entitlement percentage (uint16).
</ParamField>

<ParamField path="maxImbalance" type="int" required>
  The maximum imbalance (uint56).
</ParamField>

<ResponseField name="returns" type="string" required>
  None
</ResponseField>

```python theme={null}
async def updateFeeConfig(marketId: int, tradeFeePct: int, maxEntitlement: int, insuranceFundEntitlementPct: int, maxImbalance: int):
    contract = retrieveContract()
    w3 = retrieveWeb3Instance()
    fee_config = (tradeFeePct, maxEntitlement, insuranceFundEntitlementPct, maxImbalance)
    transaction = contract.functions.updateFeeConfig(marketId, fee_config).build_transaction({'from': Web3.to_checksum_address(os.getenv('ACCOUNT')), 'nonce': w3.eth.get_transaction_count(Web3.to_checksum_address(os.getenv('ACCOUNT'))), 'gas': 1000000, 'gasPrice': w3.eth.gas_price})
    await submitTransactionWithOracle(w3, transaction, marketId)
    print(f'Fees updated for market ID {marketId}')
```
