fme-quotes-oanda
Version:
This takes the oanda interface and streams quotes using the fme-quote format
25 lines (15 loc) • 659 B
text/typescript
import {Log} from "fme-logger";
var L = new Log("test-fme-quotes-oanda");
L.setLevel("debug")
L.info("getting auth");
var auth = require("/root/keys/oanda-login.json");
L.info("Auth for oanda is",auth);
import {OandaController} from "./controllers/oanda-controller";
var oanda = new OandaController("practice",auth.token,auth.username,auth.accountId);
oanda.connect();
oanda.getSymbols().then( async (symbols:any) => {
L.info("got data back",symbols.length)
L.info("symbol count is",symbols.length,symbols[1]);
await oanda.startStream(symbols);
L.info("Stream Started!")
}).catch(err => {L.error("oops",err)})