Documentation
API Reference
Prices
ℹ️

To interact with the Cede SDK, you need to create an instance of the SDK and register at least one exchange instance. Refer to the General info section for details.

Get prices

Provides average prices in USD for all supported tokens. The average token price is calculated based on the prices from all supported exchanges listing the token.

method: getPrices
params:

  • exchangeId - string, optional
    The exchange ID to get prices from. If not provided, the SDK will get prices from all supported exchanges and calculate the average price. If you provide an exchange ID, make sure the token is listed on the exchange.

response structure: Promise<{ [tokenSymbol: string]: number }>

const prices = await cedeSDK.api.getPrices();