From 9889f7851a5aae6ba7293806dce844754f56e131 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Fri, 14 Aug 2026 09:05:09 +0000 Subject: [PATCH 1/3] docs(assets-controllers): add spot-prices example URL for dev verification Add an example Price API v3/spot-prices URL above SPOT_PRICES_SUPPORT_INFO so developers can verify an assetId is supported before adding a new entry. Co-authored-by: prithpal.sooriya --- .../assets-controllers/src/token-prices-service/codefi-v2.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/assets-controllers/src/token-prices-service/codefi-v2.ts b/packages/assets-controllers/src/token-prices-service/codefi-v2.ts index afda203d7f..295640cb37 100644 --- a/packages/assets-controllers/src/token-prices-service/codefi-v2.ts +++ b/packages/assets-controllers/src/token-prices-service/codefi-v2.ts @@ -246,6 +246,7 @@ export const getNativeTokenAddress = (chainId: Hex): Hex => // Source: https://github.com/consensys-vertical-apps/va-mmcx-price-api/blob/main/src/constants/slip44.ts // This list is ONLY for chains that are supported by the Price API v3/spot-prices endpoint. // Please check that endpoint returns a price for the given assetId before including it in this list. +// Example: https://price.api.cx.metamask.io/v3/spot-prices?assetIds=eip155:5042/erc20:0x3600000000000000000000000000000000000000&vsCurrency=usd&includeMarketData=true&cacheOnly=false // Please include a comment with the name of the chain and the native symbol. // Please keep the list sorted by chain ID. export const SPOT_PRICES_SUPPORT_INFO = { From a85f53293a7665ead50a115d30f5e4c1a0c619d5 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Fri, 14 Aug 2026 09:06:53 +0000 Subject: [PATCH 2/3] docs(assets-controllers): add supportedNetworks link, shorten comment Co-authored-by: prithpal.sooriya --- .../src/token-prices-service/codefi-v2.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/assets-controllers/src/token-prices-service/codefi-v2.ts b/packages/assets-controllers/src/token-prices-service/codefi-v2.ts index 295640cb37..7ff08c8625 100644 --- a/packages/assets-controllers/src/token-prices-service/codefi-v2.ts +++ b/packages/assets-controllers/src/token-prices-service/codefi-v2.ts @@ -244,11 +244,10 @@ export const getNativeTokenAddress = (chainId: Hex): Hex => chainIdToNativeTokenAddress[chainId] ?? ZERO_ADDRESS; // Source: https://github.com/consensys-vertical-apps/va-mmcx-price-api/blob/main/src/constants/slip44.ts -// This list is ONLY for chains that are supported by the Price API v3/spot-prices endpoint. -// Please check that endpoint returns a price for the given assetId before including it in this list. -// Example: https://price.api.cx.metamask.io/v3/spot-prices?assetIds=eip155:5042/erc20:0x3600000000000000000000000000000000000000&vsCurrency=usd&includeMarketData=true&cacheOnly=false -// Please include a comment with the name of the chain and the native symbol. -// Please keep the list sorted by chain ID. +// Price API v3/spot-prices chains only — verify support before adding: +// https://price.api.cx.metamask.io/v2/supportedNetworks +// https://price.api.cx.metamask.io/v3/spot-prices?assetIds=eip155:5042/erc20:0x3600000000000000000000000000000000000000&vsCurrency=usd&includeMarketData=true&cacheOnly=false +// Include chain name + native symbol. Keep sorted by chain ID. export const SPOT_PRICES_SUPPORT_INFO = { '0x1': 'eip155:1/slip44:60', // Ethereum Mainnet - Native symbol: ETH '0xa': 'eip155:10/slip44:60', // OP Mainnet - Native symbol: ETH From fb4d1bce992192c9b36a37e758a7b4a0c92dad68 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Fri, 14 Aug 2026 09:35:37 +0000 Subject: [PATCH 3/3] docs(assets-controllers): restructure spot-prices verification comments Co-authored-by: Prithpal Sooriya --- .../assets-controllers/src/token-prices-service/codefi-v2.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/assets-controllers/src/token-prices-service/codefi-v2.ts b/packages/assets-controllers/src/token-prices-service/codefi-v2.ts index 7ff08c8625..bd00f5dfed 100644 --- a/packages/assets-controllers/src/token-prices-service/codefi-v2.ts +++ b/packages/assets-controllers/src/token-prices-service/codefi-v2.ts @@ -243,10 +243,10 @@ const chainIdToNativeTokenAddress: Record = { export const getNativeTokenAddress = (chainId: Hex): Hex => chainIdToNativeTokenAddress[chainId] ?? ZERO_ADDRESS; -// Source: https://github.com/consensys-vertical-apps/va-mmcx-price-api/blob/main/src/constants/slip44.ts // Price API v3/spot-prices chains only — verify support before adding: +// Source: https://github.com/consensys-vertical-apps/va-mmcx-price-api/blob/main/src/constants/slip44.ts // https://price.api.cx.metamask.io/v2/supportedNetworks -// https://price.api.cx.metamask.io/v3/spot-prices?assetIds=eip155:5042/erc20:0x3600000000000000000000000000000000000000&vsCurrency=usd&includeMarketData=true&cacheOnly=false +// https://price.api.cx.metamask.io/v3/spot-prices?assetIds=&vsCurrency=usd // Include chain name + native symbol. Keep sorted by chain ID. export const SPOT_PRICES_SUPPORT_INFO = { '0x1': 'eip155:1/slip44:60', // Ethereum Mainnet - Native symbol: ETH