aluna-crypto / alunajs

Standardizing Crypto Trading APIs across multiple exchanges.
MIT License
0 stars 0 forks source link

Valr - Placing an order with insufficient balance amount does not return an error #74

Closed Torres-ssf closed 2 years ago

Torres-ssf commented 2 years ago

It seems the Valr exchange does not throw an error for requests to place orders to a market with an insufficient balance amount. The error is instead informed inside the order object that is returned from the API

"order": {
  "orderId": "a80469ce-c411-49b6-8ace-7537d6f80bb1",
  "orderStatusType": "Failed",
  "currencyPair": "BTCUSDC",
  "originalPrice": "1000",
  "remainingQuantity": "1000",
  "originalQuantity": "1000",
  "orderSide": "buy",
  "orderType": "limit",
  "failedReason": "Insufficient Balance",
  "orderUpdatedAt": "2022-05-18T20:41:30.606Z",
  "orderCreatedAt": "2022-05-18T20:41:30.605Z",
  "timeInForce": "GTC"
}

cc @LucianoPierdona