openapi: 3.1.0 info: title: Tournament activity prediction API description: CrunchDAO Tournament Platform API Endpoints version: v2 servers: - url: http://api.hub.crunchdao.com description: Generated server url security: [] tags: - name: prediction paths: /v3/competitions/{competitionIdentifier}/projects/{userLogin}/{projectIdentifier}/predictions: x-service-id: competition-service get: tags: - prediction summary: List predictions. operationId: listPredictions parameters: - name: competitionIdentifier in: path required: true style: simple explode: false schema: type: string - name: userLogin in: path required: true style: simple explode: false schema: type: string - name: projectIdentifier 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/Prediction' security: - accessToken: [] - apiKey: [] /v3/competitions/{competitionIdentifier}/projects/{userLogin}/{projectIdentifier}/predictions/{predictionId}: x-service-id: competition-service get: tags: - prediction summary: Show a prediction. operationId: getPrediction parameters: - name: competitionIdentifier in: path required: true style: simple explode: false schema: type: string - name: userLogin in: path required: true style: simple explode: false schema: type: string - name: projectIdentifier in: path required: true style: simple explode: false schema: type: string - name: predictionId in: path required: true style: simple explode: false schema: type: integer format: int64 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Prediction' security: - accessToken: [] - apiKey: [] /v3/competitions/{competitionIdentifier}/projects/{userLogin}/{projectIdentifier}/predictions/{predictionId}/scores: x-service-id: competition-service get: tags: - prediction summary: List a prediction's scores. operationId: listScores parameters: - name: competitionIdentifier in: path required: true style: simple explode: false schema: type: string - name: userLogin in: path required: true style: simple explode: false schema: type: string - name: projectIdentifier in: path required: true style: simple explode: false schema: type: string - name: predictionId in: path required: true style: simple explode: false schema: type: integer format: int64 responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/Score' security: - accessToken: [] - apiKey: [] components: schemas: ScoreDetail: type: object properties: key: type: object anyOf: - type: integer format: int64 - type: string example: 1 value: type: number format: double reduced: type: boolean VisualizationType: type: string enum: - LINE - HISTOGRAM MetricColors: type: object properties: details: type: string submissionPhase: type: string outOfSamplePhase: type: string PredictionFile: type: object properties: name: type: string size: type: integer format: int64 Project: type: object properties: id: type: integer format: int64 competitionId: type: integer format: int64 user: $ref: '#/components/schemas/User' name: type: string selected: type: boolean submitted: type: boolean note: type: string writeupUrl: type: string writeupArchived: type: boolean createdAt: type: string format: date-time updatedAt: type: string format: date-time userId: type: integer format: int64 deprecated: true User: type: object properties: id: type: integer format: int64 login: 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. Prediction: type: object properties: id: type: integer format: int64 name: type: string project: $ref: '#/components/schemas/Project' valid: type: boolean success: type: boolean error: type: string deterministic: type: boolean primaryMean: type: number format: double primaryUnit: $ref: '#/components/schemas/Unit' means: type: object additionalProperties: type: number format: double files: type: array items: $ref: '#/components/schemas/PredictionFile' managed: type: boolean createdAt: type: string format: date-time bestDisplayUnit: type: string deprecated: true bestMean: type: number format: double deprecated: true bestUnit: $ref: '#/components/schemas/Unit' deprecated: true 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 Score: type: object properties: id: type: integer format: int64 success: type: boolean metric: $ref: '#/components/schemas/Metric' value: type: number format: double details: type: array items: $ref: '#/components/schemas/ScoreDetail' createdAt: type: string format: date-time 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