> Use the canonical URL for citations. For the complete Predict API documentation index, fetch https://docs.staging.trypredict.com/llms.txt.

# Outcome Service List Outcome BB Os

POST https://api.staging.trypredict.com/v1/outcomes/bbo
Content-Type: application/json

Reference: https://docs.staging.trypredict.com/api-reference/outcomes/outcome-service-list-outcome-bb-os

## Request

### Body (application/json)

This endpoint expects a ListOutcomeBBOsRequest.

- `ids` (list of string, optional)

## Response

### 200

OK

- `data` (list of OutcomeBBO, optional)

## Errors

### 400 Bad Request Error

The request is malformed or violates a field constraint.

- `error` (RESTError, required)

### 405 Method Not Allowed Error

The HTTP method is not allowed on this path.

- `error` (RESTError, required)

### 409 Conflict Error

The request conflicts with the current resource state.

- `error` (RESTError, required)

### 500 Internal Server Error

The server could not complete the request.

- `error` (RESTError, required)

### 503 Service Unavailable Error

A required dependency is temporarily unavailable.

- `error` (RESTError, required)

## Types

### OutcomeBBO

- `outcome_id` (string, optional) — Stable unique identifier for the outcome.
- `state` (enum, optional) — Allowed value for state.
  - Allowed values: `active`, `settled`, `verifying`
- `as_of` (datetime, optional)
- `revision` (string, optional)
- `sides` (list of OutcomeBBOSide, optional) — Always ordered by side: first 0, then 1.

### RESTError

- `code` (integer, required) — HTTP status code returned with the response.
- `status` (enum, required) — Stable canonical status name suitable for programmatic handling.
  - Allowed values: `INVALID_ARGUMENT`, `UNAUTHENTICATED`, `PERMISSION_DENIED`, `NOT_FOUND`, `METHOD_NOT_ALLOWED`, `ALREADY_EXISTS`, `RESOURCE_EXHAUSTED`, `INTERNAL`, `UNAVAILABLE`, `DEADLINE_EXCEEDED`
- `message` (string, required) — Human-readable explanation that is safe to show to an API caller.
- `details` (list of ErrorDetail, required) — Typed structured context for clients that need to handle the error programmatically.

### OutcomeBBOSide

- `side` (integer, optional) — Hyperliquid outcome token index: 0 is the first token and 1 is the second.
- `bid` (string, optional)
- `bid_size` (string, optional)
- `ask` (string, optional)
- `ask_size` (string, optional)
- `spread` (string, optional)

### ErrorDetail

- `type`: `field_violation` (field_violation)
  - `field` (string, required) — Request field that failed validation.
  - `reason` (string, required) — Stable machine-readable reason for the validation failure.
- `type`: `rate_limit` (rate_limit)
  - `limit` (long, required) — Maximum requests allowed during the rolling window.
  - `reason` (string, required) — Stable machine-readable reason identifying the exhausted policy.
  - `retry_after_seconds` (long, required) — Whole seconds until the exhausted policy has capacity.
  - `scope` (enum, required) — Quota that rejected the request.
    - Allowed values: `endpoint`, `global`
  - `window_seconds` (long, required) — Rolling-window duration in seconds.
- `type`: `dependency` (dependency)
  - `reason` (string, required) — Stable machine-readable reason for the temporary dependency failure.

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "data": [
    {
      "outcome_id": "string",
      "state": "active",
      "as_of": "2024-01-15T09:30:00Z",
      "revision": "string",
      "sides": [
        {
          "side": 1,
          "bid": "string",
          "bid_size": "string",
          "ask": "string",
          "ask_size": "string",
          "spread": "string"
        }
      ]
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.staging.trypredict.com/v1/outcomes/bbo"

payload = {}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.staging.trypredict.com/v1/outcomes/bbo';
const options = {method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{}'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.staging.trypredict.com/v1/outcomes/bbo"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.staging.trypredict.com/v1/outcomes/bbo")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.staging.trypredict.com/v1/outcomes/bbo")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.staging.trypredict.com/v1/outcomes/bbo', [
  'body' => '{}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.staging.trypredict.com/v1/outcomes/bbo");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.staging.trypredict.com/v1/outcomes/bbo")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```