Last active
March 18, 2019 00:13
-
-
Save adrake33/d192651a004684cfcd8d347bc5a9bff6 to your computer and use it in GitHub Desktop.
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, | |
realized: string, | |
timestamp: number, | |
total: string, | |
totalPosition: string, | |
unrealized: string | |
} | |
export interface GetTradingPositionsResults { | |
Array: GetTradingPositionsResult | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We will have this data from the OrderFilled logs except for the unrealized profit which will need to look at the last price of the outcome. I think it would be nice to add a new log for outcome price so that no logic is needed for when a market finalizes and the payout for that outcome should be used.
The latest OrderFilled log for a give account/market/outcome is what should be used.