Kraken API Integration for Mobile Crypto Apps

We've seen teams get stuck on the request signing phase: HMAC-SHA512 with double hashing scares even experienced developers. Kraken's algorithm is one of the strictest among public crypto exchanges. But in practice, integration on mobile platforms takes half a day if you know the nuances. With over

Development and support of all types of mobile applications:

Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1All 1734 services
Kraken API Integration for Mobile Crypto Apps
Medium
~3-5 days

Our competencies:

Frequently Asked Questions

Latest works

  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    898
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    784
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1219
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    1081
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    1004
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    600

We've seen teams get stuck on the request signing phase: HMAC-SHA512 with double hashing scares even experienced developers. Kraken's algorithm is one of the strictest among public crypto exchanges. But in practice, integration on mobile platforms takes half a day if you know the nuances. With over 10 years of experience and 40+ completed exchange API integrations, our team ensures stable operation without lockouts.

Problems We Solve

HMAC-SHA512 is the core of the signature, but errors arise from incorrect private key decoding. The private key is a Base64 binary secret, not an ASCII string. On iOS, a typical mistake is passing Data(privateKey.utf8) instead of Data(base64Encoded: privateKey)!. On Android, forgetting to decode Base64 before using Mac.getInstance("HmacSHA512"). Result: signature formed, but server returns authentication error.

Non-standard asset names: The REST API uses XBT instead of BTC, XDG instead of DOGE. Pairs look like XBTZUSD. WebSocket v2 normalizes (BTC/USD), but REST and historical data do not. Without a mapping table, users won't recognize their assets. We implement an alias map from AssetPairs.

Rate limiting without hints: Kraken does not return headers with remaining limit. Exceeding it results in an IP block for several minutes. We implement adaptive intervals: balance every 10 seconds, orders every 30 seconds, all market data via WebSocket.

How Kraken Request Signing Works

  1. Generate a nonce — Unix timestamp in milliseconds.
  2. Compute SHA256 of nonce + postData (URL-encoded string).
  3. Create HMAC-SHA512 of urlPath + the resulting hash, using the Base64-decoded private key.

Result — API-Sign. If nonce is not first in postData, Kraken returns EAPI:Invalid nonce. An incorrect signature can cost time and money: one mistaken order can lead to $100 loss. Our approach eliminates such errors. We use CryptoKit on iOS (available since iOS 13) and javax.crypto.Mac on Android. More details in the Kraken API documentation.

Why Kraken Asset Names Differ from Standard

Historically, Kraken used ISO codes with prefixes: X for base, Z for quote currency. XBT = Bitcoin, XDG = Dogecoin. Inside pairs, prefixes double: XXBTZUSD. WebSocket v2 switched to readable format (BTC/USD), but REST remained old. We build a table from AssetPairs and display convenient names while using originals in requests.

WebSocket API v2: Updates

With the transition to v2, the message format changed: from {"event":"subscribe"} to {"method":"subscribe","params":{...}}. Authorization for private channels: get a token via REST /0/private/GetWebSocketToken, pass it in params.token when subscribing to executions (orders) or balances. The token lives 15 minutes — a refresh mechanism is required. Without it, the session silently dies, and the user stops seeing order updates.

Parameter WebSocket v1 WebSocket v2
URL wss://ws.kraken.com wss://ws.kraken.com/v2
Subscribe event: subscribe method: subscribe, params: {...}
Asset names XBT/USD BTC/USD
Private channels Token in parameters Token in params.token

Example signing code in Swift:

import CryptoKit func generateSignature(urlPath: String, body: Data, secret: String) -> String { let secretData = Data(base64Encoded: secret)! let nonce = "\(Date().timeIntervalSince1970 * 1000)" var postData = "nonce=\(nonce)" if let additionalData = String(data: body, encoding: .utf8) { postData += "&\(additionalData)" } let sha256 = SHA256.hash(data: postData.data(using: .utf8)!) let hmac = HMAC<SHA512>.authenticationCode(for: urlPath.data(using: .utf8)! + sha256.data, using: SymmetricKey(data: secretData)) return hmac.compactMap { String(format: "%02x", $0) }.joined() } 
Data REST (polling) WebSocket (push)
Balance /0/private/Balance balances channel
Orders /0/private/OpenOrders executions channel
Market data /0/public/Ticker ticker channel

What's Included

  • Analysis of your app's current architecture and selection of the appropriate stack (iOS: URLSession + Combine, Android: OkHttp + Coroutines).
  • Implementation of signature and error handling (including WebSocket reconnection).
  • Setup of push notifications (APNs/FCM) for order confirmations.
  • Testing with real trading data simulating rate limits.
  • Documentation — endpoint descriptions, request examples, operation instructions.
  • Warranty — 30 days of free support after launch.

Want to avoid these issues? Order Kraken integration from us and get a free analysis of your app. We'll evaluate your project in one business day. Contact us for a consultation.

Stack and Timeline

For native iOS: CryptoKit (HMAC-SHA512), URLSessionWebSocketTask, Combine Publisher. For Android: Mac with HmacSHA512, OkHttp WebSocket, Kotlin Coroutines + Flow. Spot integration (no margin) — 3-4 weeks. Futures API — separate, with different authentication. If you want to estimate the timeline for your project, contact us.

We'll evaluate your project in one business day. Get a consultation on Kraken integration for your app — free of charge.