@noves/noves-sdk
Version:
Noves Developer Kit
55 lines (40 loc) • 1.69 kB
Markdown
The Pricing API provides functionality to retrieve pricing information for tokens across various blockchains.
The Pricing API supports the following ecosystems:
- [EVM-based blockchains](./evm.md) (Ethereum, Binance Smart Chain, Polygon, etc.)
- [SVM-based blockchains](./svm.md) (Solana)
- [UTXO-based blockchains](./utxo.md) (Bitcoin, Cardano)
- [Cosmos-based blockchains](./cosmos.md) (Cosmos Hub, Osmosis, etc.)
- [Move-based blockchains](./move.md) (Aptos, Sui, etc.)
```bash
npm install @noves/noves-sdk
```
```typescript
import { Pricing } from "@noves/noves-sdk";
// Initialize the pricing client for the ecosystem you want to use
const evmPricing = Pricing.evm("YOUR_API_KEY");
const svmPricing = Pricing.svm("YOUR_API_KEY");
const utxoPricing = Pricing.utxo("YOUR_API_KEY");
const cosmosPricing = Pricing.cosmos("YOUR_API_KEY");
const movePricing = Pricing.move("YOUR_API_KEY");
// Examples
async function examples() {
// Get supported chains
const evmChains = await evmPricing.getChains();
const utxoChains = await utxoPricing.getChains();
// Get token price
const tokenPrice = await evmPricing.getPrice("eth", "0x1234567890123456789012345678901234567890");
// Get price from a specific pool
const poolPrice = await evmPricing.getPriceFromPool(
"eth",
"0x1234567890123456789012345678901234567890", // pool address
"0x0987654321098765432109876543210987654321" // token address
);
}
```
For detailed API documentation for each ecosystem, please refer to the specific documentation pages linked above.