Skip to content
This repository was archived by the owner on Jul 16, 2026. It is now read-only.
This repository was archived by the owner on Jul 16, 2026. It is now read-only.

I got double order when calling createOrder #7

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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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