Skip to content

Commit 069ed49

Browse files
committed
24/5 ingestion and table filtering update
1 parent b7269a8 commit 069ed49

File tree

3 files changed

+348
-68
lines changed

3 files changed

+348
-68
lines changed

src/content/data-streams/market-hours.mdx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,23 @@ RWA markets operate during specific hours, with breaks for holidays and sometime
7171
| **Precious Metals (Spot)**<br/>(XAU, XAG) | **18:00 Sun** | **17:00 Fri** | 17:00–18:00 Mon-Thu | Jan 1, Good Fri, Dec 25 |
7272
| **Commodities** <br/> (WTI Synthetic Spot) | **18:00 Sun** | **17:00 Fri** | 17:00–18:00 Mon-Thu | [NYMEX holiday calendar](https://www.cmegroup.com/tools-information/holiday-calendar/) |
7373

74+
### US Equities 24/5 Trading Sessions
75+
76+
For feeds using the [RWA Advanced (v11) schema](/data-streams/reference/report-schema-v11), US Equities are available across three distinct trading sessions, providing 24/5 coverage:
77+
78+
| Session | Hours (ET) | `marketStatus` Value | Description |
79+
| ------------------- | ------------------------------------- | ------------------------------------ | ---------------------------------------------- |
80+
| **Regular Hours** | 9:30am–4:00pm Mon–Fri | `2` (Regular hours) | Primary trading session with highest liquidity |
81+
| **Extended Hours** | 4:00am–9:30am & 4:00pm–8:00pm Mon–Fri | `1` (Pre-market) & `3` (Post-market) | Pre-market and post-market sessions |
82+
| **Overnight Hours** | 8:00pm–4:00am Sun evening–Fri morning | `4` (Overnight) | Overnight session with limited liquidity |
83+
84+
**Additional `marketStatus` values:**
85+
86+
- `0` (Unknown) — Market status cannot be determined
87+
- `5` (Weekend) — Weekend period: 8:00pm Fri–8:00pm Sun
88+
89+
See the [24/5 US Equities User Guide](/data-streams/rwa-streams/24-5-us-equities-user-guide) for detailed information on building continuous price feeds and managing session transitions.
90+
7491
\* Times shown as **HH:MM ET**.
7592
\*\* Half-day trading may apply on the eve of certain U.S. holidays (e.g., Jul 3, Nov 28). Consult the linked exchange calendars for exact cut-off times.
7693

src/features/feeds/components/FeedList.tsx

Lines changed: 119 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export type DataFeedType =
2929

3030
type SchemaFilterValue = "all" | "v8" | "v11"
3131
type StreamsRwaFeedTypeValue = "all" | "datalink" | "equities" | "forex"
32+
type TradingHoursFilterValue = "all" | "regular" | "extended" | "overnight"
3233

3334
type FilterOption<T extends string> = {
3435
label: string
@@ -59,10 +60,19 @@ const feedTypeFilterOptions: FilterOption<StreamsRwaFeedTypeValue>[] = [
5960
{ label: "Forex Streams", value: "forex" },
6061
]
6162

63+
const tradingHoursFilterOptions: FilterOption<TradingHoursFilterValue>[] = [
64+
{ label: "All Time Segments", value: "all" },
65+
{ label: "Regular Hours", value: "regular" },
66+
{ label: "Extended Hours", value: "extended" },
67+
{ label: "Overnight Hours", value: "overnight" },
68+
]
69+
6270
const isSchemaFilterValue = (value: unknown): value is SchemaFilterValue =>
6371
value === "all" || value === "v8" || value === "v11"
6472
const isStreamsRwaFeedTypeValue = (value: unknown): value is StreamsRwaFeedTypeValue =>
6573
value === "all" || value === "datalink" || value === "equities" || value === "forex"
74+
const isTradingHoursFilterValue = (value: unknown): value is TradingHoursFilterValue =>
75+
value === "all" || value === "regular" || value === "extended" || value === "overnight"
6676

6777
const FilterDropdown = <T extends string>({
6878
label,
@@ -288,6 +298,19 @@ export const FeedList = ({
288298
const [showOnlySVR, setShowOnlySVR] = useState(false)
289299
const [showOnlyDEXFeeds, setShowOnlyDEXFeeds] = useState(false)
290300
const [showOnlyDEXFeedsTestnet, setShowOnlyDEXFeedsTestnet] = useState(false)
301+
const [show24x5FeedsParam, setShow24x5FeedsParam] = useQueryString("show24x5")
302+
const show24x5Feeds = show24x5FeedsParam === "true"
303+
const setShow24x5Feeds = (value: boolean) => {
304+
setShow24x5FeedsParam(value ? "true" : [])
305+
}
306+
const [tradingHoursFilterParam, setTradingHoursFilterParam] = useQueryString("tradingHours")
307+
const tradingHoursFilter =
308+
typeof tradingHoursFilterParam === "string" && isTradingHoursFilterValue(tradingHoursFilterParam)
309+
? tradingHoursFilterParam
310+
: "all"
311+
const setTradingHoursFilter = (next: TradingHoursFilterValue) => {
312+
setTradingHoursFilterParam(next === "all" ? [] : next)
313+
}
291314
const [rwaSchemaFilterParam, setRwaSchemaFilterParam] = useQueryString("schema")
292315
const rwaSchemaFilter =
293316
typeof rwaSchemaFilterParam === "string" && isSchemaFilterValue(rwaSchemaFilterParam) ? rwaSchemaFilterParam : "all"
@@ -302,6 +325,19 @@ export const FeedList = ({
302325
const setTestnetRwaSchemaFilter = (next: SchemaFilterValue) => {
303326
setTestnetRwaSchemaFilterParam(next === "all" ? [] : next)
304327
}
328+
const [show24x5FeedsTestnetParam, setShow24x5FeedsTestnetParam] = useQueryString("testnetShow24x5")
329+
const show24x5FeedsTestnet = show24x5FeedsTestnetParam === "true"
330+
const setShow24x5FeedsTestnet = (value: boolean) => {
331+
setShow24x5FeedsTestnetParam(value ? "true" : [])
332+
}
333+
const [testnetTradingHoursFilterParam, setTestnetTradingHoursFilterParam] = useQueryString("testnetTradingHours")
334+
const testnetTradingHoursFilter =
335+
typeof testnetTradingHoursFilterParam === "string" && isTradingHoursFilterValue(testnetTradingHoursFilterParam)
336+
? testnetTradingHoursFilterParam
337+
: "all"
338+
const setTestnetTradingHoursFilter = (next: TradingHoursFilterValue) => {
339+
setTestnetTradingHoursFilterParam(next === "all" ? [] : next)
340+
}
305341
const [openDropdownId, setOpenDropdownId] = useState<string | null>(null)
306342
const handleDropdownToggle = (dropdownId: string, isOpen: boolean) => {
307343
setOpenDropdownId((current) => {
@@ -827,7 +863,42 @@ export const FeedList = ({
827863
setCurrentPage("1")
828864
}}
829865
/>
830-
{(searchValue || rwaSchemaFilter !== "all" || streamCategoryFilter !== "all") && (
866+
<div className={feedList.checkboxContainer}>
867+
<label className={feedList.detailsLabel}>
868+
<input
869+
type="checkbox"
870+
style="width:15px;height:15px;display:inline;margin-right:8px;"
871+
checked={show24x5Feeds}
872+
onChange={() => {
873+
closeAllDropdowns()
874+
const newValue = !show24x5Feeds
875+
setShow24x5Feeds(newValue)
876+
if (newValue) {
877+
// Reset trading hours filter when enabling 24/5
878+
setTradingHoursFilter("all")
879+
}
880+
setCurrentPage("1")
881+
}}
882+
/>
883+
Show only 24/5 Equity Streams
884+
</label>
885+
</div>
886+
{show24x5Feeds && (
887+
<FilterDropdown
888+
isOpen={openDropdownId === "main-trading-hours"}
889+
onToggle={(isOpen) => handleDropdownToggle("main-trading-hours", isOpen)}
890+
onClose={closeAllDropdowns}
891+
label="Time segment"
892+
options={tradingHoursFilterOptions}
893+
value={tradingHoursFilter}
894+
groupId="trading-hours-main"
895+
onSelect={(next) => {
896+
setTradingHoursFilter(next)
897+
setCurrentPage("1")
898+
}}
899+
/>
900+
)}
901+
{(searchValue || rwaSchemaFilter !== "all" || streamCategoryFilter !== "all" || show24x5Feeds) && (
831902
<button
832903
type="button"
833904
className={clsx(button.secondary, feedList.clearFilterBtn)}
@@ -836,6 +907,8 @@ export const FeedList = ({
836907
setSearchValue("")
837908
setRwaSchemaFilter("all")
838909
setStreamCategoryFilter("all")
910+
setShow24x5Feeds(false)
911+
setTradingHoursFilter("all")
839912
setCurrentPage("1")
840913
const inputElement = document.getElementById("search") as HTMLInputElement
841914
if (inputElement) {
@@ -869,6 +942,8 @@ export const FeedList = ({
869942
showOnlyDEXFeeds={showOnlyDEXFeeds}
870943
rwaSchemaFilter={rwaSchemaFilter}
871944
streamCategoryFilter={streamCategoryFilter}
945+
show24x5Feeds={show24x5Feeds}
946+
tradingHoursFilter={tradingHoursFilter}
872947
dataFeedType={dataFeedType}
873948
ecosystem={ecosystem}
874949
lastAddr={lastAddr}
@@ -947,7 +1022,45 @@ export const FeedList = ({
9471022
setTestnetCurrentPage("1")
9481023
}}
9491024
/>
950-
{(testnetSearchValue || testnetRwaSchemaFilter !== "all" || testnetStreamCategoryFilter !== "all") && (
1025+
<div className={feedList.checkboxContainer}>
1026+
<label className={feedList.detailsLabel}>
1027+
<input
1028+
type="checkbox"
1029+
style="width:15px;height:15px;display:inline;margin-right:8px;"
1030+
checked={show24x5FeedsTestnet}
1031+
onChange={() => {
1032+
closeAllDropdowns()
1033+
const newValue = !show24x5FeedsTestnet
1034+
setShow24x5FeedsTestnet(newValue)
1035+
if (newValue) {
1036+
// Reset trading hours filter when enabling 24/5
1037+
setTestnetTradingHoursFilter("all")
1038+
}
1039+
setTestnetCurrentPage("1")
1040+
}}
1041+
/>
1042+
Show only 24/5 Equity Streams
1043+
</label>
1044+
</div>
1045+
{show24x5FeedsTestnet && (
1046+
<FilterDropdown
1047+
isOpen={openDropdownId === "test-trading-hours"}
1048+
onToggle={(isOpen) => handleDropdownToggle("test-trading-hours", isOpen)}
1049+
onClose={closeAllDropdowns}
1050+
label="Time segment"
1051+
options={tradingHoursFilterOptions}
1052+
value={testnetTradingHoursFilter}
1053+
groupId="trading-hours-testnet"
1054+
onSelect={(next) => {
1055+
setTestnetTradingHoursFilter(next)
1056+
setTestnetCurrentPage("1")
1057+
}}
1058+
/>
1059+
)}
1060+
{(testnetSearchValue ||
1061+
testnetRwaSchemaFilter !== "all" ||
1062+
testnetStreamCategoryFilter !== "all" ||
1063+
show24x5FeedsTestnet) && (
9511064
<button
9521065
type="button"
9531066
className={clsx(button.secondary, feedList.clearFilterBtn)}
@@ -956,6 +1069,8 @@ export const FeedList = ({
9561069
setTestnetSearchValue("")
9571070
setTestnetRwaSchemaFilter("all")
9581071
setTestnetStreamCategoryFilter("all")
1072+
setShow24x5FeedsTestnet(false)
1073+
setTestnetTradingHoursFilter("all")
9591074
setTestnetCurrentPage("1")
9601075
const inputElement = document.getElementById("testnetSearch") as HTMLInputElement
9611076
if (inputElement) {
@@ -990,6 +1105,8 @@ export const FeedList = ({
9901105
showOnlyDEXFeeds={showOnlyDEXFeedsTestnet}
9911106
rwaSchemaFilter={testnetRwaSchemaFilter}
9921107
streamCategoryFilter={testnetStreamCategoryFilter}
1108+
show24x5Feeds={show24x5FeedsTestnet}
1109+
tradingHoursFilter={testnetTradingHoursFilter}
9931110
firstAddr={testnetFirstAddr}
9941111
lastAddr={testnetLastAddr}
9951112
addrPerPage={testnetAddrPerPage}

0 commit comments

Comments
 (0)