Skip to content

I got double order when calling createOrder #7

@lvntruong

Description

@lvntruong

I got double order when calling the function createOrder

This is my code

const createOrder = (price, amount, side) => {
  const api = new GateApi.SpotApi(client);
  const order = new Order(); // Order |
  order.price = price; // string | Order price
  order.amount = amount; // string | Order amount
  order.side = side; // string | Order side
  order.currencyPair = currencyPair; // string | Currency pair
  api.createOrder(order).then(
    (value) =>
      console.log("API called successfully. Returned data: ", value.body),
    (error) => console.error(error)
  );
};

Screen Shot 2021-11-07 at 22 56 18

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions