Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscribe to XBT currency pairs are not supported #126

Open
Strebor opened this issue Dec 9, 2024 · 6 comments
Open

Subscribe to XBT currency pairs are not supported #126

Strebor opened this issue Dec 9, 2024 · 6 comments

Comments

@Strebor
Copy link

Strebor commented Dec 9, 2024

Describe the bug
After recent updates, it's no longer possible to subscribe to trade updates for any XBT currency pair, e.g., XBTUSDT, XBTUSDC, XXBTZEUR, etc.

To Reproduce
IKrakenSocketClientSpotApi SubscribeToTradeUpdatesAsync result.Error.Message is "Currency pair not supported XBT/USDC"

Expected behavior
Subscription success, like for any other currency pair in the Kraken Coin list.

@Strebor Strebor changed the title Subscribe to XBT currency pairs is not supported Subscribe to XBT currency pairs are not supported Dec 9, 2024
@JKorf
Copy link
Owner

JKorf commented Dec 13, 2024

Hi, the library has been updated to Kraken websocket version 2.0. This version uses BTC instead of XBT for asset and symbol names, and removes additional chars for fiat assets.
So for example:
XBT/ETH => BTC/ETH
ZEUR/ZUSD => EUR/USD

To programatically retrieve the new names you can use this call (note the newAssetNameResponse parameter):
var symbols = await krakenRestClient.SpotApi.ExchangeData.GetSymbolsAsync(newAssetNameResponse: true);

@Strebor
Copy link
Author

Strebor commented Dec 14, 2024

Great, thanks. This makes all the difference, and finally the symbols match the other Kraken platforms.

@Strebor Strebor closed this as completed Dec 14, 2024
@Strebor
Copy link
Author

Strebor commented Dec 15, 2024

If I may ask a related question here. KrakentRestClient.SpotApi.Account.GetBalancesAsync() returns crypto symbols using the 'old' asset names. Example:

ADA
TRX
XLTC
XXLM
XXRP
ZEUR

Is there a switch for this one too?
Otherwise, it's not really that hard to remove the prefix for names that don't match those returned by GetSymbolsAsync(newAssetNameResponse: true)

@Strebor Strebor reopened this Dec 15, 2024
@JKorf
Copy link
Owner

JKorf commented Dec 15, 2024

The newAssetNameResponse parameters are not documented, so it's a bit hard to check where it's supported and where it isn't. I've tried a few endpoints, and not all seem to support it, but the GetBalancesAsync call does. So I added the parameter there in the latest version!

@Strebor
Copy link
Author

Strebor commented Dec 15, 2024

I've found another spot for you. SpotApi.Trading.GetOpenOrdersAsync() returns KrakenOrderInfo like this:

...OrderDetails = KrakenOrderInfo { Symbol = TRXEUR, Side = Buy,...

@Strebor
Copy link
Author

Strebor commented Dec 16, 2024

fyi, the KrakenSymbol WebsocketName seems correct for all symbols except for BTC pairs. It's coming in as XBT which fails when subscribing.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants