CoinQuery: move code from promise