Skip to content

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

@Chralt98

Description

@Chralt98

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).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions