Link Quote
Welcome to the Link Quote API Reference. This service provides real-time digital asset pricing and rate aggregation from multiple market data providers.
Base URL: https://api.ledgerlink.ai/v1
Overview
Link Quote is a microservice designed to aggregate and provide real-time pricing data for digital assets from multiple market data providers. It serves as a centralized quote service for the LedgerLink platform, delivering accurate and reliable market rates for cryptocurrencies and other digital assets.
Technology Stack:
- NestJS backend framework with TypeScript
- PostgreSQL database with TypeORM
- CoinMarketCap API integration
- Pyth Network (Hermes) integration
- ActiveMQ for event publishing
- RESTful API with Swagger/OpenAPI documentation
Core Capabilities
- Multi-Provider Aggregation: Fetches rates from CoinMarketCap and Pyth Network simultaneously
- Smart Provider Selection: Asset-specific or category-based provider routing
- Real-time Pricing: Current market rates with sub-second latency
- Historical Data: Store and query historical rate data
- Event Publishing: Publishes valuation events to ActiveMQ for downstream services
- Asset Management: Full CRUD operations for digital assets
- Category Management: Organize assets into configurable categories
- Provider Configuration: Flexible provider-to-asset and provider-to-category mappings
Architecture
Data Flow
- Rate Request → Client requests rate for specific asset code
- Asset Resolution → System looks up asset in database
- Provider Selection → Determines which providers to query (asset-specific or category-based)
- Price Aggregation → Fetches rates from multiple providers in parallel
- Average Calculation → Computes weighted average from valid responses
- Data Persistence → Stores rate in PostgreSQL with timestamp
- Event Publishing → Publishes valuation event to ActiveMQ
- Response → Returns aggregated rate to client
External Integrations
- CoinMarketCap: Professional cryptocurrency market data
- Pyth Network: Real-time price feeds via Hermes client
- ActiveMQ: Message queue for publishing valuation events
API Endpoints
Rate Management
- POST /rates - Create/fetch a new rate for an asset
- GET /rates - List historical rates with filtering and pagination
Asset Management
- POST /assets - Create a new digital asset
- GET /assets - List all assets with filtering
- GET /assets/:id - Get a specific asset by ID
- PUT /assets/:id - Update an existing asset
- PATCH /assets/:id/static-value - Update asset static value
- DELETE /assets/:id - Delete an asset
Category Management
- POST /categories - Create a new asset category
- GET /categories - List all categories
- GET /categories/:id - Get a specific category
- PUT /categories/:id - Update a category
- DELETE /categories/:id - Delete a category
Provider Management
- POST /providers - Create a new price provider
- GET /providers - List all providers
- GET /providers/:id - Get a specific provider
- PUT /providers/:id - Update a provider
- DELETE /providers/:id - Delete a provider
Provider Mappings
-
POST /asset-providers - Map provider to asset
-
DELETE /asset-providers/:assetId/providers/:providerId - Remove asset-provider mapping
-
POST /category-providers - Map provider to category
-
DELETE /category-providers/:id/category/:categoryId - Remove category-provider mapping
Note: There are currently no GET endpoints to list existing mappings. Mappings can be queried through the asset/category GET endpoints which include their associated providers.
Authentication
Link Quote is accessed through the Link Dashboard, which handles all authentication via the Auth Server (BFF - Backend for Frontend).
Architecture:
User → Link Dashboard → Auth Server/BFF (Authentication) → Link Quote Service
How It Works:
- Users authenticate with the Link Dashboard (username/password)
- The Auth Server validates JWT tokens and session cookies
- Authenticated requests are proxied to Link Quote at
/api/link-quote/v1/* - No role-based access control (RBAC) - all authenticated users have full access
- Link Quote service itself does not implement authentication middleware
- Direct service-to-service calls within the secure network are unauthenticated
For Direct Service Access (Development/Testing):
- Local Link Quote instances run without authentication
- Ensure proper network isolation
- Access Swagger docs at
http://localhost:3000/api
See the Getting Started Guide for integration details.
Supported Digital Assets
Link Quote supports a wide range of digital assets including:
- Major Cryptocurrencies: Bitcoin (BTC), Ethereum (ETH), USDC, USDT, SOL, etc.
- Stablecoins: USDC, USDT, DAI, PYUSD
- ERC-20 Tokens: Various Ethereum-based tokens
- Custom Assets: Add any digital asset via the Asset Management API
Assets are organized into categories for efficient provider selection and rate retrieval.
Rate Providers
CoinMarketCap
- Professional cryptocurrency market data
- Real-time and historical pricing
- Requires API key
Pyth Network (Hermes)
- Decentralized oracle network
- Sub-second price updates
- On-chain price feeds
Provider selection is configurable per asset or category, with automatic failover if providers are unavailable.
Event Publishing
Link Quote publishes valuation events to ActiveMQ for real-time monitoring:
Event Types:
VALUATION_REQUESTED- When a rate request is receivedVALUATION_PROCESSED- When rate is successfully calculatedERROR- When valuation fails
Events include metadata such as asset ID, value, currency, and processing details.
Next Steps
- Getting Started - Learn the basics of API integration
- API Reference - Explore detailed endpoint documentation
- Error Handling - Handle errors gracefully
- FAQ - Find answers to common questions
Need Help? Contact helpdesk@ledgerlink.ai for assistance with your Link Quote integration.