Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add historical prices for ZTG/USD, ZTG/EUR, DOT/USD, DOT/EUR (later USDC/USD, USDC/EUR) for a capital gain export #492

Open
Chralt98 opened this issue Jan 25, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request high priority

Comments

@Chralt98
Copy link
Member

Chralt98 commented Jan 25, 2024

I realised that the following query only returns the most recent price of today:

query MyQuery {
  assetPrice(base: ZTG, target: USD) {
    price
    timestamp
    pair
  }
}

Additionally I noticed there exists the priceHistory query, but this only accounts for the historical prices of outcome assets denominated in the base asset of the market.

priceHistory(marketId: 10) {
  timestamp
  prices {
    assetId
    price
  }
}

I desired to see the price history of all market base assets in USD and EUR. In example: ZTG/USD, ZTG/EUR, DOT/USD, DOT/EUR for now, since there are no other base assets used right now. I would also need the same output for added base assets later on e. g. USDC.

It would be mandatory for users in the European Union to add the price history of the base asset for markets in EUR. This would allow a capital gain export for EU citizens. Since the European Union is positively regulated and doesn't forbid transactions using ZeitgeistPM explicitly like the USA, it would increase the ease of use for EU-citizens, because I could automatically generate an export in the EUR currency (which is required to specify the total EUR amount of unspecified asset prices for the outcome tokens).

@Chralt98 Chralt98 added the enhancement New feature or request label Jan 25, 2024
@Chralt98 Chralt98 changed the title Add EUR as denominator for ZTG and DOT (later USDC) historical prices Add historical prices for ZTG/USD, ZTG/EUR, DOT/USD, DOT/EUR (later USDC/USD, USDC/EUR) for a capital gain export Jan 26, 2024
@Chralt98
Copy link
Member Author

Chralt98 commented Feb 8, 2024

Added to high priority, because hutch also wanted to see a ZTG/USD historical chart on our main-app on a separate statistics page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request high priority
Projects
None yet
Development

No branches or pull requests

2 participants