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

code: -1135, msg: 'Invalid account status.' #106

Open
mishuan opened this issue Jul 29, 2022 · 1 comment
Open

code: -1135, msg: 'Invalid account status.' #106

mishuan opened this issue Jul 29, 2022 · 1 comment

Comments

@mishuan
Copy link

mishuan commented Jul 29, 2022

I recently created an API key for futures trading but hit this error code when trying to buy using the API key. I've verified I can successfully buy futures through the web app and I've also verified the code I wrote works for other people's API keys.

Could we get some clarity as to exactly what this status code entails and how to debug it?

Sample code:

async function smallBuy() {
    const Binance = require("node-binance-api");
    const signedBinance = new Binance().options({
        APIKEY: "",
        APISECRET: "",
        useServerTime: true
    });

    const test1 = await signedBinance.futuresBuy("BNBUSDT", 0.1)
    console.log(test1);

    const balance = await signedBinance.balance();
    const test2 = Object.keys(balance).map(_ => { return { [_]: Number(balance[_].available) } }).filter(_ => Object.values(_)[0] > 0);
    console.log(test2);
}
@PengRusty
Copy link

Hi there, Binance.us doesn't support futures trading yet. I guess you are trading in Binance.com.

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

3 participants
@mishuan @PengRusty and others