V3 endpoints
These endpoints require a Client API Key or Client Session Token (CST) as a bearer token.
Clients
Get the client's details
GET
https://api.portalhq.io/api/v3/clients/me
This endpoint retrieves the details of the current client, including information about associated wallets.
Headers
Authorization*
String
Bearer <Client API Key>
Content-Type*
String
application/json
Example Response
Get the client's assets by chain
GET
https://api.portalhq.io/api/v3/clients/me/chains/:chain/assets
This endpoint retrieves the asset balances (native and token balances) for a specified blockchain. It provides detailed information on the native balance and token balances held by a given address on the specified chain.
Supported Chains
You can use either the full chain identifier or the shortcut for popular chains.
Ethereum Mainnet (
eip155:1
orethereum
)Ethereum Sepolia (
eip155:11155111
orsepolia
)Solana Mainnet (
solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
orsolana
)Solana Devnet (
solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1
orsolana-devnet
)Base Mainnet (
eip155:8453
orbase
)Base Sepolia (
eip155:84532
orbase-sepolia
)Polygon Mainnet (
eip155:137
orpolygon
)Polygon Amoy (
eip155:80002
orpolygon-amoy
)Optimism Mainnet (
eip155:10
)Binance Smart Chain (
eip155:56
)Binance Smart Chain Testnet (
eip155:97
)Fantom (
eip155:250
)Moonbeam (
eip155:1284
)Arbitrum Mainnet (
eip155:42161
)Avalanche Mainnet (
eip155:43114
)Linea Mainnet (
eip155:59144
)
When using CAIP-2 chain formats in the URL (e.g. eip155:11155111
), ensure the URL is URI encoded to accommodate the ":" character.
Headers
Authorization*
String
Bearer <Client API Key>
Content-Type*
String
application/json
Query Parameters
chainId
*
String
includeNfts
Boolean - Defaults to false
Optionally includes the NFTs of the client on the specified chain.
Example Response
Get the client's assets by chain (NFTs only)
GET
https://api.portalhq.io/api/v3/clients/me/chains/:chain/assets/nfts
This endpoint retrieves the NFT assets for a specified blockchain.
Supported Chains
You can use either the full chain identifier or the shortcut for popular chains.
Ethereum Mainnet (
eip155:1
orethereum
)Ethereum Sepolia (
eip155:11155111
orsepolia
)Solana Mainnet (
solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
orsolana
)Solana Devnet (
solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1
orsolana-devnet
)Base Mainnet (
eip155:8453
orbase
)Base Sepolia (
eip155:84532
orbase-sepolia
)Polygon Mainnet (
eip155:137
orpolygon
)Polygon Amoy (
eip155:80002
orpolygon-amoy
)Optimism Mainnet (
eip155:10
)Binance Smart Chain (
eip155:56
)Binance Smart Chain Testnet (
eip155:97
)Fantom (
eip155:250
)Moonbeam (
eip155:1284
)Arbitrum Mainnet (
eip155:42161
)Avalanche Mainnet (
eip155:43114
)Linea Mainnet (
eip155:59144
)
When using CAIP-2 chain formats in the URL (e.g. eip155:11155111
), ensure the URL is URI encoded to accommodate the ":" character.
Headers
Authorization*
String
Bearer <Client API Key>
Content-Type*
String
application/json
Query Parameters
chainId
*
String
Example Response
Get the client's transaction history by chain
GET
https://api.portalhq.io/api/v3/clients/me/transactions
Retrieves the client's transaction history for a specific chain.
Supported Chains
Ethereum Mainnet (
eip155:1
)Ethereum Goerli (
eip155:5
) // @deprecatedEthereum Sepolia (
eip155:11155111
)Base Mainnet (
eip155:8453
)Base Sepolia (
eip155:84532
)Polygon Mainnet (
eip155:137
)Polygon Mumbai (
eip155:80001
)Polygon Amoy (
eip155:80002
)
When using CAIP-2 chain formats in the URL (e.g. eip155:11155111
), ensure the URL is URI encoded to accommodate the ":" character.
Headers
Authorization*
String
Bearer <Client API Key>
Content-Type*
String
application/json
Query Parameters
chainId
*
String
Example Response
Build a transaction
POST
https://api.portalhq.io/api/v3/clients/me/chains/:chain/assets/send/build-transaction
Creates an unsigned transaction for transferring assets to another address on a specific chain. You can then use this unsigned transaction to sign and submit the transaction.
Supported Chains
You can use any of the following friendly chain names for the
chain
path param (or alternatively you can use the CAIP-2chainId
):ethereum
(eip155:1
)sepolia
(eip155:11155111
)base
(eip155:8453
)base-sepolia
(eip155:84531
)polygon
(eip155:137
)polygon-mumbai
(eip155:80001
)solana
(solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
)solana-devnet
(solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1
)
When using CAIP-2 chain formats in the URL (e.g. eip155:11155111
), ensure the URL is URI encoded to accommodate the ":" character.
Headers
Authorization*
String
Bearer <Client API Key>
Content-Type*
String
application/json
Path Parameters
chain
*
String
Must be one of the chains in "Supported Chains".
Body Parameters
to
*
String
The recipient's address.
token
*
String
The token symbol (e.g., "USDC") or contract address or mint address (for Solana). For native token transfers, use "NATIVE"
.
amount
*
String
The amount to transfer (as a string, in the token's primary denomination). For example, "0.01" is 1 cent of USDC.
Example Request
Example Response
The response includes the unsigned transaction details and metadata. The structure of the response differs depending on whether the chain is Solana or an EIP-155 chain (e.g., Ethereum, Polygon, Base).
Notes
The
token
field can accept either a token symbol (e.g. "USDC" or "USDT") or a contract address (for EIP-155 tokens) or a mint address (for Solana tokens).The
amount
should be provided in the token's primary denomination (e.g. whole USDC, not micro-USDC).This endpoint creates an unsigned transaction. The client is responsible for signing the transaction before broadcasting it to the network.
The response structure differs between Solana and EIP-155 chains. Make sure to handle both response types in your implementation.
Simulate + validate a transaction
POST
https://api.portalhq.io/api/v3/clients/me/evaluate-transaction
This endpoint evaluates a transaction by either simulating its execution or validating its authenticity (or both). The evaluation provides detailed insights into the transaction, including potential changes in asset balances, exposures, and a classification of the transaction's risk.
Supported Chains
Ethereum Mainnet (
eip155:1
)Ethereum Sepolia (
eip155:11155111
)Optimism Mainnet (
eip155:10
)Binance Smart Chain (
eip155:56
)Polygon Mainnet (
eip155:137
)Blast Mainnet (
eip155:238
)zkSync Mainnet (
eip155:324
)zkSync Sepolia (
eip155:300
)Base Mainnet (
eip155:8453
)Base Sepolia (
eip155:84532
)Immutable zkEVM (
eip155:13371
)Arbitrum Mainnet (
eip155:42161
)Avalanche Fuji (
eip155:43113
)Avalanche Mainnet (
eip155:43114
)Linea Mainnet (
eip155:59144
)Scroll Mainnet (
eip155:534352
)Zora Mainnet (
eip155:7777777
)Degen Mainnet (
eip155:666666666
)Solana Mainnet (
solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
)Solana Devnet (
solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1
)
When using CAIP-2 chain formats in the URL (e.g. eip155:11155111
), ensure the URL is URI encoded to accommodate the ":" character.
Headers
Authorization*
String
Bearer <Client API Key>
Content-Type*
String
application/json
Query Parameters
chainId
*
String
Body Parameters
to
*
String
The recipient's address.
gas
String
The gas limit provided for the transaction.
gasPrice
String
The price per unit of gas the sender is willing to pay.
maxFeePerGas
String
The maximum total fee per gas unit the sender is willing to pay.
maxPriorityFeePerGas
String
The maximum priority fee per gas unit the sender is willing to pay.
value
String
The amount of native token to send with the transaction.
data
String
The input data to send with the transaction (used for contract calls).
operationType
"validation"
, "simulation"
, or "all"
Default: "all"
The operation to perform with the transaction.