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

EOrder: Insufficient funds #38

Open
reproteq opened this issue Aug 30, 2021 · 4 comments
Open

EOrder: Insufficient funds #38

reproteq opened this issue Aug 30, 2021 · 4 comments

Comments

@reproteq
Copy link

reproteq commented Aug 30, 2021

Hello again friend.
I found an error, always or almost always when I select the entire balance to make an operation I get insufficient funds error.
I solved it with this patch but I would like to know why it happens.
Ah, I mentioned you and thanked you especially in the readme of my new version

// req_data["volume"] = amount #original code

// patch for fix EOrder: Insufficient funds
fixVol = float(0.0000002) # fix EOrder: Insufficient funds
chatVol = float(chat_data["volume"])
req_data["volume"] = str(chatVol - fixVol)

Special thanks Endogen 🖖

@Endogen
Copy link
Owner

Endogen commented Aug 31, 2021

Hey, thanks 😊 i think the issue comes up because you need to pay a fee for every transaction and i think i don't account for that

@reproteq
Copy link
Author

reproteq commented Aug 31, 2021

hi mate news issues with ada example not format xcoinzfiat
i solved this with this def

// funcion compara tcoin con la lista de kraken si no esta es que se modifico para patch ada por lo tanto se agrego una xada y la quita
def jsoncoin(tcoin):

import urllib.request, json
url = 'https://api.kraken.com/0/public/Assets'
response = urllib.request.urlopen(url);
data = json.loads(response.read().decode("utf-8"))

for i in data['result']:
    #print(i)        
    if tcoin == i:
        t= tcoin
        break
    if tcoin == 'X'+i:
        t = tcoin[1:]
        break        
return t    

//funcion para formatear nuevos pares con len max 6
//todo podria hacer que la funcion usara para mas len
//TODOTT
def krakenPair(strapi):
#XXBTZEUR
#ADAEUR
lstrapi = len(strapi)
if lstrapi == 6:

    part1 = strapi[0:3]
    part2 = strapi[3:6]
    res = 'X' + part1 + 'Z' +  part2      


else:
    res = strapi
return res

................... after i use this

def trade_vol_all(update: Update, context: CallbackContext):
chat_data = context.chat_data
//TODOTT
//compruebaa formato si lleva xcoinzfiat si lo agrego para parchear funciones lo quitara si no lo dejara como estaba, fix ada
t = jsoncoin(chat_data["one"])
chat_data["one"] = t

update.message.reply_text(e_wit + "Calculating volume...")

.......

@Endogen
Copy link
Owner

Endogen commented Aug 31, 2021

Sorry I don't have the time to adjust the code

@reproteq
Copy link
Author

dont worry mate i have solved in mi version
now all its working good.
tnx same

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