Metadata-Version: 2.4
Name: ebay-sniper
Version: 0.2.1
Summary: eBay sniper: set your maximum, it bids once so late that nobody can bid back, and you pay the lowest price eBay allows
Keywords: ebay,ebay-sniper,auction-sniper,bid-sniping,sniper,auction,bidding,ebay-bot,cli
Author: Vincenzo Imperati
Author-email: Vincenzo Imperati <61617279+VincenzoImp@users.noreply.github.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Internet :: WWW/HTTP
Requires-Dist: drissionpage>=4.1.1.4,<5
Requires-Python: >=3.13
Project-URL: Homepage, https://github.com/VincenzoImp/ebay-sniper
Project-URL: Issues, https://github.com/VincenzoImp/ebay-sniper/issues
Description-Content-Type: text/markdown

# eBay Sniper

[![PyPI](https://img.shields.io/pypi/v/ebay-sniper)](https://pypi.org/project/ebay-sniper/)
[![Python](https://img.shields.io/pypi/pyversions/ebay-sniper)](https://pypi.org/project/ebay-sniper/)
[![CI](https://github.com/VincenzoImp/ebay-sniper/actions/workflows/ci.yml/badge.svg)](https://github.com/VincenzoImp/ebay-sniper/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue)](https://github.com/VincenzoImp/ebay-sniper/blob/main/LICENSE)

**Set your maximum. eBay Sniper places one bid, so late that nobody can bid back. If you win, you pay the lowest price eBay allows, never more than your maximum.**

```sh
uvx ebay-sniper 'https://www.ebay.com/itm/123456789012' --max 150
```

It needs uv and Chrome, Brave, Edge or Chromium: see Install below.

## How it works

You give eBay Sniper an auction and the most you're willing to pay. It places one bid with that amount, timed so that eBay records it about half a second before the end.

eBay then charges only what it takes to win: one bid increment above the next-highest maximum, up to yours. If the highest maximum anyone else set is 100 and yours is 150, you win at 100 plus one increment. If someone set 200, they win and you pay nothing.

Sniping stops others from reacting, but it can't beat a maximum set earlier: a higher one wins, and so does an equal one, because the earlier bid wins ties. So enter the most you would really pay.

## Why it bids 2 seconds early

eBay doesn't record a bid the moment it arrives: it takes 1.3–1.6 seconds. We measured it with real bids against eBay's own server clock. A bid sent in the last 1.3 seconds is recorded after the end.

So eBay Sniper:

- **Measures** eBay's delay one minute before the end and bids just early enough, about 2 seconds, so that eBay records the bid about half a second before the end.
- **Rehearses** the bid as soon as you start it, up to eBay's confirm button. A too-low amount or a signed-out session shows up right away, not at the last second.
- **Corrects your clock** against internet time servers (NTP).

## Install

You need Chrome, Brave, Edge or Chromium, and [uv](https://docs.astral.sh/uv/getting-started/installation/), which installs Python for you.

```sh
uv tool install ebay-sniper
```

Or, with Python 3.13 or later: `pip install ebay-sniper`.

## Use

```sh
ebay-sniper '<item link>' --max <amount>
```

The amount is in the auction's currency.

1. A browser window opens. The first time, sign in to eBay. The session stays on your computer.
2. eBay Sniper rehearses the bid, then shows the item, the end time and your maximum. Type `y`.
3. Leave the terminal, the browser and the computer on until the auction ends.

It works on every eBay site and language. Run one command per auction; several can run at once. If eBay shows a human check, complete it in the browser.

| Option | Effect |
|---|---|
| `--at HH:MM:SS` | For a test: treat this local time as the end. The bid is real. |
| `--browser PATH` | Use this browser if none is found automatically. |

Every bid is logged to `~/.ebay-sniper/history.jsonl`.

## Limits

- The browser window must stay visible: eBay blocks headless browsers.
- eBay [allows sniping](https://www.ebay.com/help/buying/bidding/bid-sniping?id=4224), but its [User Agreement](https://www.ebay.com/help/policies/member-behaviour-policies/user-agreement?id=5414) prohibits automated access without permission. Use at your own risk.
- If eBay changes its pages, update the selectors at the top of [`browser.py`](https://github.com/VincenzoImp/ebay-sniper/blob/main/src/ebay_sniper/browser.py).

## Develop

```sh
uv sync && uv run ruff check . && uv run pytest
EBAY_ITEM='<item link>' EBAY_MAX=<amount> uv run pytest tests/test_live.py -s  # real flow, never confirms
```
