binance-exchange / binance-java-api

binance-java-api is a lightweight Java library for the Binance API, supporting synchronous and asynchronous requests, as well as event streaming using WebSockets.
MIT License
831 stars 628 forks source link

A call to newOrder() is frozen my app #363

Open icemagno opened 3 years ago

icemagno commented 3 years ago

When I cal for a new order using the Async I have no response inside the response callback.

And when I call it from the Sync version, my app freezes at this point.

NewOrderResponse response = binance.getBinanceApiRestClient().newOrder( NewOrder.marketBuy( this.pair, String.valueOf( amount ) ) );

icemagno commented 3 years ago

So ... I must wait until this time? one minute ?

  /**
   * Default receiving window.
   */
  public static final long DEFAULT_RECEIVING_WINDOW = 60_000L;
icemagno commented 3 years ago

Actually I can't invoke any order ... all of them hangs forever.

icemagno commented 3 years ago

Foud the error: It was an uncatched error inside my thread.

the error was

exception.BinanceApiException: Precision is over the maximum defined for this asset