OS Trading Engine
API Reference
Endpoints
Data Sources

Data Sources

Check the configuration status of external data sources.


Endpoints Overview

MethodEndpointDescription
GET/api/v1/data-sources/statusGet data source status

This endpoint requires JWT authentication.


Get Status

Check which data sources are configured and available.

GET /api/v1/data-sources/status

Response

Success (200)

{
  "pythNetwork": {
    "configured": true
  },
  "pythSolPriceFeed": {
    "configured": true
  },
  "jupiter": {
    "configured": true
  },
  "dexscreener": {
    "configured": true
  },
  "liquidityChecks": {
    "configured": true
  },
  "signalGeneration": {
    "configured": true
  }
}

Response Fields

FieldTypeDescription
pythNetwork.configuredbooleanPyth Price Service URL configured
pythSolPriceFeed.configuredbooleanSOL/USD price feed ID configured
jupiter.configuredbooleanJupiter API key configured
dexscreener.configuredbooleanDexScreener URL configured
liquidityChecks.configuredbooleanLiquidity checking available
signalGeneration.configuredbooleanSignal generation available

For security, this endpoint only returns boolean configuration status. Actual URLs, API keys, and other sensitive values are never exposed.


Data Source Details

Pyth Network

Real-time SOL/USD price feed via Server-Sent Events (SSE).

Environment Variables:

  • PYTH_PRICE_SERVICE_URL - Pyth Hermes endpoint
  • PYTH_PRICE_FEED_ID_SOL_USD - SOL/USD feed ID

Jupiter Aggregator

DEX aggregator for swap execution and price quotes.

Environment Variables:

  • JUPITER_API_KEY - Jupiter API key (required)

DexScreener

Token price and liquidity data.

Environment Variables:

  • DEXSCREENER_URL - DexScreener API endpoint

Example

curl -X GET "https://your-instance.com/api/v1/data-sources/status" \
  -H "Authorization: Bearer <access_token>"

Check Before Trading

const response = await fetch('/api/v1/data-sources/status', {
  headers: { 'Authorization': `Bearer ${token}` }
});
 
const status = await response.json();
 
if (!status.jupiter.configured) {
  console.warn('Jupiter not configured - trading disabled');
}
 
if (!status.pythSolPriceFeed.configured) {
  console.warn('Pyth not configured - USD values may be inaccurate');
}

Related Endpoints