Patch docs/spec.md

This commit is contained in:
ai-bot committed 2026-11-15 10:30:36 +00:00
1 parent caaa61b0d8
commit baea90f046
1 file changed
+9 -6
+9 -6
View File
@@ -638,14 +638,17 @@ CSRF header. Errors are `{"error": "<nynorsk message>", "field": "<field name or
empty means "use the method".
The API takes sats as a whole number: `1500000` or `"1 500 000"`. A decimal number of BTC is
rejected. A NOK amount may carry two decimals, as the storage is øre.
rejected. A kroner amount may carry two decimals, as the storage is øre. A fee is sent as
`fee_sats` only: `fee_ore` is never sent by a client and stays 0 in the database.
For `admin_cost`, `market_id` must be absent or null, `lot_picks` are rejected, and a fee is
rejected; the account is not required and not looked up.
For `admin_cost`, the amount is sent as `leg_out_ore`, `market_id` must be absent or null,
`lot_picks` are rejected, and a fee is rejected; the account is not required and not looked up.
Every transaction object carries `btc_price_ore`: the bitcoin price of §7.3 in øre per whole
BTC, or null when the type has no price. The lot objects carry the same field name for the same
unit, worked out from the lot's remaining cost and sats.
Every transaction object carries `btc_price_ore`: the price of §7.3 in øre per whole BTC, or
null when the type has no price. For a `transfer_out` it is worked out from the consumed lots
(`cost_ore` and `consumed_sats`), and for a `transfer_in` from its own mirrored lots
(`lot_cost_ore` and `lot_sats`), so the two sides agree. The lot objects carry `btc_price_ore`
for the same unit, worked out from the lot's remaining cost and sats.
The CSV export is a plain semicolon-separated file with a UTF-8 BOM so it opens correctly in a
Norwegian Excel: one block of report rows, then one block of the year's transactions with the