const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-staging.keystoneos.xyz/v1/demo/repos/{repo_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-staging.keystoneos.xyz/v1/demo/repos/{repo_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://api-staging.keystoneos.xyz/v1/demo/repos/{repo_id} \
--header 'Authorization: Bearer <token>'{
"schemaVersion": "bitgo-repo-demo.v1",
"repoId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revision": "<string>",
"templateId": "<string>",
"templateDigest": "<string>",
"termsDigest": "<string>",
"view": "source",
"createdAt": "2023-11-07T05:31:56Z",
"terms": {
"borrower": "client_a",
"lender": "client_b",
"collateral": {
"network": "canton-testnet",
"assetId": "tcanton",
"symbol": "testCC",
"decimals": 127,
"amountBaseUnits": "<string>"
},
"cash": {
"network": "sepolia",
"chainId": "11155111",
"tokenAddress": "<string>",
"symbol": "<string>",
"decimals": 127,
"principalBaseUnits": "<string>",
"repaymentBaseUnits": "<string>"
},
"maturityAt": "2023-11-07T05:31:56Z"
},
"opening": {
"phaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "opening",
"complete": false,
"movementIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"closing": {
"phaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "closing",
"openingPhaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"complete": false,
"movementIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"movements": [
{
"movementId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "opening_collateral",
"fromActor": "client_a",
"toActor": "client_a",
"assetId": "<string>",
"amountBaseUnits": "<string>",
"executionStatus": "not_started",
"signingStatus": "not_started",
"acceptanceStatus": "not_observed",
"ledgerStatus": "not_observed",
"bookStatus": "not_observed",
"evidence": [
"<unknown>"
],
"observedAt": null
}
],
"nextActions": [
"<unknown>"
],
"blockers": [
{
"code": "provider_execution_unqualified",
"message": "<string>"
}
],
"trust": {
"provider": "bitgo_test",
"custodyModel": "self_custody_mpc",
"reservation": "simulated",
"crossNetworkAtomicity": false
},
"authority": {
"state": "not_observed",
"observedAt": null
},
"decision": {
"state": "not_started",
"observedAt": null
},
"reservation": {
"mode": "simulated",
"state": "not_observed",
"observedAt": null
},
"asOf": {
"sequence": "<string>",
"observedAt": null
}
}{
"detail": "<string>",
"code": "INVALID_TOKEN",
"docs_url": "https://docs.keystoneos.xyz/guides/error-codes#http-error"
}{
"detail": "<string>",
"code": "INVALID_TOKEN",
"docs_url": "https://docs.keystoneos.xyz/guides/error-codes#http-error"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
],
"code": "VALIDATION_ERROR",
"docs_url": "https://docs.keystoneos.xyz/guides/error-codes#validation-error"
}Read demo repo
Requires the settlements:read scope (as an M2M scope or a user permission).
The repo in one view: the agreed economics, the four movements of the schedule and the shared progress. Source, custodian A and custodian B read the same terms; no view carries a wallet, a party, a participant’s identity or a provider record.
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-staging.keystoneos.xyz/v1/demo/repos/{repo_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-staging.keystoneos.xyz/v1/demo/repos/{repo_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://api-staging.keystoneos.xyz/v1/demo/repos/{repo_id} \
--header 'Authorization: Bearer <token>'{
"schemaVersion": "bitgo-repo-demo.v1",
"repoId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revision": "<string>",
"templateId": "<string>",
"templateDigest": "<string>",
"termsDigest": "<string>",
"view": "source",
"createdAt": "2023-11-07T05:31:56Z",
"terms": {
"borrower": "client_a",
"lender": "client_b",
"collateral": {
"network": "canton-testnet",
"assetId": "tcanton",
"symbol": "testCC",
"decimals": 127,
"amountBaseUnits": "<string>"
},
"cash": {
"network": "sepolia",
"chainId": "11155111",
"tokenAddress": "<string>",
"symbol": "<string>",
"decimals": 127,
"principalBaseUnits": "<string>",
"repaymentBaseUnits": "<string>"
},
"maturityAt": "2023-11-07T05:31:56Z"
},
"opening": {
"phaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "opening",
"complete": false,
"movementIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"closing": {
"phaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "closing",
"openingPhaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"complete": false,
"movementIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"movements": [
{
"movementId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "opening_collateral",
"fromActor": "client_a",
"toActor": "client_a",
"assetId": "<string>",
"amountBaseUnits": "<string>",
"executionStatus": "not_started",
"signingStatus": "not_started",
"acceptanceStatus": "not_observed",
"ledgerStatus": "not_observed",
"bookStatus": "not_observed",
"evidence": [
"<unknown>"
],
"observedAt": null
}
],
"nextActions": [
"<unknown>"
],
"blockers": [
{
"code": "provider_execution_unqualified",
"message": "<string>"
}
],
"trust": {
"provider": "bitgo_test",
"custodyModel": "self_custody_mpc",
"reservation": "simulated",
"crossNetworkAtomicity": false
},
"authority": {
"state": "not_observed",
"observedAt": null
},
"decision": {
"state": "not_started",
"observedAt": null
},
"reservation": {
"mode": "simulated",
"state": "not_observed",
"observedAt": null
},
"asOf": {
"sequence": "<string>",
"observedAt": null
}
}{
"detail": "<string>",
"code": "INVALID_TOKEN",
"docs_url": "https://docs.keystoneos.xyz/guides/error-codes#http-error"
}{
"detail": "<string>",
"code": "INVALID_TOKEN",
"docs_url": "https://docs.keystoneos.xyz/guides/error-codes#http-error"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
],
"code": "VALIDATION_ERROR",
"docs_url": "https://docs.keystoneos.xyz/guides/error-codes#validation-error"
}Authorizations
Auth0 JWT access token. See Authentication for details.
Path Parameters
Query Parameters
The view to answer. Omitted, the sole view granted to the caller's actor is answered; with several granted, one must be named. A view that is not granted is refused; naming one never grants it.
source, custodian_a, custodian_b Response
Successful Response
One view of a repo at one revision. The movements are the schedule the terms prescribe, in order, and the phases list exactly their own movements, so a snapshot cannot describe a transfer the terms do not.
"bitgo-repo-demo.v1"20^(0|[1-9][0-9]*)$^[\x21-\x7E]{1,255}$^[0-9a-f]{64}$^[0-9a-f]{64}$source, custodian_a, custodian_b Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
4 elementsShow child attributes
Show child attributes
1 elementShow child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes