use unrealized as primary value for perp pnl
This commit is contained in:
parent
c40ead15d5
commit
daaa1fcfeb
|
@ -17,13 +17,18 @@ import { useTranslation } from 'next-i18next'
|
|||
import Link from 'next/link'
|
||||
import { useRouter } from 'next/router'
|
||||
import { useCallback, useState } from 'react'
|
||||
import { floorToDecimal, getDecimalCount } from 'utils/numbers'
|
||||
import {
|
||||
floorToDecimal,
|
||||
formatCurrencyValue,
|
||||
getDecimalCount,
|
||||
} from 'utils/numbers'
|
||||
import { breakpoints } from 'utils/theme'
|
||||
import { calculateLimitPriceForMarketOrder } from 'utils/tradeForm'
|
||||
import MarketCloseModal from './MarketCloseModal'
|
||||
import MarketLogos from './MarketLogos'
|
||||
import PerpSideBadge from './PerpSideBadge'
|
||||
import TableMarketName from './TableMarketName'
|
||||
import Tooltip from '@components/shared/Tooltip'
|
||||
|
||||
const PerpPositions = () => {
|
||||
const { t } = useTranslation(['common', 'trade'])
|
||||
|
@ -119,7 +124,7 @@ const PerpPositions = () => {
|
|||
<Th className="text-right">{`${t('trade:unsettled')} ${t(
|
||||
'pnl'
|
||||
)}`}</Th>
|
||||
<Th className="text-right">{t('pnl')}</Th>
|
||||
<Th className="text-right">{t('trade:unrealized-pnl')}</Th>
|
||||
{!isUnownedAccount ? <Th /> : null}
|
||||
</TrHead>
|
||||
</thead>
|
||||
|
@ -140,8 +145,10 @@ const PerpPositions = () => {
|
|||
if (!basePosition) return null
|
||||
|
||||
const unsettledPnl = position.getUnsettledPnlUi(market)
|
||||
const cummulativePnl =
|
||||
const totalPnl =
|
||||
position.cumulativePnlOverPositionLifetimeUi(market)
|
||||
const unrealizedPnl = position.getUnRealizedPnlUi(market)
|
||||
const realizedPnl = position.getRealizedPnlUi()
|
||||
|
||||
return (
|
||||
<TrBody
|
||||
|
@ -207,16 +214,31 @@ const PerpPositions = () => {
|
|||
decimals={2}
|
||||
/>
|
||||
</Td>
|
||||
<Td
|
||||
className={`text-right font-mono ${
|
||||
cummulativePnl > 0 ? 'text-th-up' : 'text-th-down'
|
||||
}`}
|
||||
>
|
||||
<FormatNumericValue
|
||||
value={cummulativePnl}
|
||||
isUsd
|
||||
decimals={2}
|
||||
/>
|
||||
<Td className="text-right font-mono">
|
||||
<Tooltip
|
||||
content={
|
||||
<PnlTooltipContent
|
||||
unrealizedPnl={unrealizedPnl}
|
||||
realizedPnl={realizedPnl}
|
||||
totalPnl={totalPnl}
|
||||
/>
|
||||
}
|
||||
delay={100}
|
||||
>
|
||||
<span
|
||||
className={`tooltip-underline ${
|
||||
unrealizedPnl > 0
|
||||
? 'text-th-up'
|
||||
: 'text-th-down'
|
||||
}`}
|
||||
>
|
||||
<FormatNumericValue
|
||||
value={unrealizedPnl}
|
||||
isUsd
|
||||
decimals={2}
|
||||
/>
|
||||
</span>
|
||||
</Tooltip>
|
||||
</Td>
|
||||
{!isUnownedAccount ? (
|
||||
<Td>
|
||||
|
@ -271,8 +293,10 @@ const PerpPositions = () => {
|
|||
selectedMarket.perpMarketIndex === position.marketIndex
|
||||
|
||||
if (!basePosition) return null
|
||||
const cummulativePnl =
|
||||
const totalPnl =
|
||||
position.cumulativePnlOverPositionLifetimeUi(market)
|
||||
const unrealizedPnl = position.getUnRealizedPnlUi(market)
|
||||
const realizedPnl = position.getRealizedPnlUi()
|
||||
return (
|
||||
<div
|
||||
className="flex items-center justify-between border-b border-th-bkg-3 p-4"
|
||||
|
@ -338,11 +362,24 @@ const PerpPositions = () => {
|
|||
<div className="flex items-center space-x-4">
|
||||
<div
|
||||
className={`text-right font-mono leading-none ${
|
||||
cummulativePnl > 0 ? 'text-th-up' : 'text-th-down'
|
||||
unrealizedPnl > 0 ? 'text-th-up' : 'text-th-down'
|
||||
}`}
|
||||
>
|
||||
<p className="mb-1 text-th-fgd-4">PnL</p>
|
||||
<FormatNumericValue value={cummulativePnl} isUsd />
|
||||
<Tooltip
|
||||
content={
|
||||
<PnlTooltipContent
|
||||
unrealizedPnl={unrealizedPnl}
|
||||
realizedPnl={realizedPnl}
|
||||
totalPnl={totalPnl}
|
||||
/>
|
||||
}
|
||||
delay={100}
|
||||
>
|
||||
<p className="tooltip-underline mb-1 font-body text-th-fgd-4">
|
||||
{t('trade:unrealized-pnl')}
|
||||
</p>
|
||||
</Tooltip>
|
||||
<FormatNumericValue value={unrealizedPnl} isUsd />
|
||||
</div>
|
||||
{!isUnownedAccount ? (
|
||||
<Button
|
||||
|
@ -383,3 +420,46 @@ const PerpPositions = () => {
|
|||
}
|
||||
|
||||
export default PerpPositions
|
||||
|
||||
const PnlTooltipContent = ({
|
||||
unrealizedPnl,
|
||||
realizedPnl,
|
||||
totalPnl,
|
||||
}: {
|
||||
unrealizedPnl: number
|
||||
realizedPnl: number
|
||||
totalPnl: number
|
||||
}) => {
|
||||
const { t } = useTranslation(['common', 'trade'])
|
||||
return (
|
||||
<>
|
||||
<div className="mb-3 space-y-1">
|
||||
<div className="flex justify-between">
|
||||
<p className="mr-3">{t('trade:unrealized-pnl')}</p>
|
||||
<span className="font-mono text-th-fgd-2">
|
||||
{formatCurrencyValue(unrealizedPnl, 2)}
|
||||
</span>
|
||||
</div>
|
||||
<div className="flex justify-between">
|
||||
<p className="mr-3">{t('trade:realized-pnl')}</p>
|
||||
<span className="font-mono text-th-fgd-2">
|
||||
{formatCurrencyValue(realizedPnl, 2)}
|
||||
</span>
|
||||
</div>
|
||||
<div className="flex justify-between">
|
||||
<p className="mr-3">{t('trade:total-pnl')}</p>
|
||||
<span className="font-mono text-th-fgd-2">
|
||||
{formatCurrencyValue(totalPnl, 2)}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<a
|
||||
href="https://docs.mango.markets/mango-markets/settle-pnl"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
{t('learn-more')}
|
||||
</a>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@blockworks-foundation/mango-feeds": "0.1.6",
|
||||
"@blockworks-foundation/mango-v4": "^0.16.4",
|
||||
"@blockworks-foundation/mango-v4": "^0.16.5",
|
||||
"@headlessui/react": "1.6.6",
|
||||
"@heroicons/react": "2.0.10",
|
||||
"@metaplex-foundation/js": "0.18.3",
|
||||
|
|
|
@ -89,6 +89,7 @@
|
|||
"interest-earned-paid": "Interest Earned",
|
||||
"leaderboard": "Leaderboard",
|
||||
"learn": "Learn",
|
||||
"learn-more": "Learn More",
|
||||
"leverage": "Leverage",
|
||||
"liability-weight": "Liability Weight",
|
||||
"liquidity": "Liquidity",
|
||||
|
|
|
@ -63,6 +63,7 @@
|
|||
"price-expect": "The price you receive may be worse than you expect and full execution is not guaranteed. Max slippage is 2.5% for your safety. The part of your position with slippage beyond 2.5% will not be closed.",
|
||||
"price-provided-by": "Oracle by",
|
||||
"quote": "Quote",
|
||||
"realized-pnl": "Realized PnL",
|
||||
"reduce-only": "Reduce Only",
|
||||
"sells": "Sells",
|
||||
"settle-funds": "Settle Funds",
|
||||
|
@ -86,9 +87,11 @@
|
|||
"tooltip-slippage": "An estimate of the difference between the current price and the price your trade will be executed at",
|
||||
"tooltip-volume-alert": "Volume Alert Settings",
|
||||
"tooltip-stable-price": "Stable price is used in a safety mechanism that limits a user's ability to enter risky positions when the oracle price is changing rapidly",
|
||||
"total-pnl": "Total PnL",
|
||||
"trade-sounds-tooltip": "Play a sound alert for every new trade",
|
||||
"trades": "Trades",
|
||||
"tweet-position": "Share to Twitter",
|
||||
"unrealized-pnl": "Unrealized PnL",
|
||||
"unsettled": "Unsettled",
|
||||
"volume-alert": "Volume Alert",
|
||||
"volume-alert-desc": "Play a sound whenever volume exceeds your alert threshold"
|
||||
|
|
|
@ -89,6 +89,7 @@
|
|||
"interest-earned-paid": "Interest Earned",
|
||||
"leaderboard": "Leaderboard",
|
||||
"learn": "Learn",
|
||||
"learn-more": "Learn More",
|
||||
"leverage": "Leverage",
|
||||
"liability-weight": "Liability Weight",
|
||||
"liquidity": "Liquidity",
|
||||
|
|
|
@ -63,6 +63,7 @@
|
|||
"price-expect": "The price you receive may be worse than you expect and full execution is not guaranteed. Max slippage is 2.5% for your safety. The part of your position with slippage beyond 2.5% will not be closed.",
|
||||
"price-provided-by": "Oracle by",
|
||||
"quote": "Quote",
|
||||
"realized-pnl": "Realized PnL",
|
||||
"reduce-only": "Reduce Only",
|
||||
"sells": "Sells",
|
||||
"settle-funds": "Settle Funds",
|
||||
|
@ -86,9 +87,11 @@
|
|||
"tooltip-slippage": "An estimate of the difference between the current price and the price your trade will be executed at",
|
||||
"tooltip-volume-alert": "Volume Alert Settings",
|
||||
"tooltip-stable-price": "Stable price is used in a safety mechanism that limits a user's ability to enter risky positions when the oracle price is changing rapidly",
|
||||
"total-pnl": "Total PnL",
|
||||
"trade-sounds-tooltip": "Play a sound alert for every new trade",
|
||||
"trades": "Trades",
|
||||
"tweet-position": "Share to Twitter",
|
||||
"unrealized-pnl": "Unrealized PnL",
|
||||
"unsettled": "Unsettled",
|
||||
"volume-alert": "Volume Alert",
|
||||
"volume-alert-desc": "Play a sound whenever volume exceeds your alert threshold"
|
||||
|
|
|
@ -89,6 +89,7 @@
|
|||
"interest-earned-paid": "Interest Earned",
|
||||
"leaderboard": "Leaderboard",
|
||||
"learn": "Learn",
|
||||
"learn-more": "Learn More",
|
||||
"leverage": "Leverage",
|
||||
"liability-weight": "Liability Weight",
|
||||
"liquidity": "Liquidity",
|
||||
|
|
|
@ -63,6 +63,7 @@
|
|||
"price-expect": "The price you receive may be worse than you expect and full execution is not guaranteed. Max slippage is 2.5% for your safety. The part of your position with slippage beyond 2.5% will not be closed.",
|
||||
"price-provided-by": "Oracle by",
|
||||
"quote": "Quote",
|
||||
"realized-pnl": "Realized PnL",
|
||||
"reduce-only": "Reduce Only",
|
||||
"sells": "Sells",
|
||||
"settle-funds": "Settle Funds",
|
||||
|
@ -86,9 +87,11 @@
|
|||
"tooltip-slippage": "An estimate of the difference between the current price and the price your trade will be executed at",
|
||||
"tooltip-volume-alert": "Volume Alert Settings",
|
||||
"tooltip-stable-price": "Stable price is used in a safety mechanism that limits a user's ability to enter risky positions when the oracle price is changing rapidly",
|
||||
"total-pnl": "Total PnL",
|
||||
"trade-sounds-tooltip": "Play a sound alert for every new trade",
|
||||
"trades": "Trades",
|
||||
"tweet-position": "Share to Twitter",
|
||||
"unrealized-pnl": "Unrealized PnL",
|
||||
"unsettled": "Unsettled",
|
||||
"volume-alert": "Volume Alert",
|
||||
"volume-alert-desc": "Play a sound whenever volume exceeds your alert threshold"
|
||||
|
|
|
@ -89,6 +89,7 @@
|
|||
"interest-earned-paid": "获取利息",
|
||||
"leaderboard": "排行榜",
|
||||
"learn": "学",
|
||||
"learn-more": "Learn More",
|
||||
"leverage": "杠杆",
|
||||
"liability-weight": "债务权重",
|
||||
"liquidity": "流动性",
|
||||
|
|
|
@ -1,93 +1,98 @@
|
|||
{
|
||||
"24h-volume": "24h Volume",
|
||||
"activate-volume-alert": "开启交易量警报",
|
||||
"amount": "数量",
|
||||
"activate-volume-alert": "Activate Volume Alert",
|
||||
"amount": "Amount",
|
||||
"average-funding": "Average {{interval}} Funding",
|
||||
"base": "基础",
|
||||
"book": "挂单薄",
|
||||
"buys": "买单",
|
||||
"cancel-order-error": "取消挂单出错",
|
||||
"close-confirm": "市场平仓您的{{config_name}}持仓",
|
||||
"close-position": "平仓",
|
||||
"connect-orders": "连接以查看您的订单",
|
||||
"connect-positions": "连接以查看您的持仓",
|
||||
"connect-trade-history": "连接以查看交易纪录",
|
||||
"connect-unsettled": "连接以查看未结清余额",
|
||||
"copy-and-share": "复制影像",
|
||||
"current-price": "目前价格",
|
||||
"base": "Base",
|
||||
"book": "Book",
|
||||
"buys": "Buys",
|
||||
"cancel-order-error": "Failed to cancel order",
|
||||
"close-confirm": "Market close your {{config_name}} position",
|
||||
"close-position": "Close Position",
|
||||
"connect-orders": "Connect to view your open orders",
|
||||
"connect-positions": "Connect to view your perp positions",
|
||||
"connect-trade-history": "Connect to view your trade history",
|
||||
"connect-unsettled": "Connect to view your unsettled funds",
|
||||
"copy-and-share": "Copy Image to Clipboard",
|
||||
"current-price": "Current Price",
|
||||
"edit-order": "Edit Order",
|
||||
"entry-price": "入场价",
|
||||
"est-slippage": "预计下滑",
|
||||
"funding-limits": "资金费限制",
|
||||
"funding-rate": "资金费率",
|
||||
"grouping": "分组",
|
||||
"hide-asks": "隐藏要价",
|
||||
"hide-bids": "隐藏出价",
|
||||
"in-orders": "在挂单中",
|
||||
"init-leverage": "初始杠杆",
|
||||
"instantaneous-funding": "瞬时资金费率",
|
||||
"insured": "被{{token}}保险",
|
||||
"interval-seconds": "间隔(秒)",
|
||||
"last-updated": "最近更新",
|
||||
"entry-price": "Entry Price",
|
||||
"est-slippage": "Est. Slippage",
|
||||
"funding-limits": "Funding Limits",
|
||||
"funding-rate": "1h Avg Funding Rate",
|
||||
"grouping": "Grouping",
|
||||
"hide-asks": "Hide Asks",
|
||||
"hide-bids": "Hide Bids",
|
||||
"in-orders": "In Orders",
|
||||
"init-leverage": "Init Leverage",
|
||||
"instantaneous-funding": "Instantaneous Funding Snapshot",
|
||||
"interval-seconds": "Interval (seconds)",
|
||||
"insured": "{{token}} Insured",
|
||||
"last-updated": "Last updated",
|
||||
"limit": "Limit",
|
||||
"limit-price": "限价价格",
|
||||
"long": "做多",
|
||||
"maker": "挂单者",
|
||||
"margin": "保证金",
|
||||
"market-details": "{{market}}市场细节",
|
||||
"max-leverage": "最多杠杆",
|
||||
"min-order-size": "最小订单量",
|
||||
"limit-price": "Limit Price",
|
||||
"long": "Long",
|
||||
"maker": "Maker",
|
||||
"maker-fee": "Maker Fee",
|
||||
"margin": "Margin",
|
||||
"market-details": "{{market}} Market Details",
|
||||
"max-leverage": "Max Leverage",
|
||||
"min-order-size": "Min Order Size",
|
||||
"min-order-size-error": "Min order size is {{minSize}} {{symbol}}",
|
||||
"more-details": "More Details",
|
||||
"no-balances": "您没有余额",
|
||||
"no-orders": "您没有订单",
|
||||
"no-positions": "您没有持仓",
|
||||
"no-unsettled": "您没有未结清余额",
|
||||
"notional": "合约面值",
|
||||
"notional-volume": "面值交易量($)",
|
||||
"open-interest": "持仓量",
|
||||
"oracle": "预言机",
|
||||
"oracle-not-updated": "此预言机最近没有更新。",
|
||||
"oracle-not-updated-warning": "含有此币种的帐户无法进行活动。",
|
||||
"oracle-price": "预言机价格",
|
||||
"order-error": "下订单出错了",
|
||||
"order-type": "订单方式",
|
||||
"order-value": "订单价值",
|
||||
"orders": "订单",
|
||||
"place-order": "下{{side}}单",
|
||||
"placing-order": "正在下单",
|
||||
"positions": "当前持仓",
|
||||
"no-balances": "No balances",
|
||||
"no-orders": "No open orders",
|
||||
"no-positions": "No perp positions",
|
||||
"no-unsettled": "No unsettled funds",
|
||||
"notional": "Notional",
|
||||
"notional-volume": "Notional Volume ($)",
|
||||
"open-interest": "Open Interest",
|
||||
"oracle": "Oracle",
|
||||
"oracle-not-updated": "This oracle has not updated recently.",
|
||||
"oracle-not-updated-warning": "Actions will fail for accounts with a position in this token.",
|
||||
"oracle-price": "Oracle Price",
|
||||
"order-error": "Failed to place order",
|
||||
"order-type": "Order Type",
|
||||
"order-value": "Order Value",
|
||||
"orders": "Orders",
|
||||
"place-order": "Place {{side}} Order",
|
||||
"placing-order": "Placing Order",
|
||||
"positions": "Positions",
|
||||
"post": "Post",
|
||||
"preview-sound": "声音预览",
|
||||
"price-expect": "您收到的价格可能与您预期有差异,并且无法保证完全执行。为了您的安全,最大滑点保持为 2.5%。超过 2.5%滑点的部分不会被平仓。",
|
||||
"price-provided-by": "语言机来自",
|
||||
"quote": "计价",
|
||||
"reduce-only": "限减少",
|
||||
"sells": "卖单",
|
||||
"settle-funds": "借清资金",
|
||||
"settle-funds-error": "借清出错",
|
||||
"short": "做空",
|
||||
"show-asks": "显示要价",
|
||||
"show-bids": "显示出价",
|
||||
"side": "方向",
|
||||
"size": "數量",
|
||||
"spread": "差價",
|
||||
"stable-price": "穩定價格",
|
||||
"taker": "吃單者",
|
||||
"tick-size": "波動單位",
|
||||
"preview-sound": "Preview Sound",
|
||||
"price-expect": "The price you receive may be worse than you expect and full execution is not guaranteed. Max slippage is 2.5% for your safety. The part of your position with slippage beyond 2.5% will not be closed.",
|
||||
"price-provided-by": "Oracle by",
|
||||
"quote": "Quote",
|
||||
"realized-pnl": "Realized PnL",
|
||||
"reduce-only": "Reduce Only",
|
||||
"sells": "Sells",
|
||||
"settle-funds": "Settle Funds",
|
||||
"settle-funds-error": "Failed to settle funds",
|
||||
"short": "Short",
|
||||
"show-asks": "Show Asks",
|
||||
"show-bids": "Show Bids",
|
||||
"side": "Side",
|
||||
"size": "Size",
|
||||
"spread": "Spread",
|
||||
"stable-price": "Stable Price",
|
||||
"taker": "Taker",
|
||||
"taker-fee": "Taker Fee",
|
||||
"tick-size": "Tick Size",
|
||||
"tooltip-borrow-balance": "You'll use your {{balance}} {{token}} balance and borrow {{borrowAmount}} {{token}} to execute this trade. The current {{token}} variable borrow rate is {{rate}}%",
|
||||
"tooltip-borrow-no-balance": "You'll borrow {{borrowAmount}} {{token}} to execute this trade. The current {{token}} variable borrow rate is {{rate}}%",
|
||||
"tooltip-enable-margin": "為此交易啟用保證金",
|
||||
"tooltip-ioc": "IOC交易若不吃單就會被取消。任何無法立刻成交的部分將被取消",
|
||||
"tooltip-insured": "如果發生破產,{{tokenOrMarket}}損失是否可以從保險基金中歸還",
|
||||
"tooltip-post": "Post交易若不掛單就會被取消。",
|
||||
"tooltip-slippage": "當前價格與您的交易將執行的價格之間的差值的估計",
|
||||
"tooltip-stable-price": "穩定價格用於一個安全機制。此機制可以限制用戶在預言機價格快速波動時下風險高的訂單",
|
||||
"tooltip-volume-alert": "交易量警報設定",
|
||||
"trade-sounds-tooltip": "為每筆新交易播放警報聲音",
|
||||
"trades": "交易",
|
||||
"tweet-position": "分享至Twitter",
|
||||
"unsettled": "未結清",
|
||||
"volume-alert": "交易量警報",
|
||||
"volume-alert-desc": "交易量超過警報設定時播放聲音"
|
||||
"tooltip-enable-margin": "Enable spot margin for this trade",
|
||||
"tooltip-ioc": "Immediate-Or-Cancel (IOC) orders are guaranteed to be the taker and must be executed immediately. Any portion of the order that can't be filled immediately will be cancelled",
|
||||
"tooltip-insured": "Whether or not {{tokenOrMarket}} losses can be recovered from the insurance fund in the event of bankruptcies.",
|
||||
"tooltip-post": "Post orders are guaranteed to be the maker or they will be canceled",
|
||||
"tooltip-slippage": "An estimate of the difference between the current price and the price your trade will be executed at",
|
||||
"tooltip-volume-alert": "Volume Alert Settings",
|
||||
"tooltip-stable-price": "Stable price is used in a safety mechanism that limits a user's ability to enter risky positions when the oracle price is changing rapidly",
|
||||
"total-pnl": "Total PnL",
|
||||
"trade-sounds-tooltip": "Play a sound alert for every new trade",
|
||||
"trades": "Trades",
|
||||
"tweet-position": "Share to Twitter",
|
||||
"unrealized-pnl": "Unrealized PnL",
|
||||
"unsettled": "Unsettled",
|
||||
"volume-alert": "Volume Alert",
|
||||
"volume-alert-desc": "Play a sound whenever volume exceeds your alert threshold"
|
||||
}
|
|
@ -89,6 +89,7 @@
|
|||
"interest-earned-paid": "獲取利息",
|
||||
"leaderboard": "排行榜",
|
||||
"learn": "學",
|
||||
"learn-more": "Learn More",
|
||||
"leverage": "槓桿",
|
||||
"liability-weight": "債務權重",
|
||||
"liquidity": "流動性",
|
||||
|
|
|
@ -1,95 +1,98 @@
|
|||
{
|
||||
"24h-volume": "24h Volume",
|
||||
"activate-volume-alert": "開啟交易量警報",
|
||||
"amount": "數量",
|
||||
"activate-volume-alert": "Activate Volume Alert",
|
||||
"amount": "Amount",
|
||||
"average-funding": "Average {{interval}} Funding",
|
||||
"base": "基礎",
|
||||
"book": "掛單薄",
|
||||
"buys": "買單",
|
||||
"cancel-order-error": "取消掛單出錯",
|
||||
"close-confirm": "市場平倉您的{{config_name}}持倉",
|
||||
"close-position": "平倉",
|
||||
"connect-orders": "連接以查看您的訂單",
|
||||
"connect-positions": "連接以查看您的持倉",
|
||||
"connect-trade-history": "連接以查看交易紀錄",
|
||||
"connect-unsettled": "連接以查看未結清餘額",
|
||||
"copy-and-share": "複製影像",
|
||||
"current-price": "目前價格",
|
||||
"base": "Base",
|
||||
"book": "Book",
|
||||
"buys": "Buys",
|
||||
"cancel-order-error": "Failed to cancel order",
|
||||
"close-confirm": "Market close your {{config_name}} position",
|
||||
"close-position": "Close Position",
|
||||
"connect-orders": "Connect to view your open orders",
|
||||
"connect-positions": "Connect to view your perp positions",
|
||||
"connect-trade-history": "Connect to view your trade history",
|
||||
"connect-unsettled": "Connect to view your unsettled funds",
|
||||
"copy-and-share": "Copy Image to Clipboard",
|
||||
"current-price": "Current Price",
|
||||
"edit-order": "Edit Order",
|
||||
"entry-price": "入場價",
|
||||
"est-slippage": "預計下滑",
|
||||
"funding-limits": "資金費限制",
|
||||
"funding-rate": "資金費率",
|
||||
"grouping": "分組",
|
||||
"hide-asks": "隱藏要價",
|
||||
"hide-bids": "隱藏出價",
|
||||
"in-orders": "在掛單中",
|
||||
"init-leverage": "初始槓桿",
|
||||
"instantaneous-funding": "瞬時資金費率",
|
||||
"insured": "被{{token}}保險",
|
||||
"interval-seconds": "間隔(秒)",
|
||||
"last-updated": "最近更新",
|
||||
"entry-price": "Entry Price",
|
||||
"est-slippage": "Est. Slippage",
|
||||
"funding-limits": "Funding Limits",
|
||||
"funding-rate": "1h Avg Funding Rate",
|
||||
"grouping": "Grouping",
|
||||
"hide-asks": "Hide Asks",
|
||||
"hide-bids": "Hide Bids",
|
||||
"in-orders": "In Orders",
|
||||
"init-leverage": "Init Leverage",
|
||||
"instantaneous-funding": "Instantaneous Funding Snapshot",
|
||||
"interval-seconds": "Interval (seconds)",
|
||||
"insured": "{{token}} Insured",
|
||||
"last-updated": "Last updated",
|
||||
"limit": "Limit",
|
||||
"limit-price": "限價價格",
|
||||
"long": "做多",
|
||||
"maker": "掛單者",
|
||||
"maker-fee": "掛單者 Fee",
|
||||
"margin": "保證金",
|
||||
"market-details": "{{market}}市場細節",
|
||||
"max-leverage": "最多槓桿",
|
||||
"min-order-size": "最小訂單量",
|
||||
"limit-price": "Limit Price",
|
||||
"long": "Long",
|
||||
"maker": "Maker",
|
||||
"maker-fee": "Maker Fee",
|
||||
"margin": "Margin",
|
||||
"market-details": "{{market}} Market Details",
|
||||
"max-leverage": "Max Leverage",
|
||||
"min-order-size": "Min Order Size",
|
||||
"min-order-size-error": "Min order size is {{minSize}} {{symbol}}",
|
||||
"more-details": "More Details",
|
||||
"no-balances": "您沒有餘額",
|
||||
"no-orders": "您沒有訂單",
|
||||
"no-positions": "您沒有持倉",
|
||||
"no-unsettled": "您沒有未結清餘額",
|
||||
"notional": "合約面值",
|
||||
"notional-volume": "面值交易量($)",
|
||||
"open-interest": "持倉量",
|
||||
"oracle": "預言機",
|
||||
"oracle-not-updated": "此預言機最近沒有更新。",
|
||||
"oracle-not-updated-warning": "含有此幣種的帳戶無法進行活動。",
|
||||
"oracle-price": "預言機價格",
|
||||
"order-error": "下訂單出錯了",
|
||||
"order-type": "訂單方式",
|
||||
"order-value": "訂單價值",
|
||||
"orders": "訂單",
|
||||
"place-order": "下{{side}}單",
|
||||
"placing-order": "正在下單",
|
||||
"positions": "當前持倉",
|
||||
"no-balances": "No balances",
|
||||
"no-orders": "No open orders",
|
||||
"no-positions": "No perp positions",
|
||||
"no-unsettled": "No unsettled funds",
|
||||
"notional": "Notional",
|
||||
"notional-volume": "Notional Volume ($)",
|
||||
"open-interest": "Open Interest",
|
||||
"oracle": "Oracle",
|
||||
"oracle-not-updated": "This oracle has not updated recently.",
|
||||
"oracle-not-updated-warning": "Actions will fail for accounts with a position in this token.",
|
||||
"oracle-price": "Oracle Price",
|
||||
"order-error": "Failed to place order",
|
||||
"order-type": "Order Type",
|
||||
"order-value": "Order Value",
|
||||
"orders": "Orders",
|
||||
"place-order": "Place {{side}} Order",
|
||||
"placing-order": "Placing Order",
|
||||
"positions": "Positions",
|
||||
"post": "Post",
|
||||
"preview-sound": "聲音預覽",
|
||||
"price-expect": "您收到的價格可能與您預期有差異,並且無法保證完全執行。為了您的安全,最大滑點保持為 2.5%。超過 2.5%滑點的部分不會被平倉。",
|
||||
"price-provided-by": "語言機來自",
|
||||
"quote": "計價",
|
||||
"reduce-only": "限減少",
|
||||
"sells": "賣單",
|
||||
"settle-funds": "借清資金",
|
||||
"settle-funds-error": "借清出錯",
|
||||
"short": "做空",
|
||||
"show-asks": "顯示要價",
|
||||
"show-bids": "顯示出價",
|
||||
"side": "方向",
|
||||
"size": "數量",
|
||||
"spread": "差價",
|
||||
"stable-price": "穩定價格",
|
||||
"taker": "吃單者",
|
||||
"taker-fee": "吃單者 Fee",
|
||||
"tick-size": "波動單位",
|
||||
"preview-sound": "Preview Sound",
|
||||
"price-expect": "The price you receive may be worse than you expect and full execution is not guaranteed. Max slippage is 2.5% for your safety. The part of your position with slippage beyond 2.5% will not be closed.",
|
||||
"price-provided-by": "Oracle by",
|
||||
"quote": "Quote",
|
||||
"realized-pnl": "Realized PnL",
|
||||
"reduce-only": "Reduce Only",
|
||||
"sells": "Sells",
|
||||
"settle-funds": "Settle Funds",
|
||||
"settle-funds-error": "Failed to settle funds",
|
||||
"short": "Short",
|
||||
"show-asks": "Show Asks",
|
||||
"show-bids": "Show Bids",
|
||||
"side": "Side",
|
||||
"size": "Size",
|
||||
"spread": "Spread",
|
||||
"stable-price": "Stable Price",
|
||||
"taker": "Taker",
|
||||
"taker-fee": "Taker Fee",
|
||||
"tick-size": "Tick Size",
|
||||
"tooltip-borrow-balance": "You'll use your {{balance}} {{token}} balance and borrow {{borrowAmount}} {{token}} to execute this trade. The current {{token}} variable borrow rate is {{rate}}%",
|
||||
"tooltip-borrow-no-balance": "You'll borrow {{borrowAmount}} {{token}} to execute this trade. The current {{token}} variable borrow rate is {{rate}}%",
|
||||
"tooltip-enable-margin": "為此交易啟用保證金",
|
||||
"tooltip-ioc": "IOC交易若不吃單就會被取消。任何無法立刻成交的部分將被取消",
|
||||
"tooltip-insured": "如果發生破產,{{tokenOrMarket}}損失是否可以從保險基金中歸還",
|
||||
"tooltip-post": "Post交易若不掛單就會被取消。",
|
||||
"tooltip-slippage": "當前價格與您的交易將執行的價格之間的差值的估計",
|
||||
"tooltip-stable-price": "穩定價格用於一個安全機制。此機制可以限制用戶在預言機價格快速波動時下風險高的訂單",
|
||||
"tooltip-volume-alert": "交易量警報設定",
|
||||
"trade-sounds-tooltip": "為每筆新交易播放警報聲音",
|
||||
"trades": "交易",
|
||||
"tweet-position": "分享至Twitter",
|
||||
"unsettled": "未結清",
|
||||
"volume-alert": "交易量警報",
|
||||
"volume-alert-desc": "交易量超過警報設定時播放聲音"
|
||||
"tooltip-enable-margin": "Enable spot margin for this trade",
|
||||
"tooltip-ioc": "Immediate-Or-Cancel (IOC) orders are guaranteed to be the taker and must be executed immediately. Any portion of the order that can't be filled immediately will be cancelled",
|
||||
"tooltip-insured": "Whether or not {{tokenOrMarket}} losses can be recovered from the insurance fund in the event of bankruptcies.",
|
||||
"tooltip-post": "Post orders are guaranteed to be the maker or they will be canceled",
|
||||
"tooltip-slippage": "An estimate of the difference between the current price and the price your trade will be executed at",
|
||||
"tooltip-volume-alert": "Volume Alert Settings",
|
||||
"tooltip-stable-price": "Stable price is used in a safety mechanism that limits a user's ability to enter risky positions when the oracle price is changing rapidly",
|
||||
"total-pnl": "Total PnL",
|
||||
"trade-sounds-tooltip": "Play a sound alert for every new trade",
|
||||
"trades": "Trades",
|
||||
"tweet-position": "Share to Twitter",
|
||||
"unrealized-pnl": "Unrealized PnL",
|
||||
"unsettled": "Unsettled",
|
||||
"volume-alert": "Volume Alert",
|
||||
"volume-alert-desc": "Play a sound whenever volume exceeds your alert threshold"
|
||||
}
|
|
@ -610,7 +610,7 @@ input[type='range']::-webkit-slider-runnable-track {
|
|||
}
|
||||
|
||||
.tooltip-underline {
|
||||
@apply default-transition w-max border-b border-dashed border-th-fgd-4 leading-tight hover:cursor-help hover:border-transparent;
|
||||
@apply default-transition w-max border-b border-dashed border-current leading-tight hover:cursor-help hover:border-transparent;
|
||||
}
|
||||
|
||||
.radial-gradient-bg {
|
||||
|
|
|
@ -21,10 +21,10 @@
|
|||
dependencies:
|
||||
ws "^8.13.0"
|
||||
|
||||
"@blockworks-foundation/mango-v4@^0.16.4":
|
||||
version "0.16.4"
|
||||
resolved "https://registry.yarnpkg.com/@blockworks-foundation/mango-v4/-/mango-v4-0.16.4.tgz#b1783c4c29ec7078ebe0af88bff15824edc7df16"
|
||||
integrity sha512-WzDPQ2iwAF1O4e9Dk0+DCzrJB8WChmo+xj4PVyNcqTaDFLwZtw4uW5swzFs7afLSfRXsIDzTec7BFK1JSoMB2Q==
|
||||
"@blockworks-foundation/mango-v4@0.16.5":
|
||||
version "0.16.5"
|
||||
resolved "https://registry.yarnpkg.com/@blockworks-foundation/mango-v4/-/mango-v4-0.16.5.tgz#4212f5a5eed1346a90740b61972e0b96ff87ac56"
|
||||
integrity sha512-SR1qbVLEa1L3NIl0UC/4jDYzcarpGmzDgSv59/HvFost90GgLiaVwXLmdsHB1dfFAKCwRS4BIpri3K+i8viDnA==
|
||||
dependencies:
|
||||
"@coral-xyz/anchor" "^0.27.0"
|
||||
"@project-serum/serum" "0.13.65"
|
||||
|
|
Loading…
Reference in New Issue