kraken v0.1.1 Kraken.API
API requests client for Kraken exchange.
Link to this section Summary
Functions
Post order by account
Cancel existing unclosed order
Get info about tradable asset pairs
Get account balance
Get account’s closed orders
Get info about tradable asset pairs
Get account’s open orders
Get order book
Get recent trades
Get recent spread data
Get info about tradable asset pairs
Get detailed account balance in some currency
Use this to execute private requests without API wrapper. OTP param is needed in case of 2 Factor Auth
Use this to execute public requests without API wrapper
Get detailed info about order
Link to this section Functions
Post order by account
Options:
- otp: 2 factor auth code (required if it’s enabled)
- pair: asset pair
- type: type of order (buy/sell)
- ordertype: order type: market limit: (price = limit price) stop-loss: (price = stop loss price) take-profit: (price = take profit price) stop-loss-profit: (price = stop loss price, price2 = take profit price) stop-loss-profit-limit: (price = stop loss price, price2 = take profit price) stop-loss-limit: (price = stop loss trigger price, price2 = triggered limit price) take-profit-limit: (price = take profit trigger price, price2 = triggered limit price) trailing-stop: (price = trailing stop offset) trailing-stop-limit: (price = trailing stop offset, price2 = triggered limit offset) stop-loss-and-limit: (price = stop loss price, price2 = limit price) settle-position
- price: price (optional. dependent upon ordertype)
- price2: secondary price (optional. dependent upon ordertype)
- volume: order volume in lots
- leverage: amount of leverage desired (optional. default = none)
- oflags: comma delimited list of order flags (optional): viqc: volume in quote currency (not available for leveraged orders) fcib: prefer fee in base currency fciq: prefer fee in quote currency nompp: no market price protection ** post: post only order (available when ordertype = limit)
- starttm: scheduled start time (optional):
0: now (default)
+
: schedule start time seconds from now ** : unix timestamp of start time - expiretm: expiration time (optional):
0: no expiration (default)
+
: expire seconds from now ** : unix timestamp of expiration time - userref: user reference id. 32-bit signed number. (optional)
- validate: validate inputs only. do not submit order (optional)
Optional closing order to add to system when order gets filled:
- close[ordertype]: order type
- close[price]: price
- close[price2]: secondary price
Cancel existing unclosed order
Options:
- otp: 2 factor auth code (required if it’s enabled)
- txid: transaction id
Get info about tradable asset pairs
Options:
- info: info to retrieve (optional) info: all info (default) leverage: leverage info fees: fees schedule margin: margin info
- pair: comma delimited list of asset pairs to get info on (optional. default = all)
Get account balance
Options:
- otp: 2 factor auth code (required if it’s enabled)
Get account’s closed orders
Options:
- otp: 2 factor auth code (required if it’s enabled)
- trades: whether or not to include trades in output (optional. default = false)
- userref: restrict results to given user reference id (optional)
- start: starting unix timestamp or order tx id of results (optional. exclusive)
- end: ending unix timestamp or order tx id of results (optional. inclusive)
- ofs: result offset
- closetime: which time to use (optional): open, close, both (default)
Get info about tradable asset pairs
Options:
- pair: asset pair to get OHLC data for
- interval: time frame interval in minutes (optional): 1 (default), 5, 15, 30, 60, 240, 1440, 10080, 21600
- since: return committed OHLC data since given id (optional. exclusive)
Get account’s open orders
Options:
- otp: 2 factor auth code (required if it’s enabled)
- trades: whether or not to include trades in output (optional. default = false)
- userref: restrict results to given user reference id (optional)
Get order book
Options:
- pair: asset pair to get market depth for
- count: maximum number of asks/bids (optional)
Get recent trades
Options:
- pair: asset pair to get trade data for
- since: return trade data since given id (optional. exclusive)
Get recent spread data
Options:
- pair: asset pair to get spread data for
- since: return spread data since given id (optional. inclusive)
Get info about tradable asset pairs
Options:
- pair: comma delimited list of asset pairs to get info on
Get detailed account balance in some currency
Options:
- otp: 2 factor auth code (required if it’s enabled)
- aclass: asset class (optional): currency (default)
- asset: base asset used to determine balance (default = ZUSD)
Use this to execute private requests without API wrapper. OTP param is needed in case of 2 Factor Auth.
Use this to execute public requests without API wrapper
Get detailed info about order
Options:
- otp: 2 factor auth code (required if it’s enabled)
- trades: whether or not to include trades in output (optional. default = false)
- userref: restrict results to given user reference id (optional)
- txid: comma delimited list of transaction ids to query info about (20 maximum)