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

Signature for this request is not valid error on withdrawal operation #413

Open
PaulMuller opened this issue Apr 16, 2020 · 7 comments
Open
Labels
feature-request needs-testing Someone else please confirm this bug and it will be fixed

Comments

@PaulMuller
Copy link

PaulMuller commented Apr 16, 2020

few days ago start to receive this error when try to withdraw from binance.

Solved by manyally replace signature from URL into form body.


const signedRequest = ( url, data = {}, callback, method = 'GET', noDataInSignature = false ) => {
...
 if ( method === 'POST' ) {
            let opt = reqObjPOST(
                url,
                data,
                method,
                Binance.options.APIKEY
            );
            opt.form.signature = signature
            // + '?signature=' + signature
            // let opt = reqObjPOST(
            //     url + '?signature=' + signature,
            //     data,
            //     method,
            //     Binance.options.APIKEY
            // );
            // console.log(opt)
            proxyRequest( opt, callback );

...
@jaggedsoft jaggedsoft added the needs-testing Someone else please confirm this bug and it will be fixed label Apr 16, 2020
@jaggedsoft
Copy link
Owner

jaggedsoft commented Apr 16, 2020

thank you for sharing your solution, curious how the problem is only on withdraw. cheers!

This did not break anything else? Nice improvement, thanks again.

if ( method === 'POST' ) {
    let opt = reqObjPOST(
        url,
        data,
        method,
        Binance.options.APIKEY
    );
    opt.form.signature = signature;
    proxyRequest( opt, callback );
}

jaggedsoft added a commit that referenced this issue Apr 16, 2020
@samcayford
Copy link

Also getting this error with marketSell. This change doesn't fix it for me.

Note: I had to change the URLs as I'm using binance.us, not sure if that has any bearing here.

@2pd
Copy link

2pd commented Apr 17, 2020

If possible, please switch to

POST /sapi/v1/capital/withdraw/apply

https://binance-docs.github.io/apidocs/spot/en/#withdraw-sapi

@DeveloperAriana
Copy link

I have the same problem, this worked for me, but I wonder when they will upload the fix to npm @jaggedsoft

@DeveloperAriana
Copy link

DeveloperAriana commented Apr 17, 2020

hola @DeveloperAriana, ¿puedes describir cómo lo arreglaste ? Apliqué el cambio de código pero no funcionó para mí.

Hello, I made the same modification that I comment @PaulMuller , I went to the node-modules folder of my project, specifically node-binance-api and I modified the file called node-binance-api.js. Attached image of how the file is finally
api

If this still doesn't work for you, make sure your keys are correct

@teramit
Copy link

teramit commented Apr 18, 2020

@DeveloperAriana, i did exactly same and my keys are true but not worked :(
if i change like this withdraw fails and even trade fails.
@jaggedsoft
edit: ok it worked for me too, seems like i wasnt using last version of this script so after update and using this revision now withrawals are working great, thanks

@b-m-9
Copy link

b-m-9 commented Jun 13, 2020

This fix work for me:

 opt.form.signature = signature;

Current version .withdraw has an error with signature.

"node-binance-api": "^0.11.6",

abou7mied pushed a commit to abou7mied/node-binance-api that referenced this issue Jul 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request needs-testing Someone else please confirm this bug and it will be fixed
Projects
None yet
Development

No branches or pull requests

8 participants
@2pd @teramit @jaggedsoft @PaulMuller @samcayford @b-m-9 @DeveloperAriana and others