-
Notifications
You must be signed in to change notification settings - Fork 285
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
API 2.0 trade_buy or trade_sell gives an error from bittrex #72
Comments
I've been having this same exact issue when using buy/sell in BTC markets |
@derzaicheg Since this feature is not working you can use |
|
If you inspect the request when you do a conditional sell on bittrex. it hits this endpoint however this is a post request and takes form data. The form arguments are below
the request verification token is generated from clicking the confirm button. They must have changed the endpoints. it's a huge shame they don't have documentation on their v2.0 API at all anywhere because the trade sell endpoint is extremely important |
Where can I see the API 2.0 docs? I've never found it :( |
We are stuck with an undocumented and constantly changing API right now for 2.0. |
Ok ... bittrex apis return always NO_API_RESPONSE, no matter what. Both versions. Are you experiencing the same or is it just me guys? |
Yeah, I also get a NO_API_RESPONSE message when running trade_sell (2.0 ofc) |
@mejmo |
Feel frustrated as well. v2.0 sucks |
I have come across the same issue. I am trying to initiate a market order. V1.1: V2: |
So am I right - the trade_buy does not work in 1.1 and in 2 as well right? So I have to either conenct to web interface or I have to implement my own 'market-buy' logic? |
Yep, there are some issues with urls. Look into https://github.com/thebotguys/golang-bittrex-api/wiki/Bittrex-API-Reference-(Unofficial), they know something :) Guys described that for |
I changed line 757 of the bittrex.py file from |
... cause what? (see #L73). yep. we try to do everything with GET-requests... but v2.0 (actually v2.11 at the moment) waits for POSTs :) some alts were sold at night. it's time for some risky operation! :) |
Let me know the results you get. I may be troubleshooting wrong here, but I tried changing line 73 from |
there is not only evaluated method has to be changed. parameters are included to url in the |
well, I played a bit but 've got no luck too. I rewrote signing of request but server answers 500 every time. Client-side API usage is built around |
May you guys disponibilizate an example using this "POST" method? Plz, completely confused.... To buy, "https://bittrex.com/api/v2.0/key/market/TradeBuy?marketName=BTC-LTC&orderType=LIMIT&quantity=5000&rate=.00000012&timeInEffect=GOOD_TIL_CANCELLED&conditionType=NONE&target=0" works very fine. But to sell, changing "TradeBuy" for "TradeSell" just doesnt work... Losing my mind. Somebody can help? |
@valvesss You got the buy working with post request? Would you mind pasting how? |
@toddis , I'm using the url quoted above to buy. Exactly how it is, but in the end using "&apikey=YOUR_API_KEY"... I'm having this issue to sell, all the calcs are right but when I order sell, they are cancelleds :( |
@valvesss Sorry I keep bugging you about your workaround for buying, but how do you specify the API secret? When I try, I keep getting |
@toddis , which language are you using? I'm using PHP bro... To me is just:
Good luck, all the response stuff will be inside the object and the buy action will be already done. Anything else just ask, If I could answer, I'll. Note: as you asked, the API Secret wont go inside the url - who goes its the API Key -, but in the hash_hmac. Edit: Hahahah just now I saw that is a python-bittrex issue, sorry. But this is how I use. “The mind that opens to a new idea never returns to its original size.” |
It seems that as soon as I try timeInEffect = FILL_OR_KILL I get the error message: There was a problem processing your request. If this problem persists, please email [email protected] with this error id - 974c7c6b-8aae-4638-b083-c48b9cdafccb. |
@koppentc As we know, the 2.0 API's are in BETA version, some functions appears to doesnt work properly... Seems that the function "FILL_OR_KILL" is unavailable yet. You should try the "IMMEDIATE_OR_CANCEL" instead, its 100% functional. |
@valvesss I tried using the trade_buy function with 'IMMEDIATE_OR_CANCEL' and i still get the following response: {'message': 'NO_API_RESPONSE', 'result': None, 'success': False} How did you get it working? |
@fresaelens 'NO_API_RESPONSE' is the default error message when an exception is thrown. You should check what error is thrown in the try statement. Hope this helps. |
@fresaelens You could post this part of your code? Your apikey and apisecret are configured to play TRADE LIMIT and TRADE MARKET? |
It starts at line 146 of bittrex.py: python-bittrex/bittrex/bittrex.py Line 146 in e5ebaef
You should debug here to see what exception is thrown |
@valvesss My API key and secret are configured (correctly). I have a working script using v1.1 of the API and I can use the other methods of v2 without problems. I changed the code around a bit and saw I got the following message: "No JSON object could be decoded". Then I went ahead and printed out the status code of the request being sent and I get a 404 error. You can see the complete output in the attached file. |
@fresaelens can you use other private methods (i.e. one that require the key/secret)? |
@fresaelens Houston we have a problem, honestly, sorry, I dont speak python, learning yet. I've started play this 1 month ago. I'm afraid I can't help you with this. But I'll try. Try to create your link (url) full and paste it on navigator (yes, this is very poor. And dont be afraid of your data beeing "read" by the navigators, this is done with post and get methods, everywhere, everytime), and see if it works. Its the same process, but rudimentary. You'll just have problems with the nonce. Create a new py program, just with the URL, add the nonce and try to execute. Eliminating one problem each time is the best way, this is called 'canary' (http:https://whatis.techtarget.com/definition/canary-canary-testing). |
@koppentc I just realised I did change the following in the cloned github file I changed the API call in the trade_buy method from: Because I read somewhere it should be the last. I've changed it back to the original line and now I get a different error: 200 |
@fresaelens Weird. I use with "API_V2_0: '/key/market/tradebuy'" and works. But good for you |
Yeah it should be /key/market/tradebuy. @fresaelens: that looks like a good response. Your order probably wasn't correct |
I might have misexplained myself. I changed the line back to "#API_V2_0: '/key/market/tradebuy'" and now it is 'working', that is I get a different error. I'll try troubleshooting like u said in the navigator tomorrow. @koppentc I think you're right but my mind is too tired to think straight now. I'll look back into it tomorrow. |
@fresaelens 1 time to rest is better than 2 times of work bro... This stuffs (MONEY) drives us crazy. |
I did one final test and got it working. I think the order was failing on the variable 'ORDERTYPE_MARKET'. As soon as I changed this to 'ORDERTYPE_LIMIT' my order went through. The condition 'GOOD_TIL_CANCELLED' was working too. I immediately placed a stop-loss sell order using the conditional 'CONDITIONTYPE_STOP_LOSS_FIXED' variable and the sell order was succesful. I just want to verify that the condition was passed along as well but I can't seem to find it in Bittrex. Does anyone know how I can verify on Bittrex if my sell order was placed with a condition (stop-loss)? (sorry for the noob question) |
Never mind, I found it, stupid me. (For the ones wondering, just press the 'plus' sign next to your order). |
No problem, glad its working! |
Does anyone able to successfully create trade sell with condition less than? I used the below request. I got success response, but in the response 'IsConditional' is False instead of True. Request: Response: Could someone please let me know how to fix this? |
I'm getting:
when using:
I've tried troubleshooting myself, but sadly I'm getting nowhere myself |
Well if the command you provided was what you copied above you have a lot of errors in your call. You should probably read up on some python coding :) My best guess would be |
I found out the issue. |
Any news on FILL_OR_KILL time option? I have tried to reach the support, but no answer so far. |
I manage to send orders fine using API 2.0 - however, sometimes I would send a limit order, but not receive an API response (I get a timeout). The order request still goes through and the order is open, but I am not aware of it and I can't check because I don't have an order ID I can query (which would normally come in the API response). Has anybody had this problem? Is it because I send too many requests to Bittrex and they give a temporary ban? Is there a way I can choose the order ID when I create an order, so that I can send a get_order query afterwards to verify whether my new order request was completed or not? |
@Crimees As a workaround when there is no ID returned, you can use |
Guys you do not need to have MARKET order available I think - in UI if I create order with higher value, it will buy it from the nearest offer from order book. So this is kind of market order. |
@milosjovac thanks that works |
@mejmo @Crimees There is a problem with this approach. It is that for a LIMIT trade you have to specify both attributes - quantity and a rate. So selling will be identical to market sell, but buying will not be possible since you cannot make an order by specifying how much of a base currency you want to spend. To visualize you cannot do the following (from CEX.IO market trading): |
@milosjovac I haven't been able to get FILL_OR_KILL working as well. Did you manage to fix it? |
Nope |
Hi guy!
Maybe problem not in this lib (or even I am sure it works properly) but maybe you face the same issue.
When I am sending request to tradesell or tradebuy endpoints using this lib:
buy_limit(market=USDT-ZEC, quantity=0.01, rate=216)
I get error message from bittrex:
{u'message': u'There was a problem processing your request. If this problem persists, please email [email protected] with this error id - d70a2af0-1281-4320-b3d9-f2070f5e79de', u'result': None, u'success': False}
Maybe somebody could confirm that this API does not work from their side or it works?
Thanks
Sergii
The text was updated successfully, but these errors were encountered: