Skip to main content

marketplace_push_update_offer

Replaces an offer previously published by this wallet with a new version, broadcasting a signed update transaction that supersedes the old offer.

Request

{
"jsonrpc": "2.0",
"id": 0,
"method": "marketplace_push_update_offer",
"params": {
"tx_id": "c1f6a8d9037e5b1c2a4d6e8f0123cb0d0a1a4e1c6f6a2c1c9e6b8f0a3d7e4b25",
"no": 0,
"od": {
"ot": 0,
"ap": "5000000000000",
"at": "135000000000",
"b": "",
"t": "USD",
"p": "NIR",
"lco": "US",
"lci": "ChIJD7fiBh9u5kcRYJSMaMOCCwQ",
"cnt": "[email protected]",
"com": "Price updated, fast settlement",
"pt": "bank transfer, cash",
"do": "full amount",
"cat": "currency exchange",
"url": "",
"et": 10,
"fee": 10000000000
}
}
}

Request parameters

  • tx_id - string; hex-encoded hash of the transaction that currently carries the offer being updated. This is the tx_hash reported for the offer by marketplace_get_offers_ex (which changes after every successful update), not the immutable tx_original_hash.
  • no - unsigned int; zero-based index of the offer inside that transaction, matching the offer's index_in_tx.
  • od - object; the full replacement offer. The update carries the complete new offer body, not a partial patch, so every field must be supplied — omitted fields end up empty in the published offer. Its fields have the same meaning as in marketplace_push_offer:
    • od.ot - unsigned int; offer type: 0 — primary-to-target (sell order), 1 — target-to-primary (buy order), 2 — goods-to-primary, 3 — primary-to-goods.
    • od.ap - string; amount of the primary currency, in atomic units (1 coin = 10^12 atomic units), serialized as a decimal string.
    • od.at - string; amount of the target currency or goods, in atomic units, serialized as a decimal string.
    • od.b - string; bonus description.
    • od.t - string; target currency or goods designator.
    • od.p - string; primary currency designator.
    • od.lco - string; location country.
    • od.lci - string; location city (Google geo-autocomplete place id).
    • od.cnt - string; contact details.
    • od.com - string; free-form comment.
    • od.pt - string; accepted payment types.
    • od.do - string; deal option.
    • od.cat - string; offer category.
    • od.url - string; preview image URL.
    • od.et - unsigned int; offer lifetime in days.
    • od.fee - unsigned int; fee paid for the update transaction, in atomic units; it also re-ranks the offer in marketplace listings.

The wallet authorizes the update by signing it with the key derived for tx_id and no, so only the wallet that published the offer can update it.


Response

{
"id": 0,
"jsonrpc": "2.0",
"result": {
"tx_hash": "4e1c6f6a2c1c9e6b8f0a3d7e4b25c1f6a8d9037e5b1c2a4d6e8f0123cb0d0a1a",
"tx_blob_size": 3341
}
}

Response information

  • tx_hash - string; hash of the broadcast update transaction. It becomes the offer's new current tx_hash, so use this value as tx_id for any further update or cancellation.
  • tx_blob_size - unsigned int; size of the broadcast transaction in bytes.