Skip to main content

BitMEX Liquidation

Minimal code to show how to receive the liquidations in realtime on Bitmex. It does work and does not hang randomly.

Installation

virtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements.txt

Run

python example.py               # All instruments.
python example.py XBTUSD        # Only XBTUSD.

And be patient! You might have to wait more than one hour to see your first liquidation.

Browse this link for more information: https://app.rek.to/.

Output

2019-11-10 16:33:11,486 - Connecting to wss://www.bitmex.com/realtime?subscribe=liquidation.
2019-11-10 16:33:11,486 - Connected to WS.
2019-11-10 16:33:12,478 - Websocket Opened.
2019-11-10 16:33:12,479 - [<] Welcome to the BitMEX Realtime API.
2019-11-10 16:33:12,479 - [<] Subscribed to liquidation.
2019-11-10 16:33:16,493 - Symbol    B/S   USD Value   Quantity  @   Price     Time
2019-11-10 17:02:34,396 - EOSZ19    Buy   0           600       @   0.0004007 2019-11-10 17:02:34.396
2019-11-10 17:30:08,324 - XBTUSD    Sell  68,000      68,000    @   8829.5    2019-11-10 17:30:08.324
2019-11-10 17:30:14,103 - XBTUSD    Sell  807         807       @   8827.0    2019-11-10 17:30:14.103
2019-11-10 18:44:40,254 - XBTUSD    Sell  1,013       1,013     @   8818.5    2019-11-10 18:44:40.254

Messages

This message corresponds to the first line of the banner:

{ 
   "table":"liquidation",
   "action":"insert",
   "data":[ 
      { 
         "orderID":"8b4a95db-815a-f93a-c9a2-ffbbabeddbac",
         "symbol":"TRXZ19",
         "side":"Buy",
         "price":2.17e-06,
         "leavesQty":5000
      }
   ]
}

Metadata

Release files for bitmex-liquidation 1.0.1

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

Source distribution (sdist)

Source distribution for bitmex-liquidation 1.0.1
File Size Uploaded Provenance Actions
bitmex-liquidation-1.0.1.tar.gz 3.3 kB Without provenance Details for bitmex-liquidation-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bitmex-liquidation 1.0.1
File Interpreter ABI Platform Actions
bitmex_liquidation-1.0.1-py3-none-any.whl Python 3 none any Details for bitmex_liquidation-1.0.1-py3-none-any.whl

Total release size: 7.1 kB

Release files / bitmex-liquidation-1.0.1.tar.gz

Download URL bitmex-liquidation-1.0.1.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a79827b4daf14b174eba16506c0e361dd049f7f28ff0756e9d50bc917a740773
BLAKE2b-256 checksum
How to use checksums
892995540c796096862d835941811780c4b328c8a0e920fc471460426422a40e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.4

Release files / bitmex_liquidation-1.0.1-py3-none-any.whl

Download URL bitmex_liquidation-1.0.1-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c04716dde70c9b0a939b9797fbf254d78dd7d2fa79b29629c1bb31ba62afbf16
BLAKE2b-256 checksum
How to use checksums
b38dcd87913981623373f25b9053c044cb0f180be51a4d843b2f6e2e92da3e43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.4

Security for bitmex-liquidation 1.0.1

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

1.0.1 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