Skip to main content

Tribulnation SDK dYdX

Tribulnation SDK implementation for dYdX.

Installation

pip install tribulnation-dydx

Ticker availability

tickers() reports actual bid/ask prices and quantities when depth enrichment is enabled. Its last is None: the market catalogue only publishes an oracle price, which is not the last traded price. base_volume_24h is also None because the catalogue's volume24H is quote-denominated turnover. No approximate conversion or per-market trade-history sweep is performed. Use perp_stats().index for the oracle price and candles() for historical trade prices and base volumes.

Reporting cost basis

Report.snapshot() returns the native Snapshots.snapshot() record. Each perpetual subaccount pairs collateral (equity - unrealizedPnl) with the venue's signed sizes and entry prices from the same indexer response. At the corresponding marks, collateral plus sum(size * (mark - entry_price)) preserves venue equity. Snapshot reads do not fetch or replay fills, so fill coverage and fill/snapshot timing mismatches cannot introduce a separate cash adjustment.

History still replays chronological fills using average-cost accounting to compute realized P&L, retaining the remaining entry basis on partial closes and resetting it on position flips. This reconstructed basis can differ from the venue's snapshot basis. Consumers must not assume that history's realized P&L and snapshot cash share one reconstructed basis. Any reconciliation must adjust both collateral and position entry prices consistently and first establish matching holdings and capture times.

Version 0.7.1 restores native snapshot delegation to fix the equity distortion in 0.7.0 (issue #39). This correction applies to newly fetched snapshots; downstream dependency rollout and correction of stored snapshots are separate work.

Funding payment signs

Since 0.11.0, funding payments are positive when received and negative when paid, for every supported history scope. Requires SDK >=2.10.0. Funding rates keep their existing signs. See migration notes before upgrading.

Metadata

Release files for tribulnation-dydx 0.22.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 tribulnation-dydx 0.22.1
File Size Uploaded Provenance Actions
tribulnation_dydx-0.22.1.tar.gz 65.0 kB With provenance Details for tribulnation_dydx-0.22.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tribulnation-dydx 0.22.1
File Interpreter ABI Platform Actions
tribulnation_dydx-0.22.1-py3-none-any.whl Python 3 none any Details for tribulnation_dydx-0.22.1-py3-none-any.whl

Total release size: 146.1 kB

Release files / tribulnation_dydx-0.22.1.tar.gz

Download URL tribulnation_dydx-0.22.1.tar.gz
Size 65.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fe37cfd1b7287a026944e306a41a8784b0875fe7e4d366ae4fc0947481b21555
BLAKE2b-256 checksum
How to use checksums
f64dee6b58048cea5a2f0960779c00304632c0fe9baf4226af8bf28385e64acf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Release files / tribulnation_dydx-0.22.1-py3-none-any.whl

Download URL tribulnation_dydx-0.22.1-py3-none-any.whl
Size 81.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f78b17dfc0472d8b464825739eb17af0e3a56c5e6533265377b0597a5b4b253a
BLAKE2b-256 checksum
How to use checksums
f77862336a1d1b42bae7750f1dfe1d6ff63d1dd0b552e41ac94079a118dbaddb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Security for tribulnation-dydx 0.22.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for tribulnation_dydx-0.22.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

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.22.1 This release

2 release files Full 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