Home

Awesome

crypto-client

An unified client for all cryptocurrency exchanges.

How to use

/* eslint-disable */
const CryptoClient = require('crypto-client');

(async () => {
  await CryptoClient.init({
    eosAccount: 'your-eos-account',
    eosPrivateKey: 'your-eos-private-key',
  });

  // buy
  const transactionId = await placeOrder(
    { exchange: 'Newdex', pair: 'EIDOS_EOS', type: 'Spot' },
    0.00121,
    9.2644,
    false,
  );
  console.info(transactionId);

  const orderInfo = await CryptoClient.queryOrder(
    { exchange: 'Newdex', pair: 'EIDOS_EOS', type: 'Spot' },
    transactionId,
  );
  console.info(orderInfo);

  const cancelTransactionId = await CryptoClient.cancelOrder(
    { exchange: 'Newdex', pair: 'EIDOS_EOS', type: 'Spot' },
    transactionId,
  );
  console.info(cancelTransactionId);
})();

Supported Exchanges

Related Projects