Look up escrows

All pending escrows are stored in the ledger as Escrow objects.

You can look up escrow objects by the sender's address or the destination address using the account_objects method.

Look up escrows by sender address

You can use the account_objects method to look up escrow objects by sender address.

Let's say that you want to look up all pending escrow objects with a sender address of rfztBskAVszuS3s5Kq7zDS74QtHrw893fm. You can do this using the following example request, where the sender address is the account value.

Request:

{
  "id": 5,
  "command": "account_objects",
  "account": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm",
  "ledger_index": "validated",
  "type": "escrow"
}

The response resembles the following example. Note that the response includes all pending escrow objects with rfztBskAVszuS3s5Kq7zDS74QtHrw893fm as the sender or destination address, where the sender address is the Account value and the destination address is the Destination value.

In this example, the second and fourth escrow objects meet our lookup criteria because their Account (sender address) values are set to rfztBskAVszuS3s5Kq7zDS74QtHrw893fm.

Response:

{
  "id": 5,
  "result": {
    "account": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm",
    "account_objects": [{
      "Account": "rafD3taonqdnVpaxCCT6sjnScZUeFGf1JG",
      "Amount": "250",
      "Destination": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm",
      "DestinationNode": "0000000000000000",
      "FinishAfter": 570672000,
      "Flags": 0,
      "LedgerEntryType": "Escrow",
      "OwnerNode": "0000000000000000",
      "PreviousTxnID": "A0951691DF3BCBEEB3108F2229A702D078BBBF848268BC601E59B68A2E390AAC",
      "PreviousTxnLgrSeq": 4602906,
      "index": "2BF3226ACCA8FF7ACB7201F20A701F51D8666A2FA2FBFBE6A05C9161F9228A18"
    }, {
      "Account": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm",
      "Amount": "250",
      "Destination": "r9gyNNzhMtfwZara61u3ycfMLdkTpKJZHX",
      "DestinationNode": "0000000000000000",
      "FinishAfter": 570672000,
      "Flags": 0,
      "LedgerEntryType": "Escrow",
      "OwnerNode": "0000000000000000",
      "PreviousTxnID": "463D5A3CF09F4890B8471027F80414B3B438E6907425B71DC324D7118E90A107",
      "PreviousTxnLgrSeq": 4603003,
      "index": "35462CDC28AD830B29D101E8307AF5B6BFBC262F1BDCCA7EB45D1CA3F8B44F53"
    }, {
      "Account": "r9gyNNzhMtfwZara61u3ycfMLdkTpKJZHX",
      "Amount": "250",
      "Destination": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm",
      "DestinationNode": "0000000000000000",
      "FinishAfter": 570672000,
      "Flags": 0,
      "LedgerEntryType": "Escrow",
      "OwnerNode": "0000000000000000",
      "PreviousTxnID": "08C9B20AC9EB191238038A108CC4CBBC0243672484B466FB42DED0A7DF6A31A1",
      "PreviousTxnLgrSeq": 4602954,
      "index": "A7B0983A1B53D92278E21499064A4F8BBE08CB8D14DB6BBBA8F688AB1D3FDA45"
    }, {
      "Account": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm",
      "Amount": "250",
      "Destination": "rafD3taonqdnVpaxCCT6sjnScZUeFGf1JG",
      "DestinationNode": "0000000000000000",
      "FinishAfter": 570672000,
      "Flags": 0,
      "LedgerEntryType": "Escrow",
      "OwnerNode": "0000000000000000",
      "PreviousTxnID": "F4778F528AB3CB945BDB88036EF9FE6C0E899F1629D9E51129E3B93CD488395A",
      "PreviousTxnLgrSeq": 4602977,
      "index": "F99A4DDADDDF623908C9A048170AB107AFF78684AB8F3110E9F00BBBC606ABD2"
    }],
    "ledger_hash": "1D4850035F175CA6F1CD5CE3B53C01AA83E4F086C13085E4FBC1EEFCCB345A9B",
    "ledger_index": 4603176,
    "validated": true
  },
  "status": "success",
  "type": "response"
}

Look up escrows by destination address

You can use the account_objects method to look up escrow objects by destination address.

Note: You can only look up pending escrow objects by destination address if those escrows were created after the fix1523 amendment was enabled on 2017-11-14.

Let's say that you want to look up all pending escrow objects with a destination address of rfztBskAVszuS3s5Kq7zDS74QtHrw893fm. You can do this using the following example request, where the destination address is the account value.

Request:

{
  "id": 5,
  "command": "account_objects",
  "account": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm",
  "ledger_index": "validated",
  "type": "escrow"
}

The response resembles the following example. Note that the response includes all pending escrow objects with rfztBskAVszuS3s5Kq7zDS74QtHrw893fm as the destination or sender address, where the destination address is the Destination value and the sender address is the Account value.

In this example, the first and third escrow objects meet our lookup criteria because their Destination (destination address) values are set to rfztBskAVszuS3s5Kq7zDS74QtHrw893fm.

Response:

{
  "id": 5,
  "result": {
    "account": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm",
    "account_objects": [{
      "Account": "rafD3taonqdnVpaxCCT6sjnScZUeFGf1JG",
      "Amount": "250",
      "Destination": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm",
      "DestinationNode": "0000000000000000",
      "FinishAfter": 570672000,
      "Flags": 0,
      "LedgerEntryType": "Escrow",
      "OwnerNode": "0000000000000000",
      "PreviousTxnID": "A0951691DF3BCBEEB3108F2229A702D078BBBF848268BC601E59B68A2E390AAC",
      "PreviousTxnLgrSeq": 4602906,
      "index": "2BF3226ACCA8FF7ACB7201F20A701F51D8666A2FA2FBFBE6A05C9161F9228A18"
    }, {
      "Account": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm",
      "Amount": "250",
      "Destination": "r9gyNNzhMtfwZara61u3ycfMLdkTpKJZHX",
      "DestinationNode": "0000000000000000",
      "FinishAfter": 570672000,
      "Flags": 0,
      "LedgerEntryType": "Escrow",
      "OwnerNode": "0000000000000000",
      "PreviousTxnID": "463D5A3CF09F4890B8471027F80414B3B438E6907425B71DC324D7118E90A107",
      "PreviousTxnLgrSeq": 4603003,
      "index": "35462CDC28AD830B29D101E8307AF5B6BFBC262F1BDCCA7EB45D1CA3F8B44F53"
    }, {
      "Account": "r9gyNNzhMtfwZara61u3ycfMLdkTpKJZHX",
      "Amount": "250",
      "Destination": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm",
      "DestinationNode": "0000000000000000",
      "FinishAfter": 570672000,
      "Flags": 0,
      "LedgerEntryType": "Escrow",
      "OwnerNode": "0000000000000000",
      "PreviousTxnID": "08C9B20AC9EB191238038A108CC4CBBC0243672484B466FB42DED0A7DF6A31A1",
      "PreviousTxnLgrSeq": 4602954,
      "index": "A7B0983A1B53D92278E21499064A4F8BBE08CB8D14DB6BBBA8F688AB1D3FDA45"
    }, {
      "Account": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm",
      "Amount": "250",
      "Destination": "rafD3taonqdnVpaxCCT6sjnScZUeFGf1JG",
      "DestinationNode": "0000000000000000",
      "FinishAfter": 570672000,
      "Flags": 0,
      "LedgerEntryType": "Escrow",
      "OwnerNode": "0000000000000000",
      "PreviousTxnID": "F4778F528AB3CB945BDB88036EF9FE6C0E899F1629D9E51129E3B93CD488395A",
      "PreviousTxnLgrSeq": 4602977,
      "index": "F99A4DDADDDF623908C9A048170AB107AFF78684AB8F3110E9F00BBBC606ABD2"
    }],
    "ledger_hash": "1D4850035F175CA6F1CD5CE3B53C01AA83E4F086C13085E4FBC1EEFCCB345A9B",
    "ledger_index": 4603176,
    "validated": true
  },
  "status": "success",
  "type": "response"
}

See Also