# 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](https://katoshi.gitbook.io/katoshi-docs/integrations/tradingview), add the Request JSON directly in the alert message field.
{% endhint %}

***

## Testing & Debugging

The [Terminal page](https://katoshi.gitbook.io/katoshi-docs/app/terminal) 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 %}

***

## Manage Positions

{% content-ref url="signal-api/manage-positions" %}
[manage-positions](https://katoshi.gitbook.io/katoshi-docs/api/signal-api/manage-positions)
{% endcontent-ref %}

***

## Place Orders

{% content-ref url="signal-api/place-orders" %}
[place-orders](https://katoshi.gitbook.io/katoshi-docs/api/signal-api/place-orders)
{% endcontent-ref %}

***

## Manage Orders

{% content-ref url="signal-api/manage-orders" %}
[manage-orders](https://katoshi.gitbook.io/katoshi-docs/api/signal-api/manage-orders)
{% endcontent-ref %}

***

## Bulk Operations

{% content-ref url="signal-api/bulk-operations" %}
[bulk-operations](https://katoshi.gitbook.io/katoshi-docs/api/signal-api/bulk-operations)
{% endcontent-ref %}

***

## Account Settings

{% content-ref url="signal-api/account-settings" %}
[account-settings](https://katoshi.gitbook.io/katoshi-docs/api/signal-api/account-settings)
{% endcontent-ref %}

***

## Bot Controls

{% content-ref url="signal-api/bot-controls" %}
[bot-controls](https://katoshi.gitbook.io/katoshi-docs/api/signal-api/bot-controls)
{% endcontent-ref %}
