Skip to main content

Extended SDK

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 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.1.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-extended 0.1.1
File Size Uploaded Provenance
tribulnation_extended-0.1.1.tar.gz 22.8 kB With provenance Details

Built distribution (wheel)

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

Total release size: 51.4 kB

Release files / tribulnation_extended-0.1.1.tar.gz

Download URL tribulnation_extended-0.1.1.tar.gz
Size 22.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e8f3c7d020a55681cd167c431d6a595e7a44c24314079b354f7adda136242b34
BLAKE2b-256 checksum
How to use checksums
eddfdaff4810b858784ad3a2fe5a3107a66e6d3ef1e5b9e52c0c33a7f995a31c
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 Oct 24, 2026.

Transparency log

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

Download URL tribulnation_extended-0.1.1-py3-none-any.whl
Size 28.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e1e78113486560b0b8266ee257003aa00dc2d90d34dbe8d8e3cc6432ac86cf08
BLAKE2b-256 checksum
How to use checksums
579e7b56b4a070f5bc10fd6ad09416410472a54845163968ec11cb97143781b0
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 Oct 24, 2026.

Transparency log

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for tribulnation_extended-0.1.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 Oct 24, 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.1.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