Bidding

Place bids on active auctions

This endpoint returns an unsigned Solana transaction in base64. You must sign it with the bidder wallet and broadcast it to the network. The server validates bid validity (minimum, auction status, seller-cannot-bid) before building the tx.

POST

/api/v1/auctions/:id/bid

Place a bid on an active auction. The :id is the auction PDA (base58 public key).

Request

POST /api/v1/auctions/7K8mN2qPxR.../bid
X-API-Key: sk_live_your_key_here
Content-Type: application/json

{
  "bidAmount": 2.5
}

Parameters

bidAmount
number, required
Amount to bid in SOL. Must be ≥ starting price (no prior bids) or ≥ top bid + minBidIncrement.

Response

{
  "success": true,
  "data": {
    "transaction": "AQAAAAAAAA...", // Base64 unsigned tx — sign and broadcast this
    "auctionId": "7K8mN2qPxR...",
    "bidder": "YourWalletAddress...",
    "bidAmount": 2.5,
    "nextMinimumBid": 2.6,
    "timestamp": 1711464000000
  },
  "timestamp": 1711463000000
}

Sign & Broadcast (JavaScript)

import { Transaction, Connection } from '@solana/web3.js';

const res = await fetch('/api/v1/auctions/7K8mN2qPxR.../bid', {
  method: 'POST',
  headers: { 'X-API-Key': 'sk_live_...', 'Content-Type': 'application/json' },
  body: JSON.stringify({ bidAmount: 2.5 })
});
const { data } = await res.json();

const connection = new Connection(process.env.RPC_URL);
const tx = Transaction.from(Buffer.from(data.transaction, 'base64'));
tx.sign(bidderKeypair);
const sig = await connection.sendRawTransaction(tx.serialize());
await connection.confirmTransaction(sig, 'confirmed');

Error Codes

AUCTION_ENDED

The auction's bidding window has closed. Call /settle to finalize it.

BID_TOO_LOW

Bid amount is below the required minimum. The error message includes the current minimum bid in SOL.

INVALID_REQUEST (seller cannot bid)

The wallet associated with the API key is the auction seller. Sellers cannot bid on their own listings.

NOT_FOUND

No auction exists at the given PDA. Verify the auction ID.

UNAUTHORIZED

Missing or invalid API key.

Rate Limit

60 requests / minute per authenticated API key.

© 2026 SNSAuctions.xyz. Built on Solana.