Post
Topic
Board Service Announcements
Re: [ANN] KRAKEN.COM - US-based Exchange w/ Margin Trading - OPEN BETA
by
epetroel
on 09/05/2013, 16:41:03 UTC
What's your status on an API for trading and market data?
I assume it will be available eventually, but you should release it as soon as possible to give developmers of trading utilities and bots a headstart, so they can use the beta site to test their own tools/products and have them ready when you go into production.

They do have an API, but no official docs yet.  Here's some unofficial documentation that they sent me last week.  Note that this isn't final and also doesn't cover any of the trading functions.  Should give you some idea of how it will work though (similar to Gox and other exchanges out there now)

Quote
API:

Public methods can use either GET or POST

Private methods must use POST and be set up as follows:

HTTP header:
API-Key = API key
API-Sign = Message signature using HMAC-SHA512 of the URI path and POST data and base64 decoded secret API key

POST data:
nonce = always increasing unsigned 64 bit integer

Note: There is no way to reset the nonce to a lower value so be sure to use a nonce generation method that won't generate
numbers less than the previous nonce. A persistent counter or the current time in hundredths of a second precision or higher is suggested.

Public market data
Get server time
URL: https://api.beta.kraken.com/0/public/Time

Result: Server's time

unixtime = as unix timestamp
rfc1123 = as RFC 1123 time format

Note: This is to aid in approximating the skew time between the server and client.

Get tradeable asset pairs
URL: https://api.beta.kraken.com/0/public/AssetPairs

Result: array of pair names and their info

= pair name (ISO-4217-A3-X names)
altname = alternate pair name (ISO-4217-A3 names)
aclass-base = asset class of base component
base = asset id of base component
aclass-quote = asset class of quote component
quote = asset id of quote component
lot = lot size
leverage = array of leverage amounts available

Get ticker information
URL: https://api.beta.kraken.com/0/public/Ticker

Input:
pair = comma delimited list of asset pairs to get info on

Result: array of pair names and their ticker info

= pair name (ISO-4217-A3-X names)
ask = ask array(, ),
bid = bid array(, ),
last = last array(, ),
volume = volume array(, ),
vwap = volume weighted average price array(, ),
trades = number of trades array(, ),
low = low array(, ),
high = high array(, ),
open = today's opening price

Get order book
URL: https://api.beta.kraken.com/0/public/Depth

Input:
pair = asset pair to get market depth for

Result: array of pair name and market depth

= pair name (ISO-4217-A3-X names)
asks = ask side array of array entries(, , )
bids = bid side array of array entries(, , )

Get recent trades
URL: https://api.beta.kraken.com/0/public/Trades

Input:
pair = asset pair to get trade data for
since = return trade data since given id (exclusive)

Result: array of pair name and recent trade data

= pair name (ISO-4217-A3-X names)
array of array entries(, ,