const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.keystoneos.xyz/v1/admin/settlements/stuck', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotency_key": "<string>",
"platform_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"template_version": 123,
"external_reference": "<string>",
"settlement_type": "<string>",
"parties": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "<string>",
"platform_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_reference": "<string>",
"name": "<string>",
"wallet_address": "<string>",
"chain_id": 123,
"asset_provider": "<string>",
"status": "<string>",
"confirmed_at": "2023-11-07T05:31:56Z",
"wallet_address_hint": "<string>",
"counterparty_reference": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"legs": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"settlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"leg_type": "<string>",
"instrument_id": "<string>",
"chain_id": 123,
"token_standard": "<string>",
"quantity": "<string>",
"direction": "<string>",
"party_role": "<string>",
"status": "<string>",
"external_reference": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"state": "<string>",
"timeout_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"platform_name": "",
"environment_slug": ""
}
],
"total": 123,
"limit": 123,
"offset": 123
}Find settlements that may need admin attention. Returns non-terminal settlements that are past their timeout or have not been updated recently. Ordered by staleness (longest stuck first).
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.keystoneos.xyz/v1/admin/settlements/stuck', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotency_key": "<string>",
"platform_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"template_version": 123,
"external_reference": "<string>",
"settlement_type": "<string>",
"parties": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "<string>",
"platform_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_reference": "<string>",
"name": "<string>",
"wallet_address": "<string>",
"chain_id": 123,
"asset_provider": "<string>",
"status": "<string>",
"confirmed_at": "2023-11-07T05:31:56Z",
"wallet_address_hint": "<string>",
"counterparty_reference": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"legs": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"settlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"leg_type": "<string>",
"instrument_id": "<string>",
"chain_id": 123,
"token_standard": "<string>",
"quantity": "<string>",
"direction": "<string>",
"party_role": "<string>",
"status": "<string>",
"external_reference": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"state": "<string>",
"timeout_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"platform_name": "",
"environment_slug": ""
}
],
"total": 123,
"limit": 123,
"offset": 123
}Auth0 JWT access token. See Authentication for details.
Stale threshold in minutes
1 <= x <= 100801 <= x <= 100x >= 0