Skip to content

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

@mishuan

Description

@mishuan

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);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions