> For the complete documentation index, see [llms.txt](https://docs.trustlesswork.com/trustless-work/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.trustlesswork.com/trustless-work/v2-en/api-rest/escrow-information/get-multiple-escrow-balance.md).

# Get Escrows Financial

Balances, deposits, releases and fees for up to 50 escrows via GET /escrows/financial.

{% hint style="info" %}
This endpoint replaces `GET /helper/get-multiple-escrow-balance`. It returns more than the balance — the whole financial picture of each escrow.
{% endhint %}

### **Headers**

<table><thead><tr><th width="366">Name</th><th>Value</th></tr></thead><tbody><tr><td>Content-Type</td><td><code>application/json</code></td></tr><tr><td>x-api-key</td><td><code>&#x3C;token></code></td></tr></tbody></table>

### Open API

## Read the projected financials of a batch of escrows

> Pass up to 50 contract addresses and get, for each known escrow, the PROJECTED financial view: fee, total amount, summed deposit trail, released/pending value, next tranche and a projected balance. Derived from the read-model only (never a chain call), so figures are eventually consistent — the authoritative balance lives on-chain. Unknown ids are silently absent.

```json
{"openapi":"3.0.0","info":{"title":"👋🏼 Trustless Work Core API — All Endpoints (Unified)","version":"1.0"},"servers":[{"url":"https://beta.api.trustlesswork.com"}],"security":[{}],"paths":{"/escrows/financial":{"get":{"description":"Pass up to 50 contract addresses and get, for each known escrow, the PROJECTED financial view: fee, total amount, summed deposit trail, released/pending value, next tranche and a projected balance. Derived from the read-model only (never a chain call), so figures are eventually consistent — the authoritative balance lives on-chain. Unknown ids are silently absent.","operationId":"EscrowQueryController_financialBatch","parameters":[{"name":"contractIds","required":true,"in":"query","description":"On-chain contract addresses (repeat the param: `contractIds=C…&contractIds=C…`, 1–50). Inaccessible or unknown ids are silently absent from the response.","schema":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EscrowFinancialListResponse"}}}},"400":{"description":"Request body or query params fail schema validation (wrong type, missing required field, unknown property).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailsResponseDto"}}}},"401":{"description":"Missing, malformed, expired, revoked or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailsResponseDto"}}}},"403":{"description":"API key is valid but does not have the role required for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailsResponseDto"}}}},"422":{"description":"Payload is well-formed but a business rule rejects it (e.g. amount out of range, role not allowed for this user).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailsResponseDto"}}}}},"summary":"Read the projected financials of a batch of escrows","tags":["Escrows"]}}},"components":{"schemas":{"EscrowFinancialListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EscrowFinancialResponse"}}},"required":["data"]},"EscrowFinancialResponse":{"type":"object","properties":{"contractId":{"type":"string","description":"On-chain escrow contract (C...)."},"type":{"type":"object","description":"Detected contract flavor. Null until the first state.","nullable":true},"asset":{"type":"object","nullable":true,"description":"Trustline asset as promoted from the snapshot (raw C... contract id). Prefer `assetInfo` for a resolved view.","deprecated":true},"assetInfo":{"nullable":true,"description":"The trustline asset, resolved (same shape as the escrow-root `asset` object). Null until the first state is projected.","type":"object","allOf":[{"$ref":"#/components/schemas/EscrowAssetResponse"}]},"platformFee":{"type":"object","nullable":true,"description":"Escrow-level fee as a percentage (decimal string)."},"totalAmount":{"type":"object","nullable":true,"description":"Total escrowed amount in token units (decimal string)."},"totalDeposited":{"type":"string","description":"Sum of the recorded deposit trail, in token units (decimal string)."},"totalReleased":{"type":"string","description":"Value already released per the projected state, in token units."},"pendingRelease":{"type":"string","description":"Value not yet released, in token units."},"nextRelease":{"nullable":true,"description":"Next unreleased tranche, or null when nothing remains.","type":"object","allOf":[{"$ref":"#/components/schemas/NextReleaseResponse"}]},"balance":{"type":"string","description":"totalDeposited minus totalReleased — the balance as projected from the recorded trail. The authoritative balance lives on-chain."}},"required":["contractId","totalDeposited","totalReleased","pendingRelease","balance"]},"EscrowAssetResponse":{"type":"object","properties":{"name":{"type":"object","nullable":true,"description":"Asset code / SEP-41 symbol. Null while unresolved."},"address":{"type":"object","nullable":true,"description":"Issuer account (G...) of the wrapped classic asset. Null for pure Soroban tokens or while unresolved."},"contractId":{"type":"object","nullable":true,"description":"Soroban token contract (C...) from the escrow trustline."},"decimals":{"type":"number","description":"Decimals every amount in this payload was scaled with. Falls back to 7 (Stellar classic) while the token metadata is unresolved — check `resolved`."},"resolved":{"type":"boolean","description":"False while the token metadata is unresolved: `decimals` is then the 7-decimal fallback, so amounts of a custom token may be scaled wrong until the cache self-heals. Re-scale client-side or hold rendering while false."}},"required":["decimals","resolved"]},"NextReleaseResponse":{"type":"object","properties":{"milestoneIndex":{"type":"object","nullable":true,"description":"Milestone carrying the tranche; null for single-release (the whole escrow is the tranche)."},"amount":{"type":"string","description":"Amount in token units (decimal string)."}},"required":["amount"]},"ProblemDetailsResponseDto":{"type":"object","properties":{"type":{"type":"string","description":"Stable URI identifying the error type. Hash-link points to the docs."},"title":{"type":"string","description":"Short human-readable summary of the problem."},"status":{"type":"number","description":"HTTP status code, repeated here for typed clients."},"code":{"type":"string","description":"Machine-readable error code. Stable across versions; safe to switch on."},"detail":{"type":"string","description":"Human-readable explanation specific to this occurrence."},"instance":{"type":"string","description":"URI of the request that triggered the error."},"traceId":{"type":"string","description":"Correlation id propagated from the `X-Trace-Id` header (or generated). Use it when contacting support to reference a specific request."},"extensions":{"type":"object","description":"Optional structured context. Shape depends on the error code; documented per-endpoint when relevant.","additionalProperties":true}},"required":["type","title","status","code","detail"]}}}}
```

## GET /escrows/financial

Returns the financial view of up to 50 escrows in a single request.

### Query parameters

| Name        | Type             | Description                                                  |
| ----------- | ---------------- | ------------------------------------------------------------ |
| contractIds | string\[] (1–50) | Contract addresses (`C…`). Repeat the parameter once per id. |

### **What this Endpoint returns?**

For each escrow:

| Field          | Meaning                                             |
| -------------- | --------------------------------------------------- |
| balance        | Projected current balance held by the escrow        |
| totalDeposited | Everything ever deposited                           |
| totalReleased  | Everything already released                         |
| pendingRelease | Approved but not yet released                       |
| nextRelease    | The next release due, when determinable             |
| fee            | Platform fee configured for the escrow              |
| asset          | Resolved asset: name, address, contractId, decimals |

All amounts are **decimal strings**, not floats — parse them with a decimal library rather than `Number()` if you intend to do arithmetic on them.

Unknown ids are silently absent from the response.

### Use Example:

```typescript
import axios from "axios";

const http = axios.create({
  baseURL: "https://beta.api.trustlesswork.com",
  timeout: 10000,
  headers: {
    "Content-Type": "application/json",
    "x-api-key": your_api_key,
  },
});

export const useExample = async () => {
  const contractIds = [
    "CCR6HLU3LQMXOESNA6TOS2RZKGEBWQG3EN5FMZNC43RVXZWTTDCZ...",
    "CCA7WTCVCQ5JPKNIFSHPSJLJ3FJ3GKPNEVAIHP6T..."
  ];

  const params = new URLSearchParams();
  contractIds.forEach(id => params.append("contractIds", id));

  const response = await http.get(`/escrows/financial?${params.toString()}`);
  return response.data;
}
```

{% hint style="warning" %}
`balance` comes from the read-model, which is eventually consistent. Right after funding an escrow it may still show the previous value — poll rather than treating it as an error.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.trustlesswork.com/trustless-work/v2-en/api-rest/escrow-information/get-multiple-escrow-balance.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
