get_swap method errors out
Closed this issue · 1 comments
makbeta commented
The code generates the following error, fails due to API changes
Traceback (most recent call last):
File "test.py", line 30, in <module>
result = exchange.get_quote("ETH", "USDT", 1000000000000000)
File "/home/beta/projects/1inch_wrapper/oneinch_py/main.py", line 160, in get_quote
from_base = Decimal(result['fromTokenAmount']) / Decimal(10 ** result['fromToken']['decimals'])
KeyError: 'fromTokenAmount'
Solution is forthcoming.
vmnfts commented
yeah getswap returns "HTTPError with code 400 for a request "
while get_quote call works fine
any idea?