Skip to content

Instantly share code, notes, and snippets.

@adrake33
Last active April 2, 2019 17:58
Show Gist options
  • Save adrake33/f35f1963affa6719a698ecfad43a0d80 to your computer and use it in GitHub Desktop.
Save adrake33/f35f1963affa6719a698ecfad43a0d80 to your computer and use it in GitHub Desktop.
// 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
marketCreatorFees: string, // OrderFilled.marketCreatorFees
reporterFees: string, // OrderFilled.reporterFees
selfFilled: boolean, // OrderCreated.creator/OrderCreated.filler
marketId: string, // Share token's market
outcome: number, // Share token's outcome
shareToken: string, // OrderCreated.shareToken
timestamp: number, // Block timestamp
tradeGroupId: number|null, // OrderCreated.tradeGroupId
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment