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

git pull

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