Agent API
This sections documents the Agent API
The Agent API is currently in Beta - Please report any issues or feedback in our Telegram Group
About
The Agent API is the next evolution of Katoshi - Allowing you to send complex commands to your AI Agents using natural language via simple POST requests or using webhooks. Read more about agent capabilities here:
AgentsQuick Start
POST
https://api.katoshi.ai/agent?id=USER_ID
Replace USER_ID
with your unique ID, which can be found in the Settings Page
Headers
Content-Type
*
String
application/json
Request Body
api_key
*
String
Katoshi API Key
agent_id
*
Number
ID of your agent
message
*
String
Message sent to your agent
task_id
Number
ID of a task
Example Request
{
"message": "Long BTC with $11 if the 15m RSI is oversold",
"api_key": "12345678-1234-1234-1234-123456789012",
"agent_id": 7
}
task_id
Passing a task_id parameter allows you to send predefined messages to your agent.
Create tasks in your agent settings first, then reference the task_id in your request.
Example Scenario
Task message
Open a long position with $50 size, 1% stop loss, and 3% take profit when the following conditions are met:
- The 15m RSI is oversold
- The funding rates is negative
- There is no other open perpetual positions in my account
Request
{
"message": "Apply this strategy for BTC:",
"api_key": "12345678-1234-1234-1234-123456789012",
"agent_id": 7,
"task_id": 2
}
Final Message
Apply this strategy for BTC:
Open a long position with $50 size, 1% stop loss, and 3% take profit when the following conditions are met:
- The 15m RSI is oversold
- The funding rates is negative
- There is no other open perpetual positions in my account
Testing
Test your commands using the Agents chat interface in Katoshi.
AgentsLast updated
Was this helpful?