openapi: 3.1.0 info: title: Tournament activity metric API description: CrunchDAO Tournament Platform API Endpoints version: v2 servers: - url: http://api.hub.crunchdao.com description: Generated server url security: [] tags: - name: metric paths: /v1/competitions/{competitionIdentifier}/targets/{targetName}/metrics: x-service-id: competition-service get: tags: - metric summary: List metrics of this competitions. operationId: listTargetMetrics parameters: - name: competitionIdentifier in: path required: true style: simple explode: false schema: type: string - name: targetName in: path required: true style: simple explode: false schema: type: string responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/Metric' /v1/competitions/{competitionIdentifier}/targets/{targetName}/metrics/{metricName}: x-service-id: competition-service get: tags: - metric operationId: getMetric parameters: - name: competitionIdentifier in: path required: true style: simple explode: false schema: type: string - name: targetName in: path required: true style: simple explode: false schema: type: string - name: metricName in: path required: true style: simple explode: false schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Metric' /v1/competitions/{competitionIdentifier}/metrics: x-service-id: competition-service get: tags: - metric summary: List all metrics of this competitions. operationId: listMetrics parameters: - name: competitionIdentifier in: path required: true style: simple explode: false schema: type: string responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/Metric' components: schemas: VisualizationType: type: string enum: - LINE - HISTOGRAM MetricColors: type: object properties: details: type: string submissionPhase: type: string outOfSamplePhase: type: string Unit: type: object properties: prefix: type: string description: String to show before the value. suffix: type: string description: String to show after the value. scale: type: integer format: int32 description: Number of digits to keep after the comma. MetricDefinition: type: object properties: id: type: integer format: int64 name: type: string displayName: type: string LeaderboardRankOrder: type: string enum: - DESCENDING - ASCENDING ScorerFunction: type: string enum: - BALANCED_ACCURACY - DOT_PRODUCT - F1 - PRECISION - RANDOM - RECALL - SPEARMAN - META__EXECUTION_TIME - CUSTOM__MID_ONE__PROFIT_AND_LOSS_WITH_TRANSACTION_COST - CUSTOM__BROAD__SCORING ReducerFunction: type: string enum: - NONE - SUM - MEAN - PRODUCT_PLUS_MINUS_1 Target: type: object properties: id: type: integer format: int64 name: type: string description: Slug-like name. displayName: type: string description: Display name for the UI. weight: type: number format: float description: Weight of the target in the global leaderboard. weightedMeanUnit: $ref: '#/components/schemas/Unit' description: Display name for the UI of the weighted mean column. primary: type: boolean description: Is the target displayed on the home page? virtual: type: boolean description: Is the target based on other targets. rankOrder: $ref: '#/components/schemas/LeaderboardRankOrder' description: Orders of the position on the leaderboard. weightedMeanDisplayUnit: type: string deprecated: true Metric: type: object properties: id: type: integer format: int64 target: $ref: '#/components/schemas/Target' metricDefinition: $ref: '#/components/schemas/MetricDefinition' name: type: string description: Slug-like name. displayName: type: string description: Display name. unit: $ref: '#/components/schemas/Unit' description: Unit to format the value. None if `null`. signless: type: boolean description: Ignore and hide the sign of the value. weight: type: integer format: int32 description: Weight of the value used for the weighted average. minimum: type: number format: double description: Minimum value allowed before being considered out of range. `null` if there is no minimum. maximum: type: number format: double description: Maximum value allowed before being considered out of range. `null` if there is no maximum. score: type: boolean description: Is it a score that is not considered in the weighted average? multiplier: type: number format: double description: Multiplier used to convert the raw value (divide to get the original value). cumulative: type: boolean description: Are previous values are needed to compute the final score. scorerFunction: $ref: '#/components/schemas/ScorerFunction' description: Scoring function to use implemented in the crunch-cli. reducerFunction: $ref: '#/components/schemas/ReducerFunction' description: Reducer function to consume the value to get the score. reducedDisplayName: type: string description: Display name for the reducer function. visualizationType: $ref: '#/components/schemas/VisualizationType' description: Type of visualization used to display the values. colors: $ref: '#/components/schemas/MetricColors' description: Colors for the lines. visibleOnPerformanceGraph: type: boolean description: Is the line visible on the performance graph. createdAt: type: string format: date-time displayUnit: type: string deprecated: true securitySchemes: apiKey: type: apiKey name: apiKey in: query scheme: token accessToken: type: http in: header scheme: Bearer externalDocs: description: docs.crunchdao.com url: https://docs.crunchdao.com