> For the complete documentation index, see [llms.txt](https://docs.ston.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ston.fi/developer-section/omniston/swap.md).

# Direct API integration

Choose current v1beta8 WebSocket JSON-RPC or gRPC for a custom-language integration.

Use the direct API when you need protocol access in another language or need to manage transport and serialization yourself. New integrations use API v1beta8. The [TypeScript/JavaScript](/developer-section/omniston/sdk/nodejs.md) and [React](/developer-section/omniston/sdk/react.md) SDKs handle connection and subscription plumbing for their respective application stacks.

## Choose a transport

| Transport               | What you implement                                                           | Guide                                                                 |
| ----------------------- | ---------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| JSON-RPC over WebSocket | Request IDs, subscriptions, notifications, errors, and reconnection          | [WebSocket API v1beta8](/developer-section/omniston/swap/overview.md) |
| gRPC with TLS           | Generated protobuf clients, server streams, cancellation, and error handling | [gRPC API v1beta8](/developer-section/omniston/swap/grpc.md)          |

Both use the same trader model: RFQ → selected Quote → the returned swap/order branch → build/sign/submit → settlement tracking. Use [API model v1beta8](/developer-section/omniston/swap/v1beta8.md) for fields and [Settlement lifecycle](/developer-section/omniston/how-omniston-works.md) for completion semantics.

## Inputs and signing

Choose the [environment](/developer-section/omniston/environments.md), [assets](/developer-section/omniston/chains.md#asset-addresses), and source/destination addresses. See [API amounts](/developer-section/omniston/swap/v1beta8.md#amounts-and-fee-fields) for amount fields. Source wallets must support the complete built transaction or the required order-signing mode. Use [TON](/developer-section/omniston/sdk/ton.md), [EVM](/developer-section/omniston/sdk/evm.md), or [TRON](/developer-section/omniston/sdk/tron.md) wallet guidance; adapt generated/wire data to your language and wallet library.

For resolver enrollment, authentication, and quote submission, see [Resolvers](/developer-section/omniston/resolvers.md).

## Existing clients

Use [Versions and migrations](/developer-section/omniston/migration.md) for support status, API/SDK migrations, and the v1beta7 reference.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ston.fi/developer-section/omniston/swap.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
