File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { TransportGenerics } from '../transports'
2- import { InputParametersDefinition } from '../validation/input-params'
32import { AdapterEndpoint } from './endpoint'
43
5- /**
6- * Type for the base input parameter config that any [[MarketStatusEndpoint]] must extend
7- */
8- export type MarketStatusEndpointInputParametersDefinition = InputParametersDefinition & {
9- market : {
10- aliases : readonly [ ]
11- type : 'string'
12- description : 'The name of the market'
13- required : boolean
14- }
15- }
16-
174/**
185 * Base input parameter config that any [[MarketStatusEndpoint]] must extend
196 */
@@ -24,26 +11,38 @@ export const marketStatusEndpointInputParametersDefinition = {
2411 description : 'The name of the market' ,
2512 required : true ,
2613 } ,
27- } as const satisfies MarketStatusEndpointInputParametersDefinition
14+ } as const
2815
2916export enum MarketStatus {
3017 UNKNOWN = 0 ,
3118 CLOSED = 1 ,
3219 OPEN = 2 ,
3320}
3421
22+ // 24/5
23+ export enum TwoFourFiveMarketStatus {
24+ UNKNOWN = 0 ,
25+ PRE_MARKET = 11 ,
26+ REGULAR = 12 ,
27+ POST_MARKET = 13 ,
28+ OVERNIGHT = 14 ,
29+ WEEKEND = 15 ,
30+ }
31+
32+ type AggregatedMarketStatus = MarketStatus | TwoFourFiveMarketStatus
33+
3534export type MarketStatusResultResponse = {
36- Result : MarketStatus
35+ Result : AggregatedMarketStatus
3736 Data : {
38- result : MarketStatus
37+ result : AggregatedMarketStatus
3938 }
4039}
4140
4241/**
4342 * Helper type structure that contains the different types passed to the generic parameters of a PriceEndpoint
4443 */
4544export type MarketStatusEndpointGenerics = TransportGenerics & {
46- Parameters : MarketStatusEndpointInputParametersDefinition
45+ Parameters : typeof marketStatusEndpointInputParametersDefinition
4746 Response : MarketStatusResultResponse
4847}
4948
You can’t perform that action at this time.
0 commit comments