Api Reference

Backend REST API for managing trading agents.

circle-info

Base URL: http://localhost:8000

Agent Lifecycle

Start Agent

Deploys a new trading agent for your session.

POST /start-agent
POST /start-agent
Parameter
Type
Description

session_id

string

Your wallet address

assets

string[]

Assets to trade: ["BTC", "ETH"]

interval

string

"1m", "5m", "15m", "1h"

risk_profile

string

"conservative", "moderate", "aggressive"

private_key

string

Wallet private key

public_key

string

Wallet public address

Response example:

Example response
{
  "success": true,
  "message": "Agent started",
  "session_id": "0x...",
  "assets": ["BTC", "ETH"],
  "interval": "5m"
}

Stop Agent

Terminates a running agent.

Parameter
Type
Description

session_id

string

Your wallet address


Get Status

Returns agent state and configuration.

Response example:


Get Logs

Fetches agent activity logs.


Position Management

Close Position

Closes a specific position.

Parameter
Type
Description

asset

string

Asset symbol: "BTC"

private_key

string

Wallet private key

public_key

string

Wallet address

size

float

Position size (optional, improves speed)

side

string

"LONG" or "SHORT" (optional)


Close All

Closes all open positions.

Parameter
Type
Description

private_key

string

Wallet private key

public_key

string

Wallet address


Health

Returns: