xga.fyi

Get bids with filtering

Retrieve bids with optional filtering by slot, status, entity, with pagination

GET
/api/v1/bids

Query Parameters

slot?number

Filter by slot number

Range1 <= value
status?string

Filter by bid status

Value in"pending" | "submitted" | "validated" | "updated" | "winning" | "partial" | "lost" | "cancelled" | "expired"
entityId?string

Filter by entity ID

limit?number

Number of results to return

Range1 <= value <= 100
offset?number

Number of results to skip

Response Body

curl -X GET "http://localhost:3000/api/v1/bids?slot=1234567&status=pending&entityId=entity-123&limit=20"
fetch("http://localhost:3000/api/v1/bids?slot=1234567&status=pending&entityId=entity-123&limit=20")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "http://localhost:3000/api/v1/bids?slot=1234567&status=pending&entityId=entity-123&limit=20"

  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/bids?slot=1234567&status=pending&entityId=entity-123&limit=20"

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/bids?slot=1234567&status=pending&entityId=entity-123&limit=20"))
  .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/bids?slot=1234567&status=pending&entityId=entity-123&limit=20");
var responseBody = await response.Content.ReadAsStringAsync();
[
  {
    "id": "tz4a98xxat96iws9zmbrgj3a",
    "slot": 1234567,
    "entityId": "entity-123",
    "value": "1000000000000000000",
    "quantity": 100,
    "gasFeeCap": "20000000000",
    "gasTipCap": "2000000000",
    "builderPublicKey": "0x1234567890abcdef...",
    "status": "pending",
    "submittedAt": "2024-01-01T00:00:00.000Z",
    "updatedAt": "2024-01-01T00:00:00.000Z",
    "validatedAt": "2024-01-01T00:00:05.000Z",
    "validFrom": "2024-01-01T00:00:00.000Z",
    "validUntil": "2024-01-01T00:00:12.000Z",
    "version": 1,
    "nonce": "1234567890",
    "metadata": {
      "priority": "high",
      "source": "api"
    },
    "isActive": true,
    "isModifiable": true,
    "hasExpired": false
  }
]