I understand how to trade crypto with the Krakenex API using something like the following
import krakenex
def main():
kraken = krakenex.API()
kraken.load_key('kraken.key')
response = kraken.query_private('AddOrder',
{'pair': 'XXBTZEUR',
'type': 'buy',
'ordertype': 'market',
'volume': '0.001'
})
return response
if __name__ == '__main__':
ret = main()
print(ret)
However if I were to plug my futures trading api key in rather than my spot api key it will give me “{'error': ['EAPI:Invalid key']}
“.
I have already tried to achieve this effect by simply swapping the spot key for the futures key and I am trying to do something similar to the code provided earlier but with futures.
New contributor
Dev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.