Commit 4416f7e1 authored by Ahmad Nemati's avatar Ahmad Nemati

git pull

parent 4663b0ad
...@@ -2,12 +2,7 @@ const ccxt = require ('ccxt') ...@@ -2,12 +2,7 @@ const ccxt = require ('ccxt')
const exchange = new ccxt.bybit ({
apiKey: "jCTVo1KpLd14YuLRiN",
secret: "ZxJ3LruKNMCisPVCyckTpRwcZazyqg3JRNM9",
enableRateLimit: true,
})
let redis = require('redis') let redis = require('redis')
...@@ -35,8 +30,14 @@ async function test () { ...@@ -35,8 +30,14 @@ async function test () {
// console.log(b) // console.log(b)
// let d = await exchange.createMarketOrder('BTCUSDT', 'Buy', 0.001, 0) // let d = await exchange.createMarketOrder('BTCUSDT', 'Buy', 0.001, 0)
// console.log(d) // console.log(d)
let d=await exchange.fetchOrders('BTCUSDT') const exchange = new ccxt.bybit ({
console.log(d) apiKey: "jCTVo1KpLd14YuLRiN",
secret: "ZxJ3LruKNMCisPVCyckTpRwcZazyqg3JRNM9",
enableRateLimit: true,
})
let d=await exchange.fetchBalance()
console.log(d.info.result.USDT.equity)
// console.log(d) // console.log(d)
//63d101c8-3169-473c-a7ee-53645599474d //63d101c8-3169-473c-a7ee-53645599474d
// let d=await exchange.fetchOrder('63d101c8-3169-473c-a7ee-53645599474d','BTCUSDT') // let d=await exchange.fetchOrder('63d101c8-3169-473c-a7ee-53645599474d','BTCUSDT')
......
...@@ -158,9 +158,9 @@ async function init() { ...@@ -158,9 +158,9 @@ async function init() {
async function balanceUpdater() { async function balanceUpdater() {
try { try {
let d = await exchange.fetchFreeBalance() let d = await exchange.balance()
if (d.USDT !== balance) { if (d.info.result.USDT.equity !== balance) {
balance = d.USDT balance = d.info.result.USDT.equity
appendBalanceProfitLog(balance) appendBalanceProfitLog(balance)
} }
......
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