Overview
When working with the Novig API, it’s important to understand how outcomes are organized. The order of outcomes in an array does not determine their meaning—the index field does.
The Index Field
Each outcome object contains an index field that identifies which side of the market it represents:
| Index | Meaning |
|---|
0 | Home / Yes side |
1 | Away / No side |
Do not rely on array position to determine outcome meaning. Always use the index field.
Example
Consider this response from the API:
{
"outcomeIds": [
"14e8323b-b635-41ff-b7f6-f81477ee4153",
"c84fa737-1ed7-4ed5-af47-39379c175fdd"
],
"outcomes": [
{
"id": "14e8323b-b635-41ff-b7f6-f81477ee4153",
"status": "TBD",
"index": 1
},
{
"id": "c84fa737-1ed7-4ed5-af47-39379c175fdd",
"status": "TBD",
"index": 0
}
]
}
In this example:
- The first item in the
outcomes array (14e8323b-...) has index: 1, making it the Away/No side
- The second item in the
outcomes array (c84fa737-...) has index: 0, making it the Home/Yes side
Always filter or find outcomes by their index field rather than assuming array order.
Market Type Mapping
The meaning of index: 0 depends on the market type:
| Market Type | Index 0 | Index 1 |
|---|
MONEY | Home | Away |
SPREAD | Home | Away |
TOTAL | Over | Under |
TEAM_TOTAL | Over | Under |
For game-level markets (MONEY, SPREAD), index 0 always corresponds to the home team. For totals and player props, index 0 corresponds to the Over or Yes side.