API
Public API reference generated from the Quantarya backend route registry.
Introduction
This page is generated from the backend route registry instead of being maintained as a separate hand-written reference.
That keeps the public API docs closer to the actual route definitions and gives each endpoint an explicit opt-in for website visibility.
Routes that should stay internal can remain registered in the backend while being excluded from this public reference.
Generation
The source of truth lives in the backend FastAPI app through a small route registration wrapper.
Generate the website spec with: python code/lambdas/quantarya_api/generate_api_spec.py
That command writes the frontend JSON file consumed by this page.
Public endpoint reference
Quantarya API v0.1.0 exposes 17 public endpoints.
Create API key
/api-keys
Create a new API key for external integrations.
Path parameters
None
Query parameters
None
Request body
Create a new API key.
key_name · stringrequired
Label used to identify the key.
{
"key_name": "TradingView webhook"
}Responses
201 · API key created.
api_key_id · stringrequired
API key identifier.
raw_api_key · stringrequired
Secret token returned only once.
List API keys
/api-keys
List API keys belonging to the authenticated user.
Path parameters
None
Query parameters
None
Request body
None
Responses
200 · API key collection.
api_key_id · stringrequired
API key identifier.
key_name · stringrequired
Human-readable API key label.
Revoke API key
/api-keys/{api_key_id}
Revoke one API key belonging to the authenticated user.
Path parameters
api_key_id · stringrequired
The API key identifier to revoke.
Query parameters
None
Request body
None
Responses
200 · API key revoked.
api_key_id · stringrequired
API key identifier.
List strategies
/strategies
List all strategies belonging to the authenticated user.
Path parameters
None
Query parameters
None
Request body
None
Responses
200 · Strategy collection.
strategy_id · stringrequired
Strategy identifier.
title · stringrequired
Human-readable strategy title.
Create strategy
/strategies
Create a new strategy workspace for the authenticated user.
Path parameters
None
Query parameters
None
Request body
Create a strategy workspace.
title · stringrequired
Strategy title.
description · string
Optional strategy description.
tags · string[]
Optional strategy tags.
{
"title": "Momentum Breakout",
"description": "Intraday FX breakout workflow.",
"tags": [
"fx",
"breakout"
]
}Responses
201 · Strategy created.
strategy_id · stringrequired
Strategy identifier.
Get strategy
/strategies/{strategy_id}
Return one strategy belonging to the authenticated user.
Path parameters
strategy_id · stringrequired
The target strategy identifier inside the Quantarya workspace.
Query parameters
None
Request body
None
Responses
200 · Strategy found.
strategy_id · stringrequired
Strategy identifier.
Delete strategy
/strategies/{strategy_id}
Delete one strategy belonging to the authenticated user.
Path parameters
strategy_id · stringrequired
The target strategy identifier inside the Quantarya workspace.
Query parameters
None
Request body
None
Responses
200 · Strategy deleted.
strategy_id · stringrequired
Deleted strategy id.
List trades
/strategies/{strategy_id}/trades
List all trades stored under one strategy.
Path parameters
strategy_id · stringrequired
The target strategy identifier inside the Quantarya workspace.
Query parameters
None
Request body
None
Responses
200 · Trade collection.
trade_id · stringrequired
Trade identifier.
symbol · stringrequired
Instrument symbol.
Create trade
/strategies/{strategy_id}/trades
Create a new trade or signal record for a target strategy.
Path parameters
strategy_id · stringrequired
The target strategy identifier inside the Quantarya workspace.
Query parameters
None
Request body
Create a new trade or signal record for a strategy.
symbol · stringrequired
Instrument symbol.
side · BUY | SELLrequired
Trade direction.
event · entry | update | exit
Lifecycle event. Defaults to entry.
status · OPEN | CLOSED | CANCELLED
Explicit lifecycle status.
entry · number
Entry price.
stop_loss · number
Stop loss price.
take_profit · number
Take profit price.
close_price · number
Close price.
signal_time · string
Signal timestamp.
timeframe · string
Signal timeframe.
source · string
Signal source.
external_reference · string
External signal or order id.
{
"symbol": "EURUSD",
"side": "BUY",
"entry": 1.0825,
"stop_loss": 1.0785,
"take_profit": 1.0905,
"timeframe": "4h",
"source": "tradingview",
"external_reference": "tv-eurusd-001",
"signal_time": "2026-05-21T12:00:00Z"
}Responses
201 · Trade created.
trade_id · stringrequired
Trade identifier.
strategy_id · stringrequired
Owning strategy identifier.
symbol · stringrequired
Instrument symbol.
side · BUY | SELLrequired
Trade direction.
status · OPEN | CLOSED | CANCELLEDrequired
Lifecycle status.
{
"message": "Trade created",
"data": {
"trade_id": "trd_123",
"strategy_id": "strat_123",
"user_id": "user_123",
"symbol": "EURUSD",
"side": "BUY",
"status": "OPEN",
"event": "entry",
"entry": 1.0825,
"stop_loss": 1.0785,
"take_profit": 1.0905,
"close_price": null,
"opened_at": "2026-05-21T12:00:00Z",
"closed_at": null,
"signal_time": "2026-05-21T12:00:00Z",
"timeframe": "4h",
"source": "tradingview",
"external_reference": "tv-eurusd-001",
"signal": null,
"market": null,
"risk": null,
"context": null,
"meta": null,
"created_at": "2026-05-21T12:00:00Z",
"updated_at": "2026-05-21T12:00:00Z"
}
}Get trade
/strategies/{strategy_id}/trades/{trade_id}
Return one stored trade from a strategy.
Path parameters
strategy_id · stringrequired
The target strategy identifier inside the Quantarya workspace.
trade_id · stringrequired
The trade identifier inside the target strategy.
Query parameters
None
Request body
None
Responses
200 · Trade found.
trade_id · stringrequired
Trade identifier.
Update trade
/strategies/{strategy_id}/trades/{trade_id}
Apply a partial update to an existing trade.
Path parameters
strategy_id · stringrequired
The target strategy identifier inside the Quantarya workspace.
trade_id · stringrequired
The trade identifier inside the target strategy.
Query parameters
None
Request body
Update one or more supported trade fields.
status · OPEN | CLOSED | CANCELLED
Updated lifecycle status.
close_price · number
Updated close price.
closed_at · string
Updated close timestamp.
{
"status": "CLOSED",
"close_price": 1.0898,
"closed_at": "2026-05-21T18:15:00Z"
}Responses
200 · Trade updated.
trade_id · stringrequired
Trade identifier.
Delete manual trade
/strategies/{strategy_id}/trades/{trade_id}
Delete an existing trade only when it was created manually.
Path parameters
strategy_id · stringrequired
The target strategy identifier inside the Quantarya workspace.
trade_id · stringrequired
The trade identifier inside the target strategy.
Query parameters
None
Request body
None
Responses
200 · Trade deleted.
trade_id · stringrequired
Trade identifier.
source · string | null
Signal source.
Close trade
/strategies/{strategy_id}/trades/{trade_id}/close
Close an existing trade and optionally store the final price.
Path parameters
strategy_id · stringrequired
The target strategy identifier inside the Quantarya workspace.
trade_id · stringrequired
The trade identifier inside the target strategy.
Query parameters
None
Request body
Close an existing trade and optionally record the final price.
close_price · number
Final close price.
closed_at · string
Closed timestamp.
{
"close_price": 1.0898,
"closed_at": "2026-05-21T18:15:00Z"
}Responses
200 · Trade closed.
trade_id · stringrequired
Trade identifier.
Get current user profile
/me
Return the authenticated user's Quantarya profile.
Path parameters
None
Query parameters
None
Request body
None
Responses
200 · Authenticated user profile.
user_id · stringrequired
Authenticated user id.
email · stringrequired
Authenticated user email.
user_name · stringrequired
Workspace username.
display_name · string | null
Public display name.
bio · string | null
Public profile bio.
public_profile_enabled · booleanrequired
Whether the public profile is enabled.
Create or update current user profile
/me
Create the current user profile or update the stored username.
Path parameters
None
Query parameters
None
Request body
Create or update the current user profile.
user_name · stringrequired
Public Quantarya username.
display_name · string
Optional public display name.
bio · string
Optional short public bio.
public_profile_enabled · boolean
Toggle public profile visibility.
{
"user_name": "systematic-desk",
"display_name": "Systematic Desk",
"bio": "Tracking clean signal workflows and repeatable execution.",
"public_profile_enabled": true
}Responses
201 · User profile created.
user_id · stringrequired
Authenticated user id.
display_name · string | null
Public display name.
200 · User profile updated.
user_id · stringrequired
Authenticated user id.
display_name · string | null
Public display name.
Delete workspace profile
/me
Delete the current Quantarya workspace profile and its dependent data.
Path parameters
None
Query parameters
None
Request body
None
Responses
200 · Workspace profile deleted.
user_id · stringrequired
Deleted user id.
deleted_strategy_count · numberrequired
Deleted strategy count.
deleted_api_key_count · numberrequired
Deleted API key count.
Get public profile
/profiles/{user_name}
Return a public Quantarya profile when the user has enabled sharing.
Path parameters
user_name · stringrequired
Public Quantarya username.
Query parameters
None
Request body
None
Responses
200 · Public profile found.
user_name · stringrequired
Public Quantarya username.
display_name · string | null
Optional public display name.
bio · string | null
Optional public profile bio.
public_profile_enabled · booleanrequired
Whether the public profile is enabled.
strategies · object[]required
Public strategies visible on the profile.