-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
39 lines (32 loc) · 985 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
require('babel-core/register');
const Fcoin = require('fcoin-api');
const _ = require('lodash');
const FCoinBot = require('./fcoinbot').default;
// //Important
// let fcoin = new Fcoin({
// key: 'f0f1441586ec4316a37591ae14a546ef',
// secret: 'a7073c4ce391407d8821739797a78769'
// })
// /**
// * 行情接口(ticker)
// * @param {交易对} symbol
// */
// fcoin.getTicker('btcusdt').then(data => {
// console.log('btcusdt: ', data);
// })
// /**
// * 查询账户资产
// */
// fcoin.getBalance().then(data => {
// console.log('my account balance: ', data);
// })
let fcoinBot = new FCoinBot();
// fcoinBot.buyAndSellBTC().then(() => {
// console.log('--------------------------------------------------------------------')
// })
// setInterval(() => {
// fcoinBot.buyAndSellBTC().then(() => {
// console.log('--------------------------------------------------------------------')
// })
// }, 10000);
fcoinBot.startJob().then(() => {})