I can't figure out where the Kraken API inputs go. I am using https://api.kraken.com/0/private/AddOrder as a starting point. The inputs include things like: pair = XBTUSD, type = buy, ordertype = limit etc. I'm an API noob and I realise this isn't a typical approach but I would greatly appreciate any guidance.
I've successfully used the API for other things like retrieving account balances. Just not sure where inputs fit in. I couldn't figure it out from the documentation here https://www.kraken.com/help/api. I would like to use a specific buy order as a learning example. ie buy 0.003 BTC, pair XBTUSD, limit 5000 USD...
The relevant piece of code-
function buyKraken () {
var path = "/0/private/AddOrder";
var nonce = new Date () * 1000;
var postdata = "nonce=" + nonce;
var signature = getKrakenSignature (path, postdata, nonce);
var url = 'https://api.kraken.com' + path;
var options = {
method: 'post',
headers: {
'API-Key': "###########",
'API-Sign': signature
},
payload: postdata
};
var response = UrlFetchApp.fetch (url, options);
Logger.log(response);
;
}