Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/sieblyio/kraken-api/llms.txt

Use this file to discover all available pages before exploring further.

The PartnerClient provides access to Kraken’s white-label embedded finance APIs, enabling partners to build full-featured crypto products under their own brand. It covers the Embed API (embed.kraken.com) for user onboarding, portfolio management, trading quotes, earn products, and custom orders, as well as the Ramp API for fiat-to-crypto checkout flows. All requests are authenticated with partner-level API credentials and act on behalf of users identified by their IIBAN (Internet International Bank Account Number).
Partner API access requires a partner agreement with Kraken. Contact Kraken to apply. Your partner API key and secret are separate from standard Spot or Institutional credentials.

Constructor

import { PartnerClient } from '@siebly/kraken-api';

const client = new PartnerClient({
  apiKey: 'insert_api_key_here',
  apiSecret: 'insert_api_secret_here',
});

User Management

createEmbedUser

Create a new user in the Kraken embedded finance system. Returns the Kraken-assigned IIBAN for the user, which is used as the user parameter in all subsequent calls.
createEmbedUser(params: PartnerCreateUserParams): Promise<PartnerCreateUserResponse>
Returns: PartnerCreateUserResponse{ result: { user: { iiban: string } } }
email
string
required
User’s email address.
external_id
string
required
Your system’s unique identifier for this user.
tos_version_accepted
number
required
Version number of the Terms of Service accepted by the user.
full_name
object
required
{ first_name: string, middle_name?: string, last_name: string }
date_of_birth
string
required
Date of birth in YYYY-MM-DD format.
residence
object
required
Residential address: { line1, line2?, city, postal_code, province?, country } (ISO 3166-1 alpha-2 country code).
phone
string
required
Phone number in E.164 format (e.g. +14155552671).
nationalities
string[]
required
Array of ISO 3166-1 alpha-2 country codes.
occupation
string
required
One of: agriculture, business_management, computers_and_it, construction, education, finance, government, healthcare, hospitality, manufacturing, marketing, media, other, science, self_employed, student, transportation, unemployed.
tax_ids
array
Optional tax IDs: [{ id: string, issuing_country: string }].
language
string
ISO 639-1 language code (e.g. en, de).
import { PartnerClient } from '@siebly/kraken-api';

const client = new PartnerClient({
  apiKey: 'insert_api_key_here',
  apiSecret: 'insert_api_secret_here',
});

const response = await client.createEmbedUser({
  email: 'alice@example.com',
  external_id: 'user_12345',
  tos_version_accepted: 1,
  full_name: { first_name: 'Alice', last_name: 'Smith' },
  date_of_birth: '1990-06-15',
  residence: {
    line1: '123 Main St',
    city: 'New York',
    postal_code: '10001',
    country: 'US',
  },
  phone: '+12125550100',
  nationalities: ['US'],
  occupation: 'finance',
});
const userIiban = response.result.user.iiban;
console.log('User IIBAN:', userIiban);

getEmbedUser

Retrieve profile and status information for a previously created user.
getEmbedUser(params: { user: string }): Promise<PartnerGetUserResponse>
Returns: PartnerGetUserResponse — includes user, external_id?, user_type, status, created_at.
const user = await client.getEmbedUser({ user: userIiban });
console.log('Status:', user.result?.status.state);
console.log('Required actions:', user.result?.status.required_actions);

updateEmbedUser

Update an existing user’s profile details such as address, phone, name, or occupation.
updateEmbedUser(params: PartnerUpdateUserParams): Promise<PartnerUpdateUserResponse>
Returns: PartnerUpdateUserResponse{ result?: 'success' }
user
string
required
The user’s IIBAN.
phone
string
Updated phone in E.164 format.
residence
object
Updated residential address.
occupation
string
Updated occupation.
await client.updateEmbedUser({
  user: userIiban,
  phone: '+12125550199',
  occupation: 'self_employed',
});

submitEmbedVerification

Submit a KYC identity verification for a user, including document images and metadata from your verification provider. Uses multipart/form-data internally.
submitEmbedVerification(
  params: PartnerSubmitVerificationParams,
): Promise<PartnerSubmitVerificationResponse>
Returns: PartnerSubmitVerificationResponse{ result?: { verification_id: string } }
user
string
required
The user’s IIBAN.
type
string
required
Verification type: identity_document.
metadata
object
required
Document metadata including identity (name + DOB), document_type (passport, drivers_license, id_card, residence_card, special_permanent_residence_card), document_number, issuing_country, and optional nationality.
verifier
string
required
Name of the KYC verification provider (e.g. Onfido).
verified_at
string
required
ISO 8601 datetime when verification was completed.
front
any
required
Binary file for the front side of the identity document.
back
any
required
Binary file for the back side of the identity document.

Portfolio

getEmbedPortfolioSummary

Get the overall portfolio summary for a user: total value, available balance, open orders value, and optional current-day P&L.
getEmbedPortfolioSummary(
  params: PartnerGetPortfolioSummaryParams,
): Promise<PartnerGetPortfolioSummaryResponse>
Returns: PartnerGetPortfolioSummaryResponse{ result: { timestamp, currency, portfolio_value, withheld_value, open_orders, available_balance, lots_upnl?, cost_basis?, current_day_pnl? } }
user
string
required
User IIBAN.
quote
string
Quote asset for valuation (default USD).
const summary = await client.getEmbedPortfolioSummary({ user: userIiban });
console.log('Portfolio value:', summary.result.portfolio_value, summary.result.currency);
console.log('Available balance:', summary.result.available_balance);

getEmbedPortfolioHistory

Retrieve a user’s portfolio value over time, with optional asset-level breakdown and P&L.
getEmbedPortfolioHistory(
  params: PartnerGetPortfolioHistoryParams,
): Promise<PartnerGetPortfolioHistoryResponse>
user
string
required
User IIBAN.
start_date
string
Start date in YYYY-MM-DD format.
end_date
string
End date in YYYY-MM-DD format.
resolution
number
Data point resolution in days (default 1).
include[assets][]
string[]
Include per-asset breakdown for specific assets.
include[total_pnl]
boolean
Include total profit and loss figures.
const history = await client.getEmbedPortfolioHistory({
  user: userIiban,
  start_date: '2025-01-01',
  end_date: '2025-06-30',
  'include[total_pnl]': true,
});
console.log('P&L:', history.result.total_pnl);

listEmbedPortfolioDetails

List all assets currently held in a user’s portfolio with per-asset balance and valuation.
listEmbedPortfolioDetails(
  params: PartnerListPortfolioDetailsParams,
): Promise<PartnerListPortfolioDetailsResponse>
user
string
required
User IIBAN.
quote
string
Quote asset for valuation (default USD).
const details = await client.listEmbedPortfolioDetails({ user: userIiban });
details.result?.assets.forEach((a: any) => console.log(a.asset, a.quantity));

listEmbedPortfolioTransactions

List a user’s trade and transaction history with optional filtering by type, asset, status, and date range.
listEmbedPortfolioTransactions(
  params: PartnerListPortfolioTransactionsParams,
): Promise<PartnerListPortfolioTransactionsResponse>
user
string
required
User IIBAN.
types
string[]
Filter by type: simple_order, simple_order_failed, earn_reward.
statuses
string[]
Filter by status: no_status, unspecified, in_progress, successful, failed.
assets
string[]
Filter by asset names (max 16 chars each).
from_time
string
Start of date range (ISO 8601).
until_time
string
End of date range (ISO 8601).
cursor
string
Pagination cursor from next_cursor.
page_size
number
Number of transactions per page.
const txs = await client.listEmbedPortfolioTransactions({
  user: userIiban,
  types: ['simple_order'],
  statuses: ['successful'],
  page_size: 25,
});
console.log(`Transactions: ${txs.result?.transactions.length}`);

listEmbedFundingTransactions

List funding (deposit and withdrawal) transactions at the master account level.
listEmbedFundingTransactions(
  params: PartnerListFundingTransactionsParams,
): Promise<PartnerListFundingTransactionsResponse>
type
string
required
Filter by withdrawal or deposit.
page_size
number
Number of results per page (1–500, default 25).
cursor
string
Pagination cursor.
const funding = await client.listEmbedFundingTransactions({ type: 'deposit' });
funding.result.transactions.forEach((t) => {
  console.log(`${t.type}: ${t.amount} ${t.asset}${t.status}`);
});

withdrawEmbedFunds

Initiate a withdrawal from the master account to a pre-configured withdrawal key.
This is a master-account-level operation. There is no user parameter — it operates on the partner’s master balance, not an individual user’s balance.
withdrawEmbedFunds(
  params: PartnerWithdrawFundsParams,
): Promise<PartnerWithdrawFundsResponse>
Returns: PartnerWithdrawFundsResponse{ result?: { reference_id: string } }
asset
string
required
Asset to withdraw (e.g. BTC, USD). Must be 3–16 characters.
key
string
required
Pre-configured withdrawal key.
amount
string
required
Amount to withdraw as a decimal string.
const withdrawal = await client.withdrawEmbedFunds({
  asset: 'ETH',
  key: 'my-withdrawal-key',
  amount: '1.5',
});
console.log('Reference ID:', withdrawal.result?.reference_id);

Quotes & Trading

requestEmbedQuote

Request a firm, executable price quote for a currency exchange on behalf of a user. The quote expires after a short window and can be executed with executeEmbedQuote.
requestEmbedQuote(
  params: PartnerRequestQuoteParams,
): Promise<PartnerRequestQuoteResponse>
Returns: PartnerRequestQuoteResponse — includes quote_id, type, status, expires, spend, receive, unit_price.
user
string
required
User IIBAN on whose behalf the quote is requested.
type
string
required
Quote type: receive (specify how much to receive) or spend (specify how much to spend).
amount
object
required
Amount specification: { asset_class?: 'currency', asset: string, amount: string }.
quote
object
required
Quote (counter) asset: { asset: string }.
fee_bps
string
required
Partner fee in basis points (e.g. "50" for 0.5%).
spread_bps
string
required
Spread in basis points.
import { PartnerClient } from '@siebly/kraken-api';

const client = new PartnerClient({
  apiKey: 'insert_api_key_here',
  apiSecret: 'insert_api_secret_here',
});

// Request a quote: user wants to spend 100 USD to receive BTC
const quote = await client.requestEmbedQuote({
  user: userIiban,
  type: 'spend',
  amount: {
    asset: 'USD',
    amount: '100',
  },
  quote: { asset: 'BTC' },
  fee_bps: '50',
  spread_bps: '20',
});
const quoteId = quote.result.quote_id;
console.log('Quote ID:', quoteId, 'Expires:', quote.result.expires);

requestEmbedProspectiveQuote

Request a prospective (indicative, non-binding) quote to preview pricing and fees before requesting a firm quote. Does not lock liquidity.
requestEmbedProspectiveQuote(
  params: PartnerRequestProspectiveQuoteParams,
): Promise<PartnerRequestProspectiveQuoteResponse>
Returns: PartnerRequestProspectiveQuoteResponse{ result?: { type, spend, receive, unit_price, quoted_spend?, quoted_receive?, quoted_unit_price? } }
user
string
required
User IIBAN.
action
object
required
Trade action: { type: 'receive' | 'spend', amount: { asset, amount }, quote: { asset, fee_bps, spread_bps } }.
quote_currency
string
Optional display currency for quoted amounts.
const prospective = await client.requestEmbedProspectiveQuote({
  user: userIiban,
  action: {
    type: 'spend',
    amount: { asset: 'USD', amount: '500' },
    quote: { asset: 'ETH', fee_bps: '30', spread_bps: '10' },
  },
});
console.log('Indicative receive:', prospective.result?.receive.total, prospective.result?.receive.asset);

getEmbedQuote

Retrieve the current status of a previously requested quote.
getEmbedQuote(params: PartnerGetQuoteParams): Promise<PartnerGetQuoteResponse>
quote_id
string
required
The quote ID returned by requestEmbedQuote.
user
string
required
User IIBAN.
const status = await client.getEmbedQuote({ quote_id: quoteId, user: userIiban });
console.log('Quote status:', status.result?.status);

getEmbedQuoteLimits

Retrieve the minimum, maximum, and precision constraints for a specific asset pair and trade direction. Use this to validate user input before requesting a quote.
getEmbedQuoteLimits(
  params: PartnerGetQuoteLimitsParams,
): Promise<PartnerGetQuoteLimitsResponse>
Returns: PartnerGetQuoteLimitsResponse{ result?: { asset, minimum, maximum, precision, minimum_tradable_amount?, minimum_in_display?, maximum_in_display? } }
user
string
required
User IIBAN (14–42 characters).
base_asset
string
required
Base asset of the pair (e.g. BTC).
quote_asset
string
required
Quote asset of the pair (e.g. USD).
type
string
required
Direction: receive or spend.
const limits = await client.getEmbedQuoteLimits({
  user: userIiban,
  base_asset: 'BTC',
  quote_asset: 'USD',
  type: 'spend',
});
console.log('Min:', limits.result?.minimum, 'Max:', limits.result?.maximum);

executeEmbedQuote

Execute a firm quote that was previously obtained from requestEmbedQuote. The trade is placed at the quoted price.
executeEmbedQuote(
  params: PartnerExecuteQuoteParams,
): Promise<PartnerExecuteQuoteResponse>
Returns: PartnerExecuteQuoteResponse{ result?: { quote_id, status, transaction_id? } }
quote_id
string
required
The firm quote ID to execute.
user
string
required
User IIBAN.
const execution = await client.executeEmbedQuote({
  quote_id: quoteId,
  user: userIiban,
});
console.log('Transaction ID:', execution.result?.transaction_id);

Earn

getEmbedEarnSummary

Retrieve a user’s Earn summary including total allocated amounts, rewards earned (all-time), auto-earn status, and upcoming rewards.
getEmbedEarnSummary(
  params: PartnerGetEarnSummaryParams,
): Promise<PartnerGetEarnSummaryResponse>
Returns: PartnerGetEarnSummaryResponse — includes auto_earn_eligible, auto_earn_enabled, auto_earn_last_changed?, payout_period, total_allocated_converted, total_rewarded_converted_true_rates, num_earning_assets, upcoming_rewards.
user
string
required
User IIBAN.
currency
string
Currency for converted value display (max 16 chars).
const earn = await client.getEmbedEarnSummary({ user: userIiban, currency: 'USD' });
console.log('Auto-earn enabled:', earn.result.auto_earn_enabled);
console.log('Total allocated:', earn.result.total_allocated_converted);
console.log('Total rewards:', earn.result.total_rewarded_converted_true_rates);

listEmbedEarnAssets

List assets eligible for Earn products. Optionally pass a user to include the user’s active allocations in the response.
listEmbedEarnAssets(
  params?: PartnerListEarnAssetsParams,
): Promise<PartnerListEarnAssetsResponse>
assets
string[]
Filter to specific assets (max 16 chars each).
user
string
IIBAN of a user — if provided, the response includes that user’s active allocations.
currency
string
Required when user is provided. Currency for converted values.
const earnAssets = await client.listEmbedEarnAssets({ user: userIiban, currency: 'USD' });
console.log('Earn assets:', Object.keys(earnAssets.result.assets));

toggleEmbedAutoEarn

Enable or disable Auto-Earn for a user. When enabled, idle balances are automatically allocated to Earn strategies. This is an async operation — check the result with getEmbedEarnSummary.
toggleEmbedAutoEarn(
  params: PartnerToggleAutoEarnParams,
): Promise<PartnerToggleAutoEarnResponse>
user
string
required
User IIBAN.
want_enabled
boolean
required
true to enable Auto-Earn, false to disable.
// Enable Auto-Earn
await client.toggleEmbedAutoEarn({ user: userIiban, want_enabled: true });

// Verify the change
const earnSummary = await client.getEmbedEarnSummary({ user: userIiban });
console.log('Auto-earn enabled:', earnSummary.result.auto_earn_enabled);

Custom Orders

Custom orders are price-triggered conditional trades — e.g. “buy 0.01 BTC when price drops to $X”. They persist in the system until triggered, completed, or cancelled.

createEmbedCustomOrder

Submit a price-triggered custom order for a user.
createEmbedCustomOrder(
  params: PartnerCreateCustomOrderParams,
): Promise<PartnerCreateCustomOrderResponse>
Returns: PartnerCreateCustomOrderResponse{ result?: { order: PartnerCustomOrder } }
user
string
required
User IIBAN (14–42 characters).
trigger
object
required
Price trigger: { type: 'price', base_asset, quote_asset, target_price, condition: 'gte' | 'lte' }.
action
object
required
Trade to execute when triggered: { type: 'receive' | 'spend', amount: { asset, amount }, quote: { asset, fee_bps, spread_bps } }.
name
string
required
Human-readable name for the order.
const order = await client.createEmbedCustomOrder({
  user: userIiban,
  name: 'Buy BTC at 50k',
  trigger: {
    type: 'price',
    base_asset: 'BTC',
    quote_asset: 'USD',
    target_price: '50000',
    condition: 'lte', // trigger when price <= $50,000
  },
  action: {
    type: 'spend',
    amount: { asset: 'USD', amount: '200' },
    quote: { asset: 'BTC', fee_bps: '50', spread_bps: '20' },
  },
});
console.log('Custom order ID:', order.result?.order.id);

getEmbedCustomOrder

Retrieve a single custom order by its ID.
getEmbedCustomOrder(
  params: PartnerGetCustomOrderParams,
): Promise<PartnerGetCustomOrderResponse>
user
string
required
User IIBAN.
order_id
string
required
The custom order ID.
const co = await client.getEmbedCustomOrder({
  user: userIiban,
  order_id: 'order-id-here',
});
console.log('Status:', co.result?.order.status);

listEmbedCustomOrders

List custom orders for a user, with optional status filtering and cursor-based pagination.
listEmbedCustomOrders(
  params: PartnerListCustomOrdersParams,
): Promise<PartnerListCustomOrdersResponse>
user
string
required
User IIBAN.
statuses
string[]
Filter by active, cancelled, or completed.
cursor
string
Pagination cursor from next_cursor.
const orders = await client.listEmbedCustomOrders({
  user: userIiban,
  statuses: ['active'],
});
orders.result?.orders.forEach((o) => {
  console.log(`${o.name} (${o.id}): ${JSON.stringify(o.status)}`);
});

cancelEmbedCustomOrder

Cancel a custom order that has not yet been triggered or completed.
cancelEmbedCustomOrder(
  params: PartnerCancelCustomOrderParams,
): Promise<PartnerCancelCustomOrderResponse>
user
string
required
User IIBAN.
id
string
required
The custom order ID to cancel.
const cancelled = await client.cancelEmbedCustomOrder({
  user: userIiban,
  id: 'order-id-here',
});
console.log('Cancelled order status:', cancelled.result?.order.status);

Settlement Reports

getEmbedSettlementReport

Retrieve a specific settlement report and get a secure download URL for the file.
getEmbedSettlementReport(
  params: PartnerGetSettlementReportParams,
): Promise<PartnerGetSettlementReportResponse>
Returns: Includes id, date, type, size, name, download_url, expires_at.
id
string
required
Settlement report ID.
const report = await client.getEmbedSettlementReport({ id: 'report-id-here' });
console.log('Download URL:', report.result?.download_url);
console.log('Expires:', report.result?.expires_at);

listEmbedSettlementReports

Retrieve a paginated list of settlement reports, optionally filtered by date range and report type.
listEmbedSettlementReports(
  params?: PartnerListSettlementReportsParams,
): Promise<PartnerListSettlementReportsResponse>
filter[start_date]
string
RFC 3339 datetime filter for the earliest report date.
filter[end_date]
string
RFC 3339 datetime filter for the latest report date.
filter[report_type][]
string[]
Filter by report type: trades, transfers, or earn_rewards.
page[size]
number
Results per page (1–100, default 20).
page[number]
number
Page number (≥1, default 1).
const reports = await client.listEmbedSettlementReports({
  'filter[report_type][]': ['trades'],
  'page[size]': 10,
});
reports.result?.reports.forEach((r) => {
  console.log(`${r.date}${r.type}${r.name} (${r.size} bytes)`);
});

Assets & Rates

getEmbedAsset

Get detailed information about a specific asset including market data and platform status.
getEmbedAsset(params: PartnerGetAssetParams): Promise<PartnerGetAssetResponse>
asset
string
required
Asset name (e.g. BTC, ETH).
quote
string
Quote currency for pricing (default USD).
const btc = await client.getEmbedAsset({ asset: 'BTC', quote: 'USD' });
console.log('BTC info:', btc.result);

listEmbedAssets

List all assets available on the embedded platform with optional filtering, sorting, and pagination.
listEmbedAssets(params?: PartnerListAssetsParams): Promise<PartnerListAssetsResponse>
filter[assets][]
string[]
Limit results to specific assets (max 100).
filter[tradable_only]
boolean
Return only tradable assets.
sort
string
Sort order. Options include trending, market_cap_rank, -market_cap_rank, symbol, -symbol, change_percent_24h, -change_percent_24h, and others.
page[size]
number
Assets per page (1–100).
quote
string
Quote currency (default USD).
const assets = await client.listEmbedAssets({
  'filter[tradable_only]': true,
  sort: 'market_cap_rank',
  'page[size]': 20,
});
console.log('Total assets:', assets.result.meta.total_items);

listEmbedAssetRates

Retrieve historical rate data (price over time) for a specific asset.
listEmbedAssetRates(
  params: PartnerListAssetRatesParams,
): Promise<PartnerListAssetRatesResponse>
Returns: PartnerListAssetRatesResponse{ result: { rates: [{ timestamp, price }][], meta } }
asset
string
required
Asset name (e.g. ETH).
quote
string
Quote currency (default USD).
start_time
string
RFC 3339 start datetime.
end_time
string
RFC 3339 end datetime.
interval
string
ISO 8601 duration interval (e.g. PT15M, PT60M, P1D).
const rates = await client.listEmbedAssetRates({
  asset: 'ETH',
  quote: 'USD',
  start_time: '2025-01-01T00:00:00Z',
  end_time: '2025-01-31T23:59:59Z',
  interval: 'P1D',
});
rates.result.rates.forEach((r) => console.log(r.timestamp, r.price));

Ramp

The Ramp API enables fiat-to-crypto and crypto-to-fiat conversions through a hosted checkout experience.

getRampCheckoutUrl

Generate a hosted Ramp checkout URL for a specific transaction configuration. Present this URL to the end user to complete the purchase.
getRampCheckoutUrl(
  params: PartnerGetRampCheckoutUrlParams,
): Promise<PartnerGetRampCheckoutUrlResponse>
Returns: PartnerGetRampCheckoutUrlResponse{ result: { checkout_url: string, request_data: any } }
in_asset
string
required
Fiat asset the user is paying with (e.g. USD, EUR). Max 16 characters.
in_amount
string
required
Amount to spend in the fiat asset (decimal128).
out_asset
string
required
Crypto asset the user will receive (e.g. BTC). Max 16 characters.
funding_type
string
required
Payment method type (e.g. card, bank_transfer).
withdrawal_method
string
required
Crypto withdrawal method/network.
country
string
ISO 3166-1 alpha-2 country code (max 2 characters).
redirect_url
string
URL to redirect the user after checkout completion.
external_user_id
string
Your system’s user identifier (max 36 characters).
external_transaction_id
string
Your system’s transaction identifier (max 36 characters).
const checkout = await client.getRampCheckoutUrl({
  in_asset: 'USD',
  in_amount: '100',
  out_asset: 'BTC',
  funding_type: 'card',
  withdrawal_method: 'Bitcoin',
  country: 'US',
  redirect_url: 'https://yourapp.com/ramp/complete',
  external_user_id: 'user_12345',
});
console.log('Checkout URL:', checkout.result.checkout_url);
// Redirect or embed this URL for the user

getRampLimits

Retrieve the combined minimum and maximum limits for a Ramp transaction configuration before presenting a quote to the user.
getRampLimits(
  params: PartnerGetRampLimitsParams,
): Promise<PartnerGetRampLimitsResponse>
in_asset
string
required
Fiat input asset.
out_asset
string
required
Crypto output asset.
funding_type
string
required
Payment method type.
withdrawal_method
string
required
Crypto withdrawal method.
const limits = await client.getRampLimits({
  in_asset: 'EUR',
  out_asset: 'ETH',
  funding_type: 'card',
  withdrawal_method: 'Ethereum',
});
console.log('Ramp limits:', limits.result.limits);

getRampProspectiveQuote

Get an estimated (non-binding) quote for a Ramp transaction without creating a checkout session. Use this to preview the amounts before calling getRampCheckoutUrl.
getRampProspectiveQuote(
  params: PartnerGetRampProspectiveQuoteParams,
): Promise<PartnerGetRampProspectiveQuoteResponse>
Returns: PartnerGetRampProspectiveQuoteResponse{ result: { spend, receive, unit_price } }
in_asset
string
required
Fiat input asset.
in_amount
string
required
Amount the user is spending.
out_asset
string
required
Crypto output asset.
funding_type
string
required
Payment method type.
withdrawal_method
string
required
Crypto withdrawal method.
const prospective = await client.getRampProspectiveQuote({
  in_asset: 'USD',
  in_amount: '250',
  out_asset: 'BTC',
  funding_type: 'card',
  withdrawal_method: 'Bitcoin',
});
console.log('You will receive:', prospective.result.receive);
console.log('Unit price:', prospective.result.unit_price);

listRampBuyCryptoAssets

List all cryptocurrency assets available for Ramp buy transactions, including supported networks and withdrawal methods.
listRampBuyCryptoAssets(): Promise<PartnerListRampBuyCryptoAssetsResponse>
const cryptoAssets = await client.listRampBuyCryptoAssets();
console.log('Supported crypto:', cryptoAssets.result.assets);

listRampCountries

List countries and regions where Ramp is available. Availability may be scoped to specific states or provinces based on regulation.
listRampCountries(): Promise<PartnerListRampCountriesResponse>
const countries = await client.listRampCountries();
console.log('Available countries:', countries.result.countries.length);

listRampFiatCurrencies

List fiat currencies supported for funding Ramp transactions.
listRampFiatCurrencies(): Promise<PartnerListRampFiatCurrenciesResponse>
const fiats = await client.listRampFiatCurrencies();
fiats.result.currencies.forEach((c) => console.log(c.asset));

listRampPaymentMethods

List fiat payment methods (e.g. card, bank_transfer) supported for Ramp deposits.
listRampPaymentMethods(): Promise<PartnerListRampPaymentMethodsResponse>
const methods = await client.listRampPaymentMethods();
methods.result.methods.forEach((m) => console.log(m.funding_type, m.external_id));

Full Integration Examples

import { PartnerClient } from '@siebly/kraken-api';

const client = new PartnerClient({
  apiKey: process.env.PARTNER_API_KEY,
  apiSecret: process.env.PARTNER_API_SECRET,
});

async function onboardAndTrade() {
  // 1. Create a new user
  const created = await client.createEmbedUser({
    email: 'bob@example.com',
    external_id: 'bob_007',
    tos_version_accepted: 1,
    full_name: { first_name: 'Bob', last_name: 'Jones' },
    date_of_birth: '1985-03-22',
    residence: {
      line1: '456 Oak Ave',
      city: 'Austin',
      postal_code: '78701',
      country: 'US',
    },
    phone: '+15125550100',
    nationalities: ['US'],
    occupation: 'business_management',
  });
  const userIiban = created.result.user.iiban;
  console.log('Created user:', userIiban);

  // 2. Check account status
  const user = await client.getEmbedUser({ user: userIiban });
  console.log('Status:', user.result?.status.state);

  // 3. Get a quote for 100 USD → BTC
  const quote = await client.requestEmbedQuote({
    user: userIiban,
    type: 'spend',
    amount: { asset: 'USD', amount: '100' },
    quote: { asset: 'BTC' },
    fee_bps: '50',
    spread_bps: '20',
  });
  console.log('Quote:', quote.result.quote_id, 'expires:', quote.result.expires);

  // 4. Execute the quote
  const exec = await client.executeEmbedQuote({
    quote_id: quote.result.quote_id,
    user: userIiban,
  });
  console.log('Executed! Transaction ID:', exec.result?.transaction_id);

  // 5. Check portfolio
  const portfolio = await client.getEmbedPortfolioSummary({ user: userIiban });
  console.log('Portfolio value:', portfolio.result.portfolio_value, portfolio.result.currency);
}

onboardAndTrade().catch(console.error);

Build docs developers (and LLMs) love