{"size": 402, "ext": "js", "max_stars_repo_path": "examples/exchange-rate-ticker.js", "max_stars_repo_name": "sergeiivankov/crypto-bot-api", "max_stars_repo_stars_event_min_datetime": "2022-03-05T13:22:14.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-05T13:22:14.000Z", "max_issues_repo_path": "examples/exchange-rate-ticker.js", "max_issues_repo_name": "sergeiivankov/crypto-bot-api", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "examples/exchange-rate-ticker.js", "max_forks_repo_name": "sergeiivankov/crypto-bot-api", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 26.8, "max_line_length": 68, "alphanum_fraction": 0.6741293532}
const CrypoBotAPI = require('../');

const client = new CrypoBotAPI('1234:AAA...AAA');

const tick = async () => {
  setTimeout(tick, 15000);

  // Get exchange rate with isForce parameter, beause example update
  // interval (15s) less than library exchange rates cache
  // interval (60s)
  const rate = await client.getExchangeRate('TON', 'USD', true);
  console.log('TON to USD', rate);
};

tick();