Morpho Vault Get Position
Get a wallet's current position in a MetaMorpho vault (ERC-4626). Returns vault share balance, underlying asset value, and token metadata. Supports Ethereum (1), Optimism (10), Polygon (137), Base (8453), Arbitrum (42161). Ideal for: portfolio tracking, rebalance decisions, position monitoring, yield reporting.
Catalog action Blockchain Data wallet
Get a wallet's current position in a MetaMorpho vault (ERC-4626). Returns vault share balance, underlying asset value, and token metadata. Supports Ethereum (1), Optimism (10), Polygon (137), Base (8453), Arbitrum (42161). Ideal for: portfolio tracking, rebalance decisions, position monitoring, yield reporting.
At a Glance
| Field | Value |
|---|---|
| Action ID | morpho-vault-get-position |
| Category | Blockchain Data |
| Connector | wallet |
| Requires gas | No |
| Funds movement | None declared |
| Tags | morpho, defi, vault, position, balance, erc4626, yield, read |
Payload Schema
| Field | Type | Required | Description |
|---|---|---|---|
vaultAddress | string | Yes | The MetaMorpho vault (ERC-4626) contract address |
accountAddress | string | No | The wallet address to check position for. Optional if a wallet connector is attached (address is derived from the connector). |
chainId | number | Yes | Chain ID. Supported: Ethereum (1), Optimism (10), Polygon (137), Base (8453), Arbitrum (42161) |
Result Schema
| Field | Type | Required | Description |
|---|---|---|---|
vaultAddress | string | Yes | The vault contract address |
accountAddress | string | Yes | The wallet address queried |
chainId | number | Yes | The chain ID |
shares | string | Yes | Number of vault shares held (raw) |
assets | string | Yes | Underlying asset value of the shares (raw, in smallest unit) |
formattedAssets | string | Yes | Human-readable underlying asset value with decimals |
assetAddress | string | Yes | Underlying asset token address |
assetSymbol | string | Yes | Underlying asset token symbol |
assetDecimals | number | Yes | Underlying asset token decimals |
vaultName | string | No | The vault name |
vaultSymbol | string | No | The vault share token symbol |
chainName | string | No | Human-readable chain name (e.g., 'Base', 'Ethereum') |
networkId | string | No | Chain network identifier (e.g., 'base', 'ethereum') — use for Coinbase and other APIs that accept network names |
Examples
json{ "type": "morpho-vault-get-position", "payload": { "vaultAddress": "0x0000000000000000000000000000000000000000", "chainId": 1 }, "children": [], "connector": { "type": "wallet", "id": "conn_wallet" }}
bashcurl -X POST "https://api.b3os.org/v1/actions/morpho-vault-get-position/test" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "inputs": { "vaultAddress": "0x0000000000000000000000000000000000000000", "chainId": 1 }}'
Payload fields can use workflow expressions such as {{$trigger.body.amount}}, {{$nodes.fetch.result.price}}, and {{$props.asset}} when the value should come from a trigger, prior node, or reusable workflow prop.
