I’m new to Waves and PyWaves and I’m hitting an issue that feels like I’m doing something wrong. I’m using python 3.6 and PyWaves 0.8.19. The code I’m running is
import pywaves
node = "https://nodes.wavesnodes.com"
matcher = "https://nodes.wavesnodes.com"
pywaves.setNode(node, "mainnet")
pywaves.setMatcher(matcher)
PRIVATE_KEY = ''
address = pywaves.Address(privateKey=PRIVATE_KEY)
assets = address.assets()
asset1 = pywaves.Asset(assets[0])
LTC = asset1
LTC_WAVES = pywaves.AssetPair(LTC, pywaves.WAVES)
WAVES_LTC = pywaves.AssetPair(pywaves.WAVES, LTC)
transaction = address.buy(assetPair=WAVES_LTC, amount=1000000, price=2589392269, maxLifetime=1800)
When I run this code, I seem to get a dictionary which contains all the markets. and no error message that I can find.
Can someone point out what I’m doing wrong here?
EDIT: I only have LTC and Waves in this account so asset1 should always be LTC