POST
/
v0
/
smart_account
/
batched_user_operations
from compass_api_sdk import CompassAPI, models


with CompassAPI(
    api_key_auth="<YOUR_API_KEY_HERE>",
) as compass_api:

    res = compass_api.smart_account.account_batched_user_operations(chain=models.Chain.BASE_MAINNET, operations=[
        models.UserOperation(
            action_type=models.MulticallActionType.ALLOWANCE_INCREASE,
            body=models.IncreaseAllowanceParams(
                token=models.TokenEnum.WETH,
                contract_name=models.IncreaseAllowanceParamsContractName.UNISWAP_V3_ROUTER,
                amount="1000",
            ),
        ),
    ], additional_properties={

    })

    # Handle response
    print(res)
{
  "operations": [
    {
      "to": "<string>",
      "call_data": "<string>",
      "value": 123
    }
  ]
}

Authorizations

x-api-key
string
header
required

Your Compass API Key. Get your key here.

Body

application/json

Request model for batching user operations.

Response

200
application/json

Successful Response

The response is of type object.