This task involves building a simple text UI to help people buy calls and puts on Lyra.
Ask us any questions about the expected final product, and how options or Lyra's API works. We prefer thoughtful questions, planning and correctness over completeness.
- React: A library for building user interfaces
- Chakra: A simple component library
- Next.js: A simple framework for spinning up apps
-
If the strike price is greater than the spot price (current ETH value), we expect the price to go up and should buy a call. If the strike is lower than spot, we expect the price to go down and should buy a put.
The first videos of this Khan Academy course provide a more detailed example.
-
Markets have many expiries, and expiries have many strikes.
- Clone and install the application
git clone https://github.com/lyra-finance/lyra-frontend-challenge.git
yarn install
- Run the application
yarn dev
- Complete the challenge. Edit
src/pages/index.ts
to complete the challenge, and watchhttp://localhost:3000
for realtime updates.
We have included functions to call the necessary Lyra API endpoints to complete the challenge. These are wrapped as:
fetchAllCurrencies()
- Gets all active currencies on Lyra with their spot price
fetchInstruments(params)
- Gets all active instruments for a given
currency
andtype
You can access the API documentation for more details on the request parameters and respective response body.