Documentation Index
Fetch the complete documentation index at: https://www.dynamic.xyz/docs/llms.txt
Use this file to discover all available pages before exploring further.
getMoonPayCurrencies
Fetches the list of crypto currencies supported by MoonPay for a given chain and network, filtered to active currencies only. Use this to build a token picker before generating a MoonPay onramp URL withgetMoonPayUrl.
Requires a MoonPay onramp to be enabled and configured for your environment in the Dynamic dashboard.
Usage
Parameters
| Parameter | Type | Description |
|---|---|---|
chain | Chain | The blockchain to fetch supported currencies for (e.g., 'EVM', 'SOL'). |
networkId | string (optional) | The network ID to filter currencies by (e.g., '1' for Ethereum mainnet, '137' for Polygon). |
client | DynamicClient (optional) | The Dynamic client instance. Only required when using multiple clients. |
Returns
Promise<MoonPayCurrency[]> - A promise that resolves to an array of supported MoonPay currencies. Returns an empty array if none are available.
Examples
Build a token picker
Check if a token is supported
Errors
| Error | Description |
|---|---|
MoonPayCurrenciesFetchError | The request to fetch supported MoonPay currencies failed. |
Prerequisites
- MoonPay must be enabled and configured as an onramp provider for your environment in the Dynamic dashboard.
Related functions
- getMoonPayUrl - Get a signed MoonPay onramp URL for a wallet
- getCoinbaseBuyUrl - Get a Coinbase onramp buy URL