kowala-tech / kcoin

A stable cryptocurrency that algorithmically targets $1 USD using the Kowala Protocol
https://www.kowala.tech/
Other
18 stars 16 forks source link

Create mock exchange API for tests #726

Open yourheropaul opened 6 years ago

yourheropaul commented 6 years ago

This will be necessary for controlled e2e and manual tests. The oracle clients read price information from a number of currency exchange APIs and use that to calculate the price of the kCoins in the market, and thus adjust the minting and burning rates.

We need a set of mock API endpoints that we control, which will replay fake price data as if it were happening now. Because the outcomes of those data are known, we can then make sure the oracle clients are fetching the correct values, and also that the minting and burning rates are correct.

An example of an exchange that we'll be working with for kUSD is Exrates (which has an API).

The mock exchange must: