-
Notifications
You must be signed in to change notification settings - Fork 230
Closed
Description
Versions
OS: Win 10
Python: 3.6.3
krakenex: 3
What are you trying to achieve?
I want to write a python program to place a new order, and am wondering what type of feedback I should be expecting from the Kraken API. I have installed Krakenex with pip3 and can succesfully look up balances and get a response as expected, but when I run code for new order, I get an appropriate pause (3 - 10 seconds), but no response at all. No error, or anything.
# code sample
import krakenex
from requests.exceptions import HTTPError
k = krakenex.API()
k.load_key('kraken.key')
tradepair = 'LTCUSD'
volume_units = 1
buy_price = 1
sell_price = 1000
k.query_private('AddOrder',
{'pair': tradepair,
'type': 'buy',
'ordertype': 'limit',
'price': buy_price,
'volume': volume_units,
# only `ordertype`, `price` and `price2` are valid
'close[ordertype]': 'limit',
'close[price]': sell_price,
# these will be ignored!
'close[pair]': tradepair,
'close[type]': 'sell',
'close[volume]': volume_units})
What do you expect to happen?
I would expect to get a response of some sort that has TXID, or an error message saying I don't have enough USD to complete the order.
What happens instead?
After a pause, I get a command prompt.
# error message
no error messagesI have no balance, so I don't expect the trade order to be successful, but I would expect something back.
Metadata
Metadata
Assignees
Labels
No labels