> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agg.market/llms.txt
> Use this file to discover all available pages before exploring further.

# Arb-feed

> Subscribe to the full arb-return broadcast feed. Send `{ action: "subscribe", channel: "arb-feed" }` (no ids required). Receives batched `arb_feed_batch` messages for all markets whenever the engine publishes arb updates.



## AsyncAPI

````yaml openapi/asyncapi.json arb-feed
id: arb-feed
title: Arb-feed
description: >-
  Subscribe to the full arb-return broadcast feed. Send `{ action: "subscribe",
  channel: "arb-feed" }` (no ids required). Receives batched `arb_feed_batch`
  messages for all markets whenever the engine publishes arb updates.
servers:
  - id: production
    protocol: wss
    host: ws.agg.market
    bindings: []
    variables: []
address: /
parameters: []
bindings: []
operations:
  - &ref_2
    id: subscribeArbFeed
    title: Subscribe arb feed
    description: Subscribe to the full arb-return broadcast feed
    type: send
    messages:
      - &ref_5
        id: subscribe
        payload:
          - name: Subscribe to orderbook
            description: Subscribe to aggregated orderbook updates for markets
            type: object
            properties:
              - name: action
                type: string
                description: subscribe
                required: true
              - name: channel
                type: string
                required: true
              - name: outcomeIds
                type: array
                description: Outcome IDs to subscribe to
                required: true
                properties:
                  - name: item
                    type: string
                    required: false
        headers: []
        jsonPayloadSchema:
          title: Subscribe
          type: object
          required:
            - action
            - channel
            - outcomeIds
          properties:
            action:
              const: subscribe
              type: string
              x-parser-schema-id: <anonymous-schema-2>
            channel:
              anyOf:
                - const: orderbook
                  type: string
                  x-parser-schema-id: <anonymous-schema-4>
                - const: trades
                  type: string
                  x-parser-schema-id: <anonymous-schema-5>
              x-parser-schema-id: <anonymous-schema-3>
            outcomeIds:
              description: Outcome IDs to subscribe to
              type: array
              items:
                type: string
                x-parser-schema-id: <anonymous-schema-7>
              x-parser-schema-id: <anonymous-schema-6>
          x-parser-schema-id: <anonymous-schema-1>
        title: Subscribe to orderbook
        description: Subscribe to aggregated orderbook updates for markets
        example: |-
          {
            "action": "subscribe",
            "channel": "orderbook",
            "outcomeIds": [
              "clv2abc123def456",
              "clv2xyz789ghi012"
            ]
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribe
    bindings: []
    extensions: &ref_0
      - id: x-parser-unique-object-id
        value: arb-feed
  - &ref_3
    id: unsubscribeArbFeed
    title: Unsubscribe arb feed
    description: Unsubscribe from the arb-return broadcast feed
    type: send
    messages:
      - &ref_6
        id: unsubscribe
        payload:
          - name: Unsubscribe from orderbook
            type: object
            properties:
              - name: action
                type: string
                description: unsubscribe
                required: true
              - name: channel
                type: string
                required: true
              - name: outcomeIds
                type: array
                description: Outcome IDs to unsubscribe from
                required: true
                properties:
                  - name: item
                    type: string
                    required: false
        headers: []
        jsonPayloadSchema:
          title: Unsubscribe
          type: object
          required:
            - action
            - channel
            - outcomeIds
          properties:
            action:
              const: unsubscribe
              type: string
              x-parser-schema-id: <anonymous-schema-9>
            channel:
              anyOf:
                - const: orderbook
                  type: string
                  x-parser-schema-id: <anonymous-schema-11>
                - const: trades
                  type: string
                  x-parser-schema-id: <anonymous-schema-12>
              x-parser-schema-id: <anonymous-schema-10>
            outcomeIds:
              description: Outcome IDs to unsubscribe from
              type: array
              items:
                type: string
                x-parser-schema-id: <anonymous-schema-14>
              x-parser-schema-id: <anonymous-schema-13>
          x-parser-schema-id: <anonymous-schema-8>
        title: Unsubscribe from orderbook
        example: |-
          {
            "action": "unsubscribe",
            "channel": "orderbook",
            "outcomeIds": [
              "clv2abc123def456",
              "clv2xyz789ghi012"
            ]
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: unsubscribe
    bindings: []
    extensions: *ref_0
  - &ref_1
    id: receiveArbFeedBatch
    title: Receive arb feed batch
    description: Batched arb-return update for all markets (arb-feed subscribers)
    type: receive
    messages:
      - &ref_4
        id: arbFeedBatch
        payload:
          - name: Batched arb-return feed update
            description: >-
              Pushed to clients subscribed to { channel: "arb-feed" }. Contains
              arb updates for multiple markets in a single batch.
            type: object
            properties:
              - name: type
                type: string
                description: arb_feed_batch
                required: true
              - name: feed
                type: string
                description: arb
                required: true
              - name: activeVenuesOnly
                type: boolean
                description: Producer assertion that globally inactive venues were excluded
                required: true
              - name: entries
                type: array
                required: true
                properties:
                  - name: marketId
                    type: string
                    required: true
                  - name: venueEventId
                    type: string
                    required: true
                  - name: arbReturn
                    type: number
                    required: true
                  - name: ts
                    type: number
                    required: true
                  - name: liquidityUsd
                    type: number
                    required: false
                  - name: liquidityTier
                    type: string
                    required: false
              - name: flushTs
                type: number
                required: true
              - name: chunk
                type: number
                required: true
              - name: chunkCount
                type: number
                required: true
        headers: []
        jsonPayloadSchema:
          title: ArbFeedBatch
          type: object
          required:
            - type
            - feed
            - activeVenuesOnly
            - entries
            - flushTs
            - chunk
            - chunkCount
          properties:
            type:
              const: arb_feed_batch
              type: string
              x-parser-schema-id: <anonymous-schema-252>
            feed:
              const: arb
              type: string
              x-parser-schema-id: <anonymous-schema-253>
            activeVenuesOnly:
              description: Producer assertion that globally inactive venues were excluded
              const: true
              type: boolean
              x-parser-schema-id: <anonymous-schema-254>
            entries:
              type: array
              items:
                type: object
                required:
                  - marketId
                  - venueEventId
                  - arbReturn
                  - ts
                properties:
                  marketId:
                    type: string
                    x-parser-schema-id: <anonymous-schema-257>
                  venueEventId:
                    anyOf:
                      - type: string
                        x-parser-schema-id: <anonymous-schema-259>
                      - type: 'null'
                        x-parser-schema-id: <anonymous-schema-260>
                    x-parser-schema-id: <anonymous-schema-258>
                  arbReturn:
                    type: number
                    x-parser-schema-id: <anonymous-schema-261>
                  ts:
                    type: number
                    x-parser-schema-id: <anonymous-schema-262>
                  liquidityUsd:
                    type: number
                    x-parser-schema-id: <anonymous-schema-263>
                  liquidityTier:
                    anyOf:
                      - const: deep
                        type: string
                        x-parser-schema-id: <anonymous-schema-265>
                      - const: shallow
                        type: string
                        x-parser-schema-id: <anonymous-schema-266>
                    x-parser-schema-id: <anonymous-schema-264>
                x-parser-schema-id: <anonymous-schema-256>
              x-parser-schema-id: <anonymous-schema-255>
            flushTs:
              type: number
              x-parser-schema-id: <anonymous-schema-267>
            chunk:
              type: number
              x-parser-schema-id: <anonymous-schema-268>
            chunkCount:
              type: number
              x-parser-schema-id: <anonymous-schema-269>
          x-parser-schema-id: <anonymous-schema-251>
        title: Batched arb-return feed update
        description: >-
          Pushed to clients subscribed to { channel: "arb-feed" }. Contains arb
          updates for multiple markets in a single batch.
        example: |-
          {
            "type": "arb_feed_batch",
            "feed": "arb",
            "activeVenuesOnly": true,
            "entries": [],
            "flushTs": 1710000000000,
            "chunk": 1,
            "chunkCount": 1
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: arbFeedBatch
    bindings: []
    extensions: *ref_0
sendOperations:
  - *ref_1
receiveOperations:
  - *ref_2
  - *ref_3
sendMessages:
  - *ref_4
receiveMessages:
  - *ref_5
  - *ref_6
extensions:
  - id: x-parser-unique-object-id
    value: arb-feed
securitySchemes:
  - id: appId
    name: appId
    type: userPassword
    description: >-
      App-level auth: pass appId as a query parameter on connect. Required for
      all connections. The appId must belong to an active app with matching
      allowed origins.
    extensions: []
  - id: jwt
    name: jwt
    type: http
    description: >-
      User-level auth: pass JWT as token query param on connect, or send {
      action: 'authenticate', token } mid-session. Required for user-specific
      events (orders, balances). Same JWT as the REST API.
    scheme: bearer
    bearerFormat: JWT
    extensions: []

````