Skip to main content

Unofficial Python client for Gixen.com (eBay sniping) — automates its website since there's no public API.

Project description

Contributors Forks Stargazers Issues MIT License


gixenpy

Unofficial Python client for Gixen.com (eBay sniping)
See usage examples »

Report a bug · Request a feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Security
  5. Tests
  6. Publishing to PyPI
  7. Roadmap
  8. Contributing
  9. License
  10. Contact
  11. Acknowledgments

About The Project

Gixen used to offer a public API for scheduling snipes (last-second eBay bids); that API is now restricted to regular users. gixenpy solves that by automating Gixen's web form with requests, just like a browser with JavaScript disabled would — without depending on an API that's no longer available.

Not a Gixen product, not affiliated with Gixen.com. Checked against their terms of use and FAQ: they don't prohibit automated access, but use it at your own risk — Gixen may block traffic it doesn't recognize at its discretion.

What you can do with it:

  • Schedule (add_snipe), list (list_snipes), edit (update_snipe), delete (delete_snipe) and purge ended snipes (purge_completed).
  • Bid, offset (seconds before the close) and bid group, all configurable; in update_snipe each one is independent and optional (whatever isn't passed is kept as-is).
  • Tell active snipes apart from ended ones (Snipe.status).
  • Dynamically locate Gixen's forms by parsing the HTML, instead of assuming fixed field names: if Gixen changes their site, it keeps working as long as the form structure doesn't change too much.
  • Dry-run mode (the default for add_snipe unless told otherwise): sends nothing, just reports what it would send.
  • A full CLI: gixenpy list/add/edit/remove/purge/group.

(back to top)

Built With

  • Python
  • Requests
  • Click

(back to top)

Getting Started

Prerequisites

  • Python 3.10 or newer
  • A Gixen account (credentials are Gixen's, not eBay's)

Installation

pip install git+https://github.com/figurophobia/gixenpy.git

For development (with tests):

git clone https://github.com/figurophobia/gixenpy.git
cd gixenpy
pip install -e ".[dev]"

(back to top)

Usage

As a library

from gixenpy import GixenClient

client = GixenClient(username="your_gixen_username", password="your_password", dry_run=True)

# Schedule a snipe (dry_run=True by default: doesn't bid for real).
result = client.add_snipe(item_id="123456789012", max_bid=42.50)
print(result.message)

# When you want to bid for real:
result = client.add_snipe(item_id="123456789012", max_bid=42.50, dry_run=False)

# Manage existing snipes.
for snipe in client.list_snipes():
    print(snipe.item_id, snipe.max_bid, snipe.status)  # "active" | "ended" | "unknown"

client.update_snipe(item_id="123456789012", new_max=55)
client.delete_snipe(item_id="123456789012")

# Offset (seconds before the close) and bid group, optional:
client.add_snipe(item_id="123456789012", max_bid=42.50, offset=9, group=1, dry_run=False)
client.update_snipe(item_id="123456789012", offset=12)   # change only the offset
client.update_snipe(item_id="123456789012", group=2)     # change only the group

client.purge_completed()  # remove already-ended snipes from the history

Credentials are your Gixen account's (not eBay's). Never logged or printed.

As a CLI

export GIXEN_USERNAME=your_username
export GIXEN_PASSWORD=your_password
# or create a .env with those two lines (see .env.example)

gixenpy --help                 # list of commands
gixenpy --version

gixenpy list                   # active and ended snipes

gixenpy add 123456789012 42.50                       # schedules a snipe FOR REAL
gixenpy add 123456789012 42.50 --offset 9 --group 1  # with offset/group
gixenpy add 123456789012 42.50 --dry-run             # just shows what would be sent

gixenpy edit 123456789012 55          # change the max bid
gixenpy edit 123456789012 --offset 12 # change only the offset (keeps the bid)
gixenpy edit 123456789012 --group 2   # change only the group

gixenpy remove 123456789012    # delete the snipe
gixenpy purge                  # purge ended snipes from the history

gixenpy group 3 123456789012 987654321098  # assign group 3 to several items

Every command exits with code 0 if Gixen confirmed the operation, or 1 if it failed/errored (message on stderr, prefixed with ERROR:).

(back to top)

Security

  • A small, fixed number of requests per action (1 GET + 1 POST), no aggressive polling.
  • Reuses the existing session instead of relogging on every action (avoiding unnecessarily kicking out other sessions — Gixen only allows one active session per account).
  • The max bid amount is always decided by whoever calls the library; it never picks a value on its own.
  • Any form URL extracted from Gixen's HTML is validated against gixen.com (and HTTPS only) before sending anything; a tampered response can't make the client send the payload to a different host.
  • Configurable connect/read timeouts (GixenClient(timeout=...), default (5, 25) seconds) to fail fast on network issues.
  • A single retry with backoff (GixenClient(retry_backoff=...), 2 seconds by default) if Gixen accepts a write but doesn't end up applying it — never on an explicit rejection.

(back to top)

Tests

pip install -e ".[dev]"
pytest -q

Neither suite makes any network requests: tests/test_client.py replaces Gixen's logged-in page with test HTML and verifies form parsing and the payload built; tests/test_cli.py exercises the CLI with click.testing.CliRunner, injecting a fake client.

(back to top)

Publishing to PyPI

The package is ready to publish (the gixenpy name is free on PyPI, py.typed, classifiers, python -m build + twine check pass, the wheel was verified by installing it into a clean venv). Steps left (manual, require your own PyPI account):

pip install -e ".[dev]" build twine
python -m build                 # generates dist/*.tar.gz and dist/*.whl
twine check dist/*              # validates the package
twine upload -r testpypi dist/* # optional: try it on TestPyPI first
twine upload dist/*             # real publication

(back to top)

Roadmap

  • Publish gixenpy on PyPI
  • Persistent session across processes (today every new GixenClient logs in if needed; there's no on-disk session cache)
  • Revisit the active/ended status heuristic if Gixen changes the text/order of "Status (main): ..." in their HTML

See the open issues for the full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are welcome. If you have an idea that would make this better, fork the repo and open a pull request, or simply open an issue with the "enhancement" tag.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/my-feature)
  3. Commit your Changes (git commit -m 'Add my-feature')
  4. Push to the Branch (git push origin feature/my-feature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

Contact

Project issues: github.com/figurophobia/gixenpy/issues

(back to top)

Acknowledgments

  • hsukenooi/gixen-cli — another independent implementation of the same problem, used as a reference for several improvements to this library
  • Best-README-Template — the template used for this README
  • Gixen.com for the sniping service itself

(back to top)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gixenpy-0.2.0.tar.gz (29.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gixenpy-0.2.0-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

Details for the file gixenpy-0.2.0.tar.gz.

File metadata

  • Download URL: gixenpy-0.2.0.tar.gz
  • Upload date:
  • Size: 29.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for gixenpy-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2db9af5c810597a6748b09caa6a1a4dffa32a9c4b82557090c750ea04a3b75f2
MD5 db9ce07889b2e523c201f912328e5500
BLAKE2b-256 f9e0333f4044095f33c19a31474c75574b2b862dd07ffa6d019f1d2dc7ecee8a

See more details on using hashes here.

File details

Details for the file gixenpy-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: gixenpy-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 20.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for gixenpy-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d172038cfda44f65d0d398a4295e32faa61bb3c0eea393061aaaf03208975fe4
MD5 810d1aea69d911a5f234cbc91e94581b
BLAKE2b-256 c746f3d9dc02ede803baec88ca41a9d1183c6484c2548bf857635b74a1d10abb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page