{"templateId":"markdown","versions":[{"version":"v1.39","label":"v1.39 STS","link":"/products/custody/accounts-and-assets/tokenization/ledger-specific/xrpl-api","default":true,"active":true,"folderId":"c15a2701"},{"version":"v1.38","label":"v1.38 STS","link":"/products/custody/v1.38/accounts-and-assets/tokenization/ledger-specific/xrpl-api","default":false,"active":false,"folderId":"c15a2701"},{"version":"v1.34","label":"v1.34 LTS","link":"/products/custody/v1.34/accounts-and-assets/tokenization/ledger-specific/xrpl-api","default":false,"active":false,"folderId":"c15a2701"},{"version":"v1.26","label":"v1.26 LTS","link":"/products/custody/v1.26/accounts-and-assets/tokenization/ledger-specific/xrpl-api","default":false,"active":false,"folderId":"c15a2701"},{"version":"v1.19","label":"v1.19 LTS","link":"/products/custody/v1.19/accounts-and-assets/tokenization/ledger-specific/xrpl-api","default":false,"active":false,"folderId":"c15a2701"},{"version":"v1.15","label":"v1.15 LTS","link":"/products/custody/v1.15/accounts-and-assets/tokenization/ledger-specific/xrpl-api","default":false,"active":false,"folderId":"c15a2701"}],"sharedDataIds":{"sidebar":"sidebar-products/custody/@v1.15/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["partial","admonition"]},"type":"markdown"},"seo":{"title":"Manage XRPL tokens with the API","description":"User guides, API reference, and support resources.","siteUrl":"https://docs.ripple.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"manage-xrpl-tokens-with-the-api","__idx":0},"children":["Manage XRPL tokens with the API"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can perform the following fungible token management operations on the XRP ledger:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Manage trust lines, including trust line creation, settings, and freezing"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Preauthorize deposits on an account"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Claw back tokens from an account"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Trade tokens in the decentralized exchange (DEX)"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Each of these operations involves the creation of a transaction order."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can also issue XRPL fungible tokens with a transfer order or transaction order. Transfer orders are the recommended method for sending all assets, including XRPL tokens."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For more information about:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Issuing tokens with a transfer order, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/transactions/send-and-receive/send-assets-api"},"children":["Send assets"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Trading tokens on the DEX, see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://xrpl.org/docs/tutorials/how-tos/use-tokens/trade-in-the-decentralized-exchange","target":"_blank"},"children":["Trade in the Decentralized Exchange"]}," in the XRPL documentation"]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"System change process"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All new requests to change the system state follow the same process. To familiarize yourself with this process first, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/governance/intents/manage-intents-and-approvals"},"children":["Manage intents and approvals"]},"."]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This page covers XRPL fungible tokens using trust lines. For Multi-Purpose Tokens (MPTs), see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/accounts-and-assets/tokenization/xrpl-mpts"},"children":["Multi-Purpose Tokens"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"xrpl-token-decimals-and-amounts","__idx":1},"children":["XRPL token decimals and amounts"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["XRPL uses decimal values for fungible tokens, but ","Ripple Custody"," only supports integers. Based on the smallest possible token value in XRPL (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1000000000000000e-96"]},") ","Ripple Custody"," represents this as 1 and registers the token asset with 81 decimals."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This means that to send 1 unit of a token, you must be represent it as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1000000000000000000000000000000000000000000000000000000000000000000000000000000000"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For an example of an XRPL token payload, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/accounts-and-assets/tokenization/token-management/api/add-custom-token"},"children":["Add tokens"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"manage-trust-lines","__idx":2},"children":["Manage trust lines"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A trust line is an accounting relationship between two accounts: a token ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["issuer"]}," account, which controls the tokens, and a token ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["holder"]}," account, which receives the tokens. A trust line:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Creates a trust relationship between accounts for trading fungible tokens"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Is identified by the account pair and currency symbol"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Provides a structure to hold the tokens"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In a given trust line, the token issuer has a negative balance equal to the positive balance of the token holder. For example, if the token holder holds 10 tokens issued by the issuer:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The issuer account has a balance of -10 tokens"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The holder account has a balance of 10 tokens"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For more information about trust lines, see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://xrpl.org/docs/concepts/tokens/fungible-tokens#trust-lines","target":"_blank"},"children":["Trust Lines"]}," in the XRPL documentation."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In ","Ripple Custody",", you can create a trust line in two ways:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["With an issuer account and currency"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["With a validated fungible token asset"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"prerequisites","__idx":3},"children":["Prerequisites"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To create trust lines, you need the following:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Prerequisite"},"children":["Prerequisite"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Additional information"},"children":["Additional information"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The account ID of the holder account."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/accounts-and-assets/accounts/manage-accounts-api#view-account-details"},"children":["View account details"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The address of the token issuer account, or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tickerId"]}," of an allowlisted fungible token."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["If you want to use:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["An account address, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/accounts-and-assets/accounts/manage-accounts-api#view-account-details"},"children":["View account details"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A token, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/accounts-and-assets/tokenization/token-management/api/view-tokens"},"children":["View tokens"]}]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Enough funds in the accounts to cover the transaction and all reserves, including the network reserve of 10 XRP and the reserve of 2 XRP for each object held in the account, including the account itself."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/accounts-and-assets/accounts/manage-accounts-api#check-account-balances"},"children":["Check account balances"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The following new IDs, in a standard UUID format:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A transaction order ID"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["An intent ID"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"create-a-trust-line","__idx":4},"children":["Create a trust line"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can use the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TrustSet"]}," operation to create new trust lines."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For more information about the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TrustSet"]}," operation, see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://xrpl.org/docs/references/protocol/transactions/types/trustset#trustset","target":"_blank"},"children":["TrustSet"]}," in the XRPL documentation."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Creation of a trust line adds a reserved amount of 2 XRP. For more information about reserved amounts, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/accounts-and-assets/accounts/manage-accounts-api#check-account-balances"},"children":["Check account balances"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To create a trust line, follow the steps in ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/governance/intents/manage-intents-and-approvals"},"children":["Manage intents and approvals"]},", with a transaction order payload similar to one of the following examples."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"payload-examples","__idx":5},"children":["Payload examples"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following example creates a trust line between a holder account and an issuer account specified with a code and issuer address:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"payload\": {\n        \"id\": \"8fd2d859-77de-4bcc-976c-3f4ccdfdcc3d\",\n        \"accountId\": \"c8b9519a-be18-4db7-9aca-cce93834841b\",\n        \"parameters\": {\n            \"operation\": {\n                \"type\": \"TrustSet\",\n                \"flags\": [],\n                \"enableRippling\": false,\n                \"limitAmount\": {\n                    \"currency\": {\n                        \"code\": \"USD\",\n                        \"issuer\": \"rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B\",\n                        \"type\": \"Currency\"\n                    },\n                    \"value\": \"100\",\n                },\n            }\n            \"sourceTag\": 123456,\n            \"memos\": [],\n            \"feeStrategy\": {\n                \"drops\": \"5\",\n                \"type\": \"SpecifiedAdditionalFee\"\n            },\n            \"maximumFee\": \"50\",\n            \"type\": \"XRPL\",\n        },\n        \"description\": \"string\",\n        \"customProperties\": {},\n        \"type\": \"v0_CreateTransactionOrder\"\n    }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following example creates a trust line between a holder account and an issuer account specified with a ticker ID:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"payload\": {\n        \"id\": \"8fd2d859-77de-4bcc-976c-3f4ccdfdcc3d\",\n        \"accountId\": \"c8b9519a-be18-4db7-9aca-cce93834841b\",\n        \"parameters\": {\n            \"operation\": {\n                \"type\": \"TrustSet\",\n                \"flags\": [],\n                \"enableRippling\": false,\n                \"limitAmount\": {\n                    \"currency\": {\n                       \"tickerId\": \"3334a1d5-1176-401f-b534-ec13a6b5ee8e\",\n                       \"type\": \"TickerId\"\n                    },\n                    \"value\": \"100\",\n                },\n            }\n            \"sourceTag\": 123456,\n            \"memos\": [],\n            \"feeStrategy\": {\n                \"drops\": \"5\",\n                \"type\": \"SpecifiedAdditionalFee\"\n            },\n            \"maximumFee\": \"50\",\n            \"type\": \"XRPL\",\n        },\n        \"description\": \"string\",\n        \"customProperties\": {},\n        \"type\": \"v0_CreateTransactionOrder\"\n    }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Fields of the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payload"]}," block to note are as follows:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ID of the transaction order"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["accountId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ID of the holder account"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parameters.operation"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Details of the operation:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TrustSet"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flags"]},": A list of flags to set for the trust line. The options are ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tfSetFreeze"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tfClearFreeze"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tfSetAuth"]},". "]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["enableRippling"]},": Enables settlement through rippling for these accounts. This field is optional and set to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}," by default.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"For more information, see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://xrpl.org/docs/concepts/tokens/fungible-tokens/rippling#rippling","target":"_blank"},"children":["Rippling"]}," in the XRPL documentation. "]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["limitAmount.currency"]},": Details of the trust line, either:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Currency"]},": Currency code and issuer account address. The currency code must be a three-character string or a 160-bit hexadecimal string.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"For more information, see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://xrpl.org/docs/references/protocol/data-types/currency-formats#currency-codes","target":"_blank"},"children":["Currency Codes"]}," in the XRPL documentation."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TickerId"]},": ID of an asset that is a validated XRPL fungible token."]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["limitAmount.value"]},": Maximum balance of tokens that the holder account is willing to hold."]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parameters.feeStrategy"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The fee strategy to use for the transaction.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"For more information, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/transactions/reference#fee-strategy-and-maximum-fee"},"children":["Fee strategy and maximum fee"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parameters.maximumFee"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The maximum fee, in drops.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"For more information, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/transactions/reference#fee-strategy-and-maximum-fee"},"children":["Fee strategy and maximum fee"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parameters.type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Ledger type, in this case ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["XRPL"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_CreateTransactionOrder"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"create-an-authorized-trust-line","__idx":6},"children":["Create an authorized trust line"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can use the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TrustSet"]}," operation with flag ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tfSetAuth"]}," to authorize the counterparty to hold assets."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This setting is only relevant if ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["asfRequireAuth"]}," is enabled for the holder account. For more information, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/accounts-and-assets/accounts/ledger-specific-settings/xrpl-api"},"children":["Update XRPL account settings"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To create an authorized trust line, follow the steps in ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/governance/intents/manage-intents-and-approvals"},"children":["Manage intents and approvals"]},", with a transaction order payload similar to the examples in ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#create-a-trust-line"},"children":["Create a trust line"]},". The key fields to note are:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["accountID"]},": The holder account ID."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flags"]},": Set to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tfSetAuth"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"freeze-or-unfreeze-a-trust-line","__idx":7},"children":["Freeze or unfreeze a trust line"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can use the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TrustSet"]}," operation with flags ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tfSetFreeze"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tfClearFreeze"]}," to freeze and unfreeze trust lines."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You cannot freeze the trust line if ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["asfNoFreeze"]}," is enabled for the issuer account. For more information, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/accounts-and-assets/accounts/ledger-specific-settings/xrpl-api"},"children":["Update XRPL account settings"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To freeze or unfreeze a trust line, follow the steps in ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/governance/intents/manage-intents-and-approvals"},"children":["Manage intents and approvals"]},", with a transaction order payload similar to the examples in ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#create-a-trust-line"},"children":["Create a trust line"]},". The key fields to note are:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["accountID"]},": The issuer account ID."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flags"]},": Set to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tfSetFreeze"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tfClearFreeze"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"authorize-an-account-to-hold-tokens-in-a-trust-line","__idx":8},"children":["Authorize an account to hold tokens in a trust line"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can use the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TrustSet"]}," operation with flag ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tfSetAuth"]}," to authorize a holder account to hold tokens in a trust line."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This setting is only relevant if ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["asfRequireAuth"]}," is enabled for the holder account. For more information, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/accounts-and-assets/accounts/ledger-specific-settings/xrpl-api"},"children":["Update XRPL account settings"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To authorize an account, follow the steps in ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/governance/intents/manage-intents-and-approvals"},"children":["Manage intents and approvals"]},", with a transaction order payload similar to the examples in ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#create-a-trust-line"},"children":["Create a trust line"]},". The key fields to note are:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["accountID"]},": The holder account ID."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flags"]},": Set to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tfSetAuth"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"preauthorize-deposits-on-an-account","__idx":9},"children":["Preauthorize deposits on an account"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can use the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DepositPreAuth"]}," operation to authorize an account to send tokens and XRP to the holder account. You can also remove authorization from an authorized account."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For more information about the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DepositPreAuth"]}," operation, see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://xrpl.org/docs/references/protocol/transactions/types/depositpreauth","target":"_blank"},"children":["DepositPreAuth"]}," in the XRPL documentation."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This operation is only valid for accounts with the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["asfDepositAuth"]}," setting enabled."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For more information, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/accounts-and-assets/accounts/ledger-specific-settings/xrpl-api"},"children":["Update XRPL account settings"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To authorize or unauthorize an account, follow the steps in ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/governance/intents/manage-intents-and-approvals"},"children":["Manage intents and approvals"]}," with a transaction order payload similar to one of the following examples."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"payload-examples-1","__idx":10},"children":["Payload examples"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following example shows an account authorization:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"payload\": {\n        \"id\": \"8fd2d859-77de-4bcc-976c-3f4ccdfdcc3d\",\n        \"accountId\": \"c8b9519a-be18-4db7-9aca-cce93834841b\",\n        \"parameters\": {\n            \"operation\": {\n                \"type\": \"DepositPreauth\",\n                \"authorize\": {\n                   \"address\": \"rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW\",\n                   \"type\": \"Address\"\n                },\n            },\n        }\n        \"sourceTag\": 123456,\n        \"memos\": [],\n        \"feeStrategy\": {\n            \"drops\": \"5\",\n            \"type\": \"SpecifiedAdditionalFee\"\n        },\n        \"maximumFee\": \"50\",\n        \"type\": \"XRPL\",\n    },\n    \"description\": \"string\",\n    \"customProperties\": {},\n    \"type\": \"v0_CreateTransactionOrder\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following example shows the removal of an account authorization:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"payload\": {\n        \"id\": \"8fd2d859-77de-4bcc-976c-3f4ccdfdcc3d\",\n        \"accountId\": \"c8b9519a-be18-4db7-9aca-cce93834841b\",\n        \"parameters\": {\n            \"operation\": {\n                \"type\": \"DepositPreauth\",\n                \"unauthorize\": {\n                   \"address\": \"rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW\",\n                   \"type\": \"Address\"\n                },\n            },\n        }\n        \"sourceTag\": 123456,\n        \"memos\": [],\n        \"feeStrategy\": {\n            \"drops\": \"5\",\n            \"type\": \"SpecifiedAdditionalFee\"\n        },\n        \"maximumFee\": \"50\",\n        \"type\": \"XRPL\",\n    },\n    \"description\": \"string\",\n    \"customProperties\": {},\n    \"type\": \"v0_CreateTransactionOrder\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Fields of the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payload"]}," block to note are as follows:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ID of the transaction order"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["accountId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ID of the holder account"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parameters.operation"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Details of the operation:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DepositPreauth"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["authorize"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["unauthorize"]},": Authorize or unauthorize the following account details:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]},": Possible types:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Address"]},": An account address"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Account"]},": An account ID"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Endpoint"]},": An endpoint ID"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"You cannot authorize and unauthorize in the same operation."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parameters.feeStrategy"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The fee strategy to use for the transaction.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"For more information, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/transactions/reference#fee-strategy-and-maximum-fee"},"children":["Fee strategy and maximum fee"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parameters.maximumFee"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The maximum fee, in drops.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"For more information, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/transactions/reference#fee-strategy-and-maximum-fee"},"children":["Fee strategy and maximum fee"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parameters.type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Ledger type, in this case ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["XRPL"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_CreateTransactionOrder"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"claw-back-tokens-from-an-account","__idx":11},"children":["Claw back tokens from an account"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can use the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Clawback"]}," operation to claw back tokens issued from the issuer account. You can use this, for example, when the trust line for an account is frozen."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For more information about the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Clawback"]}," operation, see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://xrpl.org/docs/references/protocol/transactions/types/clawback","target":"_blank"},"children":["Clawback"]}," in the XRPL documentation."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This operation is only valid for accounts with the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["asfAllowTrustLineClawback"]}," setting enabled."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For more information, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/accounts-and-assets/accounts/ledger-specific-settings/xrpl-api"},"children":["Update XRPL account settings"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"prerequisites-1","__idx":12},"children":["Prerequisites"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Prerequisite"},"children":["Prerequisite"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Additional information"},"children":["Additional information"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The account ID of the issuer account."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/accounts-and-assets/accounts/manage-accounts-api#view-account-details"},"children":["View account details"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The address and currency of the account or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tickerId"]}," of an allowlisted fungible token."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["If you want to use:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["An account address, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/accounts-and-assets/accounts/manage-accounts-api#view-account-details"},"children":["View account details"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A token, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/accounts-and-assets/tokenization/token-management/api/view-tokens"},"children":["View tokens"]}]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The details of the account from which to claw back tokens."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["If the account is:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Another ","Ripple Custody"," account, an account ID or address.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"For more information, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/accounts-and-assets/accounts/manage-accounts-api#view-account-details"},"children":["View account details"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["An external account, an account address.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"For more information, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/accounts-and-assets/accounts/manage-accounts-api#view-account-details"},"children":["View account details"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Associated with an endpoint, an endpoint ID.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"For more information, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/accounts-and-assets/endpoints/manage-endpoints#view-endpoint-details-with-the-api"},"children":["View endpoint details"]},"."]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Enough funds in the accounts to cover the transaction and all reserves, including the network reserve of 10 XRP and the reserve of 2 XRP for each object held in the account, including the account itself."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/accounts-and-assets/accounts/manage-accounts-api#check-account-balances"},"children":["Check account balances"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The following new IDs, in a standard UUID format:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A transaction order ID"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["An intent ID"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To claw back tokens from an account, follow the steps in ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/governance/intents/manage-intents-and-approvals"},"children":["Manage intents and approvals"]}," with a transaction order payload similar to one of the following example."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"payload-example","__idx":13},"children":["Payload example"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following example shows clawback of a specific asset ID from an account address:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"payload\": {\n        \"id\": \"8fd2d859-77de-4bcc-976c-3f4ccdfdcc3d\",\n        \"accountId\": \"c8b9519a-be18-4db7-9aca-cce93834841b\",\n        \"parameters\": {\n            \"operation\": {\n                \"type\": \"Clawback\",\n                \"currency\": {\n                    \"tickerId\": \"3334a1d5-1176-401f-b534-ec13a6b5ee8e\",\n                    \"type\": \"TickerId\"\n                },\n                \"holder\": {\n                    \"address\": \"rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW\",\n                    \"type\": \"Address\"\n                },\n                \"value\": \"3141592650000000000000000000000000000000000000000000000000000000000000000000000000\"\n            }\n            \"sourceTag\": 123456,\n            \"memos\": [],\n            \"feeStrategy\": {\n                \"drops\": \"5\",\n                \"type\": \"SpecifiedAdditionalFee\"\n            },\n            \"maximumFee\": \"50\",\n            \"type\": \"XRPL\",\n        },\n        \"description\": \"string\",\n        \"customProperties\": {},\n        \"type\": \"v0_CreateTransactionOrder\"\n    }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Fields of the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payload"]}," block to note are as follows:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ID of the transaction order"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["accountId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ID of the issuer account"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parameters.operation"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Details of the operation:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Clawback"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["currency"]},": Details of the token, one of the following: ",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]},":  ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Currency"]},": Currency code and issuer account address. The currency code must be a three-character string or a 160-bit hexadecimal string.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"For more information, see the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://xrpl.org/docs/references/protocol/data-types/currency-formats#currency-codes","target":"_blank"},"children":["XRPL documentation"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TickerId"]},": The ID of an asset that is an XRPL fungible token that is validated."]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["holder"]},": Details of the token holder account to claw back from: ",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]},": Possible types:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Address"]},": An account address."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Account"]},": An account ID"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Endpoint"]},": An endpoint ID."]}]}]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["value"]},": The amount to be clawed back, as a valid token amount.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"For more information, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#xrpl-token-decimals-and-amounts"},"children":["XRPL token decimals and amounts"]},"."]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parameters.feeStrategy"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The fee strategy to use for the transaction.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"For more information, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/transactions/reference#fee-strategy-and-maximum-fee"},"children":["Fee strategy and maximum fee"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parameters.maximumFee"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The maximum fee, in drops.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"For more information, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/transactions/reference#fee-strategy-and-maximum-fee"},"children":["Fee strategy and maximum fee"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parameters.type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Ledger type, in this case ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["XRPL"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_CreateTransactionOrder"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"trade-tokens-in-the-decentralized-exchange-dex","__idx":14},"children":["Trade tokens in the decentralized exchange (DEX)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can use the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["OfferCreate"]}," operation to create an offer on the DEX to trade XRP for tokens, or tokens for other tokens."," ","Only offers that have a corresponding offer on the DEX are executed."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For example:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A seller account offers tokens for XRP."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A taker account offers XRP for tokens."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["As long as the offer amounts match, the trade is automatically executed on the ledger."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For more information about:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["OfferCreate"]}," operation, see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://xrpl.org/docs/references/protocol/transactions/types/offercreate","target":"_blank"},"children":["OfferCreate"]}," in the XRPL documentation."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Trading tokens on the DEX, see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://xrpl.org/docs/tutorials/how-tos/use-tokens/trade-in-the-decentralized-exchange","target":"_blank"},"children":["Trade in the Decentralized Exchange"]}," in the XRPL documentation."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"supported-settings","__idx":15},"children":["Supported settings"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Since ","Ripple Custody"," only supports the creation of offers with a corresponding offer on the DEX, it is mandatory to set one of the following settings:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tfImmediateOrCancel"]},": The offer is either executed immediately or cancelled. It can be partially fulfilled."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tfFillOrKill"]},": The offer is either fully filled immediately or cancelled. It can't be partially fulfilled."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can also set the following optional setting:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tfSell"]},": Used to agree to receive more than the amount specified in ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Taker Pays"]}," if an offer is available for more than the amount asked for."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"create-an-offer-to-trade-on-the-dex","__idx":16},"children":["Create an offer to trade on the DEX"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To create an offer to trade on the DEX, follow the steps in ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/governance/intents/manage-intents-and-approvals"},"children":["Manage intents and approvals"]},", with a transaction order payload similar to the following example."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"payload-example-1","__idx":17},"children":["Payload example"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following example shows an immediate-or-cancel offer for a token:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"payload\": {\n        \"id\": \"8fd2d859-77de-4bcc-976c-3f4ccdfdcc3d\",\n        \"accountId\": \"c8b9519a-be18-4db7-9aca-cce93834841b\",\n        \"parameters\": {\n            \"operation\": {\n                \"type\": \"OfferCreate\",\n                \"flags\": [\"tfImmediateOrCancel\"],\n                \"takerGets\": {\n                    \"currency\": {\n                        \"tickerId\": \"3334a1d5-1176-401f-b534-ec13a6b5ee8e\",\n                        \"type\": \"TickerId\"\n                    },\n                    \"amount\": \"3141592650000000000000000000000000000000000000000000000000000000000000000000000000\"\n                },\n                \"takerPays\": {\n                    \"currency\": {\n                        \"code\": \"USD\",\n                        \"issuer\": \"rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B\",\n                        \"type\": \"Currency\"\n                    },\n                    \"amount\": \"3141592650000000000000000000000000000000000000000000000000000000000000000000000000\"\n                },\n            }\n            \"sourceTag\": 123456,\n            \"memos\": [],\n            \"feeStrategy\": {\n                \"drops\": \"5\",\n                \"type\": \"SpecifiedAdditionalFee\"\n            },\n            \"maximumFee\": \"50\",\n            \"type\": \"XRPL\",\n        },\n        \"description\": \"string\",\n        \"customProperties\": {},\n        \"type\": \"v0_CreateTransactionOrder\"\n    }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Fields of the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payload"]}," block to note are as follows:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ID of the transaction order"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["accountId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ID of the account creating the offer"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parameters.operation"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Details of the operation:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["OfferCreate"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flags"]},": Settings for the offer.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"For more information, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/accounts-and-assets/accounts/ledger-specific-settings/xrpl-api#supported-settings"},"children":["Supported settings"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["takerGets"]},": Details of what you want to offer:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["currency"]},": Null if this is XRP, otherwise one of the following:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Currency"]},": Currency code and issuer account address. The currency code must be a three-character string or a 160-bit hexadecimal string.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"For more information, see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://xrpl.org/docs/references/protocol/data-types/currency-formats#currency-codes","target":"_blank"},"children":["Currency Codes"]}," in the XRPL documentation."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TickerId"]},": The ID of an asset that is a validated XRPL fungible token."]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amount"]},": Amount of tokens you want to offer, or the amount in drops if you want to offer XRP.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"For more information about token amounts, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#xrpl-token-decimals-and-amounts"},"children":["XRPL token decimals and amounts"]},"."]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["takerPays"]},": Details of what you are willing to accept:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["currency"]},": Null if this is XRP, otherwise one of the following:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Currency"]},": Currency code and issuer account address. The currency code must be a three-character string or a 160-bit hexadecimal string.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"For more information, see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://xrpl.org/docs/references/protocol/data-types/currency-formats#currency-codes","target":"_blank"},"children":["Currency Codes"]}," in the XRPL documentation."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TickerId"]},": The ID of an asset that is an XRPL fungible token that is validated."]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amount"]},": Amount of the token that you are willing to accept, or the amount in drops if you are willing to accept XRP.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"For more information about token amounts, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#xrpl-token-decimals-and-amounts"},"children":["XRPL token decimals and amounts"]},"."]}]}]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parameters.feeStrategy"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The fee strategy to use for the transaction.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"For more information, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/transactions/reference#fee-strategy-and-maximum-fee"},"children":["Fee strategy and maximum fee"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parameters.maximumFee"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The maximum fee, in drops.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"For more information, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/transactions/reference#fee-strategy-and-maximum-fee"},"children":["Fee strategy and maximum fee"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parameters.type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Ledger type, in this case ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["XRPL"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_CreateTransactionOrder"]}]}]}]}]}]}]},"headings":[{"value":"Manage XRPL tokens with the API","id":"manage-xrpl-tokens-with-the-api","depth":1},{"value":"XRPL token decimals and amounts","id":"xrpl-token-decimals-and-amounts","depth":2},{"value":"Manage trust lines","id":"manage-trust-lines","depth":2},{"value":"Prerequisites","id":"prerequisites","depth":3},{"value":"Create a trust line","id":"create-a-trust-line","depth":3},{"value":"Payload examples","id":"payload-examples","depth":4},{"value":"Create an authorized trust line","id":"create-an-authorized-trust-line","depth":3},{"value":"Freeze or unfreeze a trust line","id":"freeze-or-unfreeze-a-trust-line","depth":3},{"value":"Authorize an account to hold tokens in a trust line","id":"authorize-an-account-to-hold-tokens-in-a-trust-line","depth":3},{"value":"Preauthorize deposits on an account","id":"preauthorize-deposits-on-an-account","depth":2},{"value":"Payload examples","id":"payload-examples-1","depth":3},{"value":"Claw back tokens from an account","id":"claw-back-tokens-from-an-account","depth":2},{"value":"Prerequisites","id":"prerequisites-1","depth":3},{"value":"Payload example","id":"payload-example","depth":3},{"value":"Trade tokens in the decentralized exchange (DEX)","id":"trade-tokens-in-the-decentralized-exchange-dex","depth":2},{"value":"Supported settings","id":"supported-settings","depth":3},{"value":"Create an offer to trade on the DEX","id":"create-an-offer-to-trade-on-the-dex","depth":3},{"value":"Payload example","id":"payload-example-1","depth":4}],"frontmatter":{"seo":{"title":"Manage XRPL tokens with the API"}},"lastModified":"2026-08-04T20:25:11.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/custody/accounts-and-assets/tokenization/ledger-specific/xrpl-api","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}