<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://nexus-wiki.org/index.php?action=history&amp;feed=atom&amp;title=Operators</id>
	<title>Operators - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://nexus-wiki.org/index.php?action=history&amp;feed=atom&amp;title=Operators"/>
	<link rel="alternate" type="text/html" href="https://nexus-wiki.org/index.php?title=Operators&amp;action=history"/>
	<updated>2026-04-24T16:43:09Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.3</generator>
	<entry>
		<id>https://nexus-wiki.org/index.php?title=Operators&amp;diff=46&amp;oldid=prev</id>
		<title>Nexus wiki: Created page with &quot;The Nexus API, and according commands support varying types of operators. Operators allow computation to be performed on a filtered data-set, much like in an excel spreadsheet.  The minimum required components of the URI for an operator is:  commands/verb/noun/filter/operator  == Filter ==  In order to execute an operator, one must apply a basic filter to the data-set because we need to isolate a component of the returned data to operate on and return.  Take the followin...&quot;</title>
		<link rel="alternate" type="text/html" href="https://nexus-wiki.org/index.php?title=Operators&amp;diff=46&amp;oldid=prev"/>
		<updated>2024-10-04T05:31:30Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;The Nexus API, and according commands support varying types of operators. Operators allow computation to be performed on a filtered data-set, much like in an excel spreadsheet.  The minimum required components of the URI for an operator is:  commands/verb/noun/filter/operator  == Filter ==  In order to execute an operator, one must apply a basic filter to the data-set because we need to isolate a component of the returned data to operate on and return.  Take the followin...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The Nexus API, and according commands support varying types of operators. Operators allow computation to be performed on a filtered data-set, much like in an excel spreadsheet.&lt;br /&gt;
&lt;br /&gt;
The minimum required components of the URI for an operator is:&lt;br /&gt;
 commands/verb/noun/filter/operator&lt;br /&gt;
&lt;br /&gt;
== Filter ==&lt;br /&gt;
&lt;br /&gt;
In order to execute an operator, one must apply a basic filter to the data-set because we need to isolate a component of the returned data to operate on and return.&lt;br /&gt;
&lt;br /&gt;
Take the following contract list:&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
    &amp;quot;id&amp;quot;: 33,&lt;br /&gt;
    &amp;quot;OP&amp;quot;: &amp;quot;CREDIT&amp;quot;,&lt;br /&gt;
    &amp;quot;for&amp;quot;: &amp;quot;COINBASE&amp;quot;,&lt;br /&gt;
    &amp;quot;txid&amp;quot;: &amp;quot;01625b58e131e61813f77e8e97404cb587d780c7951b055b4f531f2a8ea5a63fc3c95f179ec26fa138e639143615a10961719ffb1b33dd98e64d0bf4d9fe50ae&amp;quot;,&lt;br /&gt;
    &amp;quot;contract&amp;quot;: 2,&lt;br /&gt;
    &amp;quot;to&amp;quot;: &amp;quot;8BAv1H2YKfpaYC1RJMq9qjmMTiEV8DJiLpiKGqTY54wf2VPjznD&amp;quot;,&lt;br /&gt;
    &amp;quot;amount&amp;quot;: 208.833665,&lt;br /&gt;
    &amp;quot;token&amp;quot;: &amp;quot;0&amp;quot;,&lt;br /&gt;
    &amp;quot;ticker&amp;quot;: &amp;quot;NXS&amp;quot;&lt;br /&gt;
 },&lt;br /&gt;
 {&lt;br /&gt;
    &amp;quot;id&amp;quot;: 34,&lt;br /&gt;
    &amp;quot;OP&amp;quot;: &amp;quot;CREDIT&amp;quot;,&lt;br /&gt;
    &amp;quot;for&amp;quot;: &amp;quot;COINBASE&amp;quot;,&lt;br /&gt;
    &amp;quot;txid&amp;quot;: &amp;quot;01b7291259fda66e8dbde6de502bd811894e42b6f2dd9fc684bdf87e9a3f0f224e16df72c491355547191af28f1cdd84bed0b522686de837f5b346593646f40f&amp;quot;,&lt;br /&gt;
    &amp;quot;contract&amp;quot;: 2,&lt;br /&gt;
    &amp;quot;to&amp;quot;: &amp;quot;8BAv1H2YKfpaYC1RJMq9qjmMTiEV8DJiLpiKGqTY54wf2VPjznD&amp;quot;,&lt;br /&gt;
    &amp;quot;amount&amp;quot;: 205.705007,&lt;br /&gt;
    &amp;quot;token&amp;quot;: &amp;quot;0&amp;quot;,&lt;br /&gt;
    &amp;quot;ticker&amp;quot;: &amp;quot;NXS&amp;quot;&lt;br /&gt;
 },&lt;br /&gt;
&lt;br /&gt;
To operate on our amount field, we would first need to apply a filter:&lt;br /&gt;
&lt;br /&gt;
 commands/verb/noun/amount&lt;br /&gt;
&lt;br /&gt;
This command will now prepare for an operator, that can be invoked by finishing the URI:&lt;br /&gt;
&lt;br /&gt;
 commands/verb/noun/amount/sum&lt;br /&gt;
&lt;br /&gt;
The above command will return a JSON object with our filtered result:&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
    &amp;quot;amount&amp;quot;: 414.53867,&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Operators ==&lt;br /&gt;
&lt;br /&gt;
The following operators are supported for this API command-set:&lt;br /&gt;
&lt;br /&gt;
=== array ===&lt;br /&gt;
&lt;br /&gt;
Generate a list of values given from a set of filtered results as a JSON array.&lt;br /&gt;
&lt;br /&gt;
=== count ===&lt;br /&gt;
&lt;br /&gt;
Find the total number of entries returned in a given JSON list.&lt;br /&gt;
&lt;br /&gt;
=== floor ===&lt;br /&gt;
&lt;br /&gt;
Convert all values in a result to integers by stripping off decimals.&lt;br /&gt;
&lt;br /&gt;
=== max ===&lt;br /&gt;
&lt;br /&gt;
Find the maximum value in the given set, and return this as a result.&lt;br /&gt;
&lt;br /&gt;
=== mean ===&lt;br /&gt;
&lt;br /&gt;
Calculate the mean or average value across a set of filtered results.&lt;br /&gt;
&lt;br /&gt;
=== min ===&lt;br /&gt;
&lt;br /&gt;
Find the minimum value in the given set, and return this as a result.&lt;br /&gt;
&lt;br /&gt;
=== mode ===&lt;br /&gt;
&lt;br /&gt;
Find the value with the most occurrences across the data-set.&lt;br /&gt;
&lt;br /&gt;
=== sum ===&lt;br /&gt;
&lt;br /&gt;
Compute a sum of a set of values derived from filtered results.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 finance/list/accounts/balance/sum&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
&lt;br /&gt;
This command will return a sum of the balances for all accounts:&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
    &amp;quot;balance&amp;quot;: 333.376&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Nexus wiki</name></author>
	</entry>
</feed>