> For the complete documentation index, see [llms.txt](https://teos-docs.coreledger.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://teos-docs.coreledger.net/guides/warp/warp-search.md).

# Warp Search

This endpoint initiates a warp search, returning a search identifier that can be used to retrieve possible chains of supplies for exchanging sparks between offered and desired assets.

A warp is a chain of supplies automatically determined on-the-fly using a mathematical optimization algorithm, where the available supplies on the TEOS platform act as the chain links.

📘 [Learn more](/resources/using-the-teos-api/concepts/warp.md) about warps.

#### Request Endpoint

```http
POST /odata/v1.0/Warps/Search
```

#### Parameters

No query parameters.

#### Request Body

**Content type:** `application/json` — Parameters defining the warp search.

| **Parameter**  | **Type** | **Description**                                                                                             | **Mandatory** |
| -------------- | -------- | ----------------------------------------------------------------------------------------------------------- | ------------- |
| offeredAssetId | string   | Unique identifier of the asset being offered for exchange.                                                  | ✅             |
| offeredAmount  | string   | Amount of sparks of the offered asset to pay. Only one of offeredAmount or desiredAmount should be set.     | ✅             |
| desiredAssetId | string   | Unique identifier of the asset desired in exchange.                                                         | ✅             |
| desiredAmount  | string   | Amount of sparks of the desired asset to receive. Only one of offeredAmount or desiredAmount should be set. | ✅             |
| signerAddress  | string   | Public address of the wallet initiating the search.                                                         | ✅             |
| targetAddress  | string   | Public address of the wallet that will receive the resulting assets.                                        | ✅             |

#### Example Request Body

In EVM-compatible networks (e.g., Sparknet, Ethereum, and Polygon), the  address ("signerAddress", "targetAddress" and etc) is 42 characters long. In non-EVM networks, the address length may differ. For example, on Internet Computer, it is 63 characters.

```json
{
  "offeredAssetId": "0x827CB8534CFABA240CC90001",
  "offeredAmount": "4",
  "desiredAssetId": "0x86766979FD04114E1F90001",
  "desiredAmount": "0",
  "signerAddress": "0x336302d2f6f14d440837009724a9145e6103d6c7",
  "targetAddress": "0xa239d973e3622aeabee9b472056affd08f3abdda"
```

#### Response Body

**Content type:** `application/json` — Returns the warp search identifier.

| **Parameter** | **Description**                                                                                                    |
| ------------- | ------------------------------------------------------------------------------------------------------------------ |
| string        | Unique identifier of the initiated warp search. This ID can be used to track the warp search results or execution. |

#### Example Response Body

```json
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
```

#### Response Codes

| **Code** | **Description**                                     |
| -------- | --------------------------------------------------- |
| 202      | The warp search was successfully initiated.         |
| 400      | The request is invalid. Error details are included. |
| 401      | Unauthorized.                                       |

<br>


---

# 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 dynamically by asking a question.

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

```
GET https://teos-docs.coreledger.net/guides/warp/warp-search.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
