Skip to main content

swaps

Get the last 100 swaps done on Uniswap [Source: https://thegraph.com/en/]

Source Code: [link]

openbb.crypto.defi.swaps(limit: int = 100, sortby: str = "timestamp", ascend: bool = False)

Parameters​

NameTypeDescriptionDefaultOptional
limitintNumber of swaps to return. Maximum possible number: 1000.100True
sortbystrKey by which to sort data. The table can be sorted by every of its columns
(see https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v2).
timestampTrue
ascendboolFlag to sort data descendingFalseTrue

Returns​

TypeDescription
pd.DataFrameLast 100 swaps on Uniswap