cryptoeax / arbbot

Arbitrator, a bitcoin/altcoin arbitrage trading bot
https://gitter.im/cryptoeax-arbbot/Lobby
GNU General Public License v3.0
199 stars 78 forks source link

Can you add to config blocked exchanges #74

Closed OlegVic closed 6 years ago

OlegVic commented 6 years ago

need add to main.php like this, will be good for block some exchanges without deleting files

foreach ( glob( 'bot/xchange/*.php' ) as $filename ) {
  $blocked = Config::get( Config::BLOCKED_EXCH, Config::DEFAULT_BLOCKED_EXCH );

  $name = basename( $filename, '.php' );
  if(strpos($blocked, $name) !== false){
      continue;
  }
  logg( "Enabling $name..." );
  require_once $filename;
  try {
    $exchanges[] = new $name;
  }
  catch ( Exception $ex ) {
    logg( "$name not configured" );
  }
}

and need some params in Config.php

cryptoeax commented 6 years ago

Well, the bot does support not enabling an exchange when the API key and/or secret for it isn't provided in the config file as is, without the need to provide a new config variable. Based on the code snippet you have provided above, the flag you're asking for would have the exact same effect, so I think the existing support should be sufficient for your needs. If you need more specific customizations please feel free to reopen.