Get latest 32 auction results (optimized)
High-performance endpoint for retrieving the latest 32 completed auction results. Optimized with database-level aggregation and caching for frequent access.
Features:
- Single optimized SQL query with JOIN aggregation
- 60% smaller response payload than full auction objects
- Sub-50ms response time with caching
- Essential result metrics: clearing price, total bids, revenue, success rate
- Auto-detects automatically created auctions
Use this endpoint for dashboards, analytics, and high-frequency result polling. For flexible querying with custom limits, use /history endpoint instead.
curl -X GET "http://localhost:3000/api/v1/auctions/results/latest"
fetch("http://localhost:3000/api/v1/auctions/results/latest")
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "http://localhost:3000/api/v1/auctions/results/latest"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
import requests
url = "http://localhost:3000/api/v1/auctions/results/latest"
response = requests.request("GET", url)
print(response.text)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import java.time.Duration;
HttpClient client = HttpClient.newBuilder()
.connectTimeout(Duration.ofSeconds(10))
.build();
HttpRequest.Builder requestBuilder = HttpRequest.newBuilder()
.uri(URI.create("http://localhost:3000/api/v1/auctions/results/latest"))
.GET()
.build();
try {
HttpResponse<String> response = client.send(requestBuilder.build(), BodyHandlers.ofString());
System.out.println("Status code: " + response.statusCode());
System.out.println("Response body: " + response.body());
} catch (Exception e) {
e.printStackTrace();
}
using System;
using System.Net.Http;
using System.Text;
var client = new HttpClient();
var response = await client.GetAsync("http://localhost:3000/api/v1/auctions/results/latest");
var responseBody = await response.Content.ReadAsStringAsync();
[
{
"slot": 1234567,
"state": "finalized",
"clearingPrice": "1500000000000000000",
"totalBids": 42,
"totalAllocated": 1000,
"winningBidders": 15,
"finalizedAt": "2024-01-01T00:00:20.000Z",
"createdAt": "2024-01-01T00:00:00.000Z",
"duration": 300,
"autoCreated": false,
"successRate": 0.85,
"totalRevenue": "1500000000000000000000"
}
]