https://idxsolana.io/api/tech-center/contentX-API-KEY| Endpoint | POST https://idxsolana.io/api/tech-center/content |
|---|---|
| Description | This API allows integration of tech center videos and blog content into your platform. Content can be filtered by category, type, and date range. |
| Authentication | API key required in headers: X-API-KEY |
The request body should be a JSON object containing:
| Parameter | Type | Required | Description |
|---|---|---|---|
| content_type | String | Yes | Type of content: "video", "blog", or "all" |
| category | String | No | Filter by category (e.g., "blockchain", "defi", "nft") |
| limit | Integer | No | Number of items to return (default: 10, max: 50) |
| offset | Integer | No | Pagination offset (default: 0) |
| date_from | String | No | Filter content published after this date (ISO format) |
| date_to | String | No | Filter content published before this date (ISO format) |
{
"content_type": "video",
"category": "blockchain",
"limit": 5,
"offset": 0,
"date_from": "2023-01-01T00:00:00Z"
}{
"status": 200,
"error": false,
"message": "Success",
"data": {
"total_count": 42,
"returned_count": 5,
"items": [
{
"id": "v12345",
"type": "video",
"title": "Understanding Blockchain Fundamentals",
"description": "A deep dive into blockchain technology basics",
"thumbnail_url": "https://idxsolana.io/images/thumbnails/v12345.jpg",
"content_url": "https://idxsolana.io/videos/v12345",
"embed_code": "<iframe src='https://idxsolana.io/embed/v12345' width='560' height='315' frameborder='0'></iframe>",
"duration": 1245,
"category": "blockchain",
"tags": ["beginner", "education", "technology"],
"published_at": "2023-03-15T14:30:00Z",
"author": {
"name": "Alex Johnson",
"profile_url": "https://idxsolana.io/authors/alexj"
}
},
// Additional items...
]
}
}fetch('https://idxsolana.io/api/tech-center/content', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-KEY': 'your_api_key_here'
},
body: JSON.stringify({
"content_type": "video",
"category": "blockchain",
"limit": 5,
"offset": 0,
"date_from": "2023-01-01T00:00:00Z"
}),
})
.then(response => response.json())
.then(data => {
// Process and display the content
const contentContainer = document.getElementById('tech-content');
data.data.items.forEach(item => {
const contentElement = document.createElement('div');
contentElement.className = 'content-item';
contentElement.innerHTML = `
<h3>${item.title}</h3>
<div class="thumbnail">
<img src="${item.thumbnail_url}" alt="${item.title}">
</div>
<p>${item.description}</p>
<div class="embed">${item.embed_code}</div>
`;
contentContainer.appendChild(contentElement);
});
})
.catch(error => console.error('Error:', error));https://idxsolana.io/api/token/prices| Endpoint | GET https://idxsolana.io/api/token/prices |
|---|---|
| Description | This API provides real-time data for various cryptocurrency tokens, with a focus on IDX and Solana ecosystem tokens. |
| Authentication | Public API with rate limits. API key required for higher rate limits. |
The following query parameters are supported:
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbols | String | No | Comma-separated list of token symbols (e.g., "IDX,SOL,BTC"). If omitted, returns data for all available tokens. |
// Basic request for current prices GET https://idxsolana.io/api/token/prices?symbols=IDX,SOL,BTC¤cy=USD
{
"status": 200,
"error": false,
"timestamp": 1679529600,
"base": "USD",
"data": {
"IDX": {
"price": 2.45,
"market_cap": 245000000,
"volume_24h": 12450000,
"change_24h": 5.23,
"last_updated": 1679529540
},
"SOL": {
"price": 137.82,
"market_cap": 58564876543,
"volume_24h": 2345675432,
"change_24h": -1.21,
"last_updated": 1679529550
},
"BTC": {
"price": 59874.32,
"market_cap": 1143585432567,
"volume_24h": 34758392846,
"change_24h": 2.34,
"last_updated": 1679529552
}
}
}// Fetch current token prices and update UI
fetch('https://idxsolana.io/api/token/prices?symbols=IDX,SOL,BTC¤cy=USD')
.then(response => response.json())
.then(data => {
if (!data.error) {
// Update price displays
Object.keys(data.data).forEach(symbol => {
const tokenData = data.data[symbol];
const priceElement = document.getElementById(`${symbol}-price`);
const changeElement = document.getElementById(`${symbol}-change`);
if (priceElement) {
priceElement.textContent = `$${tokenData.price.toFixed(2)}`;
}
if (changeElement) {
const changeValue = tokenData.change_24h;
changeElement.textContent = `${changeValue > 0 ? '+' : ''}${changeValue.toFixed(2)}%`;
changeElement.className = changeValue >= 0 ? 'text-green-500' : 'text-red-500';
}
});
// Update last updated timestamp
document.getElementById('last-updated').textContent =
`Last updated: ${new Date(data.timestamp * 1000).toLocaleTimeString()}`;
}
})
.catch(error => console.error('Error fetching token prices:', error));