Files
services/examples/crypto/price/node/getCryptocurrencyPrice.js
2021-09-16 12:52:36 +01:00

13 lines
329 B
JavaScript
Executable File

import * as crypto from "m3o/crypto";
// Get the last price for a given crypto ticker
async function GetCryptocurrencyPrice() {
let cryptoService = new crypto.CryptoService(process.env.MICRO_API_TOKEN);
let rsp = await cryptoService.price({
symbol: "BTCUSD",
});
console.log(rsp);
}
await GetCryptocurrencyPrice();