Interested in working on the Kraken REST API #109
-
Hi I'm interested in working on the Kraken REST API but upon looking at the CCXT Based Data Loader Plugins the 5th bullet point regarding implementing the AbstractPaginationDetailSet functions is lacking clarity on how to start implementing it. How do I determine if an exchange supports these functions? Where should I look? I was wondering, can someone explain what the function is doing and what I'm returning here? Is there already explanation somewhere in the docs that I should probably start looking at first? Sorry for the rather nascent question. Just trying to gather information. |
Beta Was this translation helpful? Give feedback.
Replies: 11 comments 20 replies
-
Thanks for volunteering to contribute code! @macanudo527 , this question is for you. |
Beta Was this translation helpful? Give feedback.
-
Thanks for volunteering! I designed the CCXT data loader, so I'll try to walk you through the process of building a plugin for it. Basically, the
The You'll be one of the first people to build a CCXT based data plugin other than myself, so let me know what issues you have and I will try to be there for you. Thanks again! |
Beta Was this translation helpful? Give feedback.
-
Also perhaps the pagination detail set documentation can be fleshed out a bit more to help onboard new coders more easily. |
Beta Was this translation helpful? Give feedback.
-
Hi guys, continuing development here. I had a question since I'm a little stumped. When I was looking at the margin faq on kraken https://support.kraken.com/hc/en-us/articles/360027712571-How-to-calculate-profits-losses-from-margin-trading- It says that the profit/loss is already computed and provided in the ledger. From my understanding of rp2 is that gain/losses are calculated using matching with out transactions with its corresponding in transactions which implies asset in/outs are matched against each other. Margin is still a taxable event but it no longer applies to asset balance and rather its usually a quote balance change which if that is usually fiat. When I've tried out rp2, it doesn't seem to create a tab for fiat currencies like 'USD' in the output spreadsheets. First of all: 1). Why is fiat currency tabs not created in the output of rp2? |
Beta Was this translation helpful? Give feedback.
-
Good questions:
I wonder, since margin is a fiat derivative if it wouldn't be best to leave it out of RP2. Here's the reasoning: the complexity of crypto taxes is that when you sell crypto, the exchange on which you sell doesn't necessarily know the cost basis of the sold coins (if they were bought on another exchange). So crypto exchanges can't typically provide a full 8849 form, like stock brokers can. So RP2 and DaLI help by gathering data from exchanges, normalizing it, resolving transactions, etc. In the case of margin on Kraken, isn't it true that Kraken has full details on what your margin-related gains are? If so, perhaps we can treat it as a separate issue: the user can just get the full documentation on their margin activity from Kraken and enter it into their tax forms. I guess, I'm not entirely sure margin is a crypto tax issue: it sounds more like a fiat tax issue. Anyway, not a strong opinion, just spitballing. |
Beta Was this translation helpful? Give feedback.
-
On the unique_id field topic and using the developer faq as reference. 1). What is the transaction hash? Thanks! The unique_id/transaction resolver has always been a mystery to me and somewhat I didn't think such a problem would be possible to solve but if this is indeed a problem that can be solved I'm on the edge to learn more. :) |
Beta Was this translation helpful? Give feedback.
-
Yes, it's the hash of the transaction that is publicly available on the blockchain: it's the only way to identify the two ends of a movement in a safe manner, because hashes are globally unique across exchanges. Other conventions for Exchanges typically do expose transaction hashes in their REST responses: I took a quick look at the Kraken REST API and perhaps they call it Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
I looked at "Get Status of Recent Deposits": it's probably |
Beta Was this translation helpful? Give feedback.
-
@eprbell @macanudo527 I'm ready to open a pull request for the kraken plugin. I did my best to incorporate the abstract super class but couldn't utilize everything. I did try to work on an Abstract Pagination object but had a few roadblocks so I kept with my original code. Maybe another week I can get on it but for now I just want to submit what I have which has the base functionality working. I'd like to submit and get feedback, I'm sure there are errors just like commercial software likely has errors so any feedback is appreciated. Look forward to making it better. Thanks! Additionally, there are a few things I'm trying to understand better:
Thank you guys, please let me know next steps. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
There are various tutorials online, here's one: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request |
Beta Was this translation helpful? Give feedback.
@eprbell @macanudo527 I'm ready to open a pull request for the kraken plugin.
I did my best to incorporate the abstract super class but couldn't utilize everything. I did try to work on an Abstract Pagination object but had a few roadblocks so I kept with my original code. Maybe another week I can get on it but for now I just want to submit what I have which has the base functionality working. I'd like to submit and get feedback, I'm sure there are errors just like commercial software likely has errors so any feedback is appreciated. Look forward to making it better. Thanks!
Additionally, there are a few things I'm trying to understand better:
There is a concept with the double undersco…