Skip to main content

Tribulnation SDK Extended

Tribulnation SDK implementation for Extended perpetuals.

Perpetual Market and Report support for Extended, built on typed-extended. Install with pip install tribulnation-extended.

from tribulnation.extended import ExtendedMarket

async with ExtendedMarket.new(public=True) as venue:
  perp = await venue.perp_exchange('perp')
  market = await perp.market('BTC-USD')
  book = await market.depth(levels=5)

An account is one sub-account of a wallet. Its API key reads it and cancels its orders; placing orders also needs the sub-account's Stark private key and vault:

venue = ExtendedMarket.new(api_key='…', stark_private_key='0x…', vault=12345)

With no arguments, the client reads EXTENDED_API_KEY, EXTENDED_STARK_PRIVATE_KEY, EXTENDED_STARK_PUBLIC_KEY and EXTENDED_VAULT (EXTENDED_TESTNET_* with network='testnet'). A wallet's other sub-accounts each need their own API key.

  1. One exchange, perp. Market ids are the venue's market names (BTC-USD), the same on both networks; the collateral, fee and funding asset is USD.
  2. Public data: discovery, tickers, rules, depth, a shared book stream, candles in the six SDK intervals, index, perp_stats, next funding and hourly funding-rate history. RFQ markets' books are their quotes, from the RFQ quotes stream.
  3. Account and trading: fees, order queries, open orders, trade history and the fills stream, positions, collateral, leverage, available notional, MARKET, LIMIT (or immediate-or-cancel with settings={'extended': {'time_in_force': 'IOC'}}) and POST_ONLY orders (RFQ markets through the RFQ endpoint), and every cancellation method. Order ids are Extended's numeric order ids; client_order_id is the order's externalId.
  4. Acceptance is asynchronous: an order the matching engine refuses after acceptance shows as REJECTED in query_order; OrderRejected is raised for refusals the venue answers with an error code.
  5. funding_payments raises NotImplementedError until the sign of the venue's payment amount is observed.

Report snapshots and streams the history of the API key's sub-account; a read-only key is enough:

from tribulnation.extended import Report

async with Report.new('…') as report:
  record = await report.snapshot()

History yields asset operations (transfers between sub-accounts, deposits, withdrawals, testnet claims), fills and closed positions with their realized PnL. It raises NotImplementedError for a window holding a funding or borrow-interest payment.

See Extended Market for account configuration through MarketSDK and venue-specific semantics.

Metadata

Release files for tribulnation-extended 0.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 tribulnation-extended 0.5.2
File Size Uploaded Provenance Actions
tribulnation_extended-0.5.2.tar.gz 25.6 kB With provenance Details for tribulnation_extended-0.5.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tribulnation-extended 0.5.2
File Interpreter ABI Platform Actions
tribulnation_extended-0.5.2-py3-none-any.whl Python 3 none any Details for tribulnation_extended-0.5.2-py3-none-any.whl

Total release size: 57.2 kB

Release files / tribulnation_extended-0.5.2.tar.gz

Download URL tribulnation_extended-0.5.2.tar.gz
Size 25.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a99edb48e239ea12cb2dcc9243ebb5956c6411e8ba13a6c90d4354a819de7742
BLAKE2b-256 checksum
How to use checksums
4a554f75e6be804624d5e975b664f8e288f246ce50a0e9a9de789204fdfde948
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 28, 2026.

Transparency log

Release files / tribulnation_extended-0.5.2-py3-none-any.whl

Download URL tribulnation_extended-0.5.2-py3-none-any.whl
Size 31.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
303fd2a8ffcfddd7588b2145230d5ce44ddc373d6b096d4797f41360927f47d3
BLAKE2b-256 checksum
How to use checksums
322bb085ef08172d8031cb3fa482a0b2439f9443f52f49d90774ecb7af643d85
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 28, 2026.

Transparency log

Security for tribulnation-extended 0.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.

Full provenance

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

Select from 2 files

Attestation for tribulnation_extended-0.5.2.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 28, 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.

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