Skip to main content

MetaGame Trading Bootcamp Python Client

Write your trading bot with Python!

Dependencies

  • python
  • uv (which figures out all the python dependencies)

Installing uv

Install uv with the standalone installers:

# On macOS and Linux.
curl -LsSf https://astral.sh/uv/install.sh | sh
# On Windows.
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Or, from PyPI:

# With pip.
pip install uv
# Or pipx.
pipx install uv

Using bots

This following may not work on Windows without WSL.

  1. git clone https://github.com/tradingbootcamp/arbiter && cd arbiter/python-client
  2. Install the dependencies with uv sync
  3. Copy example.env to .env
  4. Go to the "Accounts" page on the exchange and copy your JWT into .env
  5. Make sure you are acting as the account you are going to be trading from, then copy the ACT_AS into .env
  6. Set API_URL to the base server URL (e.g. https://trading-bootcamp.fly.dev)
  7. Optionally set COHORT to the cohort name you want to connect to. If omitted, the cohort is auto-detected from your memberships: if you belong to exactly one cohort it's picked automatically; otherwise (zero or multiple memberships) the client raises ValueError and you must set COHORT explicitly.

You can test if it is working by running

uv run examples/min_max_bot.py "<name of market>"

This command places orders at the min and max settlement prices, so you shouldn't be risking any capital.

You can look at other example bots in examples/, like the code for an (older?) version of mark (market_maker_bot.py) and bob (naive.py).

You can also use list_cohorts() to discover available cohorts programmatically:

from metagame import list_cohorts
info = list_cohorts("https://trading-bootcamp.fly.dev", jwt)
print(info["cohorts"])  # Available cohorts

You can figure out the Jupyter Notebook if you wish.

Metadata

Release files for metagame 0.9.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for metagame 0.9.5.2
File Size Uploaded Provenance Actions
metagame-0.9.5.2.tar.gz 226.2 kB Without provenance Details for metagame-0.9.5.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for metagame 0.9.5.2
File Interpreter ABI Platform Actions
metagame-0.9.5.2-py3-none-any.whl Python 3 none any Details for metagame-0.9.5.2-py3-none-any.whl

Total release size: 330.4 kB

Release files / metagame-0.9.5.2.tar.gz

Download URL metagame-0.9.5.2.tar.gz
Size 226.2 kB
Tags Source
SHA-256 checksum
How to use checksums
993f67dd2bd7335eec1bcf92e6c890bacb33ecce8d5e6ae9a05ab2dcd673246a
BLAKE2b-256 checksum
How to use checksums
ff93204c4407cae8e33d6b6acfe5d3e185379ba716a4a4104bc2dac61760bd67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / metagame-0.9.5.2-py3-none-any.whl

Download URL metagame-0.9.5.2-py3-none-any.whl
Size 104.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c0342317707ef7a1e3f4f52df21005312937af76056cbe97d9b662865c040ab1
BLAKE2b-256 checksum
How to use checksums
450dfce2009bbfd70356f94d26c68e75964dad02e2e5c4fbd6ff3dcbf9397dad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for metagame 0.9.5.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.9.5.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page