LedgerCore
Query Engine

Unified Query Engine

Query multiple data sources through a single, powerful interface.

Overview

The Unified Query Engine provides a SQL-like interface to query all LedgerLink data sources through a single endpoint.

Endpoint

POST /api/v1/query

Request Format

{
  "connector": "market-data",
  "dataType": "candles",
  "filters": {
    "symbol": "BTC-USD",
    "interval": "1h"
  },
  "sort": { "timestamp": -1 },
  "limit": 100,
  "offset": 0
}

Example

const response = await fetch('http://localhost:8090/api/v1/query', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${apiKey}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    connector: 'market-data',
    dataType: 'candles',
    filters: {
      symbol: 'BTC-USD',
      interval: '1h'
    },
    limit: 100
  })
});

const data = await response.json();

Supported Connectors

  • market-data - Market intelligence data
  • kyt - Know Your Transaction
  • kye - Know Your Entity
  • kya - Know Your Address
  • treasury - Corporate treasury data
  • exchanges - Exchange registry

Next Steps

Was this page helpful?