diff --git a/package.json b/package.json index 78619c1b8..2cd99369c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kwenta", - "version": "7.5.5", + "version": "7.6.0", "description": "Kwenta", "main": "index.js", "scripts": { diff --git a/packages/app/package.json b/packages/app/package.json index eb6e7abbd..757bd2d9f 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -1,6 +1,6 @@ { "name": "@kwenta/app", - "version": "7.5.5", + "version": "7.6.0", "scripts": { "dev": "next", "build": "next build", diff --git a/packages/app/src/assets/png/currencies/sSUSHI.png b/packages/app/src/assets/png/currencies/sSUSHI.png new file mode 100644 index 000000000..19ce08d95 Binary files /dev/null and b/packages/app/src/assets/png/currencies/sSUSHI.png differ diff --git a/packages/app/src/pages/dashboard/history.tsx b/packages/app/src/pages/dashboard/history.tsx index 4f2da7bd0..01bc45ef1 100644 --- a/packages/app/src/pages/dashboard/history.tsx +++ b/packages/app/src/pages/dashboard/history.tsx @@ -1,13 +1,19 @@ import Head from 'next/head' -import { ReactNode, useCallback, useState } from 'react' +import { ReactNode, useCallback, useMemo, useState } from 'react' import { useTranslation } from 'react-i18next' +import styled from 'styled-components' +import UploadIcon from 'assets/svg/futures/upload-icon.svg' +import { FlexDivCol, FlexDivRowCentered } from 'components/layout/flex' import { MobileHiddenView, MobileOnlyView } from 'components/Media' import Spacer from 'components/Spacer' +import { Body, Heading } from 'components/Text' import DashboardLayout from 'sections/dashboard/DashboardLayout' import HistoryTabs, { HistoryTab } from 'sections/dashboard/HistoryTabs' import TradesTab from 'sections/futures/MobileTrade/UserTabs/TradesTab' import { usePollDashboardFuturesData } from 'state/futures/hooks' +import { selectPositionsCsvData, selectTradesCsvData } from 'state/futures/selectors' +import { useAppSelector } from 'state/hooks' type HistoryPageProps = React.FC & { getLayout: (page: ReactNode) => JSX.Element } @@ -15,6 +21,8 @@ const HistoryPage: HistoryPageProps = () => { const { t } = useTranslation() usePollDashboardFuturesData() + const tradesCsvData = useAppSelector(selectTradesCsvData) + const positionsCsvData = useAppSelector(selectPositionsCsvData) const [currentTab, setCurrentTab] = useState(HistoryTab.Positions) @@ -25,13 +33,36 @@ const HistoryPage: HistoryPageProps = () => { [] ) + const file = useMemo( + () => + `data:text/csv;base64,${btoa( + currentTab === HistoryTab.Positions ? positionsCsvData : tradesCsvData + )}`, + [currentTab, positionsCsvData, tradesCsvData] + ) + const fileName = useMemo( + () => (currentTab === HistoryTab.Positions ? 'positions-history.csv' : 'trades-history.csv'), + [currentTab] + ) + return ( <> {t('dashboard-history.page-title')} - + + + + {t('dashboard-history.main-title')} + {t('dashboard-history.subtitle')} + + + {t('dashboard-history.export-btn')} + + + + @@ -42,6 +73,36 @@ const HistoryPage: HistoryPageProps = () => { ) } +const ExportButton = styled.a` + gap: 8px; + height: 36px; + display: flex; + font-size: 12px; + font-weight: 700; + padding: 10px 15px; + border-radius: 50px; + font-family: ${(props) => props.theme.fonts.regular}; + color: ${(props) => props.theme.colors.selectedTheme.newTheme.pill.gray.text}; + background: ${(props) => props.theme.colors.selectedTheme.newTheme.pill.gray.background}; + + svg { + width: 10px; + path { + fill: ${(props) => props.theme.colors.selectedTheme.newTheme.pill.gray.text}; + } + } + + &:hover { + color: ${(props) => props.theme.colors.selectedTheme.newTheme.pill.gray.hover.text}; + background: ${(props) => props.theme.colors.selectedTheme.newTheme.pill.gray.hover.background}; + svg { + path { + fill: ${(props) => props.theme.colors.selectedTheme.newTheme.pill.gray.hover.text}; + } + } + } +` + HistoryPage.getLayout = (page) => {page} export default HistoryPage diff --git a/packages/app/src/sections/dashboard/HistoryTabs.tsx b/packages/app/src/sections/dashboard/HistoryTabs.tsx index 5ef9a651a..eeed3b00e 100644 --- a/packages/app/src/sections/dashboard/HistoryTabs.tsx +++ b/packages/app/src/sections/dashboard/HistoryTabs.tsx @@ -7,7 +7,7 @@ import { TabPanel } from 'components/Tab' import TraderHistory from 'sections/futures/TraderHistory' import Trades from 'sections/futures/Trades' import { fetchPositionHistoryForTrader } from 'state/futures/actions' -import { selectUsersPositionHistory } from 'state/futures/selectors' +import { selectPositionsHistoryTableData } from 'state/futures/selectors' import { useAppDispatch, useAppSelector } from 'state/hooks' import { selectWallet } from 'state/wallet/selectors' import media from 'styles/media' @@ -26,7 +26,7 @@ const HistoryTabs: React.FC = ({ currentTab, onChangeTab }) => const { t } = useTranslation() const dispatch = useAppDispatch() const walletAddress = useAppSelector(selectWallet) - const positionHistory = useAppSelector(selectUsersPositionHistory) + const positionHistory = useAppSelector(selectPositionsHistoryTableData) useEffect(() => { dispatch(fetchPositionHistoryForTrader(walletAddress ?? '')) diff --git a/packages/app/src/sections/futures/TraderHistory.tsx b/packages/app/src/sections/futures/TraderHistory.tsx index 0b217814b..d5053d953 100644 --- a/packages/app/src/sections/futures/TraderHistory.tsx +++ b/packages/app/src/sections/futures/TraderHistory.tsx @@ -1,7 +1,5 @@ -import { ZERO_WEI } from '@kwenta/sdk/constants' -import { FuturesPositionHistory } from '@kwenta/sdk/dist/types' -import { getMarketName, MarketKeyByAsset } from '@kwenta/sdk/utils' -import { wei, WeiSource } from '@synthetixio/wei' +import { FuturesMarketKey, FuturesPositionHistory } from '@kwenta/sdk/types' +import Wei, { wei, WeiSource } from '@synthetixio/wei' import router from 'next/router' import { FC, memo, useMemo } from 'react' import { useTranslation } from 'react-i18next' @@ -15,16 +13,26 @@ import Table, { TableHeader, TableNoResults } from 'components/Table' import { Body } from 'components/Text' import ROUTES from 'constants/routes' import TimeDisplay from 'sections/futures/Trades/TimeDisplay' -import { selectFuturesPositions, selectQueryStatuses } from 'state/futures/selectors' +import { selectQueryStatuses } from 'state/futures/selectors' import { useAppSelector } from 'state/hooks' import { FetchStatus } from 'state/types' import { ExternalLink } from 'styles/common' import media from 'styles/media' +type PositionData = FuturesPositionHistory & { + rank: number + currencyIconKey: FuturesMarketKey + marketShortName: string + status: string + funding: Wei + pnl: Wei + pnlPct: string +} + type TraderHistoryProps = { trader: string traderEns?: string | null - positionHistory: FuturesPositionHistory[] + positionHistory: PositionData[] resetSelection: () => void compact?: boolean searchTerm?: string | undefined @@ -33,47 +41,16 @@ type TraderHistoryProps = { const TraderHistory: FC = memo( ({ trader, traderEns, positionHistory, resetSelection, compact, searchTerm }) => { const { t } = useTranslation() - const positions = useAppSelector(selectFuturesPositions) const { selectedTraderPositionHistory: queryStatus } = useAppSelector(selectQueryStatuses) let data = useMemo(() => { - return positionHistory - .sort((a, b) => b.timestamp - a.timestamp) - .map((stat, i) => { - const totalDeposit = stat.initialMargin.add(stat.totalDeposits) - const thisPosition = stat.isOpen - ? positions.find((p) => p.market.marketKey === stat.marketKey) - : null - - const funding = stat.netFunding.add( - thisPosition?.activePosition?.accruedFunding ?? ZERO_WEI - ) - const pnlWithFeesPaid = stat.pnl.sub(stat.feesPaid).add(funding) - - return { - ...stat, - rank: i + 1, - currencyIconKey: MarketKeyByAsset[stat.asset], - marketShortName: getMarketName(stat.asset), - status: stat.isOpen ? 'Open' : stat.isLiquidated ? 'Liquidated' : 'Closed', - funding, - pnl: pnlWithFeesPaid, - pnlPct: totalDeposit.gt(0) - ? `(${pnlWithFeesPaid - .div(stat.initialMargin.add(stat.totalDeposits)) - .mul(100) - .toNumber() - .toFixed(2)}%)` - : '0%', - } - }) - .filter((i) => - searchTerm?.length - ? i.marketShortName.toLowerCase().includes(searchTerm) || - i.status.toLowerCase().includes(searchTerm) - : true - ) - }, [positionHistory, positions, searchTerm]) + return positionHistory.filter((i) => + searchTerm?.length + ? i.marketShortName.toLowerCase().includes(searchTerm) || + i.status.toLowerCase().includes(searchTerm) + : true + ) + }, [positionHistory, searchTerm]) return ( <> diff --git a/packages/app/src/sections/futures/Trades/Trades.tsx b/packages/app/src/sections/futures/Trades/Trades.tsx index fc9a8d290..abcee536f 100644 --- a/packages/app/src/sections/futures/Trades/Trades.tsx +++ b/packages/app/src/sections/futures/Trades/Trades.tsx @@ -1,4 +1,4 @@ -import { formatDollars, formatNumber, getDisplayAsset } from '@kwenta/sdk/utils' +import { formatDollars, formatNumber } from '@kwenta/sdk/utils' import { useRouter } from 'next/router' import { FC, memo, useMemo } from 'react' import { useTranslation } from 'react-i18next' @@ -14,13 +14,15 @@ import { blockExplorer } from 'containers/Connector/Connector' import useIsL2 from 'hooks/useIsL2' import useNetworkSwitcher from 'hooks/useNetworkSwitcher' import useWindowSize from 'hooks/useWindowSize' -import { selectFuturesType, selectMarketAsset } from 'state/futures/common/selectors' -import { selectAllTradesForAccountType } from 'state/futures/selectors' +import { selectFuturesType } from 'state/futures/common/selectors' +import { + selectAllTradesForAccountType, + selectTradesHistoryTableData, +} from 'state/futures/selectors' import { selectSmartMarginQueryStatuses } from 'state/futures/smartMargin/selectors' import { useAppSelector } from 'state/hooks' import { FetchStatus } from 'state/types' -import { TradeStatus } from '../types' import TableMarketDetails from '../UserInfo/TableMarketDetails' import TimeDisplay from './TimeDisplay' @@ -34,9 +36,9 @@ const Trades: FC = memo(({ rounded = false, noBottom = true }) => { const { switchToL2 } = useNetworkSwitcher() const router = useRouter() const { lessThanWidth } = useWindowSize() - const marketAsset = useAppSelector(selectMarketAsset) const accountType = useAppSelector(selectFuturesType) const history = useAppSelector(selectAllTradesForAccountType) + const historyData = useAppSelector(selectTradesHistoryTableData) const { trades } = useAppSelector(selectSmartMarginQueryStatuses) const isLoading = !history.length && trades.status === FetchStatus.Loading @@ -44,31 +46,6 @@ const Trades: FC = memo(({ rounded = false, noBottom = true }) => { const isL2 = useIsL2() - const historyData = useMemo(() => { - return history.map((trade) => { - const pnl = trade?.pnl - const feesPaid = trade?.feesPaid - const netPnl = pnl.sub(feesPaid) - - return { - ...trade, - pnl, - feesPaid, - netPnl, - notionalValue: trade?.price.mul(trade?.size.abs()), - value: Number(trade?.price), - funding: Number(trade?.fundingAccrued), - amount: trade?.size.abs(), - time: trade?.timestamp * 1000, - id: trade?.txnHash, - asset: marketAsset, - displayAsset: getDisplayAsset(trade?.asset), - type: trade?.orderType, - status: trade?.positionClosed ? TradeStatus.CLOSED : TradeStatus.OPEN, - } - }) - }, [history, marketAsset]) - const columnsDeps = useMemo(() => [historyData], [historyData]) return lessThanWidth('xl') ? ( diff --git a/packages/app/src/sections/leaderboard/Leaderboard.tsx b/packages/app/src/sections/leaderboard/Leaderboard.tsx index 387cf5d6a..3356f09b0 100644 --- a/packages/app/src/sections/leaderboard/Leaderboard.tsx +++ b/packages/app/src/sections/leaderboard/Leaderboard.tsx @@ -13,10 +13,7 @@ import useENS from 'hooks/useENS' import { CompetitionBanner } from 'sections/shared/components/CompetitionBanner' import { fetchPositionHistoryForTrader } from 'state/futures/actions' import { setSelectedTrader } from 'state/futures/reducer' -import { - selectPositionHistoryForSelectedTrader, - selectSelectedTrader, -} from 'state/futures/selectors' +import { selectLeaderBoardTableData, selectSelectedTrader } from 'state/futures/selectors' import { useAppDispatch, useAppSelector, useFetchAction } from 'state/hooks' import { fetchLeaderboard } from 'state/stats/actions' import { setLeaderboardSearchTerm } from 'state/stats/reducer' @@ -57,7 +54,7 @@ const Leaderboard: FC = ({ compact, mobile }) => { const [searchAddress, setSearchAddress] = useState('') const wallet = useAppSelector(selectWallet) const selectedTrader = useAppSelector(selectSelectedTrader) - const positionHistory = useAppSelector(selectPositionHistoryForSelectedTrader) + const positionHistory = useAppSelector(selectLeaderBoardTableData) const searchEns = useENS(searchTerm) const leaderboardLoading = useAppSelector(selectLeaderboardLoading) diff --git a/packages/app/src/state/futures/crossMargin/actions.ts b/packages/app/src/state/futures/crossMargin/actions.ts index 305b1aed6..d3eab3c91 100644 --- a/packages/app/src/state/futures/crossMargin/actions.ts +++ b/packages/app/src/state/futures/crossMargin/actions.ts @@ -17,6 +17,7 @@ import Wei, { wei } from '@synthetixio/wei' import { debounce } from 'lodash' import { notifyError } from 'components/ErrorNotifier' +import { CROSS_MARGIN_ENABLED } from 'constants/defaults' import { monitorAndAwaitTransaction } from 'state/app/helpers' import { handleTransactionError, @@ -84,7 +85,7 @@ export const fetchV3Markets = createAsyncThunk< >('futures/fetchV3Markets', async (_, { getState, extra: { sdk } }) => { const supportedNetwork = selectCrossMarginSupportedNetwork(getState()) const networkId = selectNetwork(getState()) - if (!supportedNetwork) return + if (!supportedNetwork || !CROSS_MARGIN_ENABLED) return try { const v3Markets = await sdk.perpsV3.getMarkets() diff --git a/packages/app/src/state/futures/selectors.ts b/packages/app/src/state/futures/selectors.ts index ff7ee4b9d..c591a38b7 100644 --- a/packages/app/src/state/futures/selectors.ts +++ b/packages/app/src/state/futures/selectors.ts @@ -5,10 +5,11 @@ import { FuturesMarginType, FuturesMarket, } from '@kwenta/sdk/types' -import { truncateTimestamp } from '@kwenta/sdk/utils' +import { truncateTimestamp, getDisplayAsset } from '@kwenta/sdk/utils' import { createSelector } from '@reduxjs/toolkit' import { wei } from '@synthetixio/wei' +import { TradeStatus } from 'sections/futures/types' import { selectAllCrossMarginTrades, selectCrossMarginAccountData, @@ -38,6 +39,7 @@ import { unserializeTrades, stopLossValidity, takeProfitValidity, + formatPositionForTable, } from 'utils/futures' import { @@ -859,3 +861,108 @@ export const selectPendingOrdersCount = createSelector( (asyncCount, delayedOrders, type) => type === FuturesMarginType.CROSS_MARGIN ? asyncCount : delayedOrders.length ) + +export const selectLeaderBoardTableData = createSelector( + selectFuturesPositions, + selectPositionHistoryForSelectedTrader, + (positions, history) => formatPositionForTable(positions, history) +) + +export const selectPositionsHistoryTableData = createSelector( + selectFuturesPositions, + selectUsersPositionHistory, + (positions, history) => formatPositionForTable(positions, history) +) + +export const selectPositionsCsvData = createSelector(selectPositionsHistoryTableData, (data) => { + const csvCols = [ + 'Date/Time', + 'Market', + 'Status', + 'Trades', + 'Total Volume', + 'Realized P&L USD', + 'Realized P&L %', + 'Funding', + 'Tx Hash', + ] + let csvData = csvCols.join(',') + '\n' + + data.forEach((row: (typeof data)[number]) => { + const rowItems = [ + new Date(row.timestamp).toISOString(), + row.marketShortName, + row.status, + row.trades, + row.totalVolume.toNumber(), + row.pnl.toNumber(), + row.pnlPct.slice(1, -2), + row.funding.toNumber(), + row.transactionHash, + ] + csvData += rowItems.join(',') + '\n' + }) + return csvData +}) + +export const selectTradesHistoryTableData = createSelector( + selectMarketAsset, + selectAllTradesForAccountType, + (marketAsset, history) => { + return history.map((trade) => { + const pnl = trade?.pnl + const feesPaid = trade?.feesPaid + const netPnl = pnl.sub(feesPaid) + + return { + ...trade, + pnl, + feesPaid, + netPnl, + notionalValue: trade?.price.mul(trade?.size.abs()), + value: Number(trade?.price), + funding: Number(trade?.fundingAccrued), + amount: trade?.size.abs(), + time: trade?.timestamp * 1000, + id: trade?.txnHash, + asset: marketAsset, + displayAsset: getDisplayAsset(trade?.asset), + type: trade?.orderType, + status: trade?.positionClosed ? TradeStatus.CLOSED : TradeStatus.OPEN, + } + }) + } +) + +export const selectTradesCsvData = createSelector(selectTradesHistoryTableData, (data) => { + const csvCols = [ + 'Market', + 'Side', + 'Date/Time', + 'Asset Price', + 'Type', + 'Amount', + 'Value', + 'PnL USD', + 'Fees', + 'Tx Hash', + ] + let csvData = csvCols.join(',') + '\n' + + data.forEach((row: (typeof data)[number]) => { + const rowItems = [ + row.displayAsset, + row.side, + new Date(row.time).toISOString(), + row.price.toNumber(), + row.orderType, + row.amount.toNumber(), + row.notionalValue.toNumber(), + row.netPnl.toNumber(), + row.feesPaid.toNumber(), + row.id, + ] + csvData += rowItems.join(',') + '\n' + }) + return csvData +}) diff --git a/packages/app/src/translations/en.json b/packages/app/src/translations/en.json index 0a037b22d..6bd147485 100644 --- a/packages/app/src/translations/en.json +++ b/packages/app/src/translations/en.json @@ -650,7 +650,10 @@ "page-title": "Markets | Kwenta" }, "dashboard-history": { - "page-title": "Trade History | Kwenta" + "page-title": "Trade History | Kwenta", + "main-title": "Trade History", + "subtitle": "History of all past trades on Kwenta", + "export-btn": "Export" }, "dashboard-stake": { "page-title": "Staking | Kwenta" diff --git a/packages/app/src/utils/futures.ts b/packages/app/src/utils/futures.ts index 381f95152..40257d82d 100644 --- a/packages/app/src/utils/futures.ts +++ b/packages/app/src/utils/futures.ts @@ -1,3 +1,4 @@ +import { ZERO_WEI } from '@kwenta/sdk/constants' import { DelayedOrder, FuturesMarket, @@ -24,6 +25,7 @@ import { } from '@kwenta/sdk/utils' import Wei, { wei } from '@synthetixio/wei' import { TFunction } from 'i18next' +import { FuturesPositionTablePosition } from 'types/futures' import { DelayedOrderWithDetails, TradeSizeInputs } from 'state/futures/common/types' import { SmartMarginBalanceInfo } from 'state/futures/smartMargin/types' @@ -618,3 +620,37 @@ export const stopLossValidity = ( showWarning: percent.lt(SL_LIQ_PERCENT_WARN), } } + +export function formatPositionForTable( + positions: FuturesPositionTablePosition[], + history: FuturesPositionHistory[] +) { + return history + .sort((a, b) => b.timestamp - a.timestamp) + .map((stat, i) => { + const totalDeposit = stat.initialMargin.add(stat.totalDeposits) + const thisPosition = stat.isOpen + ? positions.find((p) => p.market.marketKey === stat.marketKey) + : null + + const funding = stat.netFunding.add(thisPosition?.activePosition?.accruedFunding ?? ZERO_WEI) + const pnlWithFeesPaid = stat.pnl.sub(stat.feesPaid).add(funding) + + return { + ...stat, + rank: i + 1, + currencyIconKey: MarketKeyByAsset[stat.asset], + marketShortName: getMarketName(stat.asset), + status: stat.isOpen ? 'Open' : stat.isLiquidated ? 'Liquidated' : 'Closed', + funding, + pnl: pnlWithFeesPaid, + pnlPct: totalDeposit.gt(0) + ? `(${pnlWithFeesPaid + .div(stat.initialMargin.add(stat.totalDeposits)) + .mul(100) + .toNumber() + .toFixed(2)}%)` + : '0%', + } + }) +} diff --git a/packages/app/src/utils/icons.ts b/packages/app/src/utils/icons.ts index f8e68259a..bb1691872 100644 --- a/packages/app/src/utils/icons.ts +++ b/packages/app/src/utils/icons.ts @@ -2,8 +2,10 @@ import { CRYPTO_CURRENCY_MAP } from '@kwenta/sdk/constants' import { FuturesMarketKey } from '@kwenta/sdk/types' import KWENTAIcon from 'assets/png/currencies/KWENTA.png' +import ONEINCHIcon from 'assets/png/currencies/s1INCH.png' import AAVEIcon from 'assets/png/currencies/sAAVE.png' import ADAIcon from 'assets/png/currencies/sADA.png' +import ALGOIcon from 'assets/png/currencies/sALGO.png' import APEIcon from 'assets/png/currencies/sAPECOIN.png' import APTIcon from 'assets/png/currencies/sAPT.png' import ARBIcon from 'assets/png/currencies/sARB.png' @@ -11,16 +13,20 @@ import ATOMIcon from 'assets/png/currencies/sATOM.png' import AUDIcon from 'assets/png/currencies/sAUD.png' import AVAXIcon from 'assets/png/currencies/sAVAX.png' import AXSIcon from 'assets/png/currencies/sAXS.png' +import BALIcon from 'assets/png/currencies/sBAL.png' import BCHIcon from 'assets/png/currencies/sBCH.png' import BLURIcon from 'assets/png/currencies/sBLUR.png' import BNBIcon from 'assets/png/currencies/sBNB.png' import BTCIcon from 'assets/png/currencies/sBTC.png' +import CELOIcon from 'assets/png/currencies/sCELO.png' import CHFIcon from 'assets/png/currencies/sCHF.png' import COMPIcon from 'assets/png/currencies/sCOMP.png' import CRVIcon from 'assets/png/currencies/sCRV.png' import DOGEIcon from 'assets/png/currencies/sDOGE.png' import DOTIcon from 'assets/png/currencies/sDOT.png' import DYDXIcon from 'assets/png/currencies/sDYDX.png' +import ENJIcon from 'assets/png/currencies/sENJ.png' +import EOSIcon from 'assets/png/currencies/sEOS.png' import ETCIcon from 'assets/png/currencies/sETC.png' import ETHIcon from 'assets/png/currencies/sETH.png' import ETHBTCIcon from 'assets/png/currencies/sETHBTC.png' @@ -29,11 +35,14 @@ import FILIcon from 'assets/png/currencies/sFIL.png' import FLOKIIcon from 'assets/png/currencies/sFLOKI.png' import FLOWIcon from 'assets/png/currencies/sFLOW.png' import FTMIcon from 'assets/png/currencies/sFTM.png' +import FXSIcon from 'assets/png/currencies/sFXS.png' import GBPIcon from 'assets/png/currencies/sGBP.png' import GMXIcon from 'assets/png/currencies/sGMX.png' +import ICPIcon from 'assets/png/currencies/sICP.png' import INJIcon from 'assets/png/currencies/sINJ.png' import INRIcon from 'assets/png/currencies/sINR.png' import JPYIcon from 'assets/png/currencies/sJPY.png' +import KNCIcon from 'assets/png/currencies/sKNC.png' import KRWIcon from 'assets/png/currencies/sKRW.png' import LDOIcon from 'assets/png/currencies/sLDO.png' import LINKIcon from 'assets/png/currencies/sLINK.png' @@ -44,29 +53,43 @@ import MKRIcon from 'assets/png/currencies/sMKR.png' import NEARIcon from 'assets/png/currencies/sNEAR.png' import SNXIcon from 'assets/png/currencies/SNX.png' import OILIcon from 'assets/png/currencies/sOIL.png' +import ONEIcon from 'assets/png/currencies/sONE.png' import OPIcon from 'assets/png/currencies/sOP.png' import PEPEIcon from 'assets/png/currencies/sPEPE.png' +import PERPIcon from 'assets/png/currencies/sPERP.png' +import RNDRIcon from 'assets/png/currencies/sRNDR.png' import RPLIcon from 'assets/png/currencies/sRPL.png' +import RUNEIcon from 'assets/png/currencies/sRUNE.png' +import SEIIcon from 'assets/png/currencies/sSEI.png' import SHIBIcon from 'assets/png/currencies/sSHIB.png' import SOLIcon from 'assets/png/currencies/sSOL.png' import STETHIcon from 'assets/png/currencies/sstETH.png' +import STETHETHIcon from 'assets/png/currencies/ssthETH.png' import SUIIcon from 'assets/png/currencies/sSUI.png' +import SUSHIIcon from 'assets/png/currencies/sSUSHI.png' import TRXIcon from 'assets/png/currencies/sTRX.png' +import UMAIcon from 'assets/png/currencies/sUMA.png' import UNIIcon from 'assets/png/currencies/sUNI.png' import USDIcon from 'assets/png/currencies/sUSD.png' import USDTIcon from 'assets/png/currencies/sUSDT.png' import WLDIcon from 'assets/png/currencies/sWLD.png' import XAGIcon from 'assets/png/currencies/sXAG.png' import XAUIcon from 'assets/png/currencies/sXAU.png' +import XLMIcon from 'assets/png/currencies/sXLM.png' import XMRIcon from 'assets/png/currencies/sXMR.png' import XRPIcon from 'assets/png/currencies/sXRP.png' +import XTZIcon from 'assets/png/currencies/sXTZ.png' import YFIIcon from 'assets/png/currencies/sYFI.png' +import ZECIcon from 'assets/png/currencies/sZEC.png' +import ZILIcon from 'assets/png/currencies/sZIL.png' +import ZRXIcon from 'assets/png/currencies/sZRX.png' import WBTCIcon from 'assets/png/currencies/WBTC.png' import { SynthsName } from 'constants/currency' export const SYNTH_ICONS: Record = { sAAVEPERP: AAVEIcon, sADAPERP: ADAIcon, + sALGOPERP: ALGOIcon, sAPEPERP: APEIcon, sAPTPERP: APTIcon, sARBPERP: ARBIcon, @@ -74,15 +97,19 @@ export const SYNTH_ICONS: Record = sAUDPERP: AUDIcon, sAVAXPERP: AVAXIcon, sAXSPERP: AXSIcon, + sBALPERP: BALIcon, sBCHPERP: BCHIcon, sBLURPERP: BLURIcon, sBNBPERP: BNBIcon, sBTCPERP: BTCIcon, + sCELOPERP: CELOIcon, sCOMPPERP: COMPIcon, sCRVPERP: CRVIcon, sDOGEPERP: DOGEIcon, sDOTPERP: DOTIcon, sDYDXPERP: DYDXIcon, + sENJPERP: ENJIcon, + sEOSPERP: EOSIcon, sETHPERP: ETHIcon, sETHBTCPERP: ETHBTCIcon, sETCPERP: ETCIcon, @@ -91,9 +118,12 @@ export const SYNTH_ICONS: Record = sFLOKIPERP: FLOKIIcon, sFLOWPERP: FLOWIcon, sFTMPERP: FTMIcon, + sFXSPERP: FXSIcon, sGBPPERP: GBPIcon, sGMXPERP: GMXIcon, + sICPPERP: ICPIcon, sINJPERP: INJIcon, + sKNCPERP: KNCIcon, sLINKPERP: LINKIcon, sLDOPERP: LDOIcon, sLTCPERP: LTCIcon, @@ -101,22 +131,35 @@ export const SYNTH_ICONS: Record = sMAVPERP: MAVIcon, sMKRPERP: MKRIcon, sNEARPERP: NEARIcon, + s1INCHPERP: ONEINCHIcon, + sONEPERP: ONEIcon, sOPPERP: OPIcon, sPEPEPERP: PEPEIcon, + sPERPPERP: PERPIcon, + sRNDRPERP: RNDRIcon, sRPLPERP: RPLIcon, + sRUNEPERP: RUNEIcon, sSHIBPERP: SHIBIcon, sSOLPERP: SOLIcon, sSTETHPERP: STETHIcon, + sSTETHETHPERP: STETHETHIcon, sSUIPERP: SUIIcon, + sSUSHIPERP: SUSHIIcon, sTRXPERP: TRXIcon, + sUMAPERP: UMAIcon, sUNIPERP: UNIIcon, sUSDTPERP: USDTIcon, sWLDPERP: WLDIcon, sXAUPERP: XAUIcon, sXAGPERP: XAGIcon, + sXLMPERP: XLMIcon, sXMRPERP: XMRIcon, sXRPPERP: XRPIcon, + sXTZPERP: XTZIcon, sYFIPERP: YFIIcon, + sZECPERP: ZECIcon, + sZILPERP: ZILIcon, + sZRXPERP: ZRXIcon, sAAVE: AAVEIcon, sADA: ADAIcon, sAPE: APEIcon, @@ -155,6 +198,7 @@ export const SYNTH_ICONS: Record = sNEAR: NEARIcon, sOP: OPIcon, sPEPE: PEPEIcon, + sSEIPERP: SEIIcon, sSHIB: SHIBIcon, sSOL: SOLIcon, sSTETH: STETHIcon, diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 3e8c153d9..feb8de462 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@kwenta/sdk", - "version": "1.0.8", + "version": "1.0.9", "description": "SDK for headless interaction with Kwenta", "main": "dist/index.js", "directories": { diff --git a/packages/sdk/src/constants/futures.ts b/packages/sdk/src/constants/futures.ts index 7ec64fc71..49e2799d0 100644 --- a/packages/sdk/src/constants/futures.ts +++ b/packages/sdk/src/constants/futures.ts @@ -595,6 +595,226 @@ export const MARKETS: Record = { testnet: '0x1fc18861232290221461220bd4e2acd1dcdfbc89c84092c93c18bdc7756c1588', }, }, + [FuturesMarketKey.sSEIPERP]: { + key: FuturesMarketKey.sSEIPERP, + asset: FuturesMarketAsset.SEI, + supports: 'both', + version: 2, + pythIds: { + mainnet: '0x53614f1cb0c031d4af66c04cb9c756234adad0e1cee85303795091499a4084eb', + testnet: '0x95f1aef92c74670d40f1f37ee6fb158ffd6a0f8913b07b9e61087f9b7273b11c', + }, + }, + [FuturesMarketKey.sRUNEPERP]: { + key: FuturesMarketKey.sRUNEPERP, + asset: FuturesMarketAsset.RUNE, + supports: 'both', + version: 2, + pythIds: { + mainnet: '0x5fcf71143bb70d41af4fa9aa1287e2efd3c5911cee59f909f915c9f61baacb1e', + testnet: '0xad0f7fb0bdefc9ec569499a1382b8404153deeff7f9e2fa1c7210dc245877160', + }, + }, + [FuturesMarketKey.sSUSHIPERP]: { + key: FuturesMarketKey.sSUSHIPERP, + asset: FuturesMarketAsset.SUSHI, + supports: 'both', + version: 2, + pythIds: { + mainnet: '0x26e4f737fde0263a9eea10ae63ac36dcedab2aaf629261a994e1eeb6ee0afe53', + testnet: '0x2167ece6ee3201b7b61f4cdc17bf2e874ca6ad850c390ba2c5a76d703a1b8cd2', + }, + }, + [FuturesMarketKey.sZECPERP]: { + key: FuturesMarketKey.sZECPERP, + asset: FuturesMarketAsset.ZEC, + supports: 'both', + version: 2, + pythIds: { + mainnet: '0xbe9b59d178f0d6a97ab4c343bff2aa69caa1eaae3e9048a65788c529b125bb24', + testnet: '0x683832447e2920e3d85ab52609be9822ad0da95de656b8acd9a8f0e3a3717895', + }, + }, + [FuturesMarketKey.sXTZPERP]: { + key: FuturesMarketKey.sXTZPERP, + asset: FuturesMarketAsset.XTZ, + supports: 'both', + version: 2, + pythIds: { + mainnet: '0x0affd4b8ad136a21d79bc82450a325ee12ff55a235abc242666e423b8bcffd03', + testnet: '0x7bb0f9786aaf74adc35b9d38f255c87cffb41362ff6a44c7d6795dfacbe7f5e8', + }, + }, + [FuturesMarketKey.sUMAPERP]: { + key: FuturesMarketKey.sUMAPERP, + asset: FuturesMarketAsset.UMA, + supports: 'testnet', + version: 2, + pythIds: { + mainnet: '0x4b78d251770732f6304b1f41e9bebaabc3b256985ef18988f6de8d6562dd254c', + testnet: '0xd34659f792d16725786fe9852f80a88dc7b38c338babb60c8519e12a86a15f62', + }, + }, + [FuturesMarketKey.sENJPERP]: { + key: FuturesMarketKey.sENJPERP, + asset: FuturesMarketAsset.ENJ, + supports: 'both', + version: 2, + pythIds: { + mainnet: '0x5cc254b7cb9532df39952aee2a6d5497b42ec2d2330c7b76147f695138dbd9f3', + testnet: '0xe974bc2bee67685ba3e58fc38b1d61578a1ce7703a1f3eb66bd304f8dce89147', + }, + }, + [FuturesMarketKey.sICPPERP]: { + key: FuturesMarketKey.sICPPERP, + asset: FuturesMarketAsset.ICP, + supports: 'both', + version: 2, + pythIds: { + mainnet: '0xc9907d786c5821547777780a1e4f89484f3417cb14dd244f2b0a34ea7a554d67', + testnet: '0xda0be66c19400cdfce7944ab8def8734cb3858c3f6b34b044deb95929b47c3ab', + }, + }, + [FuturesMarketKey.sXLMPERP]: { + key: FuturesMarketKey.sXLMPERP, + asset: FuturesMarketAsset.XLM, + supports: 'both', + version: 2, + pythIds: { + mainnet: '0xb7a8eba68a997cd0210c2e1e4ee811ad2d174b3611c22d9ebf16f4cb7e9ba850', + testnet: '0xae5645a4463f4b9656694576fe6096b9bce4d37a3bb2c5287ee3d149f1a16767', + }, + }, + [FuturesMarketKey.s1INCHPERP]: { + key: FuturesMarketKey.s1INCHPERP, + asset: FuturesMarketAsset.ONEINCH, + supports: 'both', + version: 2, + pythIds: { + mainnet: '0x63f341689d98a12ef60a5cff1d7f85c70a9e17bf1575f0e7c0b2512d48b1c8b3', + testnet: '0x19786f31e85d3598cecdab810b2787de0fc22c2cf98b4f16fb1e5bf567a0a431', + }, + }, + [FuturesMarketKey.sEOSPERP]: { + key: FuturesMarketKey.sEOSPERP, + asset: FuturesMarketAsset.EOS, + supports: 'both', + version: 2, + pythIds: { + mainnet: '0x06ade621dbc31ed0fc9255caaab984a468abe84164fb2ccc76f02a4636d97e31', + testnet: '0x5212f4bb90c861ed88a2024a435463ab41cacf6f5deeed7b085dca90b1f5cfa5', + }, + }, + [FuturesMarketKey.sCELOPERP]: { + key: FuturesMarketKey.sCELOPERP, + asset: FuturesMarketAsset.CELO, + supports: 'both', + version: 2, + pythIds: { + mainnet: '0x7d669ddcdd23d9ef1fa9a9cc022ba055ec900e91c4cb960f3c20429d4447a411', + testnet: '0xe75bf4f2cf9e9f6a91d3c3cfc00136e3ba7eaeb162084fdad818c68133dc8a24', + }, + }, + [FuturesMarketKey.sALGOPERP]: { + key: FuturesMarketKey.sALGOPERP, + asset: FuturesMarketAsset.ALGO, + supports: 'both', + version: 2, + pythIds: { + mainnet: '0xfa17ceaf30d19ba51112fdcc750cc83454776f47fb0112e4af07f15f4bb1ebc0', + testnet: '0x08f781a893bc9340140c5f89c8a96f438bcfae4d1474cc0f688e3a52892c7318', + }, + }, + [FuturesMarketKey.sZRXPERP]: { + key: FuturesMarketKey.sZRXPERP, + asset: FuturesMarketAsset.ZRX, + supports: 'testnet', + version: 2, + pythIds: { + mainnet: '0x7d17b9fe4ea7103be16b6836984fabbc889386d700ca5e5b3d34b7f92e449268', + testnet: '0x27b9bf666178e240712ec592884bf7654b12a9c98e6b70417c922c91370b262d', + }, + }, + [FuturesMarketKey.sBALPERP]: { + key: FuturesMarketKey.sBALPERP, + asset: FuturesMarketAsset.BAL, + supports: 'both', + version: 2, + pythIds: { + mainnet: '0x07ad7b4a7662d19a6bc675f6b467172d2f3947fa653ca97555a9b20236406628', + testnet: '0xf3295ef1efc8cb94518faade282e294e718dc65a03aa3b7912b894e61e0a6634', + }, + }, + [FuturesMarketKey.sFXSPERP]: { + key: FuturesMarketKey.sFXSPERP, + asset: FuturesMarketAsset.FXS, + supports: 'both', + version: 2, + pythIds: { + mainnet: '0x735f591e4fed988cd38df74d8fcedecf2fe8d9111664e0fd500db9aa78b316b1', + testnet: '0xac27da9472e28969d829c27312afb08c5f1866336384f0dbdf9a48af97cf28a0', + }, + }, + [FuturesMarketKey.sKNCPERP]: { + key: FuturesMarketKey.sKNCPERP, + asset: FuturesMarketAsset.KNC, + supports: 'both', + version: 2, + pythIds: { + mainnet: '0xb9ccc817bfeded3926af791f09f76c5ffbc9b789cac6e9699ec333a79cacbe2a', + testnet: '0x5befcdb06599c4126afeb0b20d751d6360a28a880c23222be2ee40be38c1fb26', + }, + }, + [FuturesMarketKey.sRNDRPERP]: { + key: FuturesMarketKey.sRNDRPERP, + asset: FuturesMarketAsset.RNDR, + supports: 'both', + version: 2, + pythIds: { + mainnet: '0xab7347771135fc733f8f38db462ba085ed3309955f42554a14fa13e855ac0e2f', + testnet: '0xa3cd2f847362125e84d0aebce2d341957b5941dcc07760dbf2782d6300f90128', + }, + }, + [FuturesMarketKey.sONEPERP]: { + key: FuturesMarketKey.sONEPERP, + asset: FuturesMarketAsset.ONE, + supports: 'both', + version: 2, + pythIds: { + mainnet: '0xc572690504b42b57a3f7aed6bd4aae08cbeeebdadcf130646a692fe73ec1e009', + testnet: '0x9b245faf19d2f3306b58821ef60b194d7b67eb5250635059d8eaae4a36337b28', + }, + }, + [FuturesMarketKey.sPERPPERP]: { + key: FuturesMarketKey.sPERPPERP, + asset: FuturesMarketAsset.PERP, + supports: 'both', + version: 2, + pythIds: { + mainnet: '0x944f2f908c5166e0732ea5b610599116cd8e1c41f47452697c1e84138b7184d6', + testnet: '0xf26cf0b5c71699e81f59384824c71b8cdcc29ce409f3e6934c8c18abe652a04f', + }, + }, + [FuturesMarketKey.sZILPERP]: { + key: FuturesMarketKey.sZILPERP, + asset: FuturesMarketAsset.ZIL, + supports: 'both', + version: 2, + pythIds: { + mainnet: '0x609722f3b6dc10fee07907fe86781d55eb9121cd0705b480954c00695d78f0cb', + testnet: '0x2206debd84882bbb4852896580279c34f4b5dff225301bf218380828a193a10e', + }, + }, + [FuturesMarketKey.sSTETHETHPERP]: { + key: FuturesMarketKey.sSTETHETHPERP, + asset: FuturesMarketAsset.STETHETH, + supports: 'testnet', + version: 2, + pythIds: { + mainnet: '0x3af6a3098c56f58ff47cc46dee4a5b1910e5c157f7f0b665952445867470d61f', + testnet: '0x51fa95fac7bb8a4790f5733e8b2040937e88e6d8ea8fe172cea56b204b059bc2', + }, + }, } export const MARKET_ASSETS_BY_PYTH_ID = Object.values(MARKETS) diff --git a/packages/sdk/src/queries/perpsV3.ts b/packages/sdk/src/queries/perpsV3.ts index 7e0fbac74..d09d209ea 100644 --- a/packages/sdk/src/queries/perpsV3.ts +++ b/packages/sdk/src/queries/perpsV3.ts @@ -18,8 +18,6 @@ export const queryPerpsV3Markets = async (sdk: KwentaSDK): Promise { + const graphqlSafeAssetName = /^\d/.test(asset) ? `_${asset}` : asset return gql` # last before timestamp - ${asset}: rateUpdates( + ${graphqlSafeAssetName}: rateUpdates( first: 1 where: { synth: "${getDisplayAsset(asset)?.toUpperCase() ?? asset}", timestamp_gte: $minTimestamp } orderBy: timestamp diff --git a/packages/sdk/src/types/futures.ts b/packages/sdk/src/types/futures.ts index 8550c8c10..16c4139ce 100644 --- a/packages/sdk/src/types/futures.ts +++ b/packages/sdk/src/types/futures.ts @@ -136,6 +136,28 @@ export enum FuturesMarketKey { sRPLPERP = 'sRPLPERP', sWLDPERP = 'sWLDPERP', sUSDTPERP = 'sUSDTPERP', + sSEIPERP = 'sSEIPERP', + sRUNEPERP = 'sRUNEPERP', + sSUSHIPERP = 'sSUSHIPERP', + sZECPERP = 'sZECPERP', + sXTZPERP = 'sXTZPERP', + sUMAPERP = 'sUMAPERP', + sENJPERP = 'sENJPERP', + sICPPERP = 'sICPPERP', + sXLMPERP = 'sXLMPERP', + s1INCHPERP = 's1INCHPERP', + sEOSPERP = 'sEOSPERP', + sCELOPERP = 'sCELOPERP', + sALGOPERP = 'sALGOPERP', + sZRXPERP = 'sZRXPERP', + sBALPERP = 'sBALPERP', + sFXSPERP = 'sFXSPERP', + sKNCPERP = 'sKNCPERP', + sRNDRPERP = 'sRNDRPERP', + sONEPERP = 'sONEPERP', + sPERPPERP = 'sPERPPERP', + sZILPERP = 'sZILPERP', + sSTETHETHPERP = 'sSTETHETHPERP', } export enum FuturesMarketAsset { @@ -191,6 +213,28 @@ export enum FuturesMarketAsset { RPL = 'RPL', WLD = 'WLD', USDT = 'USDT', + SEI = 'SEI', + RUNE = 'RUNE', + SUSHI = 'SUSHI', + ZEC = 'ZEC', + XTZ = 'XTZ', + UMA = 'UMA', + ENJ = 'ENJ', + ICP = 'ICP', + XLM = 'XLM', + ONEINCH = '1INCH', + EOS = 'EOS', + CELO = 'CELO', + ALGO = 'ALGO', + ZRX = 'ZRX', + BAL = 'BAL', + FXS = 'FXS', + KNC = 'KNC', + RNDR = 'RNDR', + ONE = 'ONE', + PERP = 'PERP', + ZIL = 'ZIL', + STETHETH = 'STETHETH', } export interface FuturesMarketConfig { diff --git a/packages/sdk/src/utils/futures.ts b/packages/sdk/src/utils/futures.ts index 50e04c451..b0201d5a9 100644 --- a/packages/sdk/src/utils/futures.ts +++ b/packages/sdk/src/utils/futures.ts @@ -777,6 +777,28 @@ export const MarketAssetByKey: Record = { [FuturesMarketKey.sRPLPERP]: FuturesMarketAsset.RPL, [FuturesMarketKey.sWLDPERP]: FuturesMarketAsset.WLD, [FuturesMarketKey.sUSDTPERP]: FuturesMarketAsset.USDT, + [FuturesMarketKey.sSEIPERP]: FuturesMarketAsset.SEI, + [FuturesMarketKey.sRUNEPERP]: FuturesMarketAsset.RUNE, + [FuturesMarketKey.sSUSHIPERP]: FuturesMarketAsset.SUSHI, + [FuturesMarketKey.sZECPERP]: FuturesMarketAsset.ZEC, + [FuturesMarketKey.sXTZPERP]: FuturesMarketAsset.XTZ, + [FuturesMarketKey.sUMAPERP]: FuturesMarketAsset.UMA, + [FuturesMarketKey.sENJPERP]: FuturesMarketAsset.ENJ, + [FuturesMarketKey.sICPPERP]: FuturesMarketAsset.ICP, + [FuturesMarketKey.sXLMPERP]: FuturesMarketAsset.XLM, + [FuturesMarketKey.s1INCHPERP]: FuturesMarketAsset.ONEINCH, + [FuturesMarketKey.sEOSPERP]: FuturesMarketAsset.EOS, + [FuturesMarketKey.sCELOPERP]: FuturesMarketAsset.CELO, + [FuturesMarketKey.sALGOPERP]: FuturesMarketAsset.ALGO, + [FuturesMarketKey.sZRXPERP]: FuturesMarketAsset.ZRX, + [FuturesMarketKey.sBALPERP]: FuturesMarketAsset.BAL, + [FuturesMarketKey.sFXSPERP]: FuturesMarketAsset.FXS, + [FuturesMarketKey.sKNCPERP]: FuturesMarketAsset.KNC, + [FuturesMarketKey.sRNDRPERP]: FuturesMarketAsset.RNDR, + [FuturesMarketKey.sONEPERP]: FuturesMarketAsset.ONE, + [FuturesMarketKey.sPERPPERP]: FuturesMarketAsset.PERP, + [FuturesMarketKey.sZILPERP]: FuturesMarketAsset.ZIL, + [FuturesMarketKey.sSTETHETHPERP]: FuturesMarketAsset.STETHETH, } as const export const MarketKeyByAsset: Record = { @@ -832,6 +854,28 @@ export const MarketKeyByAsset: Record = { [FuturesMarketAsset.RPL]: FuturesMarketKey.sRPLPERP, [FuturesMarketAsset.WLD]: FuturesMarketKey.sWLDPERP, [FuturesMarketAsset.USDT]: FuturesMarketKey.sUSDTPERP, + [FuturesMarketAsset.SEI]: FuturesMarketKey.sSEIPERP, + [FuturesMarketAsset.RUNE]: FuturesMarketKey.sRUNEPERP, + [FuturesMarketAsset.SUSHI]: FuturesMarketKey.sSUSHIPERP, + [FuturesMarketAsset.ZEC]: FuturesMarketKey.sZECPERP, + [FuturesMarketAsset.XTZ]: FuturesMarketKey.sXTZPERP, + [FuturesMarketAsset.UMA]: FuturesMarketKey.sUMAPERP, + [FuturesMarketAsset.ENJ]: FuturesMarketKey.sENJPERP, + [FuturesMarketAsset.ICP]: FuturesMarketKey.sICPPERP, + [FuturesMarketAsset.XLM]: FuturesMarketKey.sXLMPERP, + [FuturesMarketAsset.ONEINCH]: FuturesMarketKey.s1INCHPERP, + [FuturesMarketAsset.EOS]: FuturesMarketKey.sEOSPERP, + [FuturesMarketAsset.CELO]: FuturesMarketKey.sCELOPERP, + [FuturesMarketAsset.ALGO]: FuturesMarketKey.sALGOPERP, + [FuturesMarketAsset.ZRX]: FuturesMarketKey.sZRXPERP, + [FuturesMarketAsset.BAL]: FuturesMarketKey.sBALPERP, + [FuturesMarketAsset.FXS]: FuturesMarketKey.sFXSPERP, + [FuturesMarketAsset.KNC]: FuturesMarketKey.sKNCPERP, + [FuturesMarketAsset.RNDR]: FuturesMarketKey.sRNDRPERP, + [FuturesMarketAsset.ONE]: FuturesMarketKey.sONEPERP, + [FuturesMarketAsset.PERP]: FuturesMarketKey.sPERPPERP, + [FuturesMarketAsset.ZIL]: FuturesMarketKey.sZILPERP, + [FuturesMarketAsset.STETHETH]: FuturesMarketKey.sSTETHETHPERP, } as const export const AssetDisplayByAsset: Record = { @@ -887,6 +931,28 @@ export const AssetDisplayByAsset: Record = { [FuturesMarketAsset.RPL]: 'Rocket Pool', [FuturesMarketAsset.WLD]: 'Worldcoin', [FuturesMarketAsset.USDT]: 'Tether', + [FuturesMarketAsset.SEI]: 'Sei', + [FuturesMarketAsset.RUNE]: 'THORChain', + [FuturesMarketAsset.SUSHI]: 'Sushi', + [FuturesMarketAsset.ZEC]: 'Zcash', + [FuturesMarketAsset.XTZ]: 'Tezos', + [FuturesMarketAsset.UMA]: 'UMA', + [FuturesMarketAsset.ENJ]: 'Enjin', + [FuturesMarketAsset.ICP]: 'Internet Computer', + [FuturesMarketAsset.XLM]: 'Stellar', + [FuturesMarketAsset.ONEINCH]: '1inch', + [FuturesMarketAsset.EOS]: 'EOS', + [FuturesMarketAsset.CELO]: 'Celo', + [FuturesMarketAsset.ALGO]: 'Algorand', + [FuturesMarketAsset.ZRX]: '0x', + [FuturesMarketAsset.BAL]: 'Balancer', + [FuturesMarketAsset.FXS]: 'Frax Share', + [FuturesMarketAsset.KNC]: 'Kyber Network Crystal', + [FuturesMarketAsset.RNDR]: 'Render', + [FuturesMarketAsset.ONE]: 'One', + [FuturesMarketAsset.PERP]: 'Perpetual Protocol', + [FuturesMarketAsset.ZIL]: 'Zilliqa', + [FuturesMarketAsset.STETHETH]: 'Lido stETH/ETH Ratio', } as const export const PerpsV3SymbolToMarketKey: Record = {