What the SDKs do
SDKs wrap the REST API and event handling in idiomatic libraries, so your team writes less boilerplate for authentication, pagination, retries, and event verification, and more of the logic that matters. The SDK handles token refresh, request building, cursor-following, and signature verification under the hood.
A typical flow
A few lines replace dozens of lines of hand-rolled HTTP, token, and paging code. The client is constructed with a credential provider; everything after that is method calls that return typed objects.
pythonfrom gravitas import Client client = Client(client_id="svc-desk", client_secret=SECRET) # List positions as-of a date, paging handled transparently. for pos in client.positions.list(book="GAS-EU", as_of="2026-07-01"): print(pos.commodity, pos.net_quantity, pos.mtm_value) # Book a trade; the SDK adds auth, retries, and an idempotency key. trade = client.trades.book( book="GAS-EU", instrument="TTF-MONTH", buy_sell="BUY", quantity=50_000, price=32.15, delivery_period="2026-08", counterparty="ACME-ENERGY") # Subscribe to events; signatures are verified for you. @client.events.on("trade.booked") def handle(event): rerun_risk(event.data.book)
What the SDK handles for you
- Token lifecycle: fetches and refreshes access tokens before they expire.
- Pagination: follows cursors so a
listcall iterates the whole result set. - Retries: retries transient failures with backoff, and sends idempotency keys so a retried write is safe.
- Event verification: checks webhook signatures so you never act on a forged payload.
- Typed models: returns objects rather than raw JSON, so mistakes surface at development time.
Availability
SDK availability tracks the stable API surface. For the languages and scope relevant to your integration, request a demo and we’ll share specifics.
Related
See this on your own trades
A live walkthrough is the fastest way to connect this to your desk.
Request a demo Back to API Reference