Sections
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
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Example Request
Be sure to replace the[token] with either a Client API Key or a Client Session Token.
Example Response
- 200: OK Success
- 400: Bad Request
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.- Monad Testnet (
eip155:10143ormonad-testnet) - Solana Mainnet (
solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdporsolana) - Solana Devnet (
solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1orsolana-devnet) - Bitcoin (
bip122:000000000019d6689c085ae165831e93-p2wpkhorbitcoin-p2wpkhorbitcoin-segwit) - Bitcoin Testnet (
bip122:000000000933ea01ad0ee984209779ba-p2wpkhorbitcoin-p2wpkh-testnetorbitcoin-segwit-testnet) - Celo (
eip155:42220orcelo) - Celo Alfajores Testnet (
eip155:44787orcelo-alfajores) - Tron (
tron:mainnet) - Tron Nile (
tron:nile) - Tron Shasta (
tron:shasta) - Stellar (
stellar:pubnet) - Stellar Testnet (
stellar:testnet) - Ethereum Mainnet (
eip155:1orethereum) - Ethereum Sepolia (
eip155:11155111orsepolia) - Base Mainnet (
eip155:8453orbase) - Base Sepolia (
eip155:84532orbase-sepolia) - Polygon Mainnet (
eip155:137orpolygon) - Polygon Amoy (
eip155:80002orpolygon-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) - Arbitrum Sepolia (
eip155:421614) - Avalanche Mainnet (
eip155:43114) - Linea Mainnet (
eip155:59144)
When using CAIP-2 chain formats in the URL (e.g.
eip155:10143), ensure the URL is URI encoded to accommodate the ”:” character.Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Query Parameters
| Name | Type | Description |
|---|---|---|
chainId* | String | Must be in CAIP-2 format or chain identifier shortcut (e.g. eip155:10143 or monad-testnet). |
includeNfts | Boolean - Defaults to false | Optionally includes the NFTs of the client on the specified chain. |
Example Request
Be sure to replace the[token] with either a Client API Key or a Client Session Token and the chain with a valid chain value.
Example Response
- 200: Success
- 400: Bad Request
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:1orethereum) - Ethereum Sepolia (
eip155:11155111orsepolia) - Base Mainnet (
eip155:8453orbase) - Base Sepolia (
eip155:84532orbase-sepolia) - Polygon Mainnet (
eip155:137orpolygon) - Polygon Amoy (
eip155:80002orpolygon-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:10143), ensure the URL is URI encoded to accommodate the ”:” character.Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Query Parameters
| Name | Type | Description |
|---|---|---|
chainId* | String | Must be in CAIP-2 format or chain identifier shortcut (e.g. eip155:10143 or monad-testnet). |
Example Request
Be sure to replace the[token] with either a Client API Key or a Client Session Token and the chain with a valid chain value.
Example Response
- 200: Success
- 400: Bad Request
Get the client’s Solana transaction history
GET https://api.portalhq.io/api/v3/clients/me/chains/:chain/transactions
Retrieves the client’s transaction history for a specific chain.
Supported Chains
- Solana Mainnet (
solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdporsolana) - Solana Devnet (
solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1orsolana-devnet)
When using CAIP-2 chain formats in the URL (e.g.
eip155:10143), ensure the URL is URI encoded to accommodate the ”:” character.Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Path Parameters
| Name | Type | Description |
|---|---|---|
chain* | String | Must be in CAIP-2 format or chain identifier shortcut (e.g. eip155:10143 or monad-testnet). |
Query Parameters
| Name | Type | Description |
|---|---|---|
limit | Number | The max amount of transactions returned in the request. Defaults to 1000. |
offset | Number | The number of transactions to skip before returning results. Used for pagination when combined with the limit parameter. Defaults to 0. |
Example Request
Be sure to replace the[token] with either a Client API Key or a Client Session Token and the chain with a valid chain value.
Example Response
- 200: Success
- 400: Bad Request
Get the client’s EIP-155 transaction history
GET https://api.portalhq.io/api/v3/clients/me/transactions
Retrieves the client’s transaction history for a specific chain.
Supported Chains
- Monad Testnet (
eip155:10143) - Ethereum Mainnet (
eip155:1) - Ethereum Sepolia (
eip155:11155111) - Base Mainnet (
eip155:8453) - Base Sepolia (
eip155:84532) - Polygon Mainnet (
eip155:137) - Polygon Mumbai (
eip155:80001) - Polygon Amoy (
eip155:80002) - Arbitrum (
eip155:42161) - Arbitrum Sepolia (
eip155:421614)
When using CAIP-2 chain formats in the URL (e.g.
eip155:10143), ensure the URL is URI encoded to accommodate the ”:” character.Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Query Parameters
| Name | Type | Description |
|---|---|---|
chainId* | String | Must be in CAIP-2 format (e.g. "eip155:10143"). |
Example Request
Be sure to replace the[token] with either a Client API Key or a Client Session Token and the chain with a valid chain value.
Example Response
- 200: Success
- 400: Bad Request
Fund wallet with testnet tokens
POST https://api.portalhq.io/api/v3/clients/me/fund
Sends testnet tokens to your Portal client’s wallet.
Supported Chains
- Monad Testnet (
eip155:10143)- Up to
0.01MONper Portal client per 24 hours.
- Up to
- Ethereum Sepolia (
eip155:11155111)- Up to
0.01ETHper Portal client per 24 hours.
- Up to
- Celo Alfajores (
eip155:44787)- Up to
0.1CELOper Portal client per 24 hours.
- Up to
- Solana Devnet (
solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1)- Up to
0.01SOLper Portal client per 24 hours.
- Up to
Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Body Parameters
| Name | Type | Description |
|---|---|---|
chainId* | String | The CAIP-2 chainId you want to receive testnet tokens on. |
token* | String | The testnet token you want to receive. |
amount* | String | The amount to transfer (as a string, in the token’s primary denomination). |
Example Request
Be sure to replace the[token] with either a Client API Key or a Client Session Token and the chain with a valid chain value.
Example Response
- 200: EIP-155 Response
- 429: Too Many Requests
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
chainpath param (or alternatively you can use the CAIP-2chainId):monad-testnet(eip155:10143)ethereum(eip155:1)sepolia(eip155:11155111)base(eip155:8453)base-sepolia(eip155:84532)polygon(eip155:137)polygon-mumbai(eip155:80001)celo(eip155:42220)celo-alfajores(eip155:44787)solana(solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp)solana-devnet(solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1)tron(tron:mainnet)tron-nile(tron:nile)tron-shasta(tron:shasta)stellar(stellar:pubnet)stellar-testnet(stellar:testnet)bitcoin-segwit(bip122:000000000019d6689c085ae165831e93-p2wpkh)bitcoin-segwit-testnet(bip122:000000000933ea01ad0ee984209779ba-p2wpkh)bitcoin-p2wpkh(bip122:000000000019d6689c085ae165831e93-p2wpkh)bitcoin-p2wpkh-testnet(bip122:000000000933ea01ad0ee984209779ba-p2wpkh)
When using CAIP-2 chain formats in the URL (e.g.
eip155:10143), ensure the URL is URI encoded to accommodate the ”:” character.Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Path Parameters
| Name | Type | Description |
|---|---|---|
chain* | String | Must be one of the chains in “Supported Chains”. |
Body Parameters
| Name | Type | Description |
|---|---|---|
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
Be sure to replace the[token] with either a Client API Key or a Client Session Token and the chain with a valid chain value.
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).- 200: EIP-155 Response
- 200: Solana Response
- 200: Bitcoin Response
- 400: Bad Request
Notes
- The
tokenfield 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
amountshould 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:10143), ensure the URL is URI encoded to accommodate the ”:” character.Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Query Parameters
| Name | Type | Description |
|---|---|---|
chainId* | String | Must be in CAIP-2 format (e.g. eip155:11155111, solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1). |
Body Parameters
- EIP-155
- Solana
| Name | Type | Description |
|---|---|---|
to(Required) | 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 |
| The operation to perform with the transaction. |
Example Request
Be sure to replace the[token] with either a Client API Key or a Client Session Token and the chain with a valid chain value.
Example Response
- 200: EIP-155 Success
- 200: Solana Success
- 400: Bad Request
Client Shares
Update the client’s signing share pairs’ statuses
PATCH https://api.portalhq.io/api/v3/clients/me/signing-share-pairs
Updates a client’s signing share pairs’ statuses. Intended to be used after successfully storing the client signing share on the client’s device.
Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Body Parameters
| Name | Type | Description |
|---|---|---|
signingSharePairIds* | String[] | An array of signing share pair IDs. |
status* | "STORED_CLIENT" | The updated status of the signing share pairs. |
Example Request
Be sure to replace the[token] with either a Client API Key or a Client Session Token.
Example Response
- 204: Success, No Content
- 400: Bad Request
Update the client’s backup share pairs’ statuses
PATCH https://api.portalhq.io/api/v3/clients/me/backup-share-pairs
Updates a client’s backup share pairs’ statuses. Intended to be used after successfully storing the encrypted client backup share.
Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Body Parameters
| Name | Type | Description |
|---|---|---|
backupSharePairIds* | String[] | An array of backup share pair IDs. |
status* | "STORED_CLIENT_BACKUP_SHARE_KEY" | "STORED_CLIENT_BACKUP_SHARE" | The updated status of the backup share pairs. |
Example Request
Be sure to replace the[token] with either a Client API Key or a Client Session Token.
Example Response
- 204: Success, No Content
- 400: Bad Request
Store the client’s encrypted backup share for Portal-Managed Backups
PATCH https://api.portalhq.io/api/v3/clients/me/backup-share-pairs/:backupSharePairId
Stores a client’s encrypted backup share for Portal-Managed Backups. This endpoint is used when running eject while using the Enclave MPC API with a Portal-Managed Backup configuration. Call this endpoint once for the SECP256K1 share and once for the ED25519 share.
Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Body Parameters
| Name | Type | Description |
|---|---|---|
clientCipherText* | String | The ciphertext from encrypting a backup share. |
Example Request
Be sure to replace the[token] with either a Client API Key or a Client Session Token and the backupSharePairId with the relevant backup share pair ID.
Example Response
- 200: Success
- 400: Bad Request
Get the encrypted client backup share for Portal-Managed Backups
GET https://api.portalhq.io/api/v3/clients/me/backup-share-pairs/:backupSharePairId/cipher-text
Your custodian must be using Portal-Managed Backups to use this endpoint. Fetches a client’s encrypted backup share for Portal-Managed Backups. This endpoint is used when running eject while using the Enclave MPC API with a Portal-Managed Backup configuration.
Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Example Request
Be sure to replace the[token] with either a Client API Key or a Client Session Token and the backupSharePairId with the relevant backup share pair ID.
Example Response
- 200: Success
- 400: Bad Request
Get the ejectable backup shares for Portal-Managed Backups
GET https://api.portalhq.io/api/v3/clients/me/wallets/:walletId/ejectable-backup-shares
You must have made the wallet ejectable before using this endpoint. Your custodian must be using Portal-Managed Backups to use this endpoint. Fetches a client’s encrypted backup share and their custodian backup share. This endpoint is used when running eject while using the Enclave MPC API with a Portal-Managed Backup configuration.
Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Example Request
Be sure to replace the[token] with either a Client API Key or a Client Session Token and the walletId with the relevant Portal client wallet ID.
Example Response
- 200: Success
- 400: Bad Request
Swaps
For all swap endpoints, you will need to provide a 0x API key. You can get one by signing up for a 0x account here.Get available swap sources
POST https://api.portalhq.io/api/v3/clients/me/chains/:chain/assets/swap/sources
This endpoint retrieves the available swap sources for a specific chain.
Supported Chains
- Ethereum (
eip155:1) - Monad Testnet (
eip155:10143) - Base (
eip155:8453) - Arbitrum (
eip155:42161) - Optimism (
eip155:10) - Avalanche (
eip155:43114) - Polygon (
eip155:137)
When using CAIP-2 chain formats in the URL (e.g.
eip155:10143), ensure the URL is URI encoded to accommodate the ”:” character.Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Path Parameters
| Name | Type | Description |
|---|---|---|
chain* | String | Must be one of the chains in “Supported Chains”. |
Body Parameters
| Name | Type | Description |
|---|---|---|
zeroXApiKey* | String | Your 0x API key for swap functionality. |
Example Request
Be sure to replace the[token] with either a Client API Key or a Client Session Token, the chain with a valid chain value, and the zeroXApiKey with your 0x API key.
Example Response
- 200: Success
- 400: Bad Request
Get swap quote
POST https://api.portalhq.io/api/v3/clients/me/chains/:chain/assets/swap/quote
This endpoint retrieves a swap quote for trading tokens on a specific chain.
Supported Chains
- Ethereum (
eip155:1) - Monad Testnet (
eip155:10143) - Base (
eip155:8453) - Arbitrum (
eip155:42161) - Optimism (
eip155:10) - Avalanche (
eip155:43114) - Polygon (
eip155:137)
When using CAIP-2 chain formats in the URL (e.g.
eip155:10143), ensure the URL is URI encoded to accommodate the ”:” character.Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Path Parameters
| Name | Type | Description |
|---|---|---|
chain* | String | Must be one of the chains in “Supported Chains”. |
Body Parameters
| Name | Type | Description |
|---|---|---|
zeroXApiKey* | String | Your 0x API key for swap functionality. |
buyToken* | String | The token symbol you want to buy (e.g., “ETH”, “USDC”, “0x123abc”). |
sellToken* | String | The token symbol you want to sell (e.g., “ETH”, “USDC”, “0x123abc”). |
sellAmount* | String | The amount to sell (in wei for ETH, or smallest unit for tokens). |
Example Request
Be sure to replace the[token] with either a Client API Key or a Client Session Token, the chain with a valid chain value, and the zeroXApiKey with your 0x API key.
Example Response
- 200: Success
- 400: Bad Request
Get swap price
POST https://api.portalhq.io/api/v3/clients/me/chains/:chain/assets/swap/price
This endpoint retrieves a swap price for trading tokens on a specific chain without building a transaction.
Supported Chains
- Ethereum (
eip155:1) - Monad Testnet (
eip155:10143) - Base (
eip155:8453) - Arbitrum (
eip155:42161) - Optimism (
eip155:10) - Avalanche (
eip155:43114) - Polygon (
eip155:137)
When using CAIP-2 chain formats in the URL (e.g.
eip155:10143), ensure the URL is URI encoded to accommodate the ”:” character.Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Path Parameters
| Name | Type | Description |
|---|---|---|
chain* | String | Must be one of the chains in “Supported Chains”. |
Body Parameters
| Name | Type | Description |
|---|---|---|
zeroXApiKey* | String | Your 0x API key for swap functionality. |
buyToken* | String | The token symbol you want to buy (e.g., “ETH”, “USDC”, “0x123abc”). |
sellToken* | String | The token symbol you want to sell (e.g., “ETH”, “USDC”, “0x123abc”). |
sellAmount* | String | The amount to sell (in wei for ETH, or smallest unit for tokens). |
Example Request
Be sure to replace the[token] with either a Client API Key or a Client Session Token, the chain with a valid chain value, and the zeroXApiKey with your 0x API key.
Example Response
- 200: Success
- 400: Bad Request
Yield.xyz Integration
Get yield opportunities
GET https://api.portalhq.io/api/v3/clients/me/integrations/yield-xyz/yields
This proxy endpoint retrieves a paginated list of available yield opportunities across all supported networks and protocols.
View the original Yield.xyz API endpoint here.
Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Query Parameters
| Name | Type | Description |
|---|---|---|
offset | Number | Number of results to skip (for pagination). Defaults to 0. |
limit | Number | Maximum number of results to return. Defaults to 100. |
network | String | Network identifier in CAIP-2 format (e.g., eip155:1 for Ethereum). |
networks | String[] | Array of network identifiers in CAIP-2 format. |
yieldId | String | Specific yield opportunity ID. |
yieldIds | String[] | Array of specific yield opportunity IDs. |
type | String | Type of yield mechanism (staking, restaking, lending, vault, fixed_yield, real_world_asset). |
types | String[] | Array of yield mechanism types. |
hasCooldownPeriod | Boolean | Filter by cooldown period requirement. |
hasWarmupPeriod | Boolean | Filter by warmup period requirement. |
token | String | Token contract address to filter by. |
inputToken | String | Input token symbol or address. |
inputTokens | String[] | Array of input token symbols or addresses. |
provider | String | Protocol provider (e.g., aave, compound). |
providers | String[] | Array of protocol providers. |
search | String | Search term for yield opportunities. |
sort | String | Sorting criteria (statusEnterAsc, statusEnterDesc, statusExitAsc, statusExitDesc). |
Example Request
Be sure to replace the[token] with either a Client API Key or a Client Session Token.
Example Response
- 200: Success
- 400: Bad Request
Get yield balances
POST https://api.portalhq.io/api/v3/clients/me/integrations/yield-xyz/yields/balances
This endpoint retrieves balances for multiple wallet addresses across different networks and yield opportunities.
View the original Yield.xyz API endpoint here.
Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Body Parameters
| Name | Type | Description |
|---|---|---|
queries* | Array | Array of balance query objects. |
queries[].address* | String | Wallet address to query balances for. |
queries[].network* | String | Network identifier in CAIP-2 format (e.g., eip155:1 for Ethereum). |
queries[].yieldId | String | Optional specific yield opportunity ID to query. |
queries[].arguments | Object | Optional arguments for the yield position. (View the original Yield.xyz API endpoint for available arguments here) |
Example Request
Be sure to replace the[token] with either a Client API Key or a Client Session Token.
Example Response
- 200: Success
- 400: Bad Request
Enter yield position
POST https://api.portalhq.io/api/v3/clients/me/integrations/yield-xyz/actions/enter
This endpoint creates an action to enter a yield position.
View the original Yield.xyz API endpoint here.
Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Body Parameters
| Name | Type | Description |
|---|---|---|
yieldId* | String | The yield opportunity ID to enter. |
address* | String | The wallet address to use for the yield position. |
arguments | Object | Optional arguments for the yield entry. View the original Yield.xyz API endpoint for available arguments here |
Example Request
Be sure to replace the[token] with either a Client API Key or a Client Session Token.
Example Response
- 200: Success
- 400: Bad Request
Exit yield position
POST https://api.portalhq.io/api/v3/clients/me/integrations/yield-xyz/actions/exit
This endpoint creates an action to exit a yield position.
View the original Yield.xyz API endpoint here.
Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Body Parameters
| Name | Type | Description |
|---|---|---|
yieldId* | String | The yield opportunity ID to exit. |
address* | String | The wallet address that holds the yield position. |
arguments | Object | Optional arguments for the yield exit. View the original Yield.xyz API endpoint for available arguments here |
Example Request
Be sure to replace the[token] with either a Client API Key or a Client Session Token.
Example Response
- 200: Success
- 400: Bad Request
Manage yield position
POST https://api.portalhq.io/api/v3/clients/me/integrations/yield-xyz/actions/manage
This endpoint creates an action to manage an existing yield position (claim rewards, compound, etc.).
View the original Yield.xyz API endpoint here.
Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Body Parameters
| Name | Type | Description |
|---|---|---|
yieldId* | String | The yield opportunity ID to manage. |
address* | String | The wallet address that holds the yield position. |
action* | String | The type of management action (STAKE, UNSTAKE, CLAIM_REWARDS, RESTAKE_REWARDS, WITHDRAW, WITHDRAW_ALL, RESTAKE, CLAIM_UNSTAKED, UNLOCK_LOCKED, STAKE_LOCKED, VOTE, REVOKE, VOTE_LOCKED, REVOTE, REBOND, MIGRATE, VERIFY_WITHDRAW_CREDENTIALS, DELEGATE). |
passthrough* | String | Passthrough data from the balance’s pending actions. |
arguments | Object | Optional arguments for the yield management action. View the original Yield.xyz API endpoint for available arguments here |
Example Request
Be sure to replace the[token] with either a Client API Key or a Client Session Token.
Example Response
- 200: Success
- 400: Bad Request
Submit transaction hash
PUT https://api.portalhq.io/api/v3/clients/me/integrations/yield-xyz/transactions/:transactionId/submit-hash
This endpoint submits a transaction hash after broadcasting a transaction to the network.
View the original Yield.xyz API endpoint here.
Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Path Parameters
| Name | Type | Description |
|---|---|---|
transactionId* | String | The transaction ID to submit the hash for. |
Body Parameters
| Name | Type | Description |
|---|---|---|
hash* | String | The transaction hash from the broadcasted transaction. |
Example Request
Be sure to replace the[token] with either a Client API Key or a Client Session Token and the [transactionId] with the actual transaction ID.
Example Response
- 200: Success
- 400: Bad Request
Get transaction details
GET https://api.portalhq.io/api/v3/clients/me/integrations/yield-xyz/transactions/:transactionId
This endpoint retrieves details for a specific transaction.
View the original Yield.xyz API endpoint here.
Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Path Parameters
| Name | Type | Description |
|---|---|---|
transactionId* | String | The transaction ID to retrieve details for. |
Example Request
Be sure to replace the[token] with either a Client API Key or a Client Session Token and the [transactionId] with the actual transaction ID.
Example Response
- 200: Success
- 400: Bad Request
Get historical actions
GET https://api.portalhq.io/api/v3/clients/me/integrations/yield-xyz/actions
This endpoint retrieves historical yield actions for a client with optional filtering.
View the original Yield.xyz API endpoint here.
Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Query Parameters
| Name | Type | Description |
|---|---|---|
offset | Number | Number of results to skip (for pagination). Defaults to 0. |
limit | Number | Maximum number of results to return. Defaults to 100. |
address* | String | Filter by wallet address. |
status | String | Filter by action status (pending, completed, failed). |
intent | String | Filter by action intent (enter, manage, exit). |
type | String | Filter by action type (STAKE, UNSTAKE, CLAIM_REWARDS, RESTAKE_REWARDS, WITHDRAW, WITHDRAW_ALL, RESTAKE, CLAIM_UNSTAKED, UNLOCK_LOCKED, STAKE_LOCKED, VOTE, REVOKE, VOTE_LOCKED, REVOTE, REBOND, MIGRATE, VERIFY_WITHDRAW_CREDENTIALS, DELEGATE). |
yieldId | String | Filter by yield opportunity ID. |
Example Request
Be sure to replace the[token] with either a Client API Key or a Client Session Token.
Example Response
- 200: Success
- 400: Bad Request
Deprecated Endpoints:
Get the client’s NFTs by chain (@deprecated)
GET https://api.portalhq.io/api/v3/clients/me/nfts
This endpoint retrieves the NFTs for the client for a particular chain.
Supported Chains
- Ethereum Mainnet (
eip155:1) - Ethereum Goerli (
eip155:5) // @deprecated - Ethereum 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:10143), ensure the URL is URI encoded to accommodate the ”:” character.Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Query Parameters
| Name | Type | Description |
|---|---|---|
chainId* | String | Must be in CAIP-2 format (e.g. "eip155:10143"). |
Example Response
- 200: Success
- 400: Bad Request
Simulate a transaction (@deprecated)
POST https://api.portalhq.io/api/v3/clients/me/simulate-transaction
Simulates a transaction for a specific chain.
Supported Chains
- Ethereum Mainnet (
eip155:1) - Ethereum Goerli (
eip155:5) // @deprecated - Ethereum 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:10143), ensure the URL is URI encoded to accommodate the ”:” character.Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Query Parameters
| Name | Type | Description |
|---|---|---|
chainId* | String | Must be in CAIP-2 format (e.g. "eip155:10143"). |
Body Parameters
| Name | Type | Description |
|---|---|---|
from* | String | The sender’s address. |
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). |
nonce | String | The transaction count of the sender’s address, used to ensure uniqueness. |
Example Response
- 200: Success
- 400: Bad Request
Get the client’s ERC20 assets by chain (@deprecated)
GET https://api.portalhq.io/api/v3/clients/me/balances
Retrieves the client’s ERC20 balances for a specific chain.
Supported Chains
- Ethereum Mainnet (
eip155:1) - Ethereum Goerli (
eip155:5) // @deprecated - Ethereum 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:10143), ensure the URL is URI encoded to accommodate the ”:” character.Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Query Parameters
| Name | Type | Description |
|---|---|---|
chainId* | String | Must be in CAIP-2 format (e.g. "eip155:10143"). |
Example Response
- 200: Success
- 400: Bad Request
Get swap quote (@deprecated)
POST https://api.portalhq.io/api/v3/swaps/quote
This endpoint retrieves a swap quote for trading tokens on a specific chain.
Supported Chains
- Ethereum (
eip155:1) - Monad Testnet (
eip155:10143) - Base (
eip155:8453) - Arbitrum (
eip155:42161) - Optimism (
eip155:10) - Avalanche (
eip155:43114) - Polygon (
eip155:137)
When using CAIP-2 chain formats in the URL (e.g.
eip155:10143), ensure the URL is URI encoded to accommodate the ”:” character.Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Body Parameters
| Name | Type | Description |
|---|---|---|
address* | String | The client’s address. |
apiKey* | String | Your 0x API key for swap functionality. |
chainId* | String | Must be in CAIP-2 format (e.g. "eip155:10143"). |
buyToken* | String | The token symbol you want to buy (e.g., “ETH”, “USDC”, “0x123abc”). |
sellToken* | String | The token symbol you want to sell (e.g., “ETH”, “USDC”, “0x123abc”). |
sellAmount* | String | The amount to sell (in wei for ETH, or smallest unit for tokens). |
Example Request
Be sure to replace the[token] with either a Client API Key or a Client Session Token, the address with the client’s address, the apiKey with your 0x API key, and the chainId with a valid chain value.
Example Response
- 200: Success
- 400: Bad Request
Get swap sources (@deprecated)
POST https://api.portalhq.io/api/v3/swaps/sources
This endpoint retrieves the available swap sources for a specific chain.
Supported Chains
- Ethereum (
eip155:1) - Monad Testnet (
eip155:10143) - Base (
eip155:8453) - Arbitrum (
eip155:42161) - Optimism (
eip155:10) - Avalanche (
eip155:43114) - Polygon (
eip155:137)
When using CAIP-2 chain formats in the URL (e.g.
eip155:10143), ensure the URL is URI encoded to accommodate the ”:” character.Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Body Parameters
| Name | Type | Description |
|---|---|---|
apiKey* | String | Your 0x API key for swap functionality. |
chainId* | String | Must be in CAIP-2 format (e.g. "eip155:10143"). |
Example Request
Be sure to replace the[token] with either a Client API Key or a Client Session Token, the apiKey with your 0x API key, and the chainId with a valid chain value.
Example Response
- 200: Success
- 400: Bad Request