HYBRID-CHAINDEVELOPERS
DOCUMENTATIONv2
POST

Price feeds

Create composite

/api/v2/price-feeds/composites
AUTHENTICATIONBearer token · pricing:writeAUTHORITATIVE OWNERmarket-data-serviceCONTRACT AUTHORITYGenerated Rust OpenAPISTATUSSource ready · production listed

PURPOSE + BUSINESS CONTEXT

Register an owner-scoped, DataStream-backed composite from two through eight verified direct provider mappings without granting publication or trading authority.

WHEN THIS CALL IS USEFUL

After discovering canonical instruments and live provider coverage, use this planning contract to define a private workspace-owned aggregate with explicit source, freshness, outlier, quorum, and failover policy.

OUTCOME · Create or advance

What changes

When promoted, creates a private DataStream-backed aggregate feed, aggregation policy, ordered provider mappings, and metered custom-feed usage evidence. It does not enable publication or trading ingress.

WHY IT MATTERS

  • Gives people and agents a contract-backed way to advance composite.
  • Makes feed provenance, quality, delivery entitlement, replay limits, and workspace-owned composite policy explicit before price data enters valuation or decision workflows.

ISOLATION + AUTHORITY

Instrument, provider, observation, signature, hash-chain, aggregation, composite owner, subscription, delivery, billing, valuation, market, and trading boundaries remain distinct. A feed, snapshot, replay, plan, or subscription supplies data only and grants no oracle-finality, valuation approval, publisher, order, matching, settlement, or trading authority.

BEFORE YOU CALL

  • Authenticate at the documented boundary: bearer+scope.
  • Supply the required name (body), instrument_uuid (body), sources (body) exactly as defined by the live contract.
  • Use one Idempotency-Key only for retries of the same byte-equivalent logical mutation.
  • Resolve the canonical instrument and feed, source and aggregation policy, required freshness and quality, and any subscription entitlement or replay window.

WHAT TO DO NEXT

  • Re-read the created or updated feed or subscription and confirm its owner, plan, entitlements, lifecycle state, and effective policy.
  • Reconcile an ambiguous result with the same idempotency key, then verify feed provenance and freshness before dependent use.

AGENT GUIDANCE

  • Use composite only for the purpose and lifecycle stage described by this operation; do not treat it as authority for an adjacent action.
  • Supply the required name (body), instrument_uuid (body), sources (body) exactly as defined by the live contract.
  • Preserve decimal values and observation timestamps exactly; distinguish source time, ingestion time, sequence, freshness, health, quality, aggregation, delivery entitlement, and business acceptance.
  • After a timeout or conflict, read authoritative state before deciding whether an equivalent retry is safe.
MACHINE CONTRACT

The exact deployed parameters, schemas, responses, security requirements, and Hybrid-Chain agent metadata are authoritative at this operation's production OpenAPI JSON Pointer. The readable tables below add integration guidance; the deployed OpenAPI controls if guidance and the machine contract ever differ.

Open the authoritative production contract

EXTENDED INTEGRATION GUIDANCE

Readable request and response reference

Examples illustrate integration intent; the referenced OpenAPI operation and component schemas define the executable shape.

PARAMETERS

Headers, path, query, and body

NAMELOCATIONPRESENCETYPE / RULES / PURPOSE
AuthorizationheaderRequired

Bearer tokenCredential containing the pricing:write scope.EXAMPLEBearer hc_live_…

Idempotency-KeyheaderRequired

ASCII string · 1–128Caller-generated key reused for every retry of the same logical mutation.EXAMPLEcomposite-btc-usd-treasury-v1

Content-TypeheaderRequired

application/jsonSigned mutations accept canonical JSON only.EXAMPLEapplication/json

Content-DigestheaderRequired

RFC 9530 SHA-256 digestDigest of the exact transmitted body bytes.EXAMPLEsha-256=:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=:

Signature-InputheaderRequired

RFC 9421 signature parametersCovers @method, @path, content-digest, content-type, and idempotency-key; includes keyid, nonce, created, and expires.EXAMPLEsig1=("@method" "@path" "content-digest" "content-type" "idempotency-key");created=1786582800;expires=1786583100;nonce="01J…";keyid="machine-prod"

SignatureheaderRequired

Ed25519 HTTP Message SignatureSignature made by an active public key registered to the authenticated client.EXAMPLEsig1=:base64-signature:

namebodyRequired

string · 1–120Workspace-visible private composite name.EXAMPLETreasury BTC / USD reference

instrument_uuidbodyRequired

32-character hexadecimal identifierActive canonical instrument covered by every selected direct provider mapping.EXAMPLE56a00e46cfbd4a09a4b087d052fd64be

sourcesbodyRequired

object[] · 2–8 unique providersOrdered mappings. Each requires provider_uuid and a 1–64 character provider_symbol; optional finite weight is 0.000001–100 and defaults to 1. Array order becomes source priority.EXAMPLE[{"provider_uuid":"0aadf922185145e48e7c87cf3d2759ec","provider_symbol":"BTCUSD","weight":1},{"provider_uuid":"a754639436a644cf8437da4cfab94242","provider_symbol":"XBT/USD","weight":1}]

methodbodyOptional

WEIGHTED_MEDIAN | MEDIAN | WEIGHTED_MEANAggregation method; defaults to WEIGHTED_MEDIAN.EXAMPLEWEIGHTED_MEDIAN

cadence_msbodyOptional

integer · 100–60000Target cadence; defaults to 1000 milliseconds.EXAMPLE1000

staleness_threshold_msbodyOptional

integer · 500–120000Maximum source age admitted by the aggregate; defaults to 5000.EXAMPLE5000

min_sourcesbodyOptional

integer · 1–selected source countHealthy-source quorum; defaults to 2.EXAMPLE2

max_deviation_bpsbodyOptional

integer · 1–5000Outlier threshold in basis points; defaults to 100.EXAMPLE100

failover_modebodyOptional

ALLOW_SINGLE | STRICTFeed degradation behavior; defaults to ALLOW_SINGLE and never replaces consumer fitness policy.EXAMPLESTRICT

REQUEST

JSON body example

{
  "name": "Treasury BTC / USD reference",
  "instrument_uuid": "56a00e46cfbd4a09a4b087d052fd64be",
  "sources": [
    {
      "provider_uuid": "0aadf922185145e48e7c87cf3d2759ec",
      "provider_symbol": "BTCUSD",
      "weight": 1
    },
    {
      "provider_uuid": "a754639436a644cf8437da4cfab94242",
      "provider_symbol": "XBT/USD",
      "weight": 1
    }
  ],
  "method": "WEIGHTED_MEDIAN",
  "cadence_ms": 1000,
  "staleness_threshold_ms": 5000,
  "min_sources": 2,
  "max_deviation_bps": 100,
  "failover_mode": "STRICT"
}

RESPONSES

Status and payload examples

201Stable private composite registration and retained source count.Mutation completed · JSON RESPONSE+
{
  "feed_id": "76ac1ff82d8c479cae399011db10ac4f",
  "name": "Treasury BTC / USD reference",
  "instrument": "BTC-USD",
  "mode": "AGGREGATED",
  "source_count": 2
}
INTEGRATION DECISION
CALLER ACTION
Accept the returned representation or receipt, then re-read the created or updated feed or subscription and confirm its owner, plan, entitlements, lifecycle state, and effective policy.
RETRY SAFETY
Do not repeat a successful mutation merely to confirm it. For one logical mutation, retain the same Idempotency-Key and byte-equivalent request. Never reuse that key for changed instructions.
STATE RECONCILIATION
Persist returned identifiers, versions, commitments, and receipts. Refresh the feed, source mapping, observation timestamp, quality and staleness state, policy version, and delivery or command receipt.
404The selected canonical instrument is unavailable.Resource not visible · JSON RESPONSE+
{
  "code": "price_feed_instrument_not_found",
  "message": "The selected canonical instrument is unavailable."
}
INTEGRATION DECISIONprice_feed_instrument_not_found
CALLER ACTION
Verify the canonical identifier and authenticated owner boundary. A 404 may intentionally conceal a resource outside the caller's authority.
RETRY SAFETY
Do not retry the unchanged identifier repeatedly. Refresh the relevant collection or lookup before choosing another identifier.
STATE RECONCILIATION
Refresh the feed, source mapping, observation timestamp, quality and staleness state, policy version, and delivery or command receipt.
ESCALATE WHEN
Escalate when source identity, observation time, confidence, staleness, entitlement, or delivery evidence cannot be reconciled.
401The bearer credential is missing, expired, or invalid.Authentication required · JSON RESPONSE+
{
  "code": "invalid_credentials",
  "message": "The bearer credential is missing, expired, or invalid."
}
INTEGRATION DECISIONinvalid_credentials
CALLER ACTION
Discard the rejected credential, complete the documented authentication or reassertion flow, and rebuild any request signature with fresh timestamps and nonces.
RETRY SAFETY
Retry only with a newly valid credential and fresh replay-protection values. For one logical mutation, retain the same Idempotency-Key and byte-equivalent request. Never reuse that key for changed instructions.
STATE RECONCILIATION
Assume the outcome is unknown only when the connection failed after transmission; otherwise authentication failed before domain work. Refresh the feed, source mapping, observation timestamp, quality and staleness state, policy version, and delivery or command receipt.
ESCALATE WHEN
Escalate when source identity, observation time, confidence, staleness, entitlement, or delivery evidence cannot be reconciled.
403The credential lacks pricing:write or the selected resource is outside the authenticated workspace.Authority or policy denied · JSON RESPONSE+
{
  "code": "insufficient_scope",
  "message": "The credential lacks pricing:write or the selected resource is outside the authenticated workspace."
}
INTEGRATION DECISIONinsufficient_scope
CALLER ACTION
Verify the exact scope, tenant or workspace membership, owner boundary, step-up purpose, feature policy, and resource eligibility. Never broaden authority automatically.
RETRY SAFETY
Do not retry until the missing authority or policy condition has been deliberately resolved with least privilege.
STATE RECONCILIATION
Confirm the caller and resource resolve to the same authority boundary for workspace price-feed definitions, source mappings, observations, quality status, subscriptions, and delivery receipts.
ESCALATE WHEN
Escalate when source identity, observation time, confidence, staleness, entitlement, or delivery evidence cannot be reconciled.
409The Idempotency-Key conflicts with another request or the requested lifecycle transition is forbidden.State reconciliation required · JSON RESPONSE+
{
  "code": "price_feed_conflict",
  "message": "The Idempotency-Key conflicts with another request or the requested lifecycle transition is forbidden."
}
INTEGRATION DECISIONprice_feed_conflict
CALLER ACTION
Stop the mutation sequence and fetch the latest authoritative resource, lifecycle state, version, ETag, reservation, or existing idempotency result.
RETRY SAFETY
Retry only after reconciling the conflict. For one logical mutation, retain the same Idempotency-Key and byte-equivalent request. Never reuse that key for changed instructions.
STATE RECONCILIATION
Refresh the feed, source mapping, observation timestamp, quality and staleness state, policy version, and delivery or command receipt.
ESCALATE WHEN
Escalate when source identity, observation time, confidence, staleness, entitlement, or delivery evidence cannot be reconciled.
422An identifier, field, source mapping, policy bound, action, or Idempotency-Key is invalid.Request must change · JSON RESPONSE+
{
  "code": "invalid_price_feed_command",
  "message": "An identifier, field, source mapping, policy bound, action, or Idempotency-Key is invalid."
}
INTEGRATION DECISIONinvalid_price_feed_command
CALLER ACTION
Rebuild the request from the live OpenAPI operation and correct the rejected method, media type, header, parameter, or body field.
RETRY SAFETY
Do not retry the same invalid request. For one logical mutation, retain the same Idempotency-Key and byte-equivalent request. Never reuse that key for changed instructions.
STATE RECONCILIATION
Compare the submitted values with the documented constraints before another call. Refresh the feed, source mapping, observation timestamp, quality and staleness state, policy version, and delivery or command receipt.
ESCALATE WHEN
Escalate when source identity, observation time, confidence, staleness, entitlement, or delivery evidence cannot be reconciled.
503The authoritative Core pricing mutation boundary is unavailable.Dependency unavailable or outcome uncertain · JSON RESPONSE+
{
  "code": "price_feeds_unavailable",
  "message": "The authoritative Core pricing mutation boundary is unavailable."
}
INTEGRATION DECISIONprice_feeds_unavailable
CALLER ACTION
Preserve the exact request and treat the outcome as uncertain until authoritative state proves whether it committed.
RETRY SAFETY
Reconcile before retrying. For one logical mutation, retain the same Idempotency-Key and byte-equivalent request. Never reuse that key for changed instructions. Use bounded backoff with jitter.
STATE RECONCILIATION
Refresh the feed, source mapping, observation timestamp, quality and staleness state, policy version, and delivery or command receipt.
ESCALATE WHEN
Escalate when source identity, observation time, confidence, staleness, entitlement, or delivery evidence cannot be reconciled.

OPERATIONAL NOTES

Security and lifecycle guarantees

  • Every provider must already publish the selected normalized instrument through an ACTIVE direct feed. Unsupported coverage, duplicate providers, invalid weights, or fewer than two mappings reject the complete command.
  • The definition creates a private workspace-owned DataStream, aggregate policy, ordered provider mappings, and metered custom-feed evidence. It does not publish an observation or add publisher credentials.
  • Weights and policy define normalization behavior, not fitness for a business decision. Consequential consumers must independently evaluate signatures, freshness, health, source_count, deviation, quote asset, and their own acceptance policy.
  • The signed, idempotent command grants no trading, matching, ingress, settlement, market-status, value-movement, or traffic authority. Re-read GET /api/v2/price-feeds after an ambiguous response; results are no-store.
DOCUMENTATION STATUS

This route is implemented in canonical gateway source and appears in the production OpenAPI snapshot observed 2026-09-11T06:35:11.572Z. Authentication, tenant, feature, venue, and market policy still apply.

Verify the exact production OpenAPI operation Return to the V2 directory