{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"iou.sellOffer()","siteUrl":"https://opensource.ripple.com/","meta":[{"name":"google-site-verification","content":"bLwyBi1imklcIuQxZ7JeI_kRF5Mg7yfr6arpEQV2nsE"}],"llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]},"description":"IOU.sellOffer places a DEX order to sell this IOU via an OfferCreate transaction."},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"iouselloffer","__idx":0},"children":["iou.sellOffer()"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/ripple/simpleXRPL/blob/95b977b15f8950c5bc076b25165217869c0b06d3/src/verticals/iou.ts#L348"},"children":["[Source]"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Place an order on the DEX to sell this IOU."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"signature","__idx":1},"children":["Signature"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"iou.sellOffer(\n  params: IOUOfferParams,\n  options?: IOUWriteOptions,\n): Promise<SubmissionResult<undefined>>\n","lang":"ts"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"parameters","__idx":2},"children":["Parameters"]},{"$$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":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$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":["ticker"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The currency code (3-character ISO-4217-style or 40-character hex; other codes are auto-encoded to hex)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amount"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The number of units of this IOU to sell, as a decimal string. Must be non-negative, with at most 15 significant digits."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["orderType"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IOUOrderType"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The order type: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'limit'"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'market'"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'fok'"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'passive'"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["price"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IOUOfferPrice"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["What's wanted in return — XRP, an MPT, or another IOU (see below)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["domainID"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Restrict the offer to a permissioned domain. Omit for the open DEX."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hybrid"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["boolean"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Whether a domain-scoped offer also works the open DEX. Only meaningful with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["domainID"]},"; defaults to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," when ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["domainID"]}," is set."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["offerSequence"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["number"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A prior offer sequence to replace."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["price"]}," (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IOUOfferPrice"]},") is one of:"]},{"$$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":"Shape"},"children":["Shape"]},{"$$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":["{ currency: 'XRP'; amount: string }"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Priced in XRP. Must be non-negative, with at most 6 decimal places (1 drop, XRP's smallest unit)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{ mptIssuanceId: string; amount: string }"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Priced in an MPT. However, the XRPL DEX doesn't support MPTs yet and will always be rejected."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{ ticker: string; issuer: string; amount: string }"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Priced in another IOU. Must be non-negative, with at most 15 significant digits — the XRPL issued-currency limit."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"options","__idx":3},"children":["Options"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["options"]}," is an optional second argument that sets the source account and overrides the fee."]},{"$$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":"Option"},"children":["Option"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$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":["from"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AccountSelector"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The account to act as — an r-address string, or an object ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{ address }"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{ signer, account? }"]},". Defaults to the primary signer's primary account. (For IOU operations, this is the issuer.)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fee"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FeeIntent"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Fee override — a priority tier and/or a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["maxFeeDrops"]}," cap."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["idempotencyKey"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A prior submission's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["idempotencyKey"]},", to retry to the same intent instead of creating a duplicate. Auto-generated when omitted."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"returns","__idx":4},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Resolves to a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SubmissionResult<undefined>"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Every simpleXRPL write resolves to a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SubmissionResult<T>"]}," — a union tagged by ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["source"]},", with the backend's raw response preserved verbatim. Its common fields are:"]},{"$$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":"Type"},"children":["Type"]},{"$$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":["intent"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["T"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The operation-specific output — see the operation's own return fields."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["source"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'xrpld' | 'custody' | 'palisade'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Which backend produced the result; discriminates ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["response"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["response"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TxResponse"]}," | custody record | Palisade record"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The backend's raw response, preserved verbatim."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["txHash"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}," ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["(optional)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The XRPL transaction hash, once the transaction is on-ledger."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["intentId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}," ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["(optional)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The custodian intent id, when the path produced one. Hold onto this to resume via ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client.intent"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["idempotencyKey"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}," ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["(optional)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The UUIDv7 this submission carried. Pass it back as a later call's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["idempotencyKey"]}," to retry to the same intent rather than creating a duplicate."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"return-fields","__idx":5},"children":["Return fields"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IOU.sellOffer"]}," attaches no ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["intent"]}," output; ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["intent"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["undefined"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"underlying-xrpl-transactor","__idx":6},"children":["Underlying XRPL transactor"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Builds and submits a single ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://xrpl.org/docs/references/protocol/transactions/types/offercreate"},"children":["OfferCreate"]}," transaction. Throws an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IntentValidationError"]}," if ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["price"]}," is MPT-denominated."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"example","__idx":7},"children":["Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"await client.iou.sellOffer({\n  ticker: 'USD',\n  amount: '100',\n  orderType: 'limit',\n  price: { currency: 'XRP', amount: '50' },\n})\n","lang":"ts"},"children":[]}]},"headings":[{"value":"iou.sellOffer()","id":"iouselloffer","depth":1},{"value":"Signature","id":"signature","depth":2},{"value":"Parameters","id":"parameters","depth":2},{"value":"Options","id":"options","depth":2},{"value":"Returns","id":"returns","depth":2},{"value":"Return fields","id":"return-fields","depth":3},{"value":"Underlying XRPL transactor","id":"underlying-xrpl-transactor","depth":2},{"value":"Example","id":"example","depth":2}],"frontmatter":{"seo":{"description":"IOU.sellOffer places a DEX order to sell this IOU via an OfferCreate transaction.","title":"iou.sellOffer()"},"labels":["simpleXRPL","SDK"]},"editPage":{"to":"https://github.com/ripple/opensource.ripple.com/tree/main/docs/simpleXRPL/references/verticals/iou/sellOffer.md"},"lastModified":"2026-08-26T19:04:06.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/simplexrpl/references/verticals/iou/selloffer","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}