Tech Center Content API
Endpoint
POSThttps://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
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 |
---|
Example Request
{
"content_type": "video",
"category": "blockchain",
"limit": 5,
"offset": 0,
"date_from": "2023-01-01T00:00:00Z"
}
Sample API Call
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));
Token Price API
Endpoint
GEThttps://idxsolana.io/api/token/prices
Description
This API provides real-time price 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 .
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. |
---|
Example Request
// Basic request for current prices
GET https://idxsolana.io/api/token/prices?symbols=IDX,SOL,BTC¤cy=USD
Sample API Call
// 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));