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

Built distribution (wheel)

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

Total release size: 52.0 kB

Release files / tribulnation_extended-0.1.0.tar.gz

Download URL tribulnation_extended-0.1.0.tar.gz
Size 23.1 kB
Tags Source
SHA-256 checksum
How to use checksums
de1ddfcd6a285cc36a9dc89670a9113eb47a1a9d672b115b7fcb843f4c375a9c
BLAKE2b-256 checksum
How to use checksums
2de0302aa0ff54bc36d5d3b39efba6b47a0c6baae9a594247f88fe86d1faf8ac
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 23, 2026.

Transparency log

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

Download URL tribulnation_extended-0.1.0-py3-none-any.whl
Size 29.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
97dbbf73f6150da9147523ec315cda658b82584172ff54cdc49355eff180b13a
BLAKE2b-256 checksum
How to use checksums
5e4c40d74ab5675fe9268ae7470ef28e567b59950fce9f14fbf7d074b00be01e
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 23, 2026.

Transparency log

Security for tribulnation-extended 0.1.0

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.0.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 23, 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.0 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