Quantarya logo
Quantarya
Documentation

API

Public API reference generated from the Quantarya backend route registry.

Integration
API
Browse docs

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 18 public endpoints.

API Keys
POST
Bearer user JWT
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.

API Keys
GET
Bearer user JWT
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.

API Keys
DELETE
Bearer user JWT
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.

Organizations
POST
Bearer user JWT
Create organization

/organizations

Create a new organization for grouping strategies and sharing IAM access.


Path parameters

None

Query parameters

None

Request body

Create a new strategy organization.

organization_name · stringrequired

Human-readable organization name.

organization_id · string

Optional stable organization id. Derived from organization_name when omitted.

state · development | live

Organization lifecycle state. Defaults to development.

description · string | null

Organization summary description.

website_url · string | null

Optional public organization website URL.

focus_areas · string[]

Markets this organization focuses on.

documentation · string | null

Organization documentation body.

{
  "description": "Research desk for signal review and systematic execution.",
  "documentation": "Use this area for setup notes, links, and operating rules.",
  "focus_areas": [
    "forex",
    "commodities"
  ],
  "organization_name": "Quantarya Research",
  "state": "development",
  "website_url": "https://www.quantarya.io"
}
Responses

201 · Organization created.

organization_id · stringrequired

Stable organization identifier.

owner_user_id · stringrequired

Organization owner user id.

current_user_role · owner | deputy | readerrequired

Caller role in this organization.

organization_name · stringrequired

Human-readable organization name.

state · development | liverequired

User-controlled organization lifecycle state.

description · string | null

Organization summary description.

website_url · string | null

Optional public organization website URL.

focus_areas · string[]required

Markets this organization focuses on.

documentation · string | null

Organization documentation body.

strategy_count · numberrequired

Number of strategies in this organization.

created_at · stringrequired

Creation timestamp.

updated_at · stringrequired

Last update timestamp.

Strategies
GET
Bearer user JWT
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.

image_url · string | null

Optional public strategy image URL.

organization_id · stringrequired

Stable organization identifier used to group strategies.

organization_name · stringrequired

Human-readable organization name.

Strategies
POST
Bearer user JWT
Create strategy

/strategies

Create a new strategy for the authenticated user.


Path parameters

None

Query parameters

None

Request body

Create a strategy.

title · stringrequired

Strategy title.

description · string

Optional strategy description.

tags · string[]

Optional strategy tags.

image_url · string

Optional public strategy image URL.

organization_name · string

Optional organization name. Defaults to Personal organization.

organization_id · string

Optional stable organization id. Derived from organization_name when omitted.

{
  "title": "Momentum Breakout",
  "description": "Intraday FX breakout workflow.",
  "tags": [
    "fx",
    "breakout"
  ],
  "image_url": "https://images.example.com/momentum-breakout.png",
  "organization_name": "Quantarya Research"
}
Responses

201 · Strategy created.

strategy_id · stringrequired

Strategy identifier.

image_url · string | null

Optional public strategy image URL.

organization_id · stringrequired

Stable organization identifier used to group strategies.

organization_name · stringrequired

Human-readable organization name.

Strategies
GET
Bearer user JWT
Get strategy

/strategies/{strategy_id}

Return one strategy belonging to the authenticated user.


Path parameters

strategy_id · stringrequired

The target strategy identifier inside Quantarya.

Query parameters

None

Request body

None

Responses

200 · Strategy found.

strategy_id · stringrequired

Strategy identifier.

image_url · string | null

Optional public strategy image URL.

organization_id · stringrequired

Stable organization identifier used to group strategies.

organization_name · stringrequired

Human-readable organization name.

Strategies
DELETE
Bearer user JWT
Delete strategy

/strategies/{strategy_id}

Delete one strategy belonging to the authenticated user.


Path parameters

strategy_id · stringrequired

The target strategy identifier inside Quantarya.

Query parameters

None

Request body

None

Responses

200 · Strategy deleted.

strategy_id · stringrequired

Deleted strategy id.

Trades
GET
Bearer API key or user JWT
List trades

/strategies/{strategy_id}/trades

List all trades stored under one strategy.


Path parameters

strategy_id · stringrequired

The target strategy identifier inside Quantarya.

Query parameters

None

Request body

None

Responses

200 · Trade collection.

trade_id · stringrequired

Trade identifier.

symbol · stringrequired

Instrument symbol.

Trades
POST
Bearer API key or user JWT
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 Quantarya.

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"
  }
}
Trades
GET
Bearer API key or user JWT
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 Quantarya.

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.

Trades
PATCH
Bearer API key or user JWT
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 Quantarya.

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.

Trades
DELETE
Bearer API key or user JWT
Mark trade as deleted

/strategies/{strategy_id}/trades/{trade_id}

Soft-delete an existing trade while retaining the audit trail for inspection.


Path parameters

strategy_id · stringrequired

The target strategy identifier inside Quantarya.

trade_id · stringrequired

The trade identifier inside the target strategy.

Query parameters

None

Request body

None

Responses

200 · Trade marked as deleted.

trade_id · stringrequired

Trade identifier.

source · string | null

Signal source.

Trades
POST
Bearer API key or user JWT
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 Quantarya.

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.

User
GET
Bearer user JWT
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

Quantarya username.

display_name · string | null

Public display name.

bio · string | null

Public profile bio.

public_profile_enabled · booleanrequired

Whether the public profile is enabled.

User
POST
Bearer user JWT
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.

User
DELETE
Bearer user JWT
Delete account data

/me

Delete the current Quantarya account data and its dependent data.


Path parameters

None

Query parameters

None

Request body

None

Responses

200 · Account data deleted.

user_id · stringrequired

Deleted user id.

deleted_strategy_count · numberrequired

Deleted strategy count.

deleted_api_key_count · numberrequired

Deleted API key count.

Profiles
GET
None
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.