{
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "12.0.0"
    },
    {
      "type": "datasource",
      "id": "yesoreyeram-infinity-datasource",
      "name": "Infinity",
      "version": "3.11.1"
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    },
    {
      "type": "panel",
      "id": "timeseries",
      "name": "Time series",
      "version": ""
    },
    {
      "type": "panel",
      "id": "bargauge",
      "name": "Bar gauge",
      "version": ""
    }
  ],
  "annotations": {
    "list": []
  },
  "description": "Live HIP-4 outcome markets on Hyperliquid from the Hyperodds public API: top edges, a market's price against its fair line, new listings, 24 h volume by category and what starts or settles next. Uses the Infinity data source.",
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 1,
  "links": [
    {
      "title": "Hyperodds",
      "type": "link",
      "url": "https://usehyperodds.com",
      "icon": "external link",
      "targetBlank": true,
      "tooltip": "Open usehyperodds.com"
    },
    {
      "title": "Docs",
      "type": "link",
      "url": "https://usehyperodds.com/docs/grafana",
      "icon": "doc",
      "targetBlank": true,
      "tooltip": "How to set up and read this dashboard"
    }
  ],
  "panels": [
    {
      "id": 1,
      "type": "table",
      "title": "Top edges",
      "description": "Markets where buying a side costs at least 0.5 points less than its fair line after every fee, for a $100 order. Only fair lines with more than one source count. Price is the side's best ask and Fair its fair price, both in cents, as the Console shows them.",
      "gridPos": {
        "h": 11,
        "w": 16,
        "x": 0,
        "y": 0
      },
      "datasource": {
        "type": "yesoreyeram-infinity-datasource",
        "uid": "${datasource}"
      },
      "targets": [
        {
          "refId": "A",
          "datasource": {
            "type": "yesoreyeram-infinity-datasource",
            "uid": "${datasource}"
          },
          "type": "json",
          "source": "url",
          "parser": "backend",
          "format": "table",
          "url": "${api}/trpc/markets.edges",
          "url_options": {
            "method": "GET",
            "params": [
              {
                "key": "input",
                "value": "{\"limit\":100}"
              }
            ]
          },
          "root_selector": "result.data",
          "columns": [
            {
              "selector": "title",
              "text": "market",
              "type": "string"
            },
            {
              "selector": "deployerName",
              "text": "deployer",
              "type": "string"
            },
            {
              "selector": "category",
              "text": "category",
              "type": "string"
            },
            {
              "selector": "edge.best.side",
              "text": "side",
              "type": "number"
            },
            {
              "selector": "sideLabels.0",
              "text": "side0",
              "type": "string"
            },
            {
              "selector": "sideLabels.1",
              "text": "side1",
              "type": "string"
            },
            {
              "selector": "edge.best.pts",
              "text": "edge",
              "type": "number"
            },
            {
              "selector": "bid",
              "text": "bid",
              "type": "number"
            },
            {
              "selector": "ask",
              "text": "ask",
              "type": "number"
            },
            {
              "selector": "fair.p",
              "text": "fair",
              "type": "number"
            },
            {
              "selector": "outcome",
              "text": "outcome",
              "type": "number"
            }
          ],
          "computed_columns": [
            {
              "selector": "side == 0 ? side0 : side1",
              "text": "buy",
              "type": "string"
            },
            {
              "selector": "(side == 0 ? ask : 1 - bid) * 100",
              "text": "price",
              "type": "number"
            },
            {
              "selector": "(side == 0 ? fair : 1 - fair) * 100",
              "text": "buyFair",
              "type": "number"
            }
          ],
          "filterExpression": "'${category}' == 'all' || category == '${category}'"
        }
      ],
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "side": true,
              "side0": true,
              "side1": true,
              "bid": true,
              "ask": true,
              "fair": true
            },
            "indexByName": {
              "market": 0,
              "buy": 1,
              "price": 2,
              "buyFair": 3,
              "edge": 4,
              "category": 6,
              "outcome": 7,
              "deployer": 5
            },
            "renameByName": {}
          }
        }
      ],
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "auto",
            "cellOptions": {
              "type": "auto"
            },
            "inspect": false
          },
          "color": {
            "mode": "thresholds"
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "text",
                "value": null
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "market"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Market"
              },
              {
                "id": "links",
                "value": [
                  {
                    "title": "Open on Hyperodds",
                    "url": "https://usehyperodds.com/m/${__data.fields.outcome}",
                    "targetBlank": true
                  }
                ]
              },
              {
                "id": "custom.minWidth",
                "value": 160
              },
              {
                "id": "custom.wrapText",
                "value": true
              },
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "auto",
                  "wrapText": true
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "buy"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Buy"
              },
              {
                "id": "custom.width",
                "value": 60
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "price"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Price"
              },
              {
                "id": "unit",
                "value": "suffix:¢"
              },
              {
                "id": "decimals",
                "value": 3
              },
              {
                "id": "custom.width",
                "value": 84
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "buyFair"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Fair"
              },
              {
                "id": "unit",
                "value": "suffix:¢"
              },
              {
                "id": "decimals",
                "value": 1
              },
              {
                "id": "custom.width",
                "value": 72
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "edge"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Edge (pts)"
              },
              {
                "id": "unit",
                "value": "prefix:+"
              },
              {
                "id": "decimals",
                "value": 1
              },
              {
                "id": "custom.width",
                "value": 104
              },
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "color-text"
                }
              },
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "green"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "deployer"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Deployer"
              },
              {
                "id": "custom.width",
                "value": 96
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "category"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Category"
              },
              {
                "id": "custom.width",
                "value": 96
              },
              {
                "id": "mappings",
                "value": [
                  {
                    "type": "value",
                    "options": {
                      "sports": {
                        "text": "Sports",
                        "index": 0
                      },
                      "crypto": {
                        "text": "Crypto",
                        "index": 1
                      },
                      "equities": {
                        "text": "Equities",
                        "index": 2
                      },
                      "commodities": {
                        "text": "Commodities",
                        "index": 3
                      },
                      "indices": {
                        "text": "Indices",
                        "index": 4
                      },
                      "macro": {
                        "text": "Macro",
                        "index": 5
                      },
                      "ipo": {
                        "text": "IPOs",
                        "index": 6
                      },
                      "awards": {
                        "text": "Awards",
                        "index": 7
                      },
                      "other": {
                        "text": "Other",
                        "index": 8
                      }
                    }
                  }
                ]
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "outcome"
            },
            "properties": [
              {
                "id": "custom.hidden",
                "value": true
              }
            ]
          }
        ]
      },
      "options": {
        "showHeader": true,
        "cellHeight": "sm",
        "footer": {
          "show": false,
          "reducer": ["sum"],
          "countRows": false,
          "fields": ""
        },
        "sortBy": [
          {
            "displayName": "Edge (pts)",
            "desc": true
          }
        ]
      }
    },
    {
      "id": 2,
      "type": "bargauge",
      "title": "24 h volume by category",
      "description": "Contracts traded in the last 24 hours on HIP-4 markets that have not settled, by category. A contract pays $1 if its side wins. The Console counts volume the same way.",
      "gridPos": {
        "h": 11,
        "w": 8,
        "x": 16,
        "y": 0
      },
      "datasource": {
        "type": "yesoreyeram-infinity-datasource",
        "uid": "${datasource}"
      },
      "targets": [
        {
          "refId": "A",
          "datasource": {
            "type": "yesoreyeram-infinity-datasource",
            "uid": "${datasource}"
          },
          "type": "json",
          "source": "url",
          "parser": "backend",
          "format": "table",
          "url": "${api}/trpc/markets.list",
          "url_options": {
            "method": "GET",
            "params": []
          },
          "root_selector": "result.data",
          "columns": [
            {
              "selector": "category",
              "text": "category",
              "type": "string"
            },
            {
              "selector": "volume24h",
              "text": "volume",
              "type": "number"
            }
          ],
          "summarizeExpression": "sum(volume)",
          "summarizeBy": "category",
          "summarizeAlias": "volume"
        }
      ],
      "transformations": [
        {
          "id": "sortBy",
          "options": {
            "sort": [
              {
                "field": "volume",
                "desc": true
              }
            ]
          }
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "short",
          "min": 0,
          "color": {
            "mode": "fixed",
            "fixedColor": "blue"
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "blue",
                "value": null
              }
            ]
          },
          "decimals": 0
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "category"
            },
            "properties": [
              {
                "id": "mappings",
                "value": [
                  {
                    "type": "value",
                    "options": {
                      "sports": {
                        "text": "Sports",
                        "index": 0
                      },
                      "crypto": {
                        "text": "Crypto",
                        "index": 1
                      },
                      "equities": {
                        "text": "Equities",
                        "index": 2
                      },
                      "commodities": {
                        "text": "Commodities",
                        "index": 3
                      },
                      "indices": {
                        "text": "Indices",
                        "index": 4
                      },
                      "macro": {
                        "text": "Macro",
                        "index": 5
                      },
                      "ipo": {
                        "text": "IPOs",
                        "index": 6
                      },
                      "awards": {
                        "text": "Awards",
                        "index": 7
                      },
                      "other": {
                        "text": "Other",
                        "index": 8
                      }
                    }
                  }
                ]
              }
            ]
          }
        ]
      },
      "options": {
        "orientation": "horizontal",
        "displayMode": "basic",
        "valueMode": "color",
        "namePlacement": "left",
        "showUnfilled": true,
        "sizing": "auto",
        "minVizWidth": 8,
        "minVizHeight": 16,
        "maxVizHeight": 300,
        "legend": {
          "showLegend": false,
          "displayMode": "list",
          "placement": "bottom",
          "calcs": []
        },
        "reduceOptions": {
          "values": true,
          "calcs": [],
          "fields": ""
        }
      }
    },
    {
      "id": 3,
      "type": "timeseries",
      "title": "Price of ${pick:value} and fair line: ${pick:text}",
      "description": "The last trade of the side named in the title against its Hyperodds fair line, in percent, over up to the last 24 hours. The band is the line's range, and a gap means no line stood then. A dashed line rests on one input and stays out of Top edges. The tooltip gives each line's confidence. Times are in UTC.",
      "gridPos": {
        "h": 10,
        "w": 24,
        "x": 0,
        "y": 11
      },
      "datasource": {
        "type": "yesoreyeram-infinity-datasource",
        "uid": "${datasource}"
      },
      "targets": [
        {
          "refId": "A",
          "datasource": {
            "type": "yesoreyeram-infinity-datasource",
            "uid": "${datasource}"
          },
          "type": "json",
          "source": "url",
          "parser": "backend",
          "format": "table",
          "url": "${api}/trpc/markets.history",
          "url_options": {
            "method": "GET",
            "params": [
              {
                "key": "input",
                "value": "{\"outcome\":${market},\"since\":${__from},\"until\":${__to}}"
              }
            ]
          },
          "root_selector": "result.data",
          "columns": [
            {
              "selector": "at",
              "text": "time",
              "type": "timestamp_epoch"
            },
            {
              "selector": "lastPx",
              "text": "Last trade",
              "type": "number"
            },
            {
              "selector": "fair",
              "text": "fair",
              "type": "number"
            },
            {
              "selector": "lo",
              "text": "Fair low",
              "type": "number"
            },
            {
              "selector": "hi",
              "text": "Fair high",
              "type": "number"
            },
            {
              "selector": "singleSource",
              "text": "singleSource",
              "type": "boolean"
            },
            {
              "selector": "confidence",
              "text": "confidence",
              "type": "number"
            }
          ],
          "computed_columns": [
            {
              "selector": "confidence > 0 && singleSource == false ? fair : nil",
              "text": "Fair line",
              "type": "number"
            },
            {
              "selector": "confidence > 0 && singleSource == true ? fair : nil",
              "text": "Fair line, one input",
              "type": "number"
            }
          ]
        }
      ],
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "fair": true,
              "singleSource": true
            },
            "indexByName": {
              "time": 0,
              "Last trade": 1,
              "Fair line": 2,
              "Fair line, one input": 3,
              "Fair low": 4,
              "Fair high": 5,
              "confidence": 6
            },
            "renameByName": {}
          }
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "percentunit",
          "decimals": 1,
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "drawStyle": "line",
            "lineInterpolation": "stepAfter",
            "lineWidth": 2,
            "fillOpacity": 0,
            "showPoints": "never",
            "spanNulls": false,
            "axisPlacement": "auto",
            "axisLabel": "",
            "scaleDistribution": {
              "type": "linear"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Last trade"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "orange"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Fair line"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "blue"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Fair line, one input"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "blue"
                }
              },
              {
                "id": "custom.lineStyle",
                "value": {
                  "fill": "dash",
                  "dash": [10, 10]
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Fair low"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "blue"
                }
              },
              {
                "id": "custom.lineWidth",
                "value": 0
              },
              {
                "id": "custom.hideFrom",
                "value": {
                  "legend": true,
                  "tooltip": false,
                  "viz": false
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Fair high"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "blue"
                }
              },
              {
                "id": "custom.lineWidth",
                "value": 0
              },
              {
                "id": "custom.fillBelowTo",
                "value": "Fair low"
              },
              {
                "id": "custom.fillOpacity",
                "value": 18
              },
              {
                "id": "custom.hideFrom",
                "value": {
                  "legend": true,
                  "tooltip": false,
                  "viz": false
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "confidence"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Confidence"
              },
              {
                "id": "unit",
                "value": "percentunit"
              },
              {
                "id": "decimals",
                "value": 0
              },
              {
                "id": "custom.axisPlacement",
                "value": "hidden"
              },
              {
                "id": "custom.lineWidth",
                "value": 0
              },
              {
                "id": "custom.fillOpacity",
                "value": 0
              },
              {
                "id": "custom.hideFrom",
                "value": {
                  "legend": true,
                  "tooltip": false,
                  "viz": false
                }
              }
            ]
          }
        ]
      },
      "options": {
        "legend": {
          "showLegend": true,
          "displayMode": "list",
          "placement": "bottom",
          "calcs": ["lastNotNull"]
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      }
    },
    {
      "id": 4,
      "type": "table",
      "title": "New listings",
      "description": "HIP-4 markets, newest first. Listed shows when each one appeared, or Earlier for markets listed before Hyperodds started tracking listings.",
      "gridPos": {
        "h": 10,
        "w": 24,
        "x": 0,
        "y": 21
      },
      "datasource": {
        "type": "yesoreyeram-infinity-datasource",
        "uid": "${datasource}"
      },
      "targets": [
        {
          "refId": "A",
          "datasource": {
            "type": "yesoreyeram-infinity-datasource",
            "uid": "${datasource}"
          },
          "type": "json",
          "source": "url",
          "parser": "backend",
          "format": "table",
          "url": "${api}/trpc/markets.list",
          "url_options": {
            "method": "GET",
            "params": [
              {
                "key": "input",
                "value": "{\"sort\":\"new\"}"
              }
            ]
          },
          "root_selector": "result.data",
          "columns": [
            {
              "selector": "listedAt",
              "text": "listed",
              "type": "number"
            },
            {
              "selector": "title",
              "text": "market",
              "type": "string"
            },
            {
              "selector": "deployerName",
              "text": "deployer",
              "type": "string"
            },
            {
              "selector": "category",
              "text": "category",
              "type": "string"
            },
            {
              "selector": "mid",
              "text": "midPx",
              "type": "number"
            },
            {
              "selector": "outcome",
              "text": "outcome",
              "type": "number"
            }
          ],
          "filterExpression": "'${category}' == 'all' || category == '${category}'",
          "computed_columns": [
            {
              "selector": "midPx > 0 ? midPx * 100 : nil",
              "text": "mid",
              "type": "number"
            }
          ]
        }
      ],
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "midPx": true
            },
            "indexByName": {
              "listed": 0,
              "market": 1,
              "deployer": 2,
              "category": 3,
              "mid": 4,
              "outcome": 5
            },
            "renameByName": {}
          }
        },
        {
          "id": "limit",
          "options": {
            "limitField": 50
          }
        }
      ],
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "auto",
            "cellOptions": {
              "type": "auto"
            },
            "inspect": false
          },
          "color": {
            "mode": "thresholds"
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "text",
                "value": null
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "listed"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Listed"
              },
              {
                "id": "unit",
                "value": "dateTimeFromNow"
              },
              {
                "id": "custom.width",
                "value": 152
              },
              {
                "id": "mappings",
                "value": [
                  {
                    "type": "special",
                    "options": {
                      "match": "null",
                      "result": {
                        "text": "Earlier",
                        "index": 0
                      }
                    }
                  }
                ]
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "market"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Market"
              },
              {
                "id": "links",
                "value": [
                  {
                    "title": "Open on Hyperodds",
                    "url": "https://usehyperodds.com/m/${__data.fields.outcome}",
                    "targetBlank": true
                  }
                ]
              },
              {
                "id": "custom.minWidth",
                "value": 160
              },
              {
                "id": "custom.wrapText",
                "value": true
              },
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "auto",
                  "wrapText": true
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "deployer"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Deployer"
              },
              {
                "id": "custom.width",
                "value": 100
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "category"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Category"
              },
              {
                "id": "custom.width",
                "value": 100
              },
              {
                "id": "mappings",
                "value": [
                  {
                    "type": "value",
                    "options": {
                      "sports": {
                        "text": "Sports",
                        "index": 0
                      },
                      "crypto": {
                        "text": "Crypto",
                        "index": 1
                      },
                      "equities": {
                        "text": "Equities",
                        "index": 2
                      },
                      "commodities": {
                        "text": "Commodities",
                        "index": 3
                      },
                      "indices": {
                        "text": "Indices",
                        "index": 4
                      },
                      "macro": {
                        "text": "Macro",
                        "index": 5
                      },
                      "ipo": {
                        "text": "IPOs",
                        "index": 6
                      },
                      "awards": {
                        "text": "Awards",
                        "index": 7
                      },
                      "other": {
                        "text": "Other",
                        "index": 8
                      }
                    }
                  }
                ]
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "mid"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Mid"
              },
              {
                "id": "unit",
                "value": "suffix:¢"
              },
              {
                "id": "decimals",
                "value": 1
              },
              {
                "id": "custom.width",
                "value": 70
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "outcome"
            },
            "properties": [
              {
                "id": "custom.hidden",
                "value": true
              }
            ]
          }
        ]
      },
      "options": {
        "showHeader": true,
        "cellHeight": "sm",
        "footer": {
          "show": false,
          "reducer": ["sum"],
          "countRows": false,
          "fields": ""
        }
      }
    },
    {
      "id": 5,
      "type": "table",
      "title": "Coming up",
      "description": "Open markets in the order things happen, as the Console lists them: a game by its start and a rate decision by its decision time while those are ahead, any other market by when it settles. Once a game or decision is under way, it moves to its Settles by time. Times are in UTC.",
      "gridPos": {
        "h": 12,
        "w": 24,
        "x": 0,
        "y": 31
      },
      "datasource": {
        "type": "yesoreyeram-infinity-datasource",
        "uid": "${datasource}"
      },
      "targets": [
        {
          "refId": "A",
          "datasource": {
            "type": "yesoreyeram-infinity-datasource",
            "uid": "${datasource}"
          },
          "type": "json",
          "source": "url",
          "parser": "backend",
          "format": "table",
          "url": "${api}/trpc/markets.list",
          "url_options": {
            "method": "GET",
            "params": [
              {
                "key": "input",
                "value": "{\"sort\":\"settling\"}"
              }
            ]
          },
          "root_selector": "result.data",
          "columns": [
            {
              "selector": "title",
              "text": "market",
              "type": "string"
            },
            {
              "selector": "status",
              "text": "status",
              "type": "string"
            },
            {
              "selector": "deployerName",
              "text": "deployer",
              "type": "string"
            },
            {
              "selector": "category",
              "text": "category",
              "type": "string"
            },
            {
              "selector": "kind",
              "text": "kind",
              "type": "string"
            },
            {
              "selector": "timing.starts",
              "text": "startsAt",
              "type": "number"
            },
            {
              "selector": "timing.settles",
              "text": "settlesAt",
              "type": "number"
            },
            {
              "selector": "timing.by",
              "text": "settlesBy",
              "type": "number"
            },
            {
              "selector": "mid",
              "text": "midPx",
              "type": "number"
            },
            {
              "selector": "volume24h",
              "text": "volume",
              "type": "number"
            },
            {
              "selector": "outcome",
              "text": "outcome",
              "type": "number"
            }
          ],
          "computed_columns": [
            {
              "selector": "kind != 'policy_rate' && startsAt > 0 ? startsAt : nil",
              "text": "starts",
              "type": "number"
            },
            {
              "selector": "kind == 'policy_rate' && startsAt > 0 ? startsAt : nil",
              "text": "decision",
              "type": "number"
            },
            {
              "selector": "midPx > 0 ? midPx * 100 : nil",
              "text": "mid",
              "type": "number"
            }
          ],
          "filterExpression": "(status == 'open' || status == 'live') && ('${category}' == 'all' || category == '${category}')"
        }
      ],
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "status": true,
              "kind": true,
              "startsAt": true,
              "midPx": true
            },
            "indexByName": {
              "market": 0,
              "starts": 1,
              "decision": 2,
              "settlesAt": 3,
              "settlesBy": 4,
              "mid": 5,
              "volume": 6,
              "category": 8,
              "outcome": 9,
              "deployer": 7
            },
            "renameByName": {}
          }
        }
      ],
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "auto",
            "cellOptions": {
              "type": "auto"
            },
            "inspect": false
          },
          "color": {
            "mode": "thresholds"
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "text",
                "value": null
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "market"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Market"
              },
              {
                "id": "links",
                "value": [
                  {
                    "title": "Open on Hyperodds",
                    "url": "https://usehyperodds.com/m/${__data.fields.outcome}",
                    "targetBlank": true
                  }
                ]
              },
              {
                "id": "custom.minWidth",
                "value": 160
              },
              {
                "id": "custom.wrapText",
                "value": true
              },
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "auto",
                  "wrapText": true
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "starts"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Starts"
              },
              {
                "id": "unit",
                "value": "time:MMM D YYYY HH:mm [UTC]"
              },
              {
                "id": "custom.width",
                "value": 128
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "decision"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Decision"
              },
              {
                "id": "unit",
                "value": "time:MMM D YYYY HH:mm [UTC]"
              },
              {
                "id": "custom.width",
                "value": 128
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "settlesAt"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Settles at"
              },
              {
                "id": "unit",
                "value": "time:MMM D YYYY HH:mm [UTC]"
              },
              {
                "id": "custom.width",
                "value": 128
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "settlesBy"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Settles by"
              },
              {
                "id": "unit",
                "value": "time:MMM D YYYY HH:mm [UTC]"
              },
              {
                "id": "custom.width",
                "value": 128
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "mid"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Mid"
              },
              {
                "id": "unit",
                "value": "suffix:¢"
              },
              {
                "id": "decimals",
                "value": 1
              },
              {
                "id": "custom.width",
                "value": 64
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "volume"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "24 h volume (contracts)"
              },
              {
                "id": "unit",
                "value": "short"
              },
              {
                "id": "custom.width",
                "value": 92
              },
              {
                "id": "decimals",
                "value": 0
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "deployer"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Deployer"
              },
              {
                "id": "custom.width",
                "value": 96
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "category"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Category"
              },
              {
                "id": "custom.width",
                "value": 96
              },
              {
                "id": "mappings",
                "value": [
                  {
                    "type": "value",
                    "options": {
                      "sports": {
                        "text": "Sports",
                        "index": 0
                      },
                      "crypto": {
                        "text": "Crypto",
                        "index": 1
                      },
                      "equities": {
                        "text": "Equities",
                        "index": 2
                      },
                      "commodities": {
                        "text": "Commodities",
                        "index": 3
                      },
                      "indices": {
                        "text": "Indices",
                        "index": 4
                      },
                      "macro": {
                        "text": "Macro",
                        "index": 5
                      },
                      "ipo": {
                        "text": "IPOs",
                        "index": 6
                      },
                      "awards": {
                        "text": "Awards",
                        "index": 7
                      },
                      "other": {
                        "text": "Other",
                        "index": 8
                      }
                    }
                  }
                ]
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "outcome"
            },
            "properties": [
              {
                "id": "custom.hidden",
                "value": true
              }
            ]
          }
        ]
      },
      "options": {
        "showHeader": true,
        "cellHeight": "sm",
        "footer": {
          "show": false,
          "reducer": ["sum"],
          "countRows": false,
          "fields": ""
        }
      }
    }
  ],
  "refresh": "1m",
  "schemaVersion": 41,
  "tags": ["hyperodds", "hip-4", "hyperliquid", "prediction-markets", "infinity"],
  "templating": {
    "list": [
      {
        "name": "datasource",
        "label": "Data source",
        "type": "datasource",
        "query": "yesoreyeram-infinity-datasource",
        "current": {},
        "hide": 2,
        "refresh": 1,
        "regex": "",
        "options": []
      },
      {
        "name": "api",
        "label": "API",
        "type": "textbox",
        "query": "https://api.usehyperodds.com",
        "current": {
          "text": "https://api.usehyperodds.com",
          "value": "https://api.usehyperodds.com"
        },
        "options": [
          {
            "selected": true,
            "text": "https://api.usehyperodds.com",
            "value": "https://api.usehyperodds.com"
          }
        ],
        "hide": 2
      },
      {
        "name": "category",
        "label": "Category",
        "type": "custom",
        "query": "Sports : sports,Crypto : crypto,Equities : equities,Commodities : commodities,Indices : indices,Macro : macro,IPOs : ipo,Awards : awards,Other : other",
        "includeAll": true,
        "allValue": "all",
        "multi": false,
        "current": {
          "text": "All",
          "value": "$__all"
        },
        "options": [],
        "hide": 0
      },
      {
        "name": "market",
        "label": "Market",
        "description": "Markets with a fair line above 0% and below 100%, busiest first",
        "type": "query",
        "datasource": {
          "type": "yesoreyeram-infinity-datasource",
          "uid": "${datasource}"
        },
        "query": {
          "queryType": "infinity",
          "refId": "variable",
          "infinityQuery": {
            "refId": "variable",
            "type": "json",
            "source": "url",
            "parser": "backend",
            "format": "table",
            "url": "${api}/trpc/markets.list",
            "url_options": {
              "method": "GET",
              "params": [
                {
                  "key": "input",
                  "value": "{\"sort\":\"volume\"}"
                }
              ]
            },
            "root_selector": "result.data",
            "columns": [
              {
                "selector": "title",
                "text": "__text",
                "type": "string"
              },
              {
                "selector": "outcome",
                "text": "__value",
                "type": "string"
              },
              {
                "selector": "fair.p",
                "text": "fair",
                "type": "number"
              }
            ],
            "filterExpression": "fair != nil && fair > 0 && fair < 1"
          }
        },
        "refresh": 1,
        "includeAll": false,
        "multi": false,
        "sort": 0,
        "current": {},
        "options": [],
        "hide": 0,
        "allowCustomValue": false
      },
      {
        "name": "pick",
        "label": "Picked market",
        "description": "Names the chart's market and side in its title, including a market opened by URL that the picker leaves out",
        "type": "query",
        "datasource": {
          "type": "yesoreyeram-infinity-datasource",
          "uid": "${datasource}"
        },
        "query": {
          "queryType": "infinity",
          "refId": "variable",
          "infinityQuery": {
            "refId": "variable",
            "type": "json",
            "source": "url",
            "parser": "backend",
            "format": "table",
            "url": "${api}/trpc/markets.get",
            "url_options": {
              "method": "GET",
              "params": [
                {
                  "key": "input",
                  "value": "{\"outcome\":${market}}"
                }
              ]
            },
            "root_selector": "result.data.summary",
            "columns": [
              {
                "selector": "title",
                "text": "__text",
                "type": "string"
              },
              {
                "selector": "sideLabels.0",
                "text": "__value",
                "type": "string"
              }
            ]
          }
        },
        "refresh": 1,
        "includeAll": false,
        "multi": false,
        "sort": 0,
        "current": {
          "text": "an unknown market",
          "value": "the first side"
        },
        "options": [],
        "hide": 2
      }
    ]
  },
  "time": {
    "from": "now-24h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": ["1m", "5m", "15m", "30m", "1h"]
  },
  "timezone": "utc",
  "title": "Hyperodds: HIP-4 markets",
  "uid": "hyperodds-hip4",
  "version": 1,
  "weekStart": ""
}
