Marketplace filter structure and description

Offer's JSON structure and fields description

Blockchain can keep hundreds of thousands of offers and fetching a particular set of offers need to have a filtering mechanism. Zano daemon has a built-in effective search engine, which car represents marketplace offers in a few different orders, with wide filtering options provided in this structure.

od: {
      "offset": 0,
      "limit": 100,
      "amount_low_limit": 0,
      "amount_up_limit": 0,
      "category": "",
      "keyword": "",
      "location_city": "",
      "location_country": "",
      "offer_type_mask": 0,
      "order_by": 0,
      "primary": "",
      "rate_low_limit": "0.000000",
      "rate_up_limit": "0.000000",
      "reverse": false,
      "target": "",
      "timestamp_start": 0,
      "timestamp_stop": 0
    }

Fields description:

  • order_by - chose in how to order offers in selection. At this moment supported following ordering:
"order_by" valueOrder Type
0Order by timestamp (most usable)
1Order by an amount of Zano
2Order by the amount of specified currency
3Order by rate, which calculated as the amount currency divided to amount Zano
4Order by payment type(as string)
5Order by contact field(as string)
6Order by location: country string concatenated with city string
7Order by target string, basically title string
  • reverse - Reverse order
  • offset - Offeset regarding first item which fit specified filter, count include only items which fit the filter. Userful for enumeration big amount or records, up to whole offers database enumeration.
  • limit - Maximum records to return.
  • amount_low_limit - filter offers selection by field amount of specified currency at lower boundary.
  • amount_up_limit - filter offers selection by field amoun of specified currency t at higher boundary.
  • category - fiter by category, work's as substring matching, i.e. if categories set to "CLS:MAN:TSH" and filters category fileds set to "MAN" then it fits category condition.
  • keyword - This use search by keyword throught the all fields.
  • location_city - Used to filter by city name or geo-tag
  • location_country - Filters by country code.
  • offer_type_mask - Specify type of the offer:
0x00000001Offer type 0 (buy currency for Zano)
0x00000002Offer type 1 (buy Zano for currency)
0x00000004Offer type 2 (buy goods for Zano)
0x00000008Offer type 3 (sell goods for Zano)
  • rate_low_limit - Filter by low limit of the rate between Zano and currency amount currency divided to amount Zano)
  • rate_up_limit - Filter by up limit of the rate between Zano and currency amount currency divided to amount Zano)
  • target - Basically a title for subject of the Offer - could be the name of the goods or currency which supposed to be traded.
  • timestamp_start - Setup a lower timestamp boundary. Useful if the offers are selecting for given time range.
  • timestamp_stop - Setup a higher timestamp boundary. Useful if the offers are selecting for given time range.