> For the complete documentation index, see [llms.txt](https://k4k3ru.gitbook.io/k4k3ru-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://k4k3ru.gitbook.io/k4k3ru-docs/api/market-hub/carry-subscribe.md).

# Subscribe to Funding Carry

`MarketHub.Carry.Subscribe` uses the [Carry Get parameters](/k4k3ru-docs/api/market-hub/get-carry-snapshot.md) over a signed WebSocket request. It costs 100 ticks at subscription creation; Carry does not incur periodic subscription ticks. `MarketHub.Carry.Unsubscribe` is signed, costs zero ticks, and uses the same normalized parameters. This contract requires a release containing Carry.

```json
{
  "id": "1",
  "method": "MarketHub.Carry.Subscribe",
  "params": {
    "symbol": "BTC/USDC",
    "baseAsset": "BTC",
    "quantity": "0.1",
    "holdingPeriodMinutes": 1440,
    "route": {
      "buy": {"venue": "binance", "marketType": "perp"},
      "sell": {"venue": "hyperliquid", "marketType": "perp"}
    }
  },
  "auth": {
    "apiKey": "YOUR_API_KEY",
    "timestamp": 1788652800,
    "nonce": "UNIQUE_NONCE",
    "signature": "REQUEST_SIGNATURE"
  }
}
```

The `auth` values above are placeholders: generate a current timestamp, a new nonce and the matching signature for each request.

The ACK returns normalized parameters. The next message is an initial `{"e":"cy","data":...}` event containing the same result type as Get. A subscription remains active when Funding falls below an entry/exit threshold or inputs become unavailable. No search threshold is accepted. Each request monitors one fixed route; subscribe separately to multiple routes on the same connection. Get and Subscribe return the same result type.

Market Hub reevaluates on 100ms refresh boundaries, coalescing observations and checking expiry even without new input. Changes to prices, Mark Price, Funding, settlement identity or availability produce a latest-state event. This is realtime delivery within the source and evaluation cadence, not a guarantee of every venue tick or a message every 100ms. There is no interval parameter. Observation timestamps and book versions alone are suppressed within a second; a snapshot is renewed across evaluation seconds so clients can assess freshness.

Each event is a full replacement snapshot. Unavailable metrics invalidate previous values; recovery restores them without resubscribing. Consumers must also detect connection loss and check `availability.*.validUntil`; absence of an event is not evidence that a market or position remains safe. After reconnecting, establish subscriptions again and use their initial snapshots; this interface does not replay missed events. `evaluationId` is not a monotonic sequence number.

Unsubscribe on the owning WebSocket session with method `MarketHub.Carry.Unsubscribe`, the same normalized fixed parameters, and a newly signed `auth`. After its ACK, verify that events for this evaluation stop; other subscribed routes remain active. Route, quantity and holding period participate in subscription identity. Closing the session removes its subscriptions; shared evaluation survives until the last subscriber leaves.

Market Hub supplies route market data. Trade Hub owns threshold decisions, orders, position/account state, margin and liquidation risk monitoring. Carry Mark Price observations alone cannot establish an account's liquidation risk.

The Go SDK exposes typed subscriptions through `websocket.Module.Carry()`. Construct the WebSocket module with an application-owned credential provider; pass `carry.Params` to `module.Carry().Subscribe(ctx, params)`, consume `subscription.Events()`, and call `module.Carry().Unsubscribe(ctx, subscription)` to remove it. SDK code owns protocol/signature behavior while the application retains signing credentials.

Search/Get's optional-auth 60 requests/minute quota does not specify a Subscribe message rate. Subscribe uses its own lifecycle and creation charge; delivered `cy` events do not each consume 100 ticks.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://k4k3ru.gitbook.io/k4k3ru-docs/api/market-hub/carry-subscribe.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
