# Delphi SDK

## Overview

This Delphi SDK provides everything you need to know about reading market data, executing trades, managing positions, and query historical on-chain events through a single `DelphiClient` interface.

### What it Does

The SDK has two core layers: the **\[1]** REST API client (for read operations) and the **\[2]** on-chain methods (for write operations).&#x20;

1. **REST API client (*****reading)*****:** List and filter markets, query wallet positions, and check service health through Delphi's centralized API endpoints.
2. **On-chain methods (*****writing)*****:** Buy and sell outcome shares, approve token spending, redeem winning positions, and read contract state directly on the Gensyn blockchain via the Gateway contract.

{% hint style="info" %}
This is a **TypeScript** only SDK. There is no Python SDK at this time.
{% endhint %}

The `@gensyn-ai/gensyn-delphi-sdk` package is available on `npm` and offers support for both private key signing in development and Coinbase Developer Platform (CDP) Server Wallets for production use. It is configured for both testnet and mainnet networks, with sensible defaults for each.

### Who it's For

The Delphi SDK is the foundational layer for any programmatic interaction with [Delphi](https://app.delphi.fyi/) markets. It is used directly by developers building custom integrations, and it powers the [Agentic Trading toolkit](/tech/agentic-trading.md) under the hood.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gensyn.ai/tech/delphi-sdk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
