Author

Topic: YoBit API Glitch? (Read 808 times)

newbie
Activity: 2
Merit: 0
March 04, 2019, 04:42:18 PM
#9
QUE YOBIT Invalid Ticker
newbie
Activity: 1
Merit: 0
December 03, 2017, 08:36:46 AM
#8
Hello everyone.
I'm creating a little bot for yobit using Python these days and I faced the same problem ({'error': 'Total transaction amount is less than minimal total: 0.00010000', 'success': 0}).
Today I finally found out what was wrong. It's not quotes. Python represents very small float numbers as an exponent (e.g. 0.00000577 as 5.77e-6). That's why yobit server returns that error - it doesn't know what this 'e' means. If I get it right, it doesn't really matter what type of variables the price and the amount should be - float or string. But these numbers should not be exponent, like 5.77e-6, they should have 'normal' form, like 0.00000577. I hope this will help you Smiley

Sorry for bad English, it's not my native language.
sr. member
Activity: 1022
Merit: 280
August 22, 2017, 09:33:30 AM
#7
I figured it out !

Someone in the troll box was nice enough to help me  Cheesy

The price must be in quotes (not mentionned in their API FAQ obviously) and no more problems  Cool



Are you thinking about the fees when you're looking at this? The end result has to be after all the network fees and internal trade fees were taking a consideration. Even if API has a glitch, it is surely to be a temporary one.
newbie
Activity: 4
Merit: 0
August 21, 2017, 11:06:33 AM
#6
I figured it out !

Someone in the troll box was nice enough to help me  Cheesy

The price must be in quotes (not mentionned in their API FAQ obviously) and no more problems  Cool

newbie
Activity: 4
Merit: 0
August 20, 2017, 06:08:46 AM
#5
Thanks for your replies Smiley I've been trying with some other pairs but I have the same issue.

Here's what my request looks like which should be like yours :

Code:
{'pair': 'nlc2_btc', 'type': 'buy', 'rate': 3e-05, 'amount': 666, 'method': 'Trade', 'nonce': '1503225324'}

and i get the error :

Code:
{'success': 0, 'error': 'Total transaction amount is less than minimal total: 0.00010000'}

However this succeeds (I checked on yobit's site) :

Code:
trade("nlc2_btc","buy",0.01,0.01)

which results in me buying 0.01 NLC at the lowest selling price, let's say 4.000 satoshis, meaning the total amount in BTC of my order is 40 sats  Huh Huh ! I finally figured out how the fake pumping bots are able to buy such small amounts  Grin !

I've tried contacting the support as well, but they won't answer me.

Are you able to set price below 0.0001 in your requests ? I wonder what's wrong  Undecided
legendary
Activity: 1946
Merit: 1137
August 20, 2017, 01:15:00 AM
#4
have you tried your code with some other pair? like buying something else like LTC for example. if you haven't then give it a try and if that was successful then it is that particular pair's problem not your code.

if that didn't work either, then it is your code.
i checked my own code (it is not python) and i am appending the "method" and "nonce" at the end of my request! maybe that is your issue. Yobit API is known to give weird error messages like that and confuse you.
full member
Activity: 174
Merit: 100
August 19, 2017, 11:50:00 PM
#3
I've tried contacting support but they haven't responded yet. At this point, I've given up on day trading nlc2; just waiting for it to spike.
newbie
Activity: 4
Merit: 0
August 19, 2017, 09:03:19 AM
#2
Hey! I'm having the exact same issue. Did you find out how to fix this ? Your help would be very much appreciated. (And i'm quite into nlc2 as well hehe  Cheesy)
full member
Activity: 174
Merit: 100
August 04, 2017, 11:36:25 PM
#1
When I run the following python code:
Code:
import time,hmac,hashlib,requests,json
from urllib.parse import urlencode
url = "https://yobit.net/tapi"
key = MY API KEY
secret = MY API SECRET
values = {}
values["method"] = "Trade"
values["nonce"] = str(int(time.time()*100-15*10**10))
values["pair"] = "nlc2_btc"
values["type"] = 'buy'
values["rate"] = 0.00001420
values["amount"] = 3000
body = urlencode(values)
signature = hmac.new(secret.encode("utf-8"), body.encode("utf-8"), hashlib.sha512).hexdigest()
headers = {
                    'Content-Type': 'application/x-www-form-urlencoded',
                    'Key':key,
                    'Sign': signature
                }
req = requests.post(url,data=values,headers=headers)
print(req.text)

Instead of executing a trade for 3000 NLC2 at 1420 sats, it prints '{"success":0,"error":"Total transaction amount is less than minimal total: 0.00010000"}'

Clearly 3000*0.00001420 > 0.00010000, so something is wrong here...

If somebody could help me fix that, that would be great.
Jump to: