2023-05-16 16:57:36 +00:00
|
|
|
import { DepthChartContainer } from '@vegaprotocol/market-depth';
|
2023-08-10 15:02:46 +00:00
|
|
|
import { Filter, OpenOrdersMenu } from '@vegaprotocol/orders';
|
2023-12-28 12:33:18 +00:00
|
|
|
import {
|
|
|
|
TradesContainer,
|
|
|
|
TradesSettings,
|
|
|
|
} from '../../components/trades-container';
|
2023-07-24 08:37:18 +00:00
|
|
|
import { OrderbookContainer } from '../../components/orderbook-container';
|
2023-12-28 12:33:18 +00:00
|
|
|
import {
|
|
|
|
FillsContainer,
|
|
|
|
FillsSettings,
|
|
|
|
} from '../../components/fills-container';
|
|
|
|
import {
|
|
|
|
PositionsContainer,
|
|
|
|
PositionsSettings,
|
|
|
|
} from '../../components/positions-container';
|
|
|
|
import {
|
|
|
|
AccountsContainer,
|
|
|
|
AccountsSettings,
|
|
|
|
} from '../../components/accounts-container';
|
2023-06-27 00:10:22 +00:00
|
|
|
import { LiquidityContainer } from '../../components/liquidity-container';
|
2023-09-20 09:11:03 +00:00
|
|
|
import { FundingContainer } from '../../components/funding-container';
|
2023-12-28 12:33:18 +00:00
|
|
|
import {
|
|
|
|
FundingPaymentsContainer,
|
|
|
|
FundingPaymentsSettings,
|
|
|
|
} from '../../components/funding-payments-container';
|
|
|
|
import {
|
|
|
|
OrdersContainer,
|
|
|
|
OrdersSettings,
|
|
|
|
} from '../../components/orders-container';
|
|
|
|
import {
|
|
|
|
StopOrdersContainer,
|
|
|
|
StopOrdersSettings,
|
|
|
|
} from '../../components/stop-orders-container';
|
2023-08-10 15:02:46 +00:00
|
|
|
import { AccountsMenu } from '../../components/accounts-menu';
|
2023-08-22 09:17:10 +00:00
|
|
|
import { PositionsMenu } from '../../components/positions-menu';
|
2023-12-13 01:33:41 +00:00
|
|
|
import { ChartContainer, ChartMenu } from '../../components/chart-container';
|
2023-05-16 16:57:36 +00:00
|
|
|
|
|
|
|
export type TradingView = keyof typeof TradingViews;
|
|
|
|
|
|
|
|
export const TradingViews = {
|
2023-12-13 01:33:41 +00:00
|
|
|
chart: {
|
|
|
|
component: ChartContainer,
|
|
|
|
menu: ChartMenu,
|
2023-05-16 16:57:36 +00:00
|
|
|
},
|
|
|
|
depth: {
|
2023-11-16 03:10:39 +00:00
|
|
|
component: DepthChartContainer,
|
2023-05-16 16:57:36 +00:00
|
|
|
},
|
|
|
|
liquidity: {
|
2023-11-16 03:10:39 +00:00
|
|
|
component: LiquidityContainer,
|
2023-05-16 16:57:36 +00:00
|
|
|
},
|
2023-09-20 09:11:03 +00:00
|
|
|
funding: {
|
2023-11-16 03:10:39 +00:00
|
|
|
component: FundingContainer,
|
2023-09-20 09:11:03 +00:00
|
|
|
},
|
2023-10-09 14:59:00 +00:00
|
|
|
fundingPayments: {
|
|
|
|
component: FundingPaymentsContainer,
|
2023-12-28 12:33:18 +00:00
|
|
|
settings: FundingPaymentsSettings,
|
2023-10-09 14:59:00 +00:00
|
|
|
},
|
2023-05-16 16:57:36 +00:00
|
|
|
orderbook: {
|
2023-11-16 03:10:39 +00:00
|
|
|
component: OrderbookContainer,
|
2023-05-16 16:57:36 +00:00
|
|
|
},
|
|
|
|
trades: {
|
2023-11-16 03:10:39 +00:00
|
|
|
component: TradesContainer,
|
2023-12-28 12:33:18 +00:00
|
|
|
settings: TradesSettings,
|
2023-05-16 16:57:36 +00:00
|
|
|
},
|
2023-08-22 09:17:10 +00:00
|
|
|
positions: {
|
|
|
|
component: PositionsContainer,
|
|
|
|
menu: PositionsMenu,
|
2023-12-28 12:33:18 +00:00
|
|
|
settings: PositionsSettings,
|
2023-08-22 09:17:10 +00:00
|
|
|
},
|
2023-05-16 16:57:36 +00:00
|
|
|
activeOrders: {
|
2023-11-16 03:10:39 +00:00
|
|
|
component: () => <OrdersContainer filter={Filter.Open} />,
|
2023-08-10 15:02:46 +00:00
|
|
|
menu: OpenOrdersMenu,
|
2023-12-28 12:33:18 +00:00
|
|
|
settings: () => <OrdersSettings filter={Filter.Open} />,
|
2023-05-16 16:57:36 +00:00
|
|
|
},
|
|
|
|
closedOrders: {
|
2023-11-16 03:10:39 +00:00
|
|
|
component: () => <OrdersContainer filter={Filter.Closed} />,
|
2023-12-28 12:33:18 +00:00
|
|
|
settings: () => <OrdersSettings filter={Filter.Closed} />,
|
2023-05-16 16:57:36 +00:00
|
|
|
},
|
|
|
|
rejectedOrders: {
|
2023-11-16 03:10:39 +00:00
|
|
|
component: () => <OrdersContainer filter={Filter.Rejected} />,
|
2023-12-28 12:33:18 +00:00
|
|
|
settings: () => <OrdersSettings filter={Filter.Rejected} />,
|
2023-05-16 16:57:36 +00:00
|
|
|
},
|
|
|
|
orders: {
|
2023-06-27 00:10:22 +00:00
|
|
|
component: OrdersContainer,
|
2023-08-10 15:02:46 +00:00
|
|
|
menu: OpenOrdersMenu,
|
2023-12-28 12:33:18 +00:00
|
|
|
settings: OrdersSettings,
|
2023-05-16 16:57:36 +00:00
|
|
|
},
|
2023-08-02 10:28:33 +00:00
|
|
|
stopOrders: {
|
|
|
|
component: StopOrdersContainer,
|
2023-12-28 12:33:18 +00:00
|
|
|
settings: StopOrdersSettings,
|
2023-08-02 10:28:33 +00:00
|
|
|
},
|
2023-08-10 15:02:46 +00:00
|
|
|
collateral: {
|
|
|
|
component: AccountsContainer,
|
|
|
|
menu: AccountsMenu,
|
2023-12-28 12:33:18 +00:00
|
|
|
settings: AccountsSettings,
|
2023-08-10 15:02:46 +00:00
|
|
|
},
|
2023-12-28 12:33:18 +00:00
|
|
|
fills: { component: FillsContainer, settings: FillsSettings },
|
2023-11-16 03:10:39 +00:00
|
|
|
} as const;
|