Developers
API reference

Stakes

get/v1/stakes

List stakes in other ledgers

stakes.listread tokenidempotent

Every ledger this one owns a share of, with what the share is worth.

Parameters

limit
integer · query
Page size, 1–200.
cursor
string | null · query
The next_cursor of the previous page.
X-Organization-Id
string | null · header

Returns 200 · StakeList

data
array of Stake · required
has_more
boolean · required
next_cursor
string | null · required
Example
curl -X GET "https://api.lumaledger.app/v1/stakes" \
  -H "Authorization: Bearer $LUMALEDGER_TOKEN"
delete/v1/stakes/{stake_id}

Unlink a stake

stakes.deletewrite tokendestructiveidempotent

Stop counting the share: its value comes off this ledger from today, and its account is retired with its history. Takes an owner or admin.

Parameters

stake_id
integer · path · required
X-Organization-Id
string | null · header

Returns 204 with no body.

Example
curl -X DELETE "https://api.lumaledger.app/v1/stakes/{stake_id}" \
  -H "Authorization: Bearer $LUMALEDGER_TOKEN"
get/v1/stakes/{stake_id}

Get a stake

stakes.getread tokenidempotent

One stake and what it is worth.

Parameters

stake_id
integer · path · required
X-Organization-Id
string | null · header

Returns 200 · Stake

account_id
integer · required
The stake's asset account in this ledger.
held_name
string · required
What the owned ledger is, or was last, called.
held_organization_id
string | null · required
The ledger owned. Null once that ledger has been deleted.
id
integer · required
ownership_pct
string · required
The share owned, as a decimal string ("50.0000").
status
string · required
One of active, access_lost, source_deleted. Anything but active means the value is frozen as of valued_at: the person who linked it is no longer an owner or admin of the owned ledger, or that ledger was deleted.
value
Money · required
What the share is worth, in this ledger's base currency: the percentage of the owned ledger's assets minus liabilities, never below zero.
valued_at
datetime | null · required
When the value was last brought up to date.
Example
curl -X GET "https://api.lumaledger.app/v1/stakes/{stake_id}" \
  -H "Authorization: Bearer $LUMALEDGER_TOKEN"
patch/v1/stakes/{stake_id}

Change the share owned

stakes.updatewrite tokenidempotent

Set the percentage owned from today and revalue the stake. Takes an owner or admin of this ledger.

Parameters

stake_id
integer · path · required
X-Organization-Id
string | null · header

Body · StakeUpdate

ownership_pct
string · required
The share owned from today, as a decimal string between 0 and 100. Past values keep the share they had. Pattern: ^\d{1,3}(\.\d{1,4})?$.

Returns 200 · Stake

account_id
integer · required
The stake's asset account in this ledger.
held_name
string · required
What the owned ledger is, or was last, called.
held_organization_id
string | null · required
The ledger owned. Null once that ledger has been deleted.
id
integer · required
ownership_pct
string · required
The share owned, as a decimal string ("50.0000").
status
string · required
One of active, access_lost, source_deleted. Anything but active means the value is frozen as of valued_at: the person who linked it is no longer an owner or admin of the owned ledger, or that ledger was deleted.
value
Money · required
What the share is worth, in this ledger's base currency: the percentage of the owned ledger's assets minus liabilities, never below zero.
valued_at
datetime | null · required
When the value was last brought up to date.
Example
curl -X PATCH "https://api.lumaledger.app/v1/stakes/{stake_id}" \
  -H "Authorization: Bearer $LUMALEDGER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "ownership_pct": "…"
  }'
post/v1/stakes/{stake_id}/revalue

Revalue a stake now

stakes.revaluewrite tokenidempotent

Bring the stake to the owned ledger's value right now instead of at the next daily revaluation. Posts the change, if any, to this ledger.

Parameters

stake_id
integer · path · required
X-Organization-Id
string | null · header

Returns 200 · Stake

account_id
integer · required
The stake's asset account in this ledger.
held_name
string · required
What the owned ledger is, or was last, called.
held_organization_id
string | null · required
The ledger owned. Null once that ledger has been deleted.
id
integer · required
ownership_pct
string · required
The share owned, as a decimal string ("50.0000").
status
string · required
One of active, access_lost, source_deleted. Anything but active means the value is frozen as of valued_at: the person who linked it is no longer an owner or admin of the owned ledger, or that ledger was deleted.
value
Money · required
What the share is worth, in this ledger's base currency: the percentage of the owned ledger's assets minus liabilities, never below zero.
valued_at
datetime | null · required
When the value was last brought up to date.
Example
curl -X POST "https://api.lumaledger.app/v1/stakes/{stake_id}/revalue" \
  -H "Authorization: Bearer $LUMALEDGER_TOKEN"

Objects

Money

An amount and its currency. `amount` is a base-10 string with two decimal places and an optional leading minus sign. Parse it with a decimal type, not a float.

Fields

amount
string · required
Pattern: ^-?\d+\.\d{2}$.
currency
string · required
ISO 4217 code. Pattern: ^[A-Z]{3}$.

Stake

This ledger's share of another ledger.

Fields

account_id
integer · required
The stake's asset account in this ledger.
held_name
string · required
What the owned ledger is, or was last, called.
held_organization_id
string | null · required
The ledger owned. Null once that ledger has been deleted.
id
integer · required
ownership_pct
string · required
The share owned, as a decimal string ("50.0000").
status
string · required
One of active, access_lost, source_deleted. Anything but active means the value is frozen as of valued_at: the person who linked it is no longer an owner or admin of the owned ledger, or that ledger was deleted.
value
Money · required
What the share is worth, in this ledger's base currency: the percentage of the owned ledger's assets minus liabilities, never below zero.
valued_at
datetime | null · required
When the value was last brought up to date.

StakeList

A page of stakes, in id order.

Fields

data
array of Stake · required
has_more
boolean · required
next_cursor
string | null · required

StakeUpdate

Fields

ownership_pct
string · required
The share owned from today, as a decimal string between 0 and 100. Past values keep the share they had. Pattern: ^\d{1,3}(\.\d{1,4})?$.