USD 값으로 BitMEX PNL보기 – Bitmex.com 용 USD 변환기 도구
BitMEX를 처음 사용하십니까? 거래 수수료 10 % 할인을 위해 저희 링크를 사용하여 등록하십시오 :
https://www.bitmex.com/register/fMRfzN
BitMEX는 완전한 비트 코인 표시 거래 플랫폼입니다. 대부분의 트레이더는이 거래소가 비트 코인 예금 만 허용한다는 것을 알고 있습니다. XBT로 모든 수익을 지불하고 XBT / BTC로 출시 / 미출시 PnL 만 표시합니다. Bitmex가 BTC 값과 함께 PnL에 USD 단위를 표시하면 좋지 않을까요??
인기있는 XBTUSD, ETHUSD, XRPUSD 영구 스왑 계약은 모두 반대입니다. 그것은 그들이 USD로 평가된다는 것을 의미합니다. 그러나 모든 PNL (수익 및 손실)은 비트 코인으로 계산됩니다. 현물 시장에서 PnL을 계산하는 것만 큼 간단하지 않기 때문에 처음에는 이해하기가 매우 어려울 수 있습니다. 따라서 통화를 XBT에서 USD로 변경하는 것이 현명합니다. 특히 이것은 USD로 PnL을 추적하는 사용자에게 좋습니다..
다음 가이드는 Bitmex.com PNL 열에 USD 단위를 추가하는 방법을 설명합니다..
BitMEX PnL을 USD 값으로 표시하는 방법
Bybit 파생 상품 거래 플랫폼은 USD와 BTC 모두에 PNL을 표시합니다..

Bitmex는 기본적으로이 기능을 제공하지 않지만 브라우저 플러그인을 사용하여 PnL을 USD로 표시 할 수 있습니다..
이를 구현하려면 다음 두 가지가 필요합니다. 1. 타사 브라우저 확장 및 2. 오픈 소스 JavaScript 코드.
Tampermonkey 브라우저 확장 설치
Tampermonkey는 인기있는 사용자 스크립트 관리자입니다. 이 확장 프로그램은 Chrome, Firefox, Brave 브라우저, Microsoft Edge, Safari 및 Opera에서 사용할 수 있습니다..
Chrome 및 Brave 브라우저 : https://chrome.google.com/webstore/search/tampermonkey

Firefox의 경우 Tampermonkey 또는 Greasemonkey를 사용할 수 있습니다. 두 확장 모두 작동합니다. 어쨌든이 가이드에서는 Tampermonkey를 사용할 것입니다..
Firefox : https://addons.mozilla.org/en-US/firefox/addon/tampermonkey/
https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/
아니면 그냥 https://www.tampermonkey.net 운영중인 관련 브라우저에 확장 프로그램을 추가합니다..
브라우저에 확장 프로그램을 추가하면 오른쪽 상단에 Tampermonkey 아이콘이 표시됩니다..

BitMEX USD 변환기 스크립트 설치
오른쪽 상단 모서리에서 Tampermonkey 아이콘을 클릭하고 메뉴에서 “새 스크립트 만들기”를 선택합니다..
이제 편집기에서 모든 것을 삭제하고 다음 스크립트를 붙여 넣으십시오..
// == UserScript ==
// @name BitMex USD 변환기
// @namespace https://bitmex.com/
// @ 버전 0.11
// @description BitMEX PnL에 대한 USD 단위
// @author koinkraft
// @ 없음
// @include https://bitmex.com/*
// @include https://www.bitmex.com/*
// @require https://code.jquery.com/jquery-2.1.4.min.js
// == / UserScript ==
(함수() {
‘엄격한 사용’;
// 스크립트 변수
indexPrice = 0;
let currentBalance = {total : 0, avail : 0};
// BitMex 가격 추출
const updateIndexPrice = () => {
$ ( ‘. instrument’). each (function () {
let obj = this;
if ($ (obj) .children ( ‘. symbol’). length > 0 && $ (obj) .children ( ‘. symbol’). html () == ‘.BXBT’) {
indexPrice = $ (obj) .children ( ‘. price’). html ();
}
});
setTimeout (function () {
updateIndexPrice ();
}, 1000);
};
// 지갑 잔액 추출
const extractWalletBalance = (콜백) => {
잔액 = currentBalance;
$ ( ‘a [href ="/ 앱 / 지갑"] > 스팬 > 표 > tbody > tr ‘). each (function () {
let currentLabel = ”;
$ (this) .children ( ‘td’). each (function () {
if ($ (this) .html () == ‘Total’|| $ (this) .html () == ‘Avail’) {
currentLabel = $ (this) .html ();
} else {
if (currentLabel == ‘Total’) {
let balanceTotal = formatXBTString ($ (this) .html ());
if (balanceTotal! == false) balances.total = balanceTotal;
} else if (currentLabel == ‘사용 가능’) {
let balanceAvail = formatXBTString ($ (this) .html ());
if (balanceAvail! == false) balances.avail = balanceAvail;
}
}
});
});
currentBalance = 잔액;
콜백 (잔액);
};
// USD 월렛 잔액 설정
const setWalletBalance = (updatedBalances) => {
if (updatedBalances.total + ‘USD’! = $ ( ‘. balance-usd-total’). html ()) $ ( ‘. balance-usd-total’). html (updatedBalances.total + ‘USD’);
if (updatedBalances.avail + ‘USD’! = $ ( ‘. balance-usd-avail’). html ()) $ ( ‘. balance-usd-avail’). html (updatedBalances.avail + ‘USD’);
};
// XBT 문자열 변환
const 형식 XBTString = (문자열) => {
let parts = string.split (" ");
if (parts.length == 2) {
if (부품 [1] == ‘XBT’) {
부품 반환 [0] .replace (",",".");
} else if (parts [1] == ‘mXBT’) {
부품 반환 [0] .replace (",",".") * 0.001;
} else if (parts [1] == ‘XBt’) {
부품 반환 [0] .replace (".","") * 0.00001;
} else if (parts [1] == ‘μXBT’) {
부품 반환 [0] .replace (".","").바꾸다(",",".") * 0.000001;
}
}
false를 반환하십시오.
};
// 지갑 잔액 업데이트
const updateWalletBalances = () => {
setTimeout (function () {
if (indexPrice! = 0) {
extractWalletBalance (function (balances) {
let updatedBalances = {total : (balances.total * indexPrice) .toLocaleString ( ‘en-US’, {minimumFractionDigits : 2, maximumFractionDigits : 2}), avail : (balances.avail * indexPrice) .toLocaleString ( ‘en-US’ , {minimumFractionDigits : 2, maximumFractionDigits : 2})};
setWalletBalance (updatedBalances);
});
}
updateWalletBalances ();
}, 1000);
};
// 손익 업데이트
const updatePNLs = (setTimeoutCycle) => {
if (indexPrice! = 0) {
// 미실현 손익
$ ( ‘td.unrealisedPnl’). each (function () {
let obj = this;
내용을 보자;
let isSpan = false;
if ($ (this) .children ( ‘div : first-child’). children ( ‘span’). length > 0) {
content = $ (this) .children ( ‘div : first-child’). children ( ‘span : first-child’). html ();
isSpan = true;
} else {
content = $ (this) .children ( ‘div : first-child’). html ();
}
let parts = content.split (" ");
if (부품 [1] == ‘XBT’|| 부품 [1] == ‘mXBT’|| 부품 [1] == ‘XBt’|| 부품 [1] == ‘μXBT’) {
let formatUnrealizedPNL = formatXBTString (parts [0] + ”+ parts [1]);
let unrealizedPNLUSD = (formatUnrealizedPNL * indexPrice) .toLocaleString ( ‘en-US’, {minimumFractionDigits : 2, maximumFractionDigits : 2});
let newDivContent;
if (! isSpan) {
newDivContent = 미실현 PNLUSD + ‘USD | ‘+’BTC ‘+ formatUnrealizedPNL +’ ‘+ 부품 [2];
} else {
newDivContent = ”+ 미실현 PNLUSD + ‘USD | ‘+’BTC ‘+ formatUnrealizedPNL +’ ‘+ 부품 [2] +’ ‘;
}
if (newDivContent! = $ (obj) .children ( ‘div.unrealizedPnlUSD’). html ()) {
$ (obj) .children ( ‘div.unrealizedPnlUSD’). html (newDivContent);
if (formatUnrealizedPNL * indexPrice < 0) {
if (! $ (obj) .children ( ‘div.unrealizedPnlUSD’). hasClass ( ‘neg’)) {
$ (obj) .children ( ‘div.unrealizedPnlUSD’). addClass ( ‘neg’). removeClass ( ‘pos’);
}
} else {
if (! $ (obj) .children ( ‘div.unrealizedPnlUSD’). hasClass ( ‘pos’)) {
$ (obj) .children ( ‘div.unrealizedPnlUSD’). addClass ( ‘pos’). removeClass ( ‘neg’);
}
}
}
}
});
// 실현 된 손익
$ ( ‘td.combinedRealisedPnl’). each (function () {
let obj = this;
let realityPNLhover = formatXBTString ($ (obj) .children ( ‘. hoverContainer : first-child’). children ( ‘. hoverVisible’). children ( ‘. tooltipWrapper’). children ( ‘span’). html ());
let realityPNL = formatXBTString ($ (obj) .children ( ‘. hoverContainer : first-child’). children ( ‘. hoverHidden’). children ( ‘span’). html ());
let allowedPNLUSDhoverContent = (realizedPNLhover * indexPrice) .toLocaleString ( ‘en-US’, {minimumFractionDigits : 2, maximumFractionDigits : 2}) + ‘USD’;
let allowedPNLUSDContent = (realizedPNL * indexPrice) .toLocaleString ( ‘en-US’, {minimumFractionDigits : 2, maximumFractionDigits : 2}) + ‘USD’;
if ($ (obj) .children ( ‘. realizedPNLContainer’). children ( ‘. hoverVisible’). children ( ‘. tooltipWrapper’). children ( ‘span’). html ()! = 깨달음 PNLUSDhoverContent) {
$ (obj) .children ( ‘. realizedPNLContainer’). children ( ‘. hoverVisible’). children ( ‘. tooltipWrapper’). children ( ‘span’). html (realizedPNLUSDhoverContent);
if (realizedPNLhover * indexPrice < 0) {
if (! $ (obj) .children ( ‘. realizedPNLContainer’). children ( ‘. hoverVisible’). children ( ‘. tooltipWrapper’). children ( ‘span’). hasClass ( ‘neg’)) {
$ (obj) .children ( ‘. realizedPNLContainer’). children ( ‘. hoverVisible’). children ( ‘. tooltipWrapper’). children ( ‘span’). addClass ( ‘neg’). removeClass ( ‘pos’);
}
} else {
if (! $ (obj) .children ( ‘. realizedPNLContainer’). children ( ‘. hoverVisible’). children ( ‘. tooltipWrapper’). children ( ‘span’). hasClass ( ‘pos’)) {
$ (obj) .children ( ‘. realizedPNLContainer’). children ( ‘. hoverVisible’). children ( ‘. tooltipWrapper’). children ( ‘span’). addClass ( ‘pos’). removeClass ( ‘neg’);
}
}
}
if ($ (obj) .children ( ‘. realizedPNLContainer’). children ( ‘. hoverHidden’). children ( ‘span’). html ()! = 깨달음 PNLUSDContent) {
$ (obj) .children ( ‘. realizedPNLContainer’). children ( ‘. hoverHidden’). children ( ‘span’). html (realizedPNLUSDContent);
if (realizedPNL * indexPrice < 0) {
if (! $ (obj) .children ( ‘. realizedPNLContainer’). children ( ‘. hoverHidden’). children ( ‘span’). hasClass ( ‘neg’)) {
$ (obj) .children ( ‘. realizedPNLContainer’). children ( ‘. hoverHidden’). children ( ‘span’). addClass ( ‘neg’). removeClass ( ‘pos’);
}
} else {
if (! $ (obj) .children ( ‘. realizedPNLContainer’). children ( ‘. hoverHidden’). children ( ‘span’). hasClass ( ‘pos’)) {
$ (obj) .children ( ‘. realizedPNLContainer’). children ( ‘. hoverHidden’). children ( ‘span’). addClass ( ‘pos’). removeClass ( ‘neg’);
}
}
}
});
}
if (setTimeoutCycle) {
setTimeout (function () {
updatePNLs (true);
}, 50);
}
};
// PNL 래퍼 초기화
const initPNLWrapper = (setTimeoutCycle) => {
if ($ ( ‘td.unrealisedPnl’). length > 0 && $ ( ‘. unrealizedPnlUSD’). length == 0) {
// 미실현 손익
$ ( ‘td.unrealisedPnl’). css ( ‘position’, ‘relative’);
$ ( ‘td.unrealisedPnl > div ‘). css (‘opacity ‘,’0 ‘). css (‘position ‘,’absolute ‘). css (‘left ‘,’0 ‘). css (‘top ‘,’0 ‘). css ( ‘오른쪽’, ‘0’). css ( ‘bottom’, ‘0’);
$ ( ‘td.unrealisedPnl > div ‘). after (‘0.00 USD (0.00 %) ‘);
// 실현 된 손익
$ ( ‘td.combinedRealisedPnl > .hoverContainer ‘). hide ();
$ ( ‘td.combinedRealisedPnl > .hoverContainer ‘). after (‘0.00 USD0.00 USD ‘);
}
if (setTimeoutCycle) {
setTimeout (function () {
initPNLWrapper (true);
}, 100);
}
};
// 창이로드 될 때까지 기다립니다.
$ (window) .load (function () {
// BTC 잔액 상자 숨기기
$ ( ‘._ 1mNCXSUh : first’). hide ();
$ ( ‘._ 2UCMYPbC > ._2wx45MYS : first ‘). hide ();
// PNL 래퍼 초기화
initPNLWrapper (true);
$ (window) .resize (function () {
initPNLWrapper (false);
});
// USD 잔액 div 삽입
$ ( ‘. announcementsDropdown’). before ( ‘
| 합계 | 0.00 USD |
| 이익 | 0.00 USD |
‘);
// 업데이트 기능
setInterval (() => {
console.log ( ‘업데이트 중 ….’);
updateIndexPrice ();
updateWalletBalances ();
updatePNLs (true);
$ ( ‘td.unrealisedPnl > div ‘). hover (function () {
updatePNLs (false);
});
}, 30000);
});
}) ();
위 코드는 KoinKraft가 작성한 오픈 소스 JavaScript 코드입니다..
참고: https://gist.github.com/btc-zz/6b8315f93969ee7caf6c3d66e70ec721

완료되면 파일을 클릭하십시오. >> 저장.
그런 다음 Tampermonkey와 BitMEX USD 변환기 도구가 모두 활성화되어 있는지 확인하십시오. 원할 때마다 스크립트를 비활성화 할 수 있습니다..

이제 Bitmex.com 거래 페이지를 새로 고치고 스크립트가로드 될 때까지 잠시 기다리십시오. 로드되면 PNL 열에 USD 값이 표시됩니다. USD가 아닌 USD와 BTC 값을 모두 표시합니다. 또한 USD 변환은 실시간으로 발생합니다..

플러그인이 작동하지 않습니다.?
이 방법은 모든 주요 웹 브라우저에서 작동합니다. 이 플러그인이 제대로 작동하려면 BitMEX 통화 표시를 XBT (Bitcoin)로 설정해야합니다. Satoshi, micro-Bitcoin 및 milli-Bitcoin과 같은 다른 통화에서는 작동하지 않습니다. 또한 처음에는 USD 값을로드하는 데 시간이 걸리므로 시간이 좀 걸립니다..
이제부터는 수익이 USD로 얼마인지 평가하기 위해 BTC에서 피아트 통화로 또는 Satoshi에서 USD로 기본 변환을 수행 할 필요가 없기를 바랍니다. 스크립트가 당신을 위해 일합니다..

Facebook
Pinterest