WebSockets API offers real-time market data updates. WebSockets is a bidirectional protocol offering fastest real-time data, helping you build real-time applications. The public message types presented below do not require authentication. Private-data messages can be subscribed on a separate authenticated endpoint.
Kraken offers a REST API too with Public market data and Private user data (which requires an authentication).
Private API requires creating an API key from your Kraken account.
Kraken allows Test environment on WebSocket protocol, enable Beta property from Kraken Property to use this beta feature.
oClient := TsgcWebSocketClient.Create(nil);
oKraken := TsgcWSAPI_Kraken.Create(nil);
oKraken.Client := oClient;
oClient.Active := True;
oClient := TsgcWebSocketClient.Create(nil);
oKraken := TsgcWSAPI_Kraken.Create(nil);
oKraken.Kraken.ApiKey := 'your api key';
oKraken.Kraken.ApiSecret := 'your api secret';
oKraken.Client := oClient;
oClient.Active := True;
oClient := TsgcWebSocketClient.Create(nil);
oKraken := TsgcWSAPI_Kraken.Create(nil);
oKraken.Client := oClient;
ShowMessage(oKraken.GetTicker(['XBTUSD']));
| Method | Arguments | Description |
| GetSystemStatus | Get current system status. |
| Method | Arguments | Description |
| GetExtendedBalance | Get extended balance information. | |
| AmendOrder | Amend an existing order. | |
| CancelAllOrders | Cancel all open orders. | |
| CancelAllOrdersAfter | Dead man's switch - cancel all orders after timeout. | |
| EditOrder | Edit an existing order. | |
| AddOrderBatch | Batch add multiple orders. | |
| CancelOrderBatch | Batch cancel multiple orders. | |
| GetWithdrawalMethods | Get available withdrawal methods. | |
| GetWithdrawalAddresses | Get withdrawal addresses. |
oClient := TsgcWebSocketClient.Create(nil);
oKraken := TsgcWSAPI_Kraken.Create(nil);
oKraken.Kraken.ApiKey := 'your api key';
oKraken.Kraken.ApiSecret := 'your api secret';
oKraken.Client := oClient;
ShowMessage(oKraken.GetAccountBalance());