marketplace_get_offers_ex
Returns the marketplace offers published by this wallet, with the same filtering, sorting and paging options as a global marketplace search. Same response schema as the daemon's marketplace_global_get_offers_ex, but scoped to offers published by this wallet.
Request
{
"jsonrpc": "2.0",
"id": 0,
"method": "marketplace_get_offers_ex",
"params": {
"filter": {
"order_by": 0,
"reverse": false,
"offset": 0,
"limit": 20,
"timestamp_start": 0,
"timestamp_stop": 0,
"offer_type_mask": 15,
"amount_low_limit": 0,
"amount_up_limit": 0,
"rate_low_limit": "0.000000",
"rate_up_limit": "0.000000",
"payment_types": ["bank transfer", "cash"],
"location_country": "US",
"location_city": "",
"target": "USD",
"primary": "NIR",
"bonus": false,
"category": "",
"keyword": "",
"fake": false
}
}
}
Request parameters
- filter - object; the search filter applied to this wallet's own offers. All of its members are optional, but the object itself must be present (send an empty object
{}to get every offer this wallet has published). - filter.order_by - unsigned int; index of the field used for sorting the result (timestamp, amount, rate, payment types, contacts, location, and so on).
- filter.reverse - boolean; when
true, the sort order selected byorder_byis reversed. - filter.offset - unsigned int; number of matching offers to skip before collecting the result page.
- filter.limit - unsigned int; maximum number of offers to return in one call.
- filter.timestamp_start - unsigned int; unix timestamp; skip offers published earlier than this moment.
0disables the lower bound. - filter.timestamp_stop - unsigned int; unix timestamp; skip offers published later than this moment.
0disables the upper bound. - filter.offer_type_mask - unsigned int; bitmask selecting which offer types to return:
0x1— primary-to-target (sell order),0x2— target-to-primary (buy order),0x4— goods-to-primary,0x8— primary-to-goods. Combine bits to match several types at once. - filter.amount_low_limit - unsigned int; lower bound on the offer's primary amount, in atomic units (1 coin = 10^12 atomic units).
- filter.amount_up_limit - unsigned int; upper bound on the offer's primary amount, in atomic units.
0disables the upper bound. - filter.rate_low_limit - string; lower bound on the target/primary exchange rate. Serialized as a decimal number in a string.
- filter.rate_up_limit - string; upper bound on the target/primary exchange rate. Serialized as a decimal number in a string.
- filter.payment_types - array of strings; accept only offers that declare at least one of these payment methods.
- filter.location_country - string; two-letter country code, for example
US. - filter.location_city - string; city identifier (Google geo-autocomplete place id).
- filter.target - string; target currency or goods designator to match.
- filter.primary - string; primary currency designator to match.
- filter.bonus - boolean; when
true, return only offers that carry a bonus. - filter.category - string; offer category to match.
- filter.keyword - string; free-text keyword matched against the offer's text fields.
- filter.fake - boolean; service flag used to request test/placeholder entries; leave
falsefor normal use.
Response
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"status": "OK",
"offers": [
{
"tx_hash": "c1f6a8d9037e5b1c2a4d6e8f0123cb0d0a1a4e1c6f6a2c1c9e6b8f0a3d7e4b25",
"tx_original_hash": "c1f6a8d9037e5b1c2a4d6e8f0123cb0d0a1a4e1c6f6a2c1c9e6b8f0a3d7e4b25",
"index_in_tx": 0,
"timestamp": 1701350400,
"fee": 10000000000,
"security": "7e5b1c2a4d6e8f0123cb0d0a1a4e1c6f6a2c1c9e6b8f0a3d7e4b25c1f6a8d903",
"ot": 0,
"ap": "5000000000000",
"at": "120000000000",
"b": "",
"t": "USD",
"p": "NIR",
"lco": "US",
"lci": "ChIJD7fiBh9u5kcRYJSMaMOCCwQ",
"cnt": "[email protected]",
"com": "Fast settlement, business hours only",
"pt": "bank transfer, cash",
"do": "full amount",
"cat": "currency exchange",
"url": "",
"et": 10
}
],
"total_offers": 1
}
}
Response information
- status - string;
OKon success. - total_offers - unsigned int; total number of this wallet's offers that matched the filter before
offset/limitpaging was applied. - offers - array of offer objects published by this wallet. Field names are the compact keys used on the wire:
- offers[].tx_hash - string; hash of the transaction that currently carries the offer. Together with
index_in_tx, this identifies the offer formarketplace_push_update_offerandmarketplace_cancel_offer. - offers[].tx_original_hash - string; hash of the transaction that originally published the offer. It stays the same across updates, while
tx_hashchanges with every update. - offers[].index_in_tx - unsigned int; zero-based index of this offer within its transaction.
- offers[].timestamp - unsigned int; unix timestamp of the transaction that published the offer. Not stored in the offer itself; filled in from the carrying transaction.
- offers[].fee - unsigned int; fee paid to publish the offer, in atomic units (1 coin = 10^12 atomic units). It determines the offer's rank in marketplace listings.
- offers[].security - string; hex-encoded public key used to authorize updates and cancellation of this offer.
- offers[].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. - offers[].ap - string; amount of the primary currency, in atomic units, serialized as a decimal string.
- offers[].at - string; amount of the target currency or goods, in atomic units, serialized as a decimal string.
- offers[].b - string; bonus description.
- offers[].t - string; target currency or goods designator.
- offers[].p - string; primary currency designator.
- offers[].lco - string; location country, for example
US. - offers[].lci - string; location city (Google geo-autocomplete place id).
- offers[].cnt - string; contact details published with the offer (e-mail, messenger, website, and so on).
- offers[].com - string; free-form comment.
- offers[].pt - string; accepted payment types (bank transfer, internet money, cash, and so on).
- offers[].do - string; deal option, for example full amount only or partial deals.
- offers[].cat - string; offer category.
- offers[].url - string; preview image URL.
- offers[].et - unsigned int; expiration time of the offer, in days since publication.