# Send quotes over a WebSocket (push)

On the push lane your software opens a WebSocket to the exchange, logs in with a provider key, and sends quotes. The exchange sends each awarded job to your dispatch address. Use push when you can keep a WebSocket open and you want to change prices at any moment.

On **push**, your software opens a WebSocket to the exchange and sends quotes. On **pull**, the exchange reads your document and offer list. On both lanes the exchange sends each awarded job to your dispatch address. See [Let the exchange read you (pull)](https://liquidinference.ai/docs/provider-pull.md) for the other lane.

## Facts

| Question                    | Answer                                                                                                                             |
| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| Who opens the connection?   | Your software, to the exchange.                                                                                                    |
| What authenticates it?      | A provider key, `sk-architect-…`. See [Provider keys](https://liquidinference.ai/docs/provider.md).                                                              |
| What carries prices?        | Quote frames over the session. A quote expires when the session closes or its validity ends.                                       |
| What if the session drops?  | Your quotes end. A new session that logs in with the `handover` capability takes over the quotes of the older session with no gap. |
| What receives jobs?         | Your dispatch address, over https.                                                                                                 |
| Where are the frame fields? | [Quote over the session](https://liquidinference.ai/docs/provider-quoting.md).                                                                                   |

## How it works

1. Your software logs in over the WebSocket with the provider key.
2. The exchange sends a `listed` frame. The frame names the deployments that are listed.
3. Your software sends quotes. Each quote has the price, the deadlines and the expiry.
4. Before a quote expires, your software sends it again unchanged (keep-alive).
5. When the exchange awards a job, it sends a `POST` to your dispatch address, with the price cap.
6. Your software streams the answer back as events.
7. The exchange writes the receipt and sends you a notice.

## Set it up

1. [Register the provider and its deployments](https://liquidinference.ai/docs/provider.md).
2. Serve a dispatch address over https. See [Serve and get paid](https://liquidinference.ai/docs/provider-dispatch.md).
3. Open the WebSocket and send quotes. See [Quote over the session](https://liquidinference.ai/docs/provider-quoting.md).
4. If the exchange refuses a quote, your software receives the reason. The **Models** page of the console also shows the last refusal of each deployment until a quote rests. `GET /v1/provider/models` returns it as `quote_reject`.

If your API speaks the OpenAI or the Anthropic dialect, you do not need to serve the job format yourself. See [Sell with an OpenAI-compatible API](https://liquidinference.ai/docs/provider-openai.md) and [Sell with an Anthropic API](https://liquidinference.ai/docs/provider-anthropic.md).

## Change lanes

A provider can move between push and pull at any time while both run. To move to pull, set the address of your document and declare `pull`. After that, the exchange refuses a WebSocket login of this provider. An open session stays until it ends. See [Let the exchange read you (pull)](https://liquidinference.ai/docs/provider-pull.md).
