Skip to main content
Historical data is available from October 8, 2025 onwards. Backfilling to earlier dates will be added in a future release.

Overview

Historical data allows you to track how your DeFi positions have changed over time.

Portfolio Tracking

See your total portfolio value across all protocols

Performance Analysis

Understand returns over time

Historical Charts

Visualize position growth and changes
Historical data tracks cumulative values, meaning the raw balances in your positions. This includes natural yield accumulation as well as any deposits or withdrawals you make.

What Data is Available

Historical snapshots are available for position attributes only. These attributes enable you to track your portfolio’s value over time in both native tokens and in USD.
AttributeDescription
amountPosition balance in native token units
amountUsdPosition balance in USD equivalent
timestampWhen this snapshot was recorded (RFC 3339)

Get Historical Snapshots

Fetch position snapshots for any time range:
// Get history from launch date (Oct 8, 2025) to now
const endDate = new Date().toISOString();
const startDate = '2025-10-08T00:00:00Z'; // Historical data starts from this date

const response = await fetch(
  'https://markets.dial.to/api/v0/positions/history?' + new URLSearchParams({
    walletAddress: '6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176',
    startTime: startDate,
    endTime: endDate
  }),
  {
    headers: {
      'x-dialect-api-key': 'YOUR_API_KEY'
    }
  }
);

const data = await response.json();

Query Parameters

ParameterRequiredDescription
walletAddressYesWallet address to fetch position history for
startTimeYesStart of time range (RFC 3339 format, e.g., 2025-10-08T00:00:00Z)
endTimeYesEnd of time range (RFC 3339 format, e.g., 2025-10-10T23:59:59Z)
positionIdsNoOptional array of position IDs to filter. If empty, returns all positions

Response Structure

In the example below, you see an example of the response structure, that shows the Lulo Regular position with two snapshots showing growth from 1.02 to 2.02 USDC. Later in this document, you will learn how to use and interpret this data.
{
  "data": {
    "positions": [
      {
        "id": "lulo.regular.HwE39BAt5i6ymd8hhZbaxTrYf61ifm8PRwJpm4o9ULzj",
        "providerId": "lulo",
        "type": "yield",
        "marketId": "lulo.regular",
        "history": [
          {
            "timestamp": "2025-10-08T16:24:29.000Z",
            "amount": 1.018845,
            "amountUsd": 1.02
          },
          {
            "timestamp": "2025-10-09T21:16:12.000Z",
            "amount": 2.017082,
            "amountUsd": 2.02
          }
        ]
      }
    ]
  }
}
The response above shows 2 positions of the response to facilitate readability. The full response for this wallet contains 11 positions across Lulo, Jupiter, and Kamino. The following examples use the complete dataset.
{
  "data": {
    "positions": [
      {
        "id": "lulo.protected.HwE39BAt5i6ymd8hhZbaxTrYf61ifm8PRwJpm4o9ULzj",
        "providerId": "lulo",
        "type": "yield",
        "marketId": "lulo.protected",
        "history": [
          {
            "timestamp": "2025-10-08T16:24:29.000Z",
            "amount": 1.012845,
            "amountUsd": 1.01
          },
          {
            "timestamp": "2025-10-09T21:21:20.000Z",
            "amount": 1.999995,
            "amountUsd": 2
          }
        ]
      },
      {
        "id": "lulo.regular.HwE39BAt5i6ymd8hhZbaxTrYf61ifm8PRwJpm4o9ULzj",
        "providerId": "lulo",
        "type": "yield",
        "marketId": "lulo.regular",
        "history": [
          {
            "timestamp": "2025-10-08T16:24:29.000Z",
            "amount": 1.018845,
            "amountUsd": 1.02
          },
          {
            "timestamp": "2025-10-09T21:16:12.000Z",
            "amount": 2.017082,
            "amountUsd": 2.02
          }
        ]
      },
      {
        "id": "jupiter.earn.SOL.6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176",
        "providerId": "jupiter",
        "type": "yield",
        "marketId": "jupiter.earn.SOL",
        "history": [
          {
            "timestamp": "2025-10-08T16:24:29.000Z",
            "amount": 0.001000981,
            "amountUsd": 0.22
          }
        ]
      },
      {
        "id": "jupiter.borrow.1.2433.deposit",
        "providerId": "jupiter",
        "type": "lending",
        "marketId": "jupiter.borrow.1",
        "history": [
          {
            "timestamp": "2025-10-08T16:24:29.000Z",
            "amount": 0.015060546,
            "amountUsd": 3.34
          }
        ]
      },
      {
        "id": "jupiter.borrow.1.2433.borrow",
        "providerId": "jupiter",
        "type": "lending",
        "marketId": "jupiter.borrow.1",
        "history": [
          {
            "timestamp": "2025-10-08T16:24:29.000Z",
            "amount": 1.012172,
            "amountUsd": 1.01
          }
        ]
      },
      {
        "id": "jupiter.earn.USDC.6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176",
        "providerId": "jupiter",
        "type": "yield",
        "marketId": "jupiter.earn.USDC",
        "history": [
          {
            "timestamp": "2025-10-08T16:24:29.000Z",
            "amount": 0.100776,
            "amountUsd": 0.1
          }
        ]
      },
      {
        "id": "jupiter.borrow.7.1228.deposit",
        "providerId": "jupiter",
        "type": "lending",
        "marketId": "jupiter.borrow.7",
        "history": [
          {
            "timestamp": "2025-10-08T16:24:29.000Z",
            "amount": 1.331889,
            "amountUsd": 1.5
          }
        ]
      },
      {
        "id": "kamino.CnNvZzeBXiLxUmA6b5eP4MYsNCjfeXxDWMDVJtgZpAtU.EVbyPKrHG6WBfm4dLxLMJpUDY43cCAcHSpV3KYjKsktW",
        "providerId": "kamino",
        "type": "lending",
        "marketId": "kamino.EVbyPKrHG6WBfm4dLxLMJpUDY43cCAcHSpV3KYjKsktW",
        "history": [
          {
            "timestamp": "2025-10-08T16:24:29.000Z",
            "amount": 0.01643327,
            "amountUsd": 4.5
          }
        ]
      },
      {
        "id": "kamino.3YWBQnwgi7FE7e7Xahuea2eiM8aPAv84nHoAvWUtm2QV.F22tnLsbv66vEU2GZRc7coaqZsr8UcBbyp9V2kqWAiWK",
        "providerId": "kamino",
        "type": "lending",
        "marketId": "kamino.F22tnLsbv66vEU2GZRc7coaqZsr8UcBbyp9V2kqWAiWK",
        "history": [
          {
            "timestamp": "2025-10-08T16:24:29.000Z",
            "amount": 0.32602,
            "amountUsd": 0.33
          }
        ]
      },
      {
        "id": "kamino.EYqpfGinjQfcDkKvn7HWTGbxcrCZpeL9pSKgqhgWtAJg.Atj6UREVWa7WxbF2EMKNyfmYUY1U1txughe2gjhcPDCo",
        "providerId": "kamino",
        "type": "lending",
        "marketId": "kamino.Atj6UREVWa7WxbF2EMKNyfmYUY1U1txughe2gjhcPDCo",
        "history": [
          {
            "timestamp": "2025-10-08T16:24:29.000Z",
            "amount": 1.013233,
            "amountUsd": 1.01
          }
        ]
      },
      {
        "id": "kamino.CnNvZzeBXiLxUmA6b5eP4MYsNCjfeXxDWMDVJtgZpAtU.d4A2prbA2whesmvHaL88BH6Ewn5N4bTSU2Ze8P6Bc4Q",
        "providerId": "kamino",
        "type": "lending",
        "marketId": "kamino.d4A2prbA2whesmvHaL88BH6Ewn5N4bTSU2Ze8P6Bc4Q",
        "history": [
          {
            "timestamp": "2025-10-08T16:24:29.000Z",
            "amount": 0.012468525,
            "amountUsd": 2.76
          }
        ]
      }
    ]
  }
}
Each position includes:
FieldDescription
idUnique position identifier
providerIdProtocol providing the market (e.g., lulo, jupiter, kamino)
typePosition type (yield, lending, loop, perpetual)
marketIdMarket identifier within the protocol
historyArray of historical snapshots with timestamp, amount, and amountUsd (limited to 1000 data points per position)

Understanding Cumulative Values

Historical data tracks cumulative values - the actual balance in each position at each point in time.

What This Means

When you look at historical snapshots, the amount and amountUsd values reflect:
  • Yield - Accumulated interest earned on deposits
  • Deposits - When you add funds to a position
  • Withdrawals - When you remove funds from a position

Example: Deposits

Here’s real data from a Lulo position showing a deposit:
// October 8, 2025 - Initial snapshot
{
  "timestamp": "2025-10-08T16:24:29.000Z",
  "amount": 1.018845,
  "amountUsd": 1.02
}

// October 9, 2025 - After a deposit
{
  "timestamp": "2025-10-09T21:16:12.000Z",
  "amount": 2.017082,
  "amountUsd": 2.02
}
The jump in the example from ~1.02 to ~2.02 USDC between these two snapshots reflects a deposit action.

Practical Examples

Example 1: Calculate Total Portfolio Value

Sum up all position values across protocols:
const response = await fetch(
  'https://markets.dial.to/api/v0/positions/history?walletAddress=6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176&startTime=2025-10-08T00:00:00Z&endTime=2025-10-10T23:59:59Z',
  {
    headers: {
      'x-dialect-api-key': 'YOUR_API_KEY'
    }
  }
);

const result = await response.json();

// Calculate total portfolio value in USD
const totalValueUsd = result.data.positions.reduce((total, position) => {
  const latestSnapshot = position.history[position.history.length - 1];
  return total + (latestSnapshot?.amountUsd || 0);
}, 0);

console.log(`Total portfolio value: $${totalValueUsd.toFixed(2)}`);
Output:
Total portfolio value: $18.79

Example 2: Track Specific Position Over Time

Filter for a single position to see its growth:
const response = await fetch(
  'https://markets.dial.to/api/v0/positions/history?' + new URLSearchParams({
    walletAddress: '6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176',
    startTime: '2025-10-08T00:00:00Z',
    endTime: '2025-10-10T23:59:59Z',
    'positionIds[]': 'lulo.regular.HwE39BAt5i6ymd8hhZbaxTrYf61ifm8PRwJpm4o9ULzj'
  }),
  {
    headers: {
      'x-dialect-api-key': 'YOUR_API_KEY'
    }
  }
);

const result = await response.json();
const position = result.data.positions[0];

// Show growth over time
position.history.forEach(snapshot => {
  console.log(`${snapshot.timestamp}: ${snapshot.amount} USDC ($${snapshot.amountUsd})`);
});
Output:
2025-10-08T16:24:29.000Z: 1.018845 USDC ($1.02)
2025-10-09T21:16:12.000Z: 2.017082 USDC ($2.02)

Example 3: Compare Positions Across Protocols

See how different protocol positions have performed:
const response = await fetch(
  'https://markets.dial.to/api/v0/positions/history?walletAddress=6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176&startTime=2025-10-08T00:00:00Z&endTime=2025-10-10T23:59:59Z',
  {
    headers: {
      'x-dialect-api-key': 'YOUR_API_KEY'
    }
  }
);

const result = await response.json();

// Group by provider
const byProvider = result.data.positions.reduce((acc, position) => {
  const provider = position.providerId;
  const latestSnapshot = position.history[position.history.length - 1];

  if (!acc[provider]) {
    acc[provider] = { totalUsd: 0, positions: 0 };
  }

  acc[provider].totalUsd += latestSnapshot?.amountUsd || 0;
  acc[provider].positions += 1;

  return acc;
}, {});

console.log(byProvider);
Output:
{
  "lulo": { "totalUsd": 4.02, "positions": 2 },
  "jupiter": { "totalUsd": 6.17, "positions": 5 },
  "kamino": { "totalUsd": 8.6, "positions": 4 }
}

API Playground

Test the API

Play with the API and see the results in real-time.
I