# Look up Escrows All pending escrows are stored in the ledger as [Escrow objects](/docs/concepts/payment-types/escrow). You can look them up by the sender's address or the destination address. You can only look up pending escrow objects by destination address if those escrows were created after the [fix1523 amendment](/resources/known-amendments#fix1523) was enabled on 2017-11-14. Use the [account_objects method](/docs/references/http-websocket-apis/public-api-methods/account-methods/account_objects), where the sender or destination address is the `account` value. Websocket Request: { "id": 5, "command": "account_objects", "account": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm", "ledger_index": "validated", "type": "escrow" } 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" } The response includes all pending escrow objects with `rfztBskAVszuS3s5Kq7zDS74QtHrw893fm`, where the sender address is the `Account` value, or the destination address is the `Destination` value. Javascript const response = await client.request({ "command": "account_objects", "account": account, "ledger_index": "validated", "type": "escrow" }) var incoming = [] var outgoing = [] for (var i = 0; i < response.result.account_objects.length; i++) { if (response.result.account_objects[i].Account == account) { outgoing.push(response.result.account_objects[i]) } else { incoming.push(response.result.account_objects[i]) } } console.log("\nIncoming/Received escrow(s):") for (var i = 0; i < incoming.length; i++) { console.log(`\n${i+1}. Index (ObjectID/keylet): ${incoming[i].index}`) console.log(` - Account: ${incoming[i].Account})`) console.log(` - Destination: ${incoming[i].Destination}`) console.log(` - Amount: ${incoming[i].Amount} drops`) } console.log("\nOutgoing/Sent escrow(s):") for (var i = 0; i < outgoing.length; i++) { console.log(`\n${i+1}. Index (ObjectID/keylet): ${outgoing[i].index}`) console.log(` - Account: ${outgoing[i].Account})`) console.log(` - Destination: ${outgoing[i].Destination}`) console.log(` - Amount: ${outgoing[i].Amount} drops`) } Python req = AccountObjects(account=account_address, ledger_index="validated", type="escrow") response = client.request(req) # Return account escrows escrows = response.result["account_objects"] # Loop through result and parse account escrows for escrow in escrows: escrow_data = {} if isinstance(escrow["Amount"], str): escrow_data["escrow_id"] = escrow["index"] escrow_data["sender"] = escrow["Account"] escrow_data["receiver"] = escrow["Destination"] escrow_data["amount"] = str(drops_to_xrp(escrow["Amount"])) if "PreviousTxnID" in escrow: escrow_data["prex_txn_id"] = escrow["PreviousTxnID"] if "FinishAfter" in escrow: escrow_data["redeem_date"] = str(ripple_time_to_datetime(escrow["FinishAfter"])) if "CancelAfter" in escrow: escrow_data["expiry_date"] = str(ripple_time_to_datetime(escrow["CancelAfter"])) if "Condition" in escrow: escrow_data["condition"] = escrow["Condition"] # Sort escrows if escrow_data["sender"] == account_address: sent_escrows.append(escrow_data) else: received_escrows.append(escrow_data) # Add lists to escrow dict all_escrows_dict["sent"] = sent_escrows all_escrows_dict["received"] = received_escrows print(all_escrows_dict) ## See Also - **Concepts:** - [What is XRP?](/docs/introduction/what-is-xrp) - [Payment Types](/docs/concepts/payment-types) - [Escrow](/docs/concepts/payment-types/escrow) - **Tutorials:** - [Send XRP](/docs/tutorials/how-tos/send-xrp) - [Look Up Transaction Results](/docs/concepts/transactions/finality-of-results/look-up-transaction-results) - [Reliable Transaction Submission](/docs/concepts/transactions/reliable-transaction-submission) - **References:** - [EscrowCancel transaction](/docs/references/protocol/transactions/types/escrowcancel) - [EscrowCreate transaction](/docs/references/protocol/transactions/types/escrowcreate) - [EscrowFinish transaction](/docs/references/protocol/transactions/types/escrowfinish) - [account_objects method](/docs/references/http-websocket-apis/public-api-methods/account-methods/account_objects) - [tx method](/docs/references/http-websocket-apis/public-api-methods/transaction-methods/tx) - [Escrow ledger object](/docs/references/protocol/ledger-data/ledger-entry-types/escrow)