Commit 8ddbdefe authored by Ahmad Nemati's avatar Ahmad Nemati

git pull

parent 99a2ab7b
...@@ -17,12 +17,7 @@ let balance = 0 ...@@ -17,12 +17,7 @@ let balance = 0
const ccxt = require('ccxt') const ccxt = require('ccxt')
const exchange = new ccxt.bybit({ let exchange
apiKey: "JIYbRCdXjr7Hi0GyUB",
secret: "vMTlNjgUNZJNQ7LzgNWr4549cNrehrkFpGzC",
enableRateLimit: true,
})
exchange.urls['api'] = exchange.urls['test']; exchange.urls['api'] = exchange.urls['test'];
...@@ -35,6 +30,14 @@ async function init() { ...@@ -35,6 +30,14 @@ async function init() {
client.on('error', (err) => console.log('Redis Client Error', err)); client.on('error', (err) => console.log('Redis Client Error', err));
await client.connect(); await client.connect();
let info = await fs.readFileSync('info.json', 'utf8');
info=JSON.parse(info)
exchange= new ccxt.bybit({
apiKey: "JIYbRCdXjr7Hi0GyUB",
secret: "vMTlNjgUNZJNQ7LzgNWr4549cNrehrkFpGzC",
enableRateLimit: true,
})
run() run()
} }
......
{"apiKey":"","secret":""}
\ No newline at end of file
...@@ -30,13 +30,17 @@ let _ = require('lodash') ...@@ -30,13 +30,17 @@ let _ = require('lodash')
// sum = sum / arr.length // sum = sum / arr.length
// console.log(arr, sum) // console.log(arr, sum)
let t='last.json-220519074704_O1_BNC_BTCUSDT_Lp3654_3BTC7425192022.csv' // let t='last.json-220519074704_O1_BNC_BTCUSDT_Lp3654_3BTC7425192022.csv'
t = t.split('_') // t = t.split('_')
let pair = t[3].replace('usdt', '').replace('usd', '') // let pair = t[3].replace('usdt', '').replace('usd', '')
let lp = t[4].replace('lp','Lp') // let lp = t[4].replace('lp','Lp')
let p=t[t.length-1].split('.') // let p=t[t.length-1].split('.')
p=p[0].split(pair)[0] // p=p[0].split(pair)[0]
console.log(p) // console.log(p)
let t={apiKey:'',secret:''}
console.log(JSON.stringify(t))
// //
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment