Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

TypeError: api.cancel is not a function #160

@victorfds

Description

@victorfds

How to use cancel functionality with binary-live-api?

async function main() {
    const api = new LiveApi({ ...options });
    try {
       const proposal = await api.subscribeToPriceForContractProposal({ ...proposalObj });
       const buy = await api.buyContract(proposal.proposal.id, proposal.proposal.spot);
       await api.cancel(buy.proposal_open_contract.contract_id);
    }
    catch(error) {
      console.log(error); // TypeError: api.cancel is not a function
    }
}

main();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions