Skip to content

LeoYeAI/agent-master-skills / skills/alchemy-official

alchemy-official

Verified

FileKindSize
AGENTIC-GATEWAY.mdmarkdown4.3 KB
SKILL.mdskill md24.0 KB
SOURCE.mdmarkdown188 B
_meta.jsonconfig466 B
references/data-nft-api.mdmarkdown15.8 KB
references/data-overview.mdmarkdown2.0 KB
references/data-portfolio-apis.mdmarkdown15.9 KB
references/data-prices-api.mdmarkdown6.3 KB
references/data-simulation-api.mdmarkdown10.2 KB
references/data-token-api.mdmarkdown5.4 KB
references/data-transfers-api.mdmarkdown5.1 KB
references/ecosystem-anchor.mdmarkdown632 B
references/ecosystem-ethers.mdmarkdown772 B
references/ecosystem-foundry.mdmarkdown654 B
references/ecosystem-hardhat.mdmarkdown795 B
references/ecosystem-metaplex.mdmarkdown652 B
references/ecosystem-overview.mdmarkdown2.3 KB
references/ecosystem-rainbowkit.mdmarkdown604 B
references/ecosystem-solana-web3js.mdmarkdown766 B
references/ecosystem-spl-token.mdmarkdown737 B
references/ecosystem-viem.mdmarkdown827 B
references/ecosystem-wagmi.mdmarkdown829 B
references/ecosystem-web3js.mdmarkdown689 B
references/node-debug-api.mdmarkdown5.0 KB
references/node-enhanced-apis.mdmarkdown2.7 KB
references/node-json-rpc.mdmarkdown10.4 KB
references/node-overview.mdmarkdown2.1 KB
references/node-trace-api.mdmarkdown5.7 KB
references/node-utility-api.mdmarkdown3.1 KB
references/node-websocket-subscriptions.mdmarkdown4.1 KB
references/operational-alerts.mdmarkdown765 B
references/operational-allowlists.mdmarkdown819 B
references/operational-auth-and-keys.mdmarkdown1.1 KB
references/operational-best-practices.mdmarkdown1.0 KB
references/operational-dashboard-tools.mdmarkdown700 B
references/operational-jwt-and-header-auth.mdmarkdown1.1 KB
references/operational-overview.mdmarkdown2.0 KB
references/operational-pricing-and-plans.mdmarkdown916 B
references/operational-rate-limits-and-compute-units.mdmarkdown1.1 KB
references/operational-request-logs.mdmarkdown680 B
references/operational-roles-and-sso.mdmarkdown686 B
references/operational-sandbox.mdmarkdown686 B
references/operational-supported-networks.mdmarkdown2.3 KB
references/recipes-get-nft-metadata.mdmarkdown1.2 KB
references/recipes-get-nft-ownership.mdmarkdown1.2 KB
references/recipes-get-portfolio.mdmarkdown1.5 KB
references/recipes-get-prices-current-historical.mdmarkdown1.1 KB
references/recipes-get-token-balances.mdmarkdown1.4 KB
references/recipes-get-token-metadata.mdmarkdown1.3 KB
references/recipes-get-transfers-history.mdmarkdown1.0 KB
references/recipes-overview.mdmarkdown1.4 KB
references/recipes-simulate-transaction.mdmarkdown1.1 KB
references/recipes-subscribe-pending-txs.mdmarkdown1.7 KB
references/recipes-webhook-address-activity.mdmarkdown1.4 KB
references/rollups-details.mdmarkdown1.1 KB
references/rollups-overview.mdmarkdown793 B
references/solana-das-api.mdmarkdown9.0 KB
references/solana-grpc-best-practices.mdmarkdown896 B
references/solana-grpc-details.mdmarkdown1.0 KB
references/solana-grpc-examples.mdmarkdown958 B
references/solana-grpc-overview.mdmarkdown1.5 KB
references/solana-grpc-subscribe-accounts.mdmarkdown733 B
references/solana-grpc-subscribe-blocks.mdmarkdown739 B
references/solana-grpc-subscribe-request.mdmarkdown969 B
references/solana-grpc-subscribe-slots.mdmarkdown642 B
references/solana-grpc-subscribe-transactions.mdmarkdown890 B
references/solana-overview.mdmarkdown1.3 KB
references/solana-rpc.mdmarkdown7.2 KB
references/solana-wallets.mdmarkdown921 B
references/wallets-account-kit.mdmarkdown1.2 KB
references/wallets-bundler.mdmarkdown832 B
references/wallets-details.mdmarkdown1.1 KB
references/wallets-gas-manager.mdmarkdown799 B
references/wallets-overview.mdmarkdown1.6 KB
references/wallets-smart-wallets.mdmarkdown1.1 KB
references/wallets-solana-notes.mdmarkdown692 B
references/wallets-supported-chains.mdmarkdown737 B
references/wallets-wallet-apis.mdmarkdown1.0 KB
references/webhooks-address-activity.mdmarkdown1.5 KB
references/webhooks-custom-webhooks.mdmarkdown1.2 KB
references/webhooks-details.mdmarkdown2.5 KB
references/webhooks-nft-activity.mdmarkdown1.4 KB
references/webhooks-overview.mdmarkdown1.5 KB
references/webhooks-verify-signatures.mdmarkdown1.5 KB
references/webhooks-webhook-payloads.mdmarkdown1.1 KB
references/webhooks-webhook-types.mdmarkdown1.0 KB
rules/authentication.mdmarkdown4.5 KB
rules/curl-workflow.mdmarkdown8.5 KB
rules/making-requests.mdmarkdown5.6 KB
rules/overview.mdmarkdown2.2 KB
rules/payment.mdmarkdown3.4 KB
rules/reference.mdmarkdown5.0 KB
rules/wallet-bootstrap.mdmarkdown2.4 KB

references/data-portfolio-apis.md

View on GitHub
---
id: references/data-portfolio-apis.md
name: 'Portfolio APIs'
description: 'Portfolio APIs provide consolidated wallet views (tokens, NFTs, and transaction history) across multiple networks in single requests.'
tags:
  - alchemy
  - data-apis
  - data
related:
  - data-token-api.md
  - data-nft-api.md
  - data-transfers-api.md
  - recipes-get-portfolio.md
updated: 2026-02-23
---
# Portfolio APIs

Consolidated wallet views (tokens, NFTs, transaction history) across multiple networks in single requests. All endpoints are `POST` with JSON bodies.

**Base URL**: `https://api.g.alchemy.com/data/v1/$ALCHEMY_API_KEY`

**Supported chains** (in `networks` array): `eth-mainnet`, `base-mainnet`, `polygon-mainnet`, `arb-mainnet`, `opt-mainnet`, `sol-mainnet`, and more.

---

## `POST /assets/tokens/by-address`

Returns fungible tokens (native + ERC-20 + SPL) with balances, prices, and metadata for one or more wallets across multiple networks.

### Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `addresses` | array | Yes | — | Wallet/network pairs (max 2 addresses, max 5 networks each) |
| `addresses[].address` | string | Yes | — | Wallet address |
| `addresses[].networks` | string[] | Yes | — | Network slugs to query |
| `withMetadata` | boolean | No | `true` | Include token metadata (name, symbol, decimals, logo) |
| `withPrices` | boolean | No | `true` | Include token prices |
| `includeNativeTokens` | boolean | No | `true` | Include native tokens (ETH, MATIC, etc.) |
| `includeErc20Tokens` | boolean | No | `true` | Include ERC-20 tokens |
| `pageKey` | string | No | — | Pagination cursor |

### Request

```bash
curl -s -X POST "https://api.g.alchemy.com/data/v1/$ALCHEMY_API_KEY/assets/tokens/by-address" \
  -H "Content-Type: application/json" \
  -d '{
    "addresses": [{
      "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "networks": ["eth-mainnet", "base-mainnet", "arb-mainnet"]
    }]
  }'
```

### Response

```json
{
  "data": {
    "tokens": [
      {
        "network": "eth-mainnet",
        "address": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
        "tokenAddress": null,
        "tokenBalance": "0x000000000000000000000000000000000000000000000001bdd951817729c4f9",
        "tokenMetadata": {
          "symbol": null,
          "decimals": null,
          "name": null,
          "logo": null
        },
        "tokenPrices": [
          {
            "currency": "usd",
            "value": "1970.69",
            "lastUpdatedAt": "2025-06-01T12:00:00Z"
          }
        ]
      },
      {
        "network": "eth-mainnet",
        "address": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
        "tokenAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
        "tokenBalance": "0x000000000000000000000000000000000000000000000000000000003b9aca00",
        "tokenMetadata": {
          "name": "USD Coin",
          "symbol": "USDC",
          "decimals": 6,
          "logo": "https://..."
        },
        "tokenPrices": [
          {
            "currency": "usd",
            "value": "0.9998",
            "lastUpdatedAt": "2025-06-01T12:00:00Z"
          }
        ]
      }
    ],
    "pageKey": null
  }
}
```

### Response Fields

| Field | Type | Description |
|-------|------|-------------|
| `data.tokens` | array | Token objects |
| `data.tokens[].network` | string | Network slug |
| `data.tokens[].address` | string | Wallet address |
| `data.tokens[].tokenAddress` | string | Token contract address (`null` for native token) |
| `data.tokens[].tokenBalance` | string | Raw balance (hex, use token decimals to convert) |
| `data.tokens[].tokenMetadata` | object | Token name, symbol, decimals, logo |
| `data.tokens[].tokenPrices` | array | Price entries per currency (each has currency, value, lastUpdatedAt) |
| `data.pageKey` | string | Pagination cursor (null if no more results) |

---

## `POST /assets/tokens/balances/by-address`

Returns raw token balances (without prices/metadata). More efficient when you only need balances.

### Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `addresses` | array | Yes | — | Wallet/network pairs (max 3 pairs, max 20 networks total) |
| `addresses[].address` | string | Yes | — | Wallet address |
| `addresses[].networks` | string[] | Yes | — | Network slugs |
| `includeNativeTokens` | boolean | No | `true` | Include native tokens |
| `includeErc20Tokens` | boolean | No | `true` | Include ERC-20 tokens |
| `pageKey` | string | No | — | Pagination cursor |

### Request

```bash
curl -s -X POST "https://api.g.alchemy.com/data/v1/$ALCHEMY_API_KEY/assets/tokens/balances/by-address" \
  -H "Content-Type: application/json" \
  -d '{
    "addresses": [{
      "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "networks": ["eth-mainnet", "base-mainnet", "arb-mainnet", "opt-mainnet", "polygon-mainnet"]
    }]
  }'
```

### Response

```json
{
  "data": {
    "tokens": [
      {
        "network": "eth-mainnet",
        "address": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
        "tokenAddress": null,
        "tokenBalance": "0x112210f47de98000"
      },
      {
        "network": "eth-mainnet",
        "address": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
        "tokenAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
        "tokenBalance": "0x3b9aca00"
      }
    ],
    "pageKey": null
  }
}
```

### Response Fields

| Field | Type | Description |
|-------|------|-------------|
| `data.tokens[].network` | string | Network slug |
| `data.tokens[].address` | string | Wallet address |
| `data.tokens[].tokenAddress` | string | Token contract address (`null` for native token) |
| `data.tokens[].tokenBalance` | string | Raw balance (hex) |
| `data.pageKey` | string | Pagination cursor |

---

## `POST /assets/nfts/by-address`

Returns NFTs owned by a wallet across multiple networks.

### Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `addresses` | array | Yes | — | Wallet/network pairs (max 2 pairs, max 15 networks each) |
| `addresses[].address` | string | Yes | — | Wallet address |
| `addresses[].networks` | string[] | Yes | — | Network slugs |
| `excludeFilters` | string[] | No | `["SPAM"]` | Exclude `"SPAM"`, `"AIRDROPS"` |
| `includeFilters` | string[] | No | — | Include only `"SPAM"`, `"AIRDROPS"` (mutually exclusive with excludeFilters) |
| `spamConfidenceLevel` | string | No | — | `"VERY_HIGH"`, `"HIGH"`, `"MEDIUM"`, `"LOW"` |
| `withMetadata` | boolean | No | `true` | Include NFT metadata |
| `pageKey` | string | No | — | Pagination cursor |
| `pageSize` | integer | No | `100` | Results per page (max 100) |
| `orderBy` | string | No | — | `"transferTime"` |
| `sortOrder` | string | No | — | `"asc"` or `"desc"` |

### Request

```bash
curl -s -X POST "https://api.g.alchemy.com/data/v1/$ALCHEMY_API_KEY/assets/nfts/by-address" \
  -H "Content-Type: application/json" \
  -d '{
    "addresses": [{
      "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "networks": ["eth-mainnet"]
    }],
    "withMetadata": true,
    "pageSize": 2
  }'
```

### Response

```json
{
  "data": {
    "ownedNfts": [
      {
        "network": "eth-mainnet",
        "address": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
        "contract": {
          "address": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
          "name": "BoredApeYachtClub",
          "symbol": "BAYC",
          "tokenType": "ERC721",
          "openSeaMetadata": { "collectionName": "Bored Ape Yacht Club", "floorPrice": 10.5 },
          "isSpam": false
        },
        "tokenId": "1234",
        "tokenType": "ERC721",
        "name": "Bored Ape #1234",
        "description": "...",
        "image": { "cachedUrl": "https://nft-cdn.alchemy.com/..." },
        "collection": { "name": "Bored Ape Yacht Club" },
        "acquiredAt": { "blockTimestamp": "2024-03-15T10:30:00.000Z" }
      }
    ],
    "totalCount": 42,
    "pageKey": "..."
  }
}
```

### Response Fields

| Field | Type | Description |
|-------|------|-------------|
| `data.ownedNfts` | array | NFT objects (same structure as NFT API's `getNFTsForOwner` plus `network` and `address` fields) |
| `data.ownedNfts[].network` | string | Network slug |
| `data.ownedNfts[].address` | string | Wallet address |
| `data.ownedNfts[].contract` | object | Contract info (address, name, symbol, tokenType, openSeaMetadata, isSpam) |
| `data.ownedNfts[].tokenId` | string | Token ID |
| `data.ownedNfts[].name` | string | NFT name |
| `data.ownedNfts[].image` | object | Image URLs |
| `data.ownedNfts[].acquiredAt` | object | Acquisition timestamp |
| `data.totalCount` | integer | Total NFTs across all pages |
| `data.pageKey` | string | Pagination cursor |

---

## `POST /assets/nfts/contracts/by-address`

Returns NFT collections (contracts) owned by a wallet across multiple networks.

### Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `addresses` | array | Yes | — | Wallet/network pairs (max 2 pairs, max 15 networks each) |
| `addresses[].address` | string | Yes | — | Wallet address |
| `addresses[].networks` | string[] | Yes | — | Network slugs |
| `withMetadata` | boolean | No | `true` | Include contract metadata |
| `pageKey` | string | No | — | Pagination cursor |
| `pageSize` | integer | No | `100` | Results per page (max 100) |
| `orderBy` | string | No | — | `"transferTime"` |
| `sortOrder` | string | No | — | `"asc"` or `"desc"` |

### Request

```bash
curl -s -X POST "https://api.g.alchemy.com/data/v1/$ALCHEMY_API_KEY/assets/nfts/contracts/by-address" \
  -H "Content-Type: application/json" \
  -d '{
    "addresses": [{
      "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "networks": ["eth-mainnet"]
    }],
    "withMetadata": true
  }'
```

### Response

```json
{
  "data": {
    "contracts": [
      {
        "network": "eth-mainnet",
        "address": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
        "contract": {
          "address": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
          "name": "BoredApeYachtClub",
          "symbol": "BAYC",
          "totalSupply": "10000",
          "tokenType": "ERC721",
          "contractDeployer": "0xaba7161a7fb69c88e16ed9f455ce62b791ee4d03",
          "deployedBlockNumber": 12287507,
          "openSeaMetadata": {
            "collectionName": "Bored Ape Yacht Club",
            "floorPrice": 10.5
          },
          "isSpam": false,
          "totalBalance": "1",
          "numDistinctTokensOwned": "1",
          "displayNft": {
            "tokenId": "1234",
            "name": "Bored Ape #1234"
          },
          "image": {
            "cachedUrl": "https://nft-cdn.alchemy.com/...",
            "thumbnailUrl": "https://nft-cdn.alchemy.com/...",
            "pngUrl": "https://nft-cdn.alchemy.com/...",
            "contentType": "image/png",
            "originalUrl": "ipfs://..."
          }
        }
      }
    ],
    "totalCount": 5,
    "pageKey": null
  }
}
```

### Response Fields

| Field | Type | Description |
|-------|------|-------------|
| `data.contracts` | array | Contract objects |
| `data.contracts[].network` | string | Network slug |
| `data.contracts[].address` | string | Wallet address |
| `data.contracts[].contract` | object | Contract info (same as NFT API `getContractMetadata`) |
| `data.contracts[].contract.totalBalance` | string | Total NFTs owned from this contract |
| `data.contracts[].contract.numDistinctTokensOwned` | string | Number of distinct token IDs owned |
| `data.contracts[].contract.displayNft` | object | Representative NFT (tokenId, name) |
| `data.contracts[].contract.image` | object | Image URLs for the display NFT |
| `data.totalCount` | integer | Total collections |
| `data.pageKey` | string | Pagination cursor |

---

## `POST /transactions/history/by-address` (Beta)

Returns transaction history for a wallet across networks.

### Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `addresses` | array | Yes | — | Wallet/network pairs (max 1 pair, max 2 networks) |
| `addresses[].address` | string | Yes | — | Wallet address |
| `addresses[].networks` | string[] | Yes | — | Network slugs (beta: `eth-mainnet`, `base-mainnet` only) |
| `before` | string | No | — | Cursor for previous page |
| `after` | string | No | — | Cursor for next page |
| `limit` | integer | No | `25` | Results per page (max 50) |

### Request

```bash
curl -s -X POST "https://api.g.alchemy.com/data/v1/$ALCHEMY_API_KEY/transactions/history/by-address" \
  -H "Content-Type: application/json" \
  -d '{
    "addresses": [{
      "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "networks": ["eth-mainnet"]
    }],
    "limit": 5
  }'
```

### Response

```json
{
  "transactions": [
    {
      "network": "eth-mainnet",
      "hash": "0x3847245c01829b043431067fb2bfa95f7b5bdc7e...",
      "timeStamp": "2025-06-01T10:30:00.000Z",
      "blockNumber": "20000000",
      "blockHash": "0x...",
      "nonce": "42",
      "transactionIndex": "5",
      "fromAddress": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
      "toAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
      "contractAddress": null,
      "value": "0",
      "gasUsed": "46000",
      "effectiveGasPrice": "15000000000",
      "cumulativeGasUsed": "1234567",
      "logs": [],
      "internalTxns": []
    }
  ],
  "before": "cursor_prev...",
  "after": "cursor_next...",
  "totalCount": 500
}
```

### Response Fields

| Field | Type | Description |
|-------|------|-------------|
| `transactions` | array | Transaction objects |
| `transactions[].network` | string | Network slug |
| `transactions[].hash` | string | Transaction hash |
| `transactions[].timeStamp` | string | ISO 8601 timestamp |
| `transactions[].blockNumber` | string | Block number |
| `transactions[].fromAddress` | string | Sender address |
| `transactions[].toAddress` | string | Recipient address |
| `transactions[].contractAddress` | string | Deployed contract address (null if not a deployment) |
| `transactions[].value` | string | ETH value transferred |
| `transactions[].gasUsed` | string | Gas used |
| `transactions[].effectiveGasPrice` | string | Effective gas price |
| `transactions[].logs` | array | Event logs |
| `transactions[].internalTxns` | array | Internal transactions |
| `before` | string | Cursor for previous page |
| `after` | string | Cursor for next page |
| `totalCount` | integer | Total transactions |

---

## Notes

- Use the smallest `networks` list you need — each network adds to response time.
- NFT metadata can be missing or malformed. Always handle null fields.
- The Transactions endpoint is in beta and only supports Ethereum and Base mainnets.
- Paginate large wallets using `pageKey` (for asset endpoints) or `before`/`after` (for transactions).

## Agentic Gateway

This API is also available via `https://x402.alchemy.com/data/v1/...` without an API key.
See the `agentic-gateway` skill for SIWE authentication and x402 payment setup.

## Official Docs
- [Portfolio APIs Overview](https://www.alchemy.com/docs/reference/portfolio-apis)
- [Tokens by Address](https://www.alchemy.com/docs/data/portfolio-apis/portfolio-api-endpoints/portfolio-api-endpoints/get-tokens-by-address)
- [Token Balances by Address](https://www.alchemy.com/docs/data/portfolio-apis/portfolio-api-endpoints/portfolio-api-endpoints/get-token-balances-by-address)
- [NFTs by Address](https://www.alchemy.com/docs/data/portfolio-apis/portfolio-api-endpoints/portfolio-api-endpoints/get-nfts-by-address)
- [NFT Contracts by Address](https://www.alchemy.com/docs/data/portfolio-apis/portfolio-api-endpoints/portfolio-api-endpoints/get-nft-contracts-by-address)
- [Transaction History by Address (Beta)](https://www.alchemy.com/docs/data/beta-apis/beta-api-endpoints/beta-api-endpoints/get-transaction-history-by-address)
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall