API Kraken | REST Private API

Connessione

URL: https://api.kraken.com

 

Autenticazione

La REST Private API richiede una API Key e un API Secret, questi valori sono forniti da Kraken nel suo account.

  
Kraken.ApiKey := 'api key';
Kraken.ApiSecret := 'api secret';

 

Metodi

GetAccountBalance

Restituisce il saldo del tuo account.


Kraken.REST_API.GetAccountBalance();

GetTradeBalance

Restituisce informazioni sulle proprie operazioni.


Kraken.REST_API.GetTradeBalance();

GetOpenOrders

Restituisce un elenco degli ordini aperti.


Kraken.REST_API.GetOpenOrders();

GetClosedOrders

Restituisce un elenco degli ordini chiusi.


Kraken.REST_API.GetClosedOrders();

QueryOrders

Interroga le informazioni su un ordine.


Kraken.REST_API.QueryOrders('1234');

GetTradesHistory

Restituisce un array di informazioni sulle transazioni.


Kraken.REST_API.GetTradesHistory();

QueryTrades

Interrogare informazioni su una transazione.


Kraken.REST_API.QueryTrades('1234');

GetOpenPositions

Restituisce le informazioni sulla posizione.


Kraken.REST_API.GetOpenPositions('1234');

GetLedgers

Restituisce un array associativo di informazioni sui registri contabili.


Kraken.REST_API.GetLedgers();

QueryLedgers

Restituisce un array associativo di informazioni sui registri contabili.


Kraken.REST_API.QueryLedgers('1234');

GetTradeVolume

Restituisce informazioni sul volume degli scambi.


Kraken.REST_API.GetTradeVolume();

AddExport

Aggiunge una nuova esportazione di report.


Kraken.REST_API.AddExport('Report All Trades');

ExportStatus

Ottieni lo Stato dei report


Kraken.REST_API.ExportStatus();

RetrieveExport

Ottieni report tramite ID report.


Kraken.REST_API.RetrieveExport('GOCO');

RemoveExport

Rimuovi report tramite ID report.


Kraken.REST_API.RemoveExport('GOCO');
Aggiungi Ordine

Aggiunge un nuovo ordine


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)
    +n = schedule start time n seconds from now
    n = unix timestamp of start time
expiretm = expiration time (optional):
    0 = no expiration (default)
    +n = expire n seconds from now
    n = 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

oKrakenOrder := TsgcHTTPKrakenOrder.Create;
oKrakenOrder.Pair := 'XBT/USD';
oKrakenOrder._Type := koshBuy;
oKrakenOrder.OrderType := kothMarket;
oKrakenOrder.Volume := 1;
Kraken.REST_API.AddOrder(oKrakenOrder);

CancelOrder

Annulla un ordine aperto tramite id


Kraken.REST_API.CancelOrder('1234');