Oracle WebSocket API
This reference is generated from the Oracle AsyncAPI 3.0 contract. Prices and volumes are decimal strings; event timestamps are Unix milliseconds.
Explore live data in Oracle Market View.
Subscriptions
Connection & authentication
wss://api.coinpost.ai/oracle/v2/wsWhen CP Auth is enabled, send Authorization: Bearer <token> with the oracle scope in the upgrade request. Browser clients may use ?token=<token> or ?access_token=<token> on this endpoint.
Market subscriptions stream new events; they do not send an initial market snapshot. Fetch initial data through the REST API if needed. After reconnecting, send your subscriptions again. Market events do not include a subscription ID; overlapping subscriptions receive each matching event once.
Authentication methods
| Method | Location | Name |
|---|---|---|
| bearer | header | Authorization |
| httpApiKey | query | token |
| httpApiKey | query | access_token |
Subscribe (type: subscribe)
Use type: "subscribe" to create or replace a subscription. Choose the data feed with channels: klines, tickers, sourceTickers, or status. Each subscription reference page describes one feed and lists only its applicable fields. To select only that feed, explicitly provide the shown channels value.
Subscription limits
A connection supports up to 100 subscriptions and 100 unique symbols.
A market subscription that omits both symbol and symbols uses the connection's entire symbol budget. A connection can have only one such subscription, and it cannot coexist with subscriptions naming individual symbols or another all-asset subscription, even for a different quote. Additional market subscriptions require a separate connection. A subscription containing only the status channel and no symbols can coexist with it. Violating this limit returns an error with code: "symbol_limit"; the existing subscriptions stay active. Reusing the same subscription id replaces that subscription.
Combined subscriptions and defaults
subscribeClient → server
To receive multiple feeds with one ID, list them together in channels. intervals applies only to klines; sources applies only to sourceTickers. If channels is omitted or empty, the defaults are klines, tickers, and sourceTickers; status must be added explicitly. Reusing an ID replaces its full subscription, so send all desired fields again. Distinct subscriptions on one connection need distinct IDs; omitting id always uses default.
Reply: subscribed
Unsubscribe (type: unsubscribe)
unsubscribeClient → server
Remove the entire subscription identified by the request id, including all its channels. Omit or leave id blank to remove default. The server confirms using subscription_id, including when the ID does not exist.
Reply: unsubscribed
Message fields
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Always unsubscribe.Allowed: "unsubscribe" |
id | string | No | Subscription to remove. Default: default.Default: "default" |
Subscription removed (type: unsubscribed)
unsubscribedServer → client
Acknowledges the removed ID, including an ID that did not exist.
Message fields
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Allowed: "unsubscribed" |
subscription_id | string | Yes | The accepted request id, or default if the request id was omitted or blank. |
