Skip to content

Commit

Permalink
Merge pull request #1471 from 0xoscario/616-quick-perps-funding-rate
Browse files Browse the repository at this point in the history
616 quick perps funding rate
  • Loading branch information
totop716 authored Jul 6, 2024
2 parents 39fd8ca + c354a5f commit 98dbe7b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/pages/PerpsPage/GraphHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Box, Popover, useMediaQuery, useTheme } from '@material-ui/core';
import { formatNumber, getPerpsSymbol } from 'utils';
import { SearchInput } from 'components';
import { LeverageManage } from './LeverageManage';
import { formatDollarAmount } from 'utils/numbers';

interface Props {
tokenSymbol: string;
Expand Down Expand Up @@ -218,22 +219,26 @@ export const GraphHeader: React.FC<Props> = ({
<Box>
<p className='span text-secondary'>Funding Rate Long</p>
<p className='span'>
<span className='text-error'>-{token?.est_funding_rate}%</span>{' '}
<span className='text-error'>
-{parseFloat(token?.est_funding_rate) * 100}%
</span>{' '}
in {timeDifference}
</p>
</Box>
<Box>
<p className='span text-secondary'>Funding Rate Short</p>
<p className='span'>
<span className='text-success'>
+{token?.est_funding_rate}%
+{parseFloat(token?.est_funding_rate) * 100}%
</span>{' '}
in {timeDifference}
</p>
</Box>
<Box>
<p className='span text-secondary'>Open Interest</p>
<p className='span'>{token?.open_interest}</p>
<p className='span'>
{formatDollarAmount(token?.mark_price * token?.open_interest)}
</p>
</Box>
</>
)}
Expand Down

0 comments on commit 98dbe7b

Please sign in to comment.