Added check for if $APIKEY and $APISECRET is null