Skip to content

Instantly share code, notes, and snippets.

@adrake33
Last active March 17, 2019 23:42
Show Gist options
  • Save adrake33/d18487cc99b53f7a34d4c8a29ca17ad5 to your computer and use it in GitHub Desktop.
Save adrake33/d18487cc99b53f7a34d4c8a29ca17ad5 to your computer and use it in GitHub Desktop.
// Should be called GetTopicResults in v2
export interface GetCategoriesResults {
category: string, // Should be renamed topic for v2. Should log category, nonFinalizedOpenInterest, & openInterest as a single event?
nonFinalizedOpenInterest: string,
openInterest: string,
tags: Array<Tag>, // Deprecated in v2
}
@nuevoalex
Copy link

What is non finalized OI vs OI exactly? The system really only counts nonFinalized OI as OI.

I wonder what the expense of doing this map reduce is without having the data already aggregated. We only need to do it for a subset of markets (the non-finalized ones) so its limited somewhat and is a really simple op.

@adrake33
Copy link
Author

Hmm, according to https://github.com/AugurProject/augur-node/blob/master/src/types.ts#L442, nonFinalizedOI is the sum of OI in non-finalized markets in the category, and OI is the sum of OI in all markets in that category.

Like you say, though, we might be able to use map/reduce without having the data aggregated. Will make a note to check the performance on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment