The Prime Onchain Wallet REST API provides programmatic access to the Onchain Wallet, enabling workflow automation for tasks such as sending, receiving, and onchain trading. This enhances operational efficiency, minimizes manual intervention, and ensures secure, seamless transactions across supported blockchains.
An onchain wallet can be created using the same Create Wallet endpoint detailed in the Wallets concepts page. See below for examples on how to process this creation:
Creating an onchain transaction is accomplished via the Create Onchain Transaction endpoint. While this endpoint processes the initiation of a transaction, please note:
The transaction still requires signing through the standard Onchain wallet flows.
Consensus approval still applies if required by the portfolio’s transfer rules.
When specifying the chain ID, it is important to remember that it is a numeric code representing the blockchain network. For example, the chain ID for Base is 8453. Other network codes can be looked up at Chainlist.
See below for an example request.
Copy
Ask AI
TransactionsService transactionsService = PrimeServiceFactory.createOnchainTransaction(client);EvmParams evmParams = new EvmParams.Builder().chainId("CHAIN_ID_HERE").build();CreateOnchainTransactionRequest request = new CreateOnchainTransactionRequest.Builder().portfolioId("PORTFOLIO_ID_HERE").walletId("WALLET_ID_HERE").rawUnsignedTransaction("RAW_UNSIGNED_TRANSACTION_HERE").evmParams(evmParams).amount("AMOUNT").build();CreateOnchainTransactionResponse response = transactionsService.createOnchainTransaction(request);
To learn more about this SDK, please visit the Prime Java SDK.
Prime Onchain Wallet utilizes address groups, which are collections of addresses organized for specific purposes, such as grouping addresses associated with a particular Uniswap pool.
To list the available Onchain Address Groups, use the List Onchain Address Groups endpoint. An example request is shown below: