RichardAtCT/1inch_wrapper

get_swap method errors out

Closed this issue · 1 comments

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.

yeah getswap returns "HTTPError with code 400 for a request "
while get_quote call works fine
any idea?