This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface GetMarketsInfoResults { | |
id: string, // MarketCreated.market | |
universe: string, // MarketCreated.universe | |
marketType: string, // MarketCreated.marketType | |
numOutcomes: number, // Derived from MarketCreated.outcomes | |
minPrice: string, // MarketCreated.minPrice | |
maxPrice: string, // MarketCreated.maxPrice | |
cumulativeScale: string, // MarketCreated.maxPrice - MarketCreated.minPrice | |
author: string, // MarketCreated.marketCreator | |
creationTime: number, // Block timestamp of MarketCreated event |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Should log each update to the market's price history? | |
export interface TimestampedPriceAmount { | |
price: string; | |
amount: string; | |
timestamp: number; | |
} | |
export interface GetMarketPriceHistoryResults { | |
[outcome: number]: Array<TimestampedPriceAmount>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Should log when market creator has unclaimed fees & when they are claimed? | |
export interface MarketCreatorFee { | |
marketId: string; | |
unclaimedFee: string; | |
} | |
export interface GetMarketCreatorFeesResults { | |
[index: number]: Array<MarketCreatorFee>; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// May not need any additional logging? | |
export interface MarketPriceCandlestick { | |
startTimestamp: number; | |
start: string; | |
end: string; | |
min: string; | |
max: string; | |
volume: string; | |
tokenVolume: string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Probably nothing additional to log | |
export interface GetBetterWorseOrdersResults { | |
betterOrderId: Address|null; | |
worseOrderId: Address|null; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface GetOrdersResults { | |
[marketId: string]: { | |
[outcome: number]: { | |
[orderType: string]: { | |
[orderId: string]: Order; | |
}; | |
}; | |
}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Should updates to a user's trading positions in a specific market be emitted as an event? | |
export interface GetTradingPositionsResult { | |
averagePrice: string, | |
cost: string, | |
marketId: Address, | |
netPosition: string, | |
numEscrowed: string, | |
outcome: number, | |
position: string, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This data is all being logged, but currently requires getting info from multiple events, like OrderFilled, OrderCreated, & TokensMinted | |
export interface UserTrade { | |
transactionHash: string, // Block transaction hash | |
logIndex: number, // Block log index | |
orderId: string, // OrderFilled.orderId | |
type: string, // OrderCreated.orderType | |
price: string, // OrderCreated.price | |
amount: string, // OrderFilled.amountFilled | |
maker: boolean, // OrderCreated.orderType |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Should add `outcome`, `price`, & `maker` to TradingProceedsClaimed | |
export interface ProceedTradesRow { | |
logIndex: number, // Block logIndex | |
blockNumber: number, // Block number | |
timestamp: number, // Block timestamp | |
marketId: Address, // TradingProceedsClaimed.market | |
outcome: number, // Share token's outcome | |
price: BigNumberType, // Payout * tickSize * MarketCreated.minPrice | |
amount: BigNumberType, // TradingProceedsClaimed.numShares |
OlderNewer