danpaquin / coinbasepro-python

The unofficial Python client for the Coinbase Pro API
MIT License
1.82k stars 737 forks source link

API endpoint to determine withdrawal limit status? #184

Closed mthatcherclark closed 5 years ago

mthatcherclark commented 6 years ago

So, this is more of a question, but wasn't sure where else to ask. Is there a way to determine what your withdrawal limit is and how much of it you have available at a certain time? I've looked at all the endpoints on GDAX and Coinbase and cannot seem to find it.

danpaquin commented 6 years ago

Hi Matt, thanks for your support!

There's a method in the AuthenticatedClient called get_payment_methods. You may find the limit's listed here. If not, I can continue digging around, but this is usually a number that doesn't change much and could easily be added to your implementation of the project.

https://docs.gdax.com/#list-payment-methods

mthatcherclark commented 6 years ago

Thanks Dan. I was just over-complicating things. I'm trying to determine exactly how much of my limit is available at the second I want to make a trade, which turns out to be quite difficult without an endpoint that tells me this information. The payment methods endpoint does not tell me what my withdrawal limit is or how much of it is available. I know what the limit is. It's the $10,000 base limit that every knew GDAX user gets. I am trying to build an arbitrage bot, which will require regular crypto withdrawals to another exchange. Every time I make a crypto withdrawal, the limit is reduced by the amount of the withdrawal, which sounds simple enough. Now, here's the tricky part. GDAX starts returning my available withdrawal space as soon as I make the withdrawal. It doesn't just sit there for 24 hours and then return. They actually start giving me back my withdrawal limit at a rate of about 11 cents per second. I can use my prior transactions, which I have to get through the Coinbase API, to determine when I will have those prior withdrawals added back onto my balance, but it would be nice to use the space that is available in the interim. In other words, let's say I made a $10,000 withdrawal. I know that 24 hours later I will have $10,000 available again, but 12 hours later I will have $5,000 available. I might want to tell my bot to make a trade at that moment when only $5,000 is available. However, without knowing how much I had available at an exact, recent point in time, I'm lost as to how to determine it. I'm pretty sure I can do it with math, but THAT IS HARD. Why isn't there just an endpoint that would tell me this information? Anyways, I will contact the GDAX folks and see if I am missing something. There's always a chance someone else may have figured this out. So, thought it might be worth adding here. If I end up figuring this out I will let you know. Again, thanks for your response and your awesome work here. Everything is working great and has of course saved me a tremendous amount of time. THANK YOU.

kudovickij commented 6 years ago

HI,

I am stuck with exactly same issue. I scanned the API documentation and have not found anything that would mention an end point on how to retrieve the withdrawal amount at time X. Even just the static daily limit would be nice, I would write the growth formula myself.

If anyone finds an answer, please, post here.

Thanks!

kudovickij commented 6 years ago

Any update on this?

danpaquin commented 5 years ago

I believe we cover all API endpoints for the CBPro API. If there's not an endpoint covered, please share the link here and we can add it to the package. If the data does not exist on the API currently, we will not add it to the project here, but I would be happy to link to anything supplemental if you'd like.