Skip to main content
POST
Python (SDK)

Authorizations

x-api-key
string
header
required

Your Compass API Key. Get your key here.

Body

application/json

Request model for executing an Aave loop strategy.

chain
enum<string>
default:arbitrum
required
Available options:
arbitrum,
base,
ethereum
Example:

"arbitrum"

sender
string
default:0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B
required

The address of the transaction sender.

Example:

"0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B"

collateral_token
string
default:USDC
required

Symbol or address of token to supply to Aave..

Examples:

"USDC"

"WETH"

borrow_token
string
default:WETH
required

Symbol or address of token to borrow from Aave..

Examples:

"WETH"

"USDC"

initial_collateral_amount
default:1000
required

Amount of collateral token to supply to Aave

Required range: x > 0
Example:

"1000"

multiplier
default:2.5
required

Leverage multiplier. Total loop collateral will be calculated as multiplier x initial_collateral_amount

Required range: x > 1
Example:

"2.5"

max_slippage_percent
default:0.5
required

Maximum allowed slippage for token swaps in percentage

Required range: 0 < x <= 100
Example:

2.5

loan_to_value
default:60
required

Loan To Value percentage of the loop

Required range: 0 < x <= 100
Example:

20.5

estimate_gas
boolean
default:true

Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.

Example:

true

signed_authorization
SignedAuthorization · object | null

EIP-7702 authorization. Required when is_account_abstraction is False.

Example:
emode_category
integer | null

Aave E-Mode category ID to set before executing the loop. If not provided, E-Mode will not be changed.

Required range: x >= 0
Example:

0

is_account_abstraction
boolean
default:false

Whether to use account abstraction for the transaction.

Examples:

true

false

account_owner
string | null

The owner address of the smart account (Safe). Required when is_account_abstraction is True. This address will be used as the 'from' address when building the execTransaction call.

Example:

"0x06A9aF046187895AcFc7258450B15397CAc67400"

Response

Successful Response

transaction
UnsignedMulticallTransaction · object
required

The unsigned multicall transaction data. User must sign and broadcast to network.

Example: