Skip to content

@swaps:quote

Expected output of an exact-in swap, in base units of tokenOut. Quotes the same venue swap would use (or the one given), so it feeds --min directly.

Returns: number

@swaps:quote(amountIn tokenIn tokenOut venue?)
NameTypeDescription
amountInnumberAmount of tokenIn to sell, in base units (wei)
tokenInaddressToken to sell
tokenOutaddressToken to buy
[venue]swap-venueVenue to quote (default: the best venue on the chain)
# Print the expected GNO output for 100 WXDAI (on Gnosis)
print "GNO out:" @swaps:quote(100e18 0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d 0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb)