Skip to main content
POST
/
v2
/
credit
/
create_account
Python (SDK)
from compass_api_sdk import CompassAPI, models


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

    res = compass_api.credit.credit_create_account(chain=models.CreateCreditAccountRequestChain.BASE, sender="0xc98949522db2eE403d6c75E91DDEe875a824bB10", owner="0xc98949522db2eE403d6c75E91DDEe875a824bB10", estimate_gas=True)

    # Handle response
    print(res)
{
  "transaction": {
    "chainId": "<string>",
    "data": "<string>",
    "from": "<string>",
    "gas": "<string>",
    "to": "<string>",
    "value": "<string>",
    "nonce": "<string>",
    "maxFeePerGas": "<string>",
    "maxPriorityFeePerGas": "<string>"
  },
  "credit_account_address": "<string>"
}

Authorizations

x-api-key
string
header
required

Your Compass API Key. Get your key here.

Body

application/json

Request to create a compass credit account.

chain
enum<string>
default:base
required
Available options:
arbitrum,
base,
ethereum
sender
string
default:0xc98949522db2eE403d6c75E91DDEe875a824bB10
required

The address of the transaction sender.

Example:

"0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B"

owner
string
default:0xc98949522db2eE403d6c75E91DDEe875a824bB10
required

The address that will own and control the compass credit account

estimate_gas
boolean
default:true

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

Response

Successful Response

Response containing unsigned transaction to create compass Credit account.

transaction
UnsignedTransaction · object
required

Transaction to create compass credit account

credit_account_address
string
required

Predicted address of the compass credit account that will be deployed