Reputation: 19150
I want to use Python to interact with the Kraken REST API (https://support.kraken.com/hc/en-us/articles/360025180232-REST-API-command-line-client-Python-#python). I'm US-based. I was trying to figure out what kind of decimal precision I would need for a "ETHUSD" pair,
$ ./krakenapi AddOrder pair=ETHUSD type=sell ordertype=limit price=1.00 volume=50 oflags=post
however, when I query
https://api.kraken.com/0/public/AssetPairs
I do not see this pair listed. What kind of precision (decimal places) would be required or is it not possible to trade ETHUSD within Kraken's REST API?
Upvotes: 0
Views: 216
Reputation: 106543
ETHUSD
is listed as an altname
in the AssetPairs
query you mentioned, under the id/key of XETHZUSD
, with a price decimal precision of 2 as shown in the pair_decimals
key:
"XETHZUSD":{"altname":"ETHUSD","wsname":"ETH/USD","aclass_base":"currency","base":"XETH","aclass_quote":"currency","quote":"ZUSD","lot":"unit","cost_decimals":5,"pair_decimals":2,...
This means you can place an order of 1600.01 USD but not 1600.001 USD for the ETHUSD
pair.
For more information, please read the Kraken's documentation on Price decimal precision.
Upvotes: 0