feat(#39): Add a Statistics tab to the ledger view

This commit is contained in:
Sirttas
2026-07-26 12:07:49 +02:00
parent 04a9f197e8
commit 38e1063ac5
9 changed files with 425 additions and 2 deletions
+55 -1
View File
@@ -904,6 +904,34 @@ paths:
$ref: "#/components/schemas/TransactionResponse"
"404":
description: No ledger with this id
/ledgers/{ledgerId}/profit:
get:
tags:
- transaction
summary: Get the daily profit series for a single ledger
operationId: profitPerDayInLedger
parameters:
- name: ledgerId
in: path
description: Id of the ledger
required: true
schema:
type: string
format: uuid
responses:
"200":
description: "Daily profit for the ledger, ascending by date, only for days\
\ with ISK activity"
content:
'*/*':
schema:
type: array
items:
$ref: "#/components/schemas/DailyProfitResponse"
"400":
description: The ledger is the system ledger or a combined ledger
"404":
description: No ledger with this id
/ledgers/{ledgerId}/balance:
get:
tags:
@@ -1682,7 +1710,7 @@ components:
type: string
format: date-time
description: When the order was issued.
example: 2026-06-22T05:12:25Z
example: 2026-06-22T05:12:25
escrow:
type: number
description: ISK held in escrow for a buy order; null for sell orders.
@@ -1910,6 +1938,32 @@ components:
type: string
required:
- type
DailyProfitResponse:
type: object
description: "Profit for a single day: ISK in, ISK out, and their difference."
properties:
date:
type: string
format: date
description: The UTC (EVE) day this profit is for.
example: 2026-06-22
iskIn:
type: number
description: Total ISK that entered the ledger on this day.
example: 1500000.0
iskOut:
type: number
description: Total ISK that left the ledger on this day.
example: 500000.0
profit:
type: number
description: "Profit for the day: iskIn minus iskOut."
example: 1000000.0
required:
- date
- iskIn
- iskOut
- profit
BalanceResponse:
type: object
description: "The balance of a ledger: its ISK total plus the quantity of each\