비트-메이커 현금 & USDT 계약 전체 잔액 모니터링

저자:AutoBitMaker-ABM, 2021-02-20 08:12:06
태그:

오토비트 메이커현재는 공식적으로 리스크 없는 대책 전략이 출시되었습니다. 전략적 원칙은 현금 및 계약 헤딩이며, 이 과정은 수동으로 수행될 수 있습니다. 그러나 BOT는 수동 조작에 비해 시장의 모든 거래 쌍의 수익 공간을 캡처하고 하루에 수백 건의 거래를 수행합니다.

우리는오토비트 메이커짤막하게ABM 자본이 글은 이 팀의 이름과 마이크로 신호를 세밀하게 확인해 보세요. 우리는 현재 국내 고객과 WeChat, 이메일 등의 연락처를 통해만 통신하고 있으며 QQ 등의 다른 방법을 사용하지 않습니다.

ABM 팀현재 3가지 유형의 전략이 있습니다.

  • 계약 거래
  • 현금 거래
  • 이자 거래

현재 코드는 계정 모니터링에만 사용되며, 소스 코드는 공개되어 있으며, 누구나 직접 확인하거나 사용할 수 있습니다. 현금 + USDT 계약의 USDT 가치를 모니터링합니다.

현재 팀 전략 서버 클러스터는 80개에 이르고 있으며, 50개 이상의 지원 서버가 있으며, 평균적으로 초당 2회로 계정 상쇄 조건을 확인하고 있으며, 위험이 발생하면 빠르게 탈퇴할 수 있습니다.

이형적인 하이브리드 클라우드를 이용한 알리 클라우드, 아마존 클라우드, 마이크로소프트 클라우드 아키텍처, 관리와 실행을 분리하는 노드, 복수 노드 간 클러스터를 구성하여 리듀서런스 보장을 하고, 안전하게 효율적으로 사업의 원활한 운영과 자금보장을 실현한다.

실험에 대해: 귀하의 자금 규모에 따라 약 2주간의 테스트를 제공합니다. 테스트 단계에서 우리는 수수료를 받지 않습니다. 봇이 귀하의 계정을 점유한 후, 직접 작업을 수행하지 마십시오. 다른 수동 포지션이 감지되면 모든 봇이 즉시 종료됩니다.

수수료에 대해: 이것은 당신의 자금에 달려 있습니다. 우리는 테스트 단계 후에 더 이야기 할 수 있습니다. 당신은 우리의 추천 링크를 사용하여 계정을 만들 수 있다면 우리는 매우 낮은 수수료를 청구합니다.

연락처:

  1. 전국의 인터뷰
  2. :DuQi_SEC/autobitmaker/autobitmaker_001/Shawn_gb2312/ABM_DD
  3. 이메일:liuhongyu.louie@autobitmaker.com/autobitmaker_master@autobitmaker.com
  • 특별한 팁 (미크로 신호 autobitmaker001은 우리가 아닙니다!! 우리는 makebit도 아닙니다!! 미크로 신호 autobitmaker_001은 우리가입니다)

이 글의 내용은 이 부분의 내용입니다.微信小程序码


//exchanges[0] is contract
//exchanges[1] is spot

var chart = {
    __isStock: false,
    extension: {
        layout: 'single',
        col: 8,
        height: '300px'
    },
    tooltip: {
        xDateFormat: '%Y-%m-%d %H:%M:%S, %A'
    },
    title: {
        text: 'Account_Balance_Detail'
    },
    xAxis: {
        type: 'datetime'
    },
    yAxis: {
        title: {
            text: 'USDT'
        },
        opposite: false
    },
    series: []
};

function initChart() {
    chart.series.push({
        name: "Account_" + (Number(0)) + "_Detail",
        id: "Account_" + (Number(0)) + "_Detail",
        data: []
    });
}

function getChartPosition(avaliableMargin) {
    return {
        __isStock: false,
        extension: {
            layout: 'single',
            col: 4,
            height: '300px'
        },
        title: {
            text: '保证金占比(%)'
        },
        series: [{
            type: 'pie',
            name: 'one',
            data: [{
                name: '可用保证金(%)',
                y: avaliableMargin,
                color: '#dff0d8',
                sliced: true,
                selected: true
            }, {
                name: '保证金占用(%)',
                y: 100 - avaliableMargin,
                color: 'rgb(217, 237, 247)',
                sliced: true,
                selected: true
            }]
        }]
    };
}

function updateAccountDetailChart(ObjChart, totalBalance) {
    var nowTime = new Date().getTime();
    var account = exchanges[0].GetAccount();
    try {
        if (account !== null && account.Info !== null && account.Info.totalMarginBalance > 0) {
            ObjChart.add([0, [nowTime, Number(totalBalance)]]);
        }
    } catch (err) {
        Log('ERROR ' + account + ',' + err)
    }
}

function getBalance() {
    var currentBalance = 0;
    var account = exchanges[0].GetAccount();
    try {
        if (account !== null && account.Info !== null && account.Info.totalWalletBalance > 0) {
            currentBalance += Number(account.Info.totalWalletBalance);
        }
    } catch (err) {
        Log('ERROR ' + account + ',' + err)
    }
    Sleep(666);
    return Number(currentBalance).toFixed(6);
}

function getSpotBalanceInUSDT() {
    var ticker = JSON.parse(HttpQuery('https://api.binance.com/api/v1/ticker/24hr'));
    var currentBalance = 0;
    var account = exchanges[1].GetAccount();
    var priceMap = {};
    try {
        if (ticker !== null) {
            for (var index in ticker) {
                priceMap[ticker[index].symbol] = ticker[index].lastPrice;
            }
        }
        if (account !== null && account.Info !== null) {
            for (var index in account.Info.balances) {
                var obj = account.Info.balances[index];
                if (obj.asset !== 'USDT' && priceMap[obj.asset + 'USDT']) {
                    currentBalance += Number(Number(priceMap[obj.asset + 'USDT']) * Number((Number(obj.free) + Number(obj.locked))));
                }
                if (obj.asset === 'USDT') {
                    currentBalance += Number((Number(obj.free) + Number(obj.locked)));
                }
            }
        }
    } catch (err) {
        Log('ERROR ' + account + ',' + err)
    }
    Sleep(666);
    return Number(currentBalance).toFixed(6);
}

function printProfitInfo(currentBalance) {
    var profit = Number((currentBalance) - baseOriginalBalance).toFixed(5);
    var profitRate = Number((((currentBalance) - baseOriginalBalance) / baseOriginalBalance) * 100).toFixed(4);
    LogProfit(Number(profitRate), '&');
    Log('The current balance is ' + currentBalance + ', the profit is ' + profit + ', the profit rate is ' + profitRate + '%');
}

function printPositionInfo(exchangeInnerArray, totalProfitUSDT, totalProfitRate) {
    var totalProfit = 0.0
    var table = {
        type: 'table',
        title: 'POSITIONS',
        cols: ['Symbol', 'Type', 'AvgPrice', 'Position', 'Profit'],
        rows: []
    }
    table.rows.push([{
        body: '本策略是 USDT 本位,基于均值回归的币安现货-合约无风险套利策略',
        colspan: 5
    }]);
    table.rows.push([{
        body: '套利覆盖币安永续合约全部币种交易对',
        colspan: 5
    }]);
    var position = exchangeInnerArray[0].GetPosition()
    for (var indexInner in position) {
        var profit = Number(position[indexInner].Info.unRealizedProfit);
        totalProfit = totalProfit + profit
        table.rows.push([position[indexInner].Info.symbol, (position[indexInner].Type == 1 ? 'SHORT #da1b1bab' : 'LONG #1eda1bab'), position[indexInner].Price, position[indexInner].Amount, profit.toFixed(5)]);
    }
    Sleep(168);
    table.rows.push([{
        body: 'TOTAL PROFIT OF CURRENT POSITION',
        colspan: 4
    }, totalProfit.toFixed(6) + ' USDT']);
    table.rows.push([{
        body: 'TOTAL PROFIT',
        colspan: 4
    }, totalProfitUSDT + ' USDT']);
    table.rows.push([{
        body: 'TOTAL PROFIT RATE',
        colspan: 4
    }, totalProfitRate + ' %']);
    LogStatus('`' + JSON.stringify(table) + '`');
}

function main() {
    initChart();
    var ObjChart = Chart([chart, getChartPosition(100)]);
    while (true) {
        try {
            var currentBalance = getBalance();
            var currentSpotBalance = getSpotBalanceInUSDT();
            var totalBalance = Number(Number(currentBalance) + Number(currentSpotBalance)).toFixed(4);
            printProfitInfo(totalBalance);
            updateAccountDetailChart(ObjChart, totalBalance);
            for (var i = 0; i < 120; i++) {
                try {
                    var avaliableMargin = 100;
                    ObjChart.update([chart, getChartPosition(avaliableMargin)]);
                    var profit = Number((totalBalance) - baseOriginalBalance).toFixed(5);
                    var profitRate = Number((((totalBalance) - baseOriginalBalance) / baseOriginalBalance) * 100).toFixed(4);
                    printPositionInfo(exchanges, profit, profitRate);
                    Sleep(1000 * 120);
                } catch (errInner) {
                    throw errInner;
                }
            }
        } catch (err) {
            throw err;
        }
    }
}

더 많은