API reference

The generated, typed client behind the SDK.

Every SDK call is built on a typed client generated from the backend. You reach it with sdk.getInternalClient(), and the SDK also re-exports its types. Each service is a property: api.accounts, api.tokens, and so on. Every method takes one object and returns a promise.

const api = sdk.getInternalClient()
const { token } = await api.tokens.getTokenBySymbol({ symbol: 'AAPL', namespaceSlug: 'main' })

Methods are POST calls with a JSON body unless noted. Parameter and result types are in the package's .d.ts files; open them in your editor for the exact shape.

accounts

Signers, accounts, passkey challenges, profiles and transaction execution.

Method Call
authenticateSigner api.accounts.authenticateSigner({ … })
createAccount api.accounts.createAccount({ … })
createAccountWithoutSigner api.accounts.createAccountWithoutSigner({ … })
createAuthenticationChallenge api.accounts.createAuthenticationChallenge({ … })
createRegistrationChallenge api.accounts.createRegistrationChallenge({ … })
createSigner api.accounts.createSigner({ … })
executeTransaction api.accounts.executeTransaction({ … })
getAccount api.accounts.getAccount({ … })
getAccountContract api.accounts.getAccountContract({ … })
getAccountDeploymentStatus api.accounts.getAccountDeploymentStatus({ … })
getAccountProfile api.accounts.getAccountProfile({ … })
getSigner api.accounts.getSigner({ … })
setAccountProfile api.accounts.setAccountProfile({ … })

tokens

Listed tokens and lookups by id or symbol.

Method Call
bulkImportAndListTokens api.tokens.bulkImportAndListTokens({ … })
getListedTokens api.tokens.getListedTokens({ … })
getToken api.tokens.getToken({ … })
getTokenBySymbol api.tokens.getTokenBySymbol({ … })

positions

Holdings for an account.

Method Call
getPosition api.positions.getPosition({ … })

internalOrders

Buy and sell orders used by trade quotes.

Method Call
confirmMiniAppTransaction api.internalOrders.confirmMiniAppTransaction({ … })
createOrder api.internalOrders.createOrder({ … })
getOrder api.internalOrders.getOrder({ … })
getRelayReadiness api.internalOrders.getRelayReadiness({ … })
submitMiniAppOrder api.internalOrders.submitMiniAppOrder({ … })
submitOrder api.internalOrders.submitOrder({ … })

contracts

Contract addresses (router, Morpho, reference tokens) per chain.

Method Call
getAerodromeContracts api.contracts.getAerodromeContracts({ … })
getContract api.contracts.getContract({ … })
getCreditTokenContract api.contracts.getCreditTokenContract({ … })
getMorphoContracts api.contracts.getMorphoContracts({ … })
getPrimaryBalanceToken api.contracts.getPrimaryBalanceToken({ … })
getReferenceStablecoin api.contracts.getReferenceStablecoin({ … })
getSphereContracts api.contracts.getSphereContracts({ … })
getStockListing api.contracts.getStockListing({ … })

loans

Loans, Morpho markets and repayments.

Method Call
createLoan api.loans.createLoan({ … })
executeLoan api.loans.executeLoan({ … })
executeRepay api.loans.executeRepay({ … })
getLoan api.loans.getLoan({ … })
getLockedAssets api.loans.getLockedAssets({ … })
getMorphoMarket api.loans.getMorphoMarket({ … })
listLoans api.loans.listLoans({ … })

activity

Purchases, sales, deposits and loans as an activity feed.

Method Call
getActivitiesByIds api.activity.getActivitiesByIds({ … })
getDepositActivity api.activity.getDepositActivity({ … })
getLoanActivity api.activity.getLoanActivity({ … })
getPurchaseActivity api.activity.getPurchaseActivity({ … })
getSaleActivity api.activity.getSaleActivity({ … })
listActivities api.activity.listActivities({ … })

stockPriceChecker

Reference stock prices.

Method Call
getStockPrice api.stockPriceChecker.getStockPrice({ … })

inviteCodes

Create, list and validate invite codes.

Method Call
createInviteCode api.inviteCodes.createInviteCode({ … })
listInviteCodes api.inviteCodes.listInviteCodes({ … })
validateInviteCode api.inviteCodes.validateInviteCode({ … })

points

Points balance and ledger.

Method Call
getPointsBalance api.points.getPointsBalance({ … })
getPointsLedger api.points.getPointsLedger({ … })

squads

Crews: create, join through an invite, leave. (The API path and method names still say squad.)

Method Call
claimSquadInvite api.squads.claimSquadInvite({ … })
createSquad api.squads.createSquad({ … })
getMySquad api.squads.getMySquad({ … })
leaveSquad api.squads.leaveSquad({ … })

socialGraph

Connected social accounts and friend-join alerts.

Method Call
connectSocialAccount api.socialGraph.connectSocialAccount({ … })
getFriendJoinAlerts api.socialGraph.getFriendJoinAlerts({ … })
getSocialConnections api.socialGraph.getSocialConnections({ … })
syncSocialGraphEdges api.socialGraph.syncSocialGraphEdges({ … })