# Connect custom strategy

You can use **any external service or in-house script** to send alerts to Skyrexio. All you need is a simple HTTP POST request.

***

**Endpoint**

Send every alert to:

```
https://webhook.skyrexio.com/api/v1/deal/alert
```

***

**JSON Payload Structure**

```json
{
  "base": "Name of the base asset (e.g., MATIC)",
  "quote": "Name of the quote asset (e.g., USDT)",
  "position": "Use \"entry1\", \"entry2\", etc. for primary/extra entries. Use \"close\" to close all positions.",
  "price": "Limit price. For market orders you can pass any value.",
  "sourceUuid": "Value from the Alert message section of your custom bot",
  "secretToken": "Value from the Alert message section of your custom bot"
}
```

**Field explanations**

| Field         | Description                                                          |
| ------------- | -------------------------------------------------------------------- |
| `base`        | Base currency (e.g., `MATIC`).                                       |
| `quote`       | Quote currency (e.g., `USDT`).                                       |
| `position`    | `entry1`, `entry2`, etc. for entries; `close` to exit all positions. |
| `price`       | Limit-order price; any value for a market order.                     |
| `sourceUuid`  | Taken from **Alert message** settings on your custom bot page.       |
| `secretToken` | Taken from **Alert message** settings on your custom bot page.       |

***

**Sample Requests**

> You can test these calls manually with tools like **Postman**—handy for quick validation before full integration.

*POST URL:*\
`https://webhook.skyrexio.com/api/v1/deal/alert`

**Main entry (entry1)**

```json
{
  "base": "MATIC",
  "quote": "USDT",
  "position": "entry1",
  "price": "1.25",
  "sourceUuid": "your_sourceUuid_from_bot",
  "secretToken": "your_secretToken_from_bot"
}
```

**Additional entry (entry2, etc.)**

```json
{
  "base": "MATIC",
  "quote": "USDT",
  "position": "entry2",
  "price": "1.20",
  "sourceUuid": "your_sourceUuid_from_bot",
  "secretToken": "your_secretToken_from_bot"
}
```

**Close position**

```json
{
  "base": "MATIC",
  "quote": "USDT",
  "position": "close",
  "price": "1.30",
  "sourceUuid": "your_sourceUuid_from_bot",
  "secretToken": "your_secretToken_from_bot"
}
```

***

**Sending a Request in Postman**

1. Open **Postman**.
2. Select **POST** and paste the endpoint URL:\
   `https://webhook.skyrexio.com/api/v1/deal/alert`
3. Go to **Body → raw → JSON**.
4. Paste one of the JSON payloads above.
5. Click **Send**.

That’s it—you can manually trigger openings, additional entries, or closings and verify the responses. Once tested, integrate the same call into any automated trading system or alert source.


---

# 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.skyrexio.com/alert-bots/connect-custom-strategy.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.
