Skip to main content
POST
/
v2
/
global_markets_perps
/
deposit
/
sponsor_prepare
Python (SDK)
from compass_api_sdk import CompassAPI


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

    res = compass_api.global_markets_perps.global_markets_perps_deposit_sponsor_prepare(owner="0x01E62835dd7F52173546A325294762143eE4a882", amount_raw=100000000, deadline=1747097383, signature="0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", sender="0x4A83b4413CF41C3244027e1590E35a0F48403F0c")

    # Handle response
    print(res)
{
  "transaction": {
    "chainId": "0xa4b1",
    "data": "0x...",
    "from": "0x4A83b4413CF41C3244027e1590E35a0F48403F0c",
    "gas": "0x30d40",
    "maxFeePerGas": "0x59682f00",
    "maxPriorityFeePerGas": "0x3b9aca00",
    "nonce": "0x5",
    "to": "0x2Df1c51E09aECF9cacB7bc98cB1742757f163dF7",
    "value": "0x0"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.compasslabs.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
required

Your Compass API Key. Get your key here.

Body

application/json

Take a user's signed EIP-2612 USDC permit and build an Arbitrum tx that calls Bridge2.batchedDepositWithPermit.

The customer broadcasts the returned tx from their own sponsor wallet — Compass does not hold gas keys (non-custodial).

owner
string
default:0x01E62835dd7F52173546A325294762143eE4a882
required

The user's EOA address on Arbitrum (the permit signer).

amount_raw
integer
default:100000000
required

USDC amount in raw 6-decimal units, as returned by /deposit.

deadline
integer
default:1747097383
required

Permit deadline (unix seconds), as returned in the permit.message from /deposit.

signature
string
default:0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
required

The user's EIP-2612 permit signature (65-byte hex, 0x-prefixed or raw).

sender
string
default:0x4A83b4413CF41C3244027e1590E35a0F48403F0c
required

Sponsor wallet address that will broadcast the returned tx (used for from and nonce).

Response

Successful Response

Fully-encoded Arbitrum tx that completes a HL Bridge2 deposit.

Broadcast transaction from the sender wallet supplied in the request. After the receipt confirms, verify a USDC Transfer event was emitted — Bridge2 can silently no-op without reverting.

transaction
UnsignedTransaction · object
required

Unsigned Arbitrum tx calling Bridge2.batchedDepositWithPermit. Sign and broadcast from sender.

Example:
{
"chainId": "0x2105",
"data": "0x1688f0b900000000000000000000000029fcb43b46531bca003ddc8fcb67ffe91900c762000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000675f4a3d",
"from": "0x4A83b4413CF41C3244027e1590E35a0F48403F0c",
"gas": "0x7a120",
"maxFeePerGas": "0x59682f00",
"maxPriorityFeePerGas": "0x3b9aca00",
"nonce": "0x5",
"to": "0x4e1DCf7AD4e460CfD30791CCC4F9c8a4f820ec67",
"value": "0x0"
}