This a guide to basic terminology and concepts of cryptocurrency as demonstrated by functionality of the Uniswap API.
This primer is meant for people who are either brand new to cryptocurrency or who want to get a basic understanding of the Uniswap API.
Each topic in the list builds on the previous concept so it's best to start from the top.
Select a token from the dropdown menu
A token is the most basic element of cryptocurrency systems.
Selecting one of these tokens will send a fetchTokenData request to Uniswap to obtain real-time information about that token.
We will also call fetchTotalSupply for the token.
APIs used in this section:
Select two tokens to form a pair
A pair is a smart contract that enables trading between two tokens.
It might be a bit surprising to learn but a pair is itself also a token!
The order of the tokens in the pair doesn't matter.
We will pass the output from the fetchTokenData API we learned about in the previous section to fetchPairData
APIs used in this section:
A route is comprised of a path from one token to another, one or more pairs, an input token, and an output token.
APIs used in this section:
A trade is a proposal for swapping two tokens including info about the result of the trade
In this example, we will see how much of the outputToken we will receive if we traded 1000 of the inputToken.
APIs used in this section: