Skip to content

Instantly share code, notes, and snippets.

@kayibal
Created December 13, 2020 14:01
Show Gist options
  • Save kayibal/bcbcb0ea73e1e631be2a5dc0a48428b9 to your computer and use it in GitHub Desktop.
Save kayibal/bcbcb0ea73e1e631be2a5dc0a48428b9 to your computer and use it in GitHub Desktop.
def test_get_price():
exchange_gw = UniswapGateway()
usdt = Token(address="0xdAC17F958D2ee523a2206206994597C13D831ec7")
wbtc = Token(address="0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599")
order = Order(
inp_token=usdt,
out_token=wbtc,
amount=1
)
price = exchange_gw.get_price(order)
assert 19000 < price < 20000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment