> For the complete documentation index, see [llms.txt](https://katoshi.gitbook.io/katoshi-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://katoshi.gitbook.io/katoshi-docs/api/signal-api.md).

# Signal API

This section documents the Signal API.

***

## About

The Signal API is the core of Katoshi - Allowing you to send trading commands to your Hyperliquid account and vaults via simple POST requests or using webhooks. See all action types below.

***

## Quick Start

<mark style="color:green;">`POST`</mark> `https://api.katoshi.ai/signal?id=USER_ID`

Replace `USER_ID` with your unique ID, which can be found in the [Settings Page](https://katoshi.ai/app?view=settings)

### Headers

| Name                                             | Type   | Description        |
| ------------------------------------------------ | ------ | ------------------ |
| `Content-Type`<mark style="color:red;">\*</mark> | String | `application/json` |

### Request Body

| Name                                        | Type   | Description     |
| ------------------------------------------- | ------ | --------------- |
| `action`<mark style="color:red;">\*</mark>  | String | Type of action  |
| `api_key`<mark style="color:red;">\*</mark> | String | Katoshi API Key |
| `bot_id`<mark style="color:red;">\*</mark>  | Number | ID of your bot  |

### Example Request

```json
{
  "action": "open_position",
  "api_key": "12345678-1234-1234-1234-123456789012",
  "bot_id": 7
}
```

{% hint style="info" %}
For [TradingView](/katoshi-docs/integrations/tradingview.md), add the Request JSON directly in the alert message field.
{% endhint %}

***

## Testing & Debugging

The [Terminal page](/katoshi-docs/app/terminal.md) can help you generate the JSON for each request as well as sending signals.

Our API endpoints and MCP servers are also available in Postman.

[![Run In Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/44993369-4dd48d31-4836-4705-87f6-1f3978970489?action=collection%2Ffork\&source=rip_markdown\&collection-url=entityId%3D44993369-4dd48d31-4836-4705-87f6-1f3978970489%26entityType%3Dcollection%26workspaceId%3D2d7fb33e-94c5-4155-84ae-3d5c37f46ed9)

***

{% hint style="info" %}
The `coin` parameter for Perps uses a format such as `BTC` or `xyz:XZY100` for HIP-3 perps
{% endhint %}

{% hint style="info" %}
The `coin` parameter for Spot uses a format such as `UBTC/USDC` or pair ID such as `@142`
{% endhint %}
