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

Deposit into, or withdraw from, the Risk Yield Account.

The Risk Yield Account is the Earn Account on this chain, so this is the Earn transfer with the chain pinned. Sharing the implementation is deliberate: two transfer paths into one Safe would be two chances to get a balance check wrong.

owner
string
default:0x06A9aF046187895AcFc7258450B15397CAc67400
required

The owner's wallet address.

Example:

"0x06A9aF046187895AcFc7258450B15397CAc67400"

token
string
default:USDG
required

The token you would like to transfer.

Examples:

"USDC"

"WETH"

"0xA0b86a33E6441ccF30EE5DdEF1E9b652C91ac1c8"

amount
default:10
required

The amount of 'token' to transfer.

Required range: x > 0
Example:

1.5

action
enum<string>
default:DEPOSIT
required

Whether you are depositing to or withdrawing from your earn account.

Available options:
DEPOSIT,
WITHDRAW
Example:

"DEPOSIT"

chain
enum<string>
default:robinhood

Risk Yield is available on Robinhood Chain only.

Available options:
robinhood
Example:

"robinhood"

gas_sponsorship
boolean
default:false

Optionally request gas sponsorship. If set to true, EIP-712 signature data will be returned that must be signed by the owner and submitted to the /gas_sponsorship/prepare endpoint.

spender
string | null

The address that will call Permit2's permitTransferFrom to execute the transfer. When action is 'DEPOSIT' and gas_sponsorship is true: - If provided, the signature will authorize this address (typically a gas sponsor) to pull tokens. - If not provided, defaults to the Earn Account (Safe) address, allowing the transfer to be included in a bundle transaction where the Safe pulls the tokens itself.

recipient
string | null

Optional recipient address for withdrawals. When action is 'WITHDRAW': - If provided, tokens will be sent to this address instead of the owner. - If not provided, defaults to the owner's address.

Response

Successful Response

transaction
UnsignedTransaction · object | null

Unsigned transaction for direct execution. Present when gas_sponsorship=false.

Example:
eip_712
BatchedSafeOperationsResponse · object

Response containing EIP-712 typed data for Safe transaction signing.

Example: