Skip to main content

GRVT SDK

USDT-margined perpetual and spot Market support, and Report snapshots, for GRVT, built on typed-grvt. Install with pip install tribulnation-grvt.

from tribulnation.grvt import GrvtMarket

async with GrvtMarket.new() as venue:
  perp = await venue.perp_exchange('perp')
  market = await perp.market('BTC_USDT_Perp')
  book = await market.depth(levels=5)

Credentials are passed explicitly; the environment is never read. An API key serves every account read (a read-only key suffices); its EIP-712 signer key is needed only to place orders. Without an API key the venue is public: market data only.

reads = GrvtMarket.new(api_key='…')
trading = GrvtMarket.new(api_key='…', private_key='0x…', env='testnet')
  1. Two exchanges, perp and spot. Market ids are instrument names (BTC_USDT_Perp, GRVT_USDT_SpotSwap), the same on mainnet and testnet; asset ids are currency codes (USDT). Spot instruments (GRVT's SPOT_SWAP) are order books settled in the trading sub-account's spot wallet; their collateral IDs are <account>:spot:<asset>.
  2. Public data: discovery, tickers and perp_stats (one ticker request per market, sent concurrently), rules (perpetuals with GRVT's published tier-1 rates; spot publishes none), REST depth and a shared delta depth stream, candles in the six SDK intervals, index, next funding and funding-rate history (4- or 8-hour settlements).
  3. Account and trading, on the trading sub-account (trading_account_id, else the one the API key is scoped to): the account's fee tier, order queries, open orders, trade history (per market or exchange-wide) and fill streams, positions, the cross and isolated collateral buckets, leverage, available notional, funding payments, the spot wallet's balances, and MARKET, LIMIT (or immediate-or-cancel with settings={'grvt': {'time_in_force': 'IMMEDIATE_OR_CANCEL'}}) and POST_ONLY orders with every cancellation method. Order ids are client order ids. Perpetual trading is verified on testnet only, spot trading too.
  4. Margin types and leverage are read, not set: set them on the venue.

Report snapshots the funding wallet and every trading sub-account the API key can read:

from tribulnation.grvt import Report

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

Subaccounts are funding, <sub_account_id>:futures (cash balances, isolated positions' balances included, without unrealized PnL, and positions by instrument name) and <sub_account_id>:spot. Vault investments, borrowed balances and vault sub-accounts raise NotImplementedError. history() is not supported.

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

Metadata

Release files for tribulnation-grvt 0.4.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-grvt 0.4.0
File Size Uploaded Provenance Actions
tribulnation_grvt-0.4.0.tar.gz 25.4 kB With provenance Details for tribulnation_grvt-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tribulnation-grvt 0.4.0
File Interpreter ABI Platform Actions
tribulnation_grvt-0.4.0-py3-none-any.whl Python 3 none any Details for tribulnation_grvt-0.4.0-py3-none-any.whl

Total release size: 57.0 kB

Release files / tribulnation_grvt-0.4.0.tar.gz

Download URL tribulnation_grvt-0.4.0.tar.gz
Size 25.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9041b6fd7c38a1906bc66fca90c5d289cd7e0a0f890e4ee795e0b07995c6075f
BLAKE2b-256 checksum
How to use checksums
8f186b2aa618bc13cf492f77d3accdd469e05f534d6e3631b2d65a7a3c136fa2
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 18, 2026.

Transparency log

Release files / tribulnation_grvt-0.4.0-py3-none-any.whl

Download URL tribulnation_grvt-0.4.0-py3-none-any.whl
Size 31.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e63a86df6d314021b8fde867b757a3940fef95a3ec2c07ec6c709b21479a021e
BLAKE2b-256 checksum
How to use checksums
af45efc40936712cc5a2d0fd11482763d1e1d9368e27a09beca84c48ba9ed244
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 18, 2026.

Transparency log

Security for tribulnation-grvt 0.4.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

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

Select from 2 files

Attestation for tribulnation_grvt-0.4.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 Nov 18, 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