Get FxDAO vault positions
Path Parameters
Stellar account or contract address
Query Parameters
Return data as of this ledger sequence number.
This is a request, not a guarantee. Gold stores a snapshot only when a position changes, so the parameter selects the latest snapshot at or before the ledger you name. There is no interpolation and no requirement that a snapshot exist at the pin.
The response reports both ledgers, and they are different fields:
meta.requested_ledger is the pin you supplied, echoed unchanged, and
meta.as_of_ledger is the snapshot ledger actually served. Read
the served ledger from meta.as_of_ledger; it is not an echo of this
parameter.
The served ledger can sit arbitrarily far below the request — a
position untouched for months is served from its last snapshot, and
that is a correct answer, not a degraded one. Because of this, sweeping
a range of pins across a dormant position returns the same values at
every pin. Compare meta.requested_ledger against meta.as_of_ledger
to see the gap and decide whether it is acceptable for your purpose.
A pin that predates the account's first snapshot returns empty data
with a null meta.as_of_ledger — absent state is served as absent,
never as zeros or as current state.
Note that amounts on this surface are reported at the vintage of the
snapshot that served them, not accrued forward to the requested
ledger. See /at/{ledger}, which accrues share balances forward using
the latest rate at or before the pin and reports the rate's own ledger.
For a position whose snapshot is far below the pin, the two surfaces
report different amounts for the same pin by design.
int640 <= valueResponse Body
application/json
application/json
application/json
curl -X GET "https://example.com/v1/users/string/positions/fxdao"{ "data": { "address": "string", "vaults": [ { "collateral": "string", "collateral_usd": "string", "collateralization_ratio": "string", "contract_address": "string", "debt": "string", "debt_usd": "string", "denomination": "string", "ledger": 0, "net_usd": "string", "usd_unavailable_reason": "string", "vault_index": "string" } ] }, "enrichment": { "assets": { "property1": { "decimals": 0, "price_source": null, "price_usd": "string", "symbol": "string", "tags": [ "string" ] }, "property2": { "decimals": 0, "price_source": null, "price_usd": "string", "symbol": "string", "tags": [ "string" ] } }, "contracts": { "property1": { "name": "string", "position_types": [ "collateral" ], "protocol": "string", "status": "active", "version": "string" }, "property2": { "name": "string", "position_types": [ "collateral" ], "protocol": "string", "status": "active", "version": "string" } } }, "meta": { "attribution_confidence": 0.1, "data_staleness_seconds": 0, "last_indexed_ledger": 0, "oracle_staleness_seconds": 0, "partial_result": true, "response_time_ms": 0, "sources": [ "soroban_rpc" ] }}