Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions fern/api-reference/data/nft-api/nft-api-overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,42 @@ Rather than searching, indexing, and storing data yourself - you can now make on

* All NFTs owned by an address
* Metadata and attributes for a specific NFT token

## Supported Networks

Use the network slug in the request URL: `https://{network}.g.alchemy.com/nft/v3/{apiKey}/...`

**Mainnets:**

| Network Slug | | |
|--------------|--------------|--------------|
| `abstract-mainnet` | `alchemy-internal` | `anime-mainnet` |
| `apechain-mainnet` | `arb-mainnet` | `arbnova-mainnet` |
| `avax-mainnet` | `base-mainnet` | `berachain-mainnet` |
| `blast-mainnet` | `bnb-mainnet` | `celo-mainnet` |
| `eth-mainnet` | `gnosis-mainnet` | `lens-mainnet` |
| `linea-mainnet` | `mythos-mainnet` | `opt-mainnet` |
| `polygon-mainnet` | `ronin-mainnet` | `rootstock-mainnet` |
| `scroll-mainnet` | `settlus-mainnet` | `shape-mainnet` |
| `soneium-mainnet` | `starknet-mainnet` | `story-mainnet` |
| `unichain-mainnet` | `worldchain-mainnet` | `zetachain-mainnet` |
| `zksync-mainnet` | `zora-mainnet` | |

**Testnets:**

| Network Slug | | |
|--------------|--------------|--------------|
| `abstract-testnet` | `alchemy-sepolia` | `anime-sepolia` |
| `apechain-curtis` | `arb-sepolia` | `avax-fuji` |
| `base-sepolia` | `blast-sepolia` | `celo-sepolia` |
| `eth-sepolia` | `gnosis-chiado` | `lens-sepolia` |
| `linea-sepolia` | `monad-testnet` | `opt-sepolia` |
| `polygon-amoy` | `ronin-saigon` | `rootstock-testnet` |
| `scroll-sepolia` | `settlus-septestnet` | `shape-sepolia` |
| `soneium-minato` | `starknet-sepolia` | `story-aeneid` |
| `unichain-sepolia` | `worldchain-sepolia` | `zetachain-testnet` |
| `zksync-sepolia` | `zora-sepolia` | |

<Info>
Check the [Chains](https://dashboard.alchemy.com/chains) page for the most up-to-date product and chain support!
</Info>
42 changes: 42 additions & 0 deletions fern/api-reference/data/portfolio-apis/portfolio-apis.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,48 @@ Portfolio APIs include *everything* you need to build a view of a user's assets:
* 🪨 **Long Term Partners**: We have 7+ years of experience supporting the largest customers that are onchain and will be around to support you for the long term.
* ⛰️**Scalable**: These APIs power some of the biggest Wallets in the space - rest easy knowing that we can scale with you.

## Supported Networks

Pass network slugs in the `networks` query parameter to fetch data across multiple chains in a single request.

**Mainnets:**

| Network Slug | | |
|--------------|--------------|--------------|
| `abstract-mainnet` | `alchemy-internal` | `anime-mainnet` |
| `apechain-mainnet` | `arb-mainnet` | `arbnova-mainnet` |
| `avax-mainnet` | `base-mainnet` | `berachain-mainnet` |
| `blast-mainnet` | `bnb-mainnet` | `celo-mainnet` |
| `eth-mainnet` | `gnosis-mainnet` | `hyperliquid-mainnet` |
| `ink-mainnet` | `lens-mainnet` | `linea-mainnet` |
| `mythos-mainnet` | `opt-mainnet` | `polygon-mainnet` |
| `ronin-mainnet` | `rootstock-mainnet` | `scroll-mainnet` |
| `settlus-mainnet` | `shape-mainnet` | `soneium-mainnet` |
| `story-mainnet` | `unichain-mainnet` | `worldchain-mainnet` |
| `zetachain-mainnet` | `zksync-mainnet` | `zora-mainnet` |

**Testnets:**

| Network Slug | | |
|--------------|--------------|--------------|
| `abstract-testnet` | `alchemy-sepolia` | `anime-sepolia` |
| `apechain-curtis` | `arb-sepolia` | `avax-fuji` |
| `base-sepolia` | `blast-sepolia` | `bnb-testnet` |
| `celo-sepolia` | `eth-sepolia` | `gensyn-testnet` |
| `gnosis-chiado` | `ink-sepolia` | `lens-sepolia` |
| `linea-sepolia` | `monad-testnet` | `opt-sepolia` |
| `polygon-amoy` | `ronin-saigon` | `rootstock-testnet` |
| `scroll-sepolia` | `settlus-septestnet` | `shape-sepolia` |
| `soneium-minato` | `sonic-blaze` | `story-aeneid` |
| `tea-sepolia` | `unichain-sepolia` | `worldchain-sepolia` |
| `zetachain-testnet` | `zksync-sepolia` | `zora-sepolia` |

<Info>
Check the [Chains](https://dashboard.alchemy.com/chains) page for the most up-to-date product and chain support!
</Info>

## Endpoints

| [**Get Tokens By Wallet**](/reference/get-tokens-by-address) | [**NFTs By Wallet**](/reference/get-nfts-by-address) | [Transaction History](/reference/get-transaction-history-by-address) |
| ----------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| ![Image 1](https://alchemyapi-res.cloudinary.com/image/upload/v1764179965/docs/api-reference/data/cc619a4df5351c534c2c0f6c718d26336600c07275d076dd15fe80e1964aaee5-Screenshot_2025-02-24_at_4.22.57_PM.png) | ![Image 2](https://alchemyapi-res.cloudinary.com/image/upload/v1764179966/docs/api-reference/data/b6a2d47e1d0a755c480ec042ebfd011dcb7403c4338ded3c1a8e0edf106bc848-Screenshot_2025-02-24_at_4.22.10_PM.png) | ![Image 3](https://alchemyapi-res.cloudinary.com/image/upload/v1764179967/docs/api-reference/data/4b35a354494bf54afdd84697b1cabf8e199c9863394f50066727892e497111f1-Screenshot_2025-02-24_at_4.23.35_PM.png) |
Expand Down
168 changes: 22 additions & 146 deletions fern/api-reference/data/prices-api/prices-api-quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,28 @@ The Prices API includes the following REST endpoints:

***

# Supported Networks

For Token Prices By Address and Historical Prices endpoints, pass the network slug in the `network` field of your request body.

**Mainnets:**

| Network Slug | | |
|--------------|--------------|--------------|
| `apechain-mainnet` | `arb-mainnet` | `arbnova-mainnet` |
| `avax-mainnet` | `base-mainnet` | `blast-mainnet` |
| `bnb-mainnet` | `eth-mainnet` | `fantom-mainnet` |
| `gnosis-mainnet` | `linea-mainnet` | `metis-mainnet` |
| `opbnb-mainnet` | `opt-mainnet` | `polygon-mainnet` |
| `polygonzkevm-mainnet` | `scroll-mainnet` | `solana-mainnet` |
| `worldchain-mainnet` | `zetachain-mainnet` | `zksync-mainnet` |

<Info>
Check the [Chains](https://dashboard.alchemy.com/chains) page for the most up-to-date product and chain support!
</Info>

***

# Getting Started

## Via HTTP Requests
Expand Down Expand Up @@ -174,149 +196,3 @@ Execute the script from your command line:
```
</CodeGroup>

## Via Node Fetch

`node-fetch` is a lightweight option for making HTTP requests with Javascript.

### Installation

Install the `node-fetch` package using `npm` or `yarn`:

<CodeGroup>
```shell npm
npm install node-fetch
```

```shell yarn
yarn add node-fetch
```
</CodeGroup>

### Usage

Create a new JavaScript file (e.g., `prices-fetch-script.js`) and add the following code.

<CodeGroup>
```js By Symbol
// prices-fetch-script.js


// Replace with your Alchemy API key:
const apiKey = "YOUR_ALCHEMY_API_KEY";
const fetchURL = `https://api.g.alchemy.com/prices/v1/${apiKey}/tokens/by-symbol`;

// Define the symbols you want to fetch prices for.
const symbols = ["ETH", "BTC", "USDT"];

const params = new URLSearchParams();
symbols.forEach(symbol => params.append('symbols', symbol));

const urlWithParams = `${fetchURL}?${params.toString()}`;

const requestOptions = {
method: 'GET',
headers: {
'Content-Type': 'application/json',
},
};

fetch(urlWithParams, requestOptions)
.then(response => response.json())
.then(data => {
console.log("Token Prices By Symbol:");
console.log(JSON.stringify(data, null, 2));
})
.catch(error => console.error('Error:', error));
```

```js By Address
// prices-fetch-script.js


// Replace with your Alchemy API key:
const apiKey = "YOUR_ALCHEMY_API_KEY";
const fetchURL = `https://api.g.alchemy.com/prices/v1/${apiKey}/tokens/by-address`;

// Define the network and contract addresses you want to fetch prices for.
const requestBody = {
addresses: [
{
network: "eth-mainnet",
address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" // USDC
},
{
network: "eth-mainnet",
address: "0xdac17f958d2ee523a2206206994597c13d831ec7" // USDT
}
]
};

const requestOptions = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${apiKey}`,
},
body: JSON.stringify(requestBody),
};

fetch(fetchURL, requestOptions)
.then(response => response.json())
.then(data => {
console.log("Token Prices By Address:");
console.log(JSON.stringify(data, null, 2));
})
.catch(error => console.error('Error:', error));
```
</CodeGroup>

### Running the Script

Execute the script from your command line:

<CodeGroup>
```bash bash
node prices-fetch-script.js
```
</CodeGroup>

**Expected Output:**

<CodeGroup>
```json json
{
"data": [
{
"symbol": "ETH",
"prices": [
{
"currency": "USD",
"value": "3000.00",
"lastUpdatedAt": "2024-04-27T12:34:56Z"
}
],
"error": null},
{
"symbol": "BTC",
"prices": [
{
"currency": "USD",
"value": "45000.00",
"lastUpdatedAt": "2024-04-27T12:34:56Z"
}
],
"error": null},
{
"symbol": "USDT",
"prices": [
{
"currency": "USD",
"value": "1.00",
"lastUpdatedAt": "2024-04-27T12:34:56Z"
}
],
"error": null}
]
}
```
</CodeGroup>
46 changes: 46 additions & 0 deletions fern/api-reference/data/token-api/token-api-overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,52 @@ slug: reference/token-api-overview

With the Token API, you can retrieve token balances, metadata, and more. Easily request information on specific tokens such as **metadata** or **balances**.

## Supported Networks

Use the network slug in the request URL: `https://{network}.g.alchemy.com/v2/{apiKey}`

**Mainnets:**

| Network Slug | | |
|--------------|--------------|--------------|
| `abstract-mainnet` | `anime-mainnet` | `apechain-mainnet` |
| `arb-mainnet` | `arbnova-mainnet` | `avax-mainnet` |
| `base-mainnet` | `berachain-mainnet` | `blast-mainnet` |
| `bnb-mainnet` | `celo-mainnet` | `eth-mainnet` |
| `eth-mainnetbeacon` | `gensyn-mainnet` | `gnosis-mainnet` |
| `hyperliquid-mainnet` | `ink-mainnet` | `lens-mainnet` |
| `linea-mainnet` | `monad-mainnet` | `mythos-mainnet` |
| `opt-mainnet` | `polygon-mainnet` | `ronin-mainnet` |
| `rootstock-mainnet` | `scroll-mainnet` | `settlus-mainnet` |
| `shape-mainnet` | `soneium-mainnet` | `story-mainnet` |
| `unichain-mainnet` | `worldchain-mainnet` | `zetachain-mainnet` |
| `zksync-mainnet` | `zora-mainnet` | |

**Testnets:**

| Network Slug | | |
|--------------|--------------|--------------|
| `abstract-testnet` | `anime-sepolia` | `apechain-curtis` |
| `arb-sepolia` | `avax-fuji` | `base-sepolia` |
| `berachain-artio` | `berachain-bartio` | `berachain-bepolia` |
| `blast-sepolia` | `bnb-testnet` | `celo-alfajores` |
| `celo-sepolia` | `eth-holesky` | `eth-holeskybeacon` |
| `eth-hoodi` | `eth-hoodibeacon` | `eth-sepolia` |
| `eth-sepoliabeacon` | `gensyn-testnet` | `gnosis-chiado` |
| `hyperliquid-testnet` | `ink-sepolia` | `lens-sepolia` |
| `linea-sepolia` | `monad-testnet` | `opt-sepolia` |
| `polygon-amoy` | `ronin-saigon` | `rootstock-testnet` |
| `scroll-sepolia` | `settlus-septestnet` | `shape-sepolia` |
| `soneium-minato` | `story-aeneid` | `tea-sepolia` |
| `unichain-sepolia` | `worldchain-sepolia` | `zetachain-testnet` |
| `zksync-sepolia` | `zora-sepolia` | |

<Info>
Check the [Chains](https://dashboard.alchemy.com/chains) page for the most up-to-date product and chain support!
</Info>

## Endpoints

Alchemy currently supports the following [Token API Endpoints](/reference/token-api):

* [`alchemy_getTokenAllowance`](/reference/alchemy-gettokenallowance): Returns the amount which the sender is allowed to withdraw from the owner.
Expand Down
Loading
Loading