Skip to main content

dYdX SDK

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.

Metadata

Release files for tribulnation-dydx 0.8.0

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.8.0
File Size Uploaded
tribulnation_dydx-0.8.0.tar.gz 35.4 kB Details

Built distribution (wheel)

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

Total release size: 82.3 kB

Release files / tribulnation_dydx-0.8.0.tar.gz

Download URL tribulnation_dydx-0.8.0.tar.gz
Size 35.4 kB
Tags Source
SHA-256 checksum
How to use checksums
444242606313297120f4278ab9681a2d880b05c27cb322933a33b4319f8f1b36
BLAKE2b-256 checksum
How to use checksums
d2c46bc1fe7abd2c0513792a48a1d111d4b6b9995281b139db63b14f9b2c7945
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 20, 2026.

Transparency log

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

Download URL tribulnation_dydx-0.8.0-py3-none-any.whl
Size 46.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
94e0a47d66366075ff5dd26afdaad2edc8c2f4886e9285a2880c1d1d0808600f
BLAKE2b-256 checksum
How to use checksums
e45553d7e7d5291c11a4926e26eada9fa28e6bfc66812b57a135b71abc50787e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 20, 2026.

Transparency log

Release history Release notifications | RSS feed

0.16.0

2 release files

0.10.0

2 release files

0.9.0

2 release files

This release

0.8.0 This release

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.13

2 release files

0.5.12

2 release files

0.5.11

2 release files

0.5.10

2 release files

0.5.9

2 release files

0.5.8

2 release files

0.5.7

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.1.0

2 release files

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