If your Node.js code builds a map of Kraken’s tokenized stock pairs from the AssetPairs endpoint, check it against Kraken’s changes of 24 and 26 November 2026. On 24 November, the SPV entries for tokenized assets switched to their own names. Before that, they shared names with the rebased x entries, such as AAPLx/USD.
With @siebly/kraken-api 1.1.12, select the SPV or rebased entry explicitly when building the pair map. Iteration order can otherwise determine which instrument gets the shared key.
What changed
From the Kraken API changelog:
- 24 November 2026, Spot REST v1. SPV entries for tokenized assets in
AssetsandAssetPairsnow use SPV names instead of the rebasedxnames. InAssetPairs, the SPV pair entry (Kraken’s example isAAPLSPVUSD) now hasaltname: "AAPLSPVUSD"(wasAAPLxUSD),wsname: "AAPLSPV/USD"(wasAAPLx/USD) andbase: "AAPLSPV"(wasAAPLx). InAssets, the SPV entry’saltnameis nowAAPLSPV(wasAAPLx). The rebasedxentries (AAPLx,AAPLxUSD) and all other fields are unchanged. - 26 November 2026, Spot REST v1.
AssetsandAssetPairsaccept an optionalinclude_spvparameter. It defaults totrue, so responses do not change if you leave it out.include_spv=falseleaves out the SPV entries, and the rebasedxentries are still returned. It only affects full listings, and is ignored when you filter withpair(orassetforAssets).
Kraken’s advice: if you match SPV entries by altname, wsname or base, update your mapping. If you only use the rebased entries, you can pass include_spv=false instead.
What the live endpoint returns
A public request to GET /0/public/AssetPairs?aclass_base=tokenized_asset returned 356 pairs: 178 SPV entries and 178 rebased x entries, all quoted in ZUSD. With include_spv=false added, it returned the 178 x entries only. These are the two AAPL entries, trimmed to the relevant fields:
"AAPLxUSD": {
"altname": "AAPLxUSD",
"wsname": "AAPLx/USD",
"aclass_base": "tokenized_asset",
"base": "AAPLx",
"quote": "ZUSD",
"pair_decimals": 2,
"lot_decimals": 8,
"tick_size": "0.01",
"status": "online"
},
"AAPLSPVUSD": {
"altname": "AAPLSPVUSD",
"wsname": "AAPLSPV/USD",
"aclass_base": "tokenized_asset",
"base": "AAPLSPV",
"quote": "ZUSD",
"pair_decimals": 2,
"lot_decimals": 8,
"tick_size": "0.01",
"status": "online"
}
Why a pair map can go wrong
Before 24 November, the SPV entry and the rebased entry both had wsname: "AAPLx/USD" and base: "AAPLx". A map keyed on either field held only one of the two, whichever was written last, without any error. Since 24 November the names are different, so the same code now picks the x entry every time. If your code relied on the SPV entry under the old names, it no longer finds it there.
Either way, the code never told you anything. The fix is a map that:
- decides on purpose which entries it includes,
- refuses to overwrite an entry when two share a key, and
- takes precision from each pair instead of hard-coding it.
A pair map that survives renames
The example below loads tokenized pairs with SpotClient.getAssetPairs(), keeps only the rebased x entries, and keys them on wsname. It throws if two entries share a wsname, and formats prices and quantities from each pair’s own precision. AssetPairs is a public endpoint, so the client needs no API keys.
import { SpotAssetPair, SpotClient } from '@siebly/kraken-api';
const client = new SpotClient();
export interface PairInfo {
key: string; // AssetPairs result key, e.g. AAPLxUSD
wsname: string; // e.g. AAPLx/USD
altname: string;
base: string;
quote: string;
pairDecimals: number;
lotDecimals: number;
tickSize?: string;
ordermin: string;
status?: string;
}
// Since 24 Nov 2026, SPV entries use SPV names (AAPLSPVUSD,
// wsname AAPLSPV/USD, base AAPLSPV). Before that they reused
// the x names, so they collided with the rebased entries.
function isSpvEntry(pair: SpotAssetPair): boolean {
return pair.base.endsWith('SPV');
}
export async function loadTokenizedPairMap() {
const res = await client.getAssetPairs({
aclass_base: 'tokenized_asset',
});
const byWsname = new Map<string, PairInfo>();
for (const [key, pair] of Object.entries(res.result)) {
if (isSpvEntry(pair)) continue;
const { wsname } = pair;
if (!wsname) {
throw new Error(`Pair ${key} has no wsname`);
}
// Never let one entry silently replace another.
const existing = byWsname.get(wsname);
if (existing) {
throw new Error(
`Duplicate wsname ${wsname}: ${existing.key} and ${key}`,
);
}
byWsname.set(wsname, {
key,
wsname,
altname: pair.altname,
base: pair.base,
quote: pair.quote,
pairDecimals: pair.pair_decimals,
lotDecimals: pair.lot_decimals,
tickSize: pair.tick_size,
ordermin: pair.ordermin,
status: pair.status,
});
}
return byWsname;
}
function decimalsOf(value: string): number {
const dot = value.indexOf('.');
return dot === -1 ? 0 : value.length - dot - 1;
}
// Price: pair_decimals, then snapped to tick_size if present.
// Integer maths at a fixed scale avoids float drift.
export function formatPrice(info: PairInfo, price: number): string {
const tick = info.tickSize;
const scale = Math.max(
info.pairDecimals,
tick ? decimalsOf(tick) : 0,
);
const factor = 10 ** scale;
let units = Math.round(price * factor);
if (tick) {
const tickUnits = Math.round(Number(tick) * factor);
if (tickUnits > 0) {
units = Math.round(units / tickUnits) * tickUnits;
}
}
return (units / factor).toFixed(info.pairDecimals);
}
// Quantity: round down to lot_decimals, so you never send
// more than you meant to.
export function formatQty(info: PairInfo, qty: number): string {
const factor = 10 ** info.lotDecimals;
const units = Math.floor(Number((qty * factor).toFixed(2)));
return (units / factor).toFixed(info.lotDecimals);
}
async function main() {
const pairs = await loadTokenizedPairMap();
console.log('tokenized pairs:', pairs.size);
const aapl = pairs.get('AAPLx/USD');
if (!aapl) throw new Error('AAPLx/USD not listed');
console.log(aapl.key, aapl.status);
console.log('price', formatPrice(aapl, 231.456));
console.log('qty', formatQty(aapl, 0.123456789));
}
main().catch((e) => {
console.error(e);
process.exit(1);
});
How it works
- Loading.
getAssetPairs({ aclass_base: 'tokenized_asset' })callsGET /0/public/AssetPairsand returns the pairs as an object keyed by pair name. Each value is typed asSpotAssetPair. The SDK throws if Kraken returns a non-emptyerrorarray. - Skipping SPV entries.
isSpvEntry()drops entries whosebaseends inSPV. In the live data, every SPV entry matched this and no rebased entry did. If you need the SPV entries instead, flip the check and key them on their ownwsname, such asAAPLSPV/USD. - Duplicate check. If two entries ever share a
wsnameagain, the map throws when it is built, at startup, instead of quietly keeping one of them. - Prices.
formatPrice()rounds topair_decimalsand then snaps totick_sizewhen the pair has one. Both matter: in the live data,NFLXxUSDhaspair_decimals: 3buttick_size: "0.01", so a price rounded to 3 decimals alone could fall between ticks. - Quantities.
formatQty()rounds down tolot_decimals, so a computed size never grows when you round it. Check it againstorderminbefore you send an order. - Status. The map keeps
status. In the live data most tokenized pairs werepost_only, a few wereonline, and two werecancel_only. Check it before you place an order.
About include_spv
You could ask Kraken to leave the SPV entries out with include_spv=false. The parameter is not in the SDK’s SpotGetAssetPairsParams type in the current release, so the example filters on the client instead. Typed support for it is queued for an upcoming release. The client-side filter is worth keeping even after that, because Kraken ignores include_spv when you request specific pairs with pair.
Diagnose missing or duplicated instruments
| Symptom | Likely cause | Fix |
|---|---|---|
Lookups by AAPLSPV names fail, or old SPV lookups return a different pair |
SPV entries were renamed on 24 Nov 2026 | Key SPV entries on the new names (AAPLSPV/USD, AAPLSPV), or skip them |
| Map size is twice what you expected | SPV and x entries now have distinct names, so both are stored |
Filter on base, or pass include_spv=false once it is typed |
| Different pair under the same key from one run to the next | Two entries shared a key, and the last one won | Throw on duplicate keys when building the map |
| Orders rejected for price or size precision | Hard-coded decimals, or tick_size ignored |
Use pair_decimals, tick_size and lot_decimals from each pair |
- Choose which entries you want (rebased
xor SPV) explicitly. - Key on one field, and throw on duplicates.
- Rebuild the map at startup and on a schedule, not once at deploy time.
- Read the changelog for renames like this one.
Further reading
- Kraken JavaScript SDK: install, clients and examples
- Kraken API JavaScript tutorial: REST and WebSocket clients in more detail
- @siebly/kraken-api docs
- SDK example: marketData.ts, which calls
getAssetPairs()and other public endpoints, in the kraken-api repository - Kraken API docs: Get Tradable Asset Pairs and the changelog
- Related: Which Kraken SDK to install from npm and Binance order filters for trading bots
- How to find SDK functions that match API docs endpoints
