Dear friends,
when I put orders in Bittrex:
I test placing orders with small amounts (less than minimum amount allowed in Bittrex), this cause Fatal Error " Uncaught ccxt\ExchangeError: bittrex {"success":false,"message":"MIN_TRADE_REQUIREMENT_NOT_MET","result":null} "
Also , I test placing orders while my balance is not sufficient, this cause Fatal Error " Uncaught ccxt\ExchangeError: bittrex {"success":false,"message":"INSUFFICIENT_FUNDS","result":null} ",
do you plan to deal with such response or should I build my own procedure ?
what do you suggest in this procedure ?
You should update your ccxt version to most recent one (unfortunately, you did not include that information in your question) and you should catch the exceptions, like described here: https://github.com/ccxt/ccxt/wiki/Manual#error-handling. Let us know if we can help with anything else, or if you have difficulties with it, I'm closing this for now, if you don't mind.
Thank you for your response
I need to deal with the following two errors :
MIN_TRADE_REQUIREMENT_NOT_MET
and
INSUFFICIENT_FUNDS
both should belong to ExchangeError class which is defined in this php file
ccxt/php/ExchangeError.php
above class is empty !,
so I have to define my functions handling errors inside this class (or inside class extended from this)?
(simple question)
Thank you
so I have to define my functions handling errors inside this class (or inside class extended from this)?
Nope, you should copy error handling from this PHP example and change it for your needs: https://github.com/ccxt/ccxt/blob/master/examples/php/load-all-at-once.php (and look through other examples as well)