Ccxt: Dealing with INSUFFICIENT_FUNDS/MIN_TRADE_REQUIREMENT_NOT_MET response

Created on 29 Dec 2017  路  3Comments  路  Source: ccxt/ccxt

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 ?

  • OS: Apache local server on windows (XAMPP server)
  • Programming Language: PHP
  • CCXT version:
  • Exchange: Bittrex
  • Method:create_order
question

All 3 comments

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)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shnhrrsn picture shnhrrsn  路  3Comments

jackyxie picture jackyxie  路  3Comments

Fcl69 picture Fcl69  路  3Comments

jjhesk picture jjhesk  路  3Comments

werewere picture werewere  路  3Comments