-
Notifications
You must be signed in to change notification settings - Fork 13
API Reference
Base URL: http://127.0.0.1:13370/api
The UI uses this API directly. If you build integrations, treat backend handler code as the source of truth.
Most endpoints return JSON. Scan-style endpoints return NDJSON (application/x-ndjson) with progress events.
Example NDJSON stream:
{"type":"progress","message":"Fetching orders..."}
{"type":"progress","message":"Analyzing..."}
{"type":"result","data":[...],"count":123,"scan_id":456}Message types:
progressresulterror
Returns backend readiness and ESI health.
{
"sde_loaded": true,
"sde_systems": 8035,
"sde_types": 47000,
"esi_ok": true,
"esi_last_ok": 1739942400
}esi_last_ok is optional.
Returns user-scoped config.
Partial update. Common fields:
system_namecargo_capacitybuy_radiussell_radiusmin_marginsales_tax_percentbroker_fee_percentsplit_trade_feesbuy_broker_fee_percentsell_broker_fee_percentbuy_sales_tax_percentsell_sales_tax_percentalert_telegramalert_discordalert_desktopalert_telegram_tokenalert_telegram_chat_idalert_discord_webhookopacity
Send test alert through configured external channels.
{"message":"optional custom text"}Response:
{
"sent": ["telegram", "discord"],
"failed": {"telegram":"..."}
}Returns StationsResponse:
{
"stations": [
{
"id": 60003760,
"name": "Jita IV - Moon 4 - Caldari Navy Assembly Plant",
"system_id": 30000142,
"region_id": 10000002
}
],
"region_id": 10000002,
"system_id": 30000142
}Radius scan (flip opportunities).
Common request fields:
-
system_name,cargo_capacity,buy_radius,sell_radius min_margin-
sales_tax_percent,broker_fee_percent - Optional split-fees:
split_trade_fees-
buy_broker_fee_percent,sell_broker_fee_percent -
buy_sales_tax_percent,sell_sales_tax_percent
- Advanced filters:
min_daily_volumemax_investment-
min_s2b_per_day,min_bfs_per_day -
min_s2b_bfs_ratio,max_s2b_bfs_ratio min_route_security
- Structures toggle:
include_structures
Response: NDJSON with FlipResult[].
Raw cross-region scan (backend primitive). Same base request as /api/scan plus optional:
-
target_region(region name string, not ID) -
source_regions(array of region names) -
target_market_system/target_market_location_id(optional narrowing)
Response: NDJSON with FlipResult[].
Regional Trade endpoint (current "regional day trader" flow used by Region tab).
This endpoint:
- runs raw cross-region scan,
- applies Regional Day Trader math/modeling,
- returns flattened rows with
Day*fields for Region table profile.
Required fields:
system_nametarget_market_system
Commonly used fields:
source_regionstarget_market_location_id-
buy_radius(used whensource_regionsis empty) cargo_capacitymin_margin-
sales_tax_percent,broker_fee_percent -
split_trade_feesand side-specific fee fields min_item_profitmin_period_roimax_dosmin_demand_per_daypurchase_demand_daysavg_price_periodmax_investmentshipping_cost_per_m3_jumpmin_daily_volume-
min_s2b_per_day,min_bfs_per_day -
min_s2b_bfs_ratio,max_s2b_bfs_ratio category_idssell_order_modeinclude_structures
Response: NDJSON with result payload:
{
"type": "result",
"data": [...],
"count": 1234,
"scan_id": 9876,
"cache_meta": {...},
"target_region_name": "The Forge",
"period_days": 14
}data rows are FlipResult-compatible and include Regional Trade metrics (DayNowProfit, DayPeriodProfit, DayROIPeriod, DayTargetDOS, DayTradeScore, etc.).
Contract scanner. Uses base scan fields plus:
min_contract_pricemax_contract_marginmin_priced_ratiorequire_historycontract_instant_liquidationcontract_hold_dayscontract_target_confidenceexclude_rigs_with_ship
Response: NDJSON with ContractResult[].
Station trading scanner.
Request (representative):
{
"station_id": 60003760,
"region_id": 10000002,
"system_name": "Jita",
"radius": 0,
"min_margin": 5,
"sales_tax_percent": 8,
"broker_fee": 3,
"cts_profile": "balanced",
"split_trade_fees": false,
"min_daily_volume": 5,
"min_item_profit": 100000,
"min_demand_per_day": 1,
"min_s2b_per_day": 1,
"min_bfs_per_day": 0,
"avg_price_period": 90,
"min_period_roi": 0,
"bvs_ratio_min": 0,
"bvs_ratio_max": 0,
"max_pvi": 0,
"max_sds": 50,
"limit_buy_to_price_low": false,
"flag_extreme_prices": true,
"include_structures": true,
"structure_ids": [1028858195912]
}Modes:
- Single station:
station_id+region_id - All stations in region:
region_idonly - Radius:
system_name+radius
Response: NDJSON with StationTrade[].
Route builder request:
-
system_name,cargo_capacity min_margin-
sales_tax_percent,broker_fee_percent - Optional split-fees fields (same as scans)
-
min_hops,max_hops min_route_securityinclude_structures
Response: NDJSON with RouteResult[].
Returns watchlist items (market-disabled items are filtered out server-side).
Add item:
{
"type_id": 34,
"type_name": "Tritanium",
"alert_min_margin": 0,
"alert_enabled": false,
"alert_metric": "margin_percent",
"alert_threshold": 0
}alert_metric allowed values:
margin_percenttotal_profitprofit_per_unitdaily_volume
Response:
{
"items": [...],
"inserted": true
}Update alert settings for existing item.
Remove item.
Query params:
-
type_id(optional) -
limit(optional, default100) -
offset(optional)
Clear body:
{"older_than_days": 7}/results returns:
{
"scan": {...},
"results": [...]
}For all result types, market-disabled items are filtered before response.
{
"type_id": 34,
"region_id": 10000002,
"location_id": 60003760,
"quantity": 100000,
"is_buy": true,
"impact_days": 30
}Notes:
-
location_id = 0means region scope. -
impact_daysis optional, clamped to1..365when provided.
GET /api/auth/loginGET /api/auth/callbackGET /api/auth/statusPOST /api/auth/logoutPOST /api/auth/character/selectDELETE /api/auth/characters/{characterID}
GET /api/auth/characterGET /api/auth/locationGET /api/auth/undercutsGET /api/auth/orders/deskGET /api/auth/portfolioGET /api/auth/portfolio/optimizeGET /api/auth/structuresGET /api/auth/roles
Scope query params (supported by most character endpoints):
-
character_id=<id>for explicit character -
scope=all(orcharacter_id=all) for multi-character aggregation where supported
GET /api/auth/structures query params:
system_idregion_id
These require active SSO session.
{"type_id": 34}{
"solar_system_id": 30000142,
"clear_other_waypoints": true,
"add_to_beginning": false
}{"contract_id": 215283695}Returns parsed contract details:
{
"contract_id": 215283695,
"items": [
{
"type_id": 34,
"type_name": "Tritanium",
"quantity": 1000,
"is_included": true,
"is_blueprint_copy": false
}
]
}-
POST /api/industry/analyze(NDJSON) GET /api/industry/searchGET /api/industry/systemsGET /api/industry/status
/analyze supports station_id (optional) in addition to system_name, fees, blueprint params, and depth options.
GET /api/demand/regionsGET /api/demand/hotzonesGET /api/demand/region/{regionID}GET /api/demand/opportunities/{regionID}GET /api/demand/fittings/{regionID}-
POST /api/demand/refresh(NDJSON)
Query params:
-
sales_tax(default3.6) -
broker_fee(default1.0) -
nes_extractor(optional override) -
nes_omega(optional override) -
omega_usd(optional)
Note: nes_mptc is not accepted by the current API handler.
GET /api/corp/dashboardGET /api/corp/membersGET /api/corp/walletsGET /api/corp/journalGET /api/corp/ordersGET /api/corp/industryGET /api/corp/mining
Most corp endpoints use ?mode=demo|live (demo default).
Main payload models:
-
FlipResult(internal/engine/models.go) -
StationTrade(internal/engine/station_trading.go) -
ContractResult(internal/engine/models.go) -
RouteResult/RouteHop(internal/engine/models.go)
For UI-oriented TypeScript shapes, see:
frontend/src/lib/types.ts
Errors are JSON:
{"error":"message"}Common status codes:
-
400invalid input -
401auth required/expired -
404not found -
500internal error -
502upstream ESI failure -
503SDE not ready
- 🏠 Home
- 📘 Getting Started
- ⚙️ Configuration
- 🎨 Theme System