Fix the golden example: a buy carries the NOK on leg_out_ore
This commit is contained in:
1 parent
36a6d13e20
commit
533a2af89d
1 file changed
+8
-4
@@ -69,14 +69,18 @@ def create_transaction(**fields):
|
|||||||
|
|
||||||
|
|
||||||
def golden_market():
|
def golden_market():
|
||||||
"""The four transactions of docs/spec.md section 6.4 on one account."""
|
"""The four transactions of docs/spec.md section 6.4 on one account.
|
||||||
|
|
||||||
|
A leg carries one currency only: a buy receives sats on leg_in and gives NOK
|
||||||
|
on leg_out, a sell receives NOK on leg_in and gives sats on leg_out.
|
||||||
|
"""
|
||||||
market_id = create_market("Børs_01")
|
market_id = create_market("Børs_01")
|
||||||
create_transaction(market_id=market_id, date="2024-01-10",
|
create_transaction(market_id=market_id, date="2024-01-10",
|
||||||
leg_in_sats=100000000, leg_in_ore=20000000)
|
leg_in_sats=100000000, leg_out_ore=20000000)
|
||||||
create_transaction(market_id=market_id, date="2024-04-10",
|
create_transaction(market_id=market_id, date="2024-04-10",
|
||||||
leg_in_sats=100000000, leg_in_ore=50000000)
|
leg_in_sats=100000000, leg_out_ore=50000000)
|
||||||
create_transaction(market_id=market_id, date="2024-08-10",
|
create_transaction(market_id=market_id, date="2024-08-10",
|
||||||
leg_in_sats=50000000, leg_in_ore=20000000)
|
leg_in_sats=50000000, leg_out_ore=20000000)
|
||||||
create_transaction(market_id=market_id, date="2024-11-10",
|
create_transaction(market_id=market_id, date="2024-11-10",
|
||||||
leg_in_ore=50000000, leg_out_sats=100000000, fee_ore=500000)
|
leg_in_ore=50000000, leg_out_sats=100000000, fee_ore=500000)
|
||||||
return market_id
|
return market_id
|
||||||
|
|||||||
Reference in new issue
Block a user