Relatick
Reference

PropAMM quote

POST /public/v1/evm/{chain_id}/pamm-quote

Submits a signed quote-update transaction for a propAMM pool to Relatick's partner builders. Ethereum (1) and BSC (56) are supported.

{% hint style="info" %} Oracle and contract addresses: see Contract addresses. {% endhint %}

Authentication and rate limits

No API key is required. Requests without a key are rate-limited per IP address: 5 requests per second and 120 per minute. Past either limit the endpoint returns 429 and the caller is blocked for 60 seconds.

To quote at a higher rate, send a Trading API key. Any valid key raises both limits 100 times, to 500 requests per second and 12,000 per minute:

Authorization: Bearer $METRIC_TRADING_API_KEY

An invalid key is rejected with 401. Leave the header out rather than send a key you are not sure of.

Path parameters

Name
Type
Description
chain_id
integer
1 (Ethereum) or 56 (BSC). A chain Relatick doesn't serve returns 404. Any other supported chain returns 400.

Request body

Send JSON. Hex values may include the 0x prefix.

Field
Type
Chains
Description
tx
hex string
Both
Required. Signed quote-update transaction for the path's chain. Send "0x" to cancel the quote.
blockNumber
integer
Both
Required. Block for which the quote is valid. On BSC, it is the final valid block, and a live quote requires a value greater than 0.
replacementUuid
hex string, 16 bytes
Both
Required. Quote identifier.
replacementSeqNumber
integer
Both
Required. Must be greater than 0. Increase it for each update using the same replacementUuid.
disableCrossRegionSharing
boolean
Both
Optional. When true, the builder does not share the quote across regions. BTCS and ETHGas always receive true, even if omitted or false; Relatick sends directly to every BTCS and ETHGas region.
responseTimeoutMs
integer, milliseconds
Both
Optional. How long to wait for builder answers before responding, measured from arrival. It can only lower the default of 500 ms. 0 responds as soon as the update is queued for every builder.
maxTimestamp
integer, Unix seconds
BSC
Quote expiry. On a live BSC quote it can be at most five seconds ahead of the server clock. Required for BlockRazor and Jet. Without it, the quote reaches 48Club but skips both. 0 or a millisecond value is rejected on both chains; only BSC uses it.
alwaysInclude
boolean
BSC
Optional, default true. Forwarded directly to 48Club (false requests conditional inclusion there). BlockRazor and Jet always authenticate and do not receive this flag; false does not guarantee conditional inclusion by either. Ignored on Ethereum.
quoteAddress
address
Ethereum
Oracle contract the update writes to, normally the transaction's to (for example the CompressedOracle). Not the pool: pools go in poolAddresses. Ignored on BSC.
poolAddresses
address\[]
Ethereum
Pools covered by the quote. Ignored on BSC.
assetPairs
hex string\[], 40 bytes each
Ethereum
Token pairs priced by this update. Each joins two 20-byte addresses. Ignored on BSC.

On Ethereum, always include as much information as you can: quoteAddress, poolAddresses and assetPairs. Builders use it to match the quote to a trade, and a quote they can't match is never included. A builder may not use every field, but the more you send, the more likely your quote is to be included.

Unknown fields are dropped without an error, so check field names carefully.

Send the same tx, replacementUuid and replacementSeqNumber to Relatick and to any builder you also submit to directly.

Building delivery mechanics

Chain
Builder delivery
Ethereum
Relatick applies the update to the simulated head block. It forwards it to Titan, Quasar, BuilderNet, Bombora, Eureka, BTCS and ETHGas. A builder includes the update only with a trade against your pool. It places the update before that trade.
BSC: 48Club
Receives the update over a quote stream. A newer quote replaces the earlier one. Send a higher replacementSeqNumber with the same replacementUuid. A cancel removes the quote.
BSC: BlockRazor
Receives the update as a bundle placed first in the block. This is paid inclusion. An accepted bundle may land and pay gas without a trade, even when the request sets alwaysInclude: false. BlockRazor cannot cancel a bundle. A live quote therefore needs maxTimestamp.
BSC: Jet
Receives the update as a bundle. This is paid inclusion. An accepted bundle may land and pay gas without a trade, even when the request sets alwaysInclude: false. Jet has no first-in-block placement, so in Jet-built blocks the update is not guaranteed to land ahead of trades against your pool. Jet cannot cancel a bundle. A live quote therefore needs maxTimestamp.

alwaysInclude: false requests conditional inclusion from 48Club, not a guarantee of conditional inclusion from BlockRazor or Jet. Relatick authenticates every BlockRazor and Jet submission with its own credentials; you don't need a BlockRazor or Jet key. If Relatick has no usable credential for one of them, that builder reports skipped: Blockrazor submission requires PAMM_BLOCKRAZOR_API_KEY or skipped: Jet submission requires PAMM_JET_API_KEY for either setting; the update still goes to the other builders. An HTTP 200 or builder acknowledgement does not prove onchain inclusion.

Request

Ethereum

curl -X POST "https://api.metric.xyz/public/v1/evm/1/pamm-quote" \
  -H "Authorization: Bearer $METRIC_TRADING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "tx": "0x02f8b10182…", "blockNumber": 23456789, "replacementUuid": "0x6f1c2b7e9a4d4c1e8b3a5d7f0e2c4a61", "replacementSeqNumber": 7, "quoteAddress": "0xe844701934d9c6085b292e428f41b911cc0b3872", "poolAddresses": ["0xF85AfbADeCC7F23Dd173ed706f07d9C7e2473e24"] }'

BSC

curl -X POST "https://api.metric.xyz/public/v1/evm/56/pamm-quote" \
  -H "Authorization: Bearer $METRIC_TRADING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "tx": "0x02f8b13882…", "blockNumber": 63456789, "replacementUuid": "0x6f1c2b7e9a4d4c1e8b3a5d7f0e2c4a61", "replacementSeqNumber": 7, "maxTimestamp": 1790508442 }'

Cancel

Reuse the replacementUuid, increase the replacementSeqNumber and send an empty tx:

curl -X POST "https://api.metric.xyz/public/v1/evm/1/pamm-quote" \
  -H "Authorization: Bearer $METRIC_TRADING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "tx": "0x", "blockNumber": 23456789, "replacementUuid": "0x6f1c2b7e9a4d4c1e8b3a5d7f0e2c4a61", "replacementSeqNumber": 8 }'

{% hint style="warning" %} On BSC, a cancel only reaches 48Club. Neither BlockRazor nor Jet has a cancel operation. A bundle either has already accepted stays live until its blockNumber or maxTimestamp passes, even after a newer quote or cancel. The same signed transaction can only land once. An outdated quote can still land during that window. Keep maxTimestamp as short as your update cadence allows. {% endhint %}

Response

The endpoint returns 200 OK with a PammQuoteResponse, even if no builder accepts the update. Check accepted.

Relatick responds once every builder has answered or the response deadline passes (500 ms from arrival, or your responseTimeoutMs). A builder that hasn't answered by then is reported as pending. Relatick still delivers the update to it, but its final result isn't returned to you.

Field
Description
accepted
true when at least one builder acknowledged the update by the response deadline.
providers[].provider
Builder and endpoint, such as titan:wss://…, club48:wss://pamm.48.club, blockrazor:https://tokyo.builder.blockrazor.io, or jet:https://rpc.bsc.metric.jetbldr.xyz.
providers[].accepted
Whether this builder acknowledged the update.
providers[].timestampNs
Time the builder acknowledged the update, when reported.
providers[].bundleHash
Accepted bundle hash. BlockRazor and Jet only.
providers[].pending
true when the builder had not answered by the response deadline. accepted is then false and there is no error. Omitted otherwise.
providers[].error
Reason the update was not accepted. An error starting with skipped: means Relatick did not submit to that builder.

Ethereum example

{
  "accepted": true,
  "providers": [
    {
      "provider": "titan:wss://eu.rpc.titanbuilder.xyz/ws/sendquoteupdate",
      "accepted": true,
      "timestampNs": 1790508439123456789
    },
    {
      "provider": "bombora:wss://direct-tyo-1.bombora.build/ws/sendquoteupdate",
      "accepted": false,
      "pending": true
    }
  ]
}

BSC example

{
  "accepted": true,
  "providers": [
    {
      "provider": "club48:wss://pamm.48.club",
      "accepted": true,
      "timestampNs": 1790508439123456789
    },
    {
      "provider": "blockrazor:https://tokyo.builder.blockrazor.io",
      "accepted": true,
      "bundleHash": "0x9c1e…"
    }
  ]
}

On BSC, the BlockRazor and Jet entries each report a skip in two cases, naming their own builder:

  • The request had no maxTimestamp: "accepted": false, "error": "skipped: maxTimestamp is required for Blockrazor, which cannot cancel a bundle" (Jet: "skipped: maxTimestamp is required for Jet, which cannot cancel a bundle").
  • The request was a cancel: "skipped: blockrazor has no cancel operation" (Jet: "skipped: jet has no cancel operation").

An acknowledgement is not inclusion. Measure fills, not acknowledgements.

Timing

  • Relatick responds within 500 ms of arrival, or sooner if you set responseTimeoutMs. Builders that haven't answered by then are reported as pending.
  • Each builder has three seconds to acknowledge. Relatick keeps delivering a pending update in the background until then.
  • An update with less than 500 ms of that time left can be dropped before it's sent. This applies to the Ethereum builders and 48Club. You only see such an update as pending.
  • Slow builder connections reconnect automatically.
  • Ethereum: the simulated-head update runs in the background.
  • BlockRazor and Jet (each endpoint on its own; one never waits for the other):
  • Relatick sends one request at a time per replacementUuid, and up to 8 at once per endpoint from each Relatick server. A push waits, and is sent once a request finishes, when its replacementUuid already has a request in flight, when the same bundle is already being sent under another replacementUuid (it then reuses that request's result instead of being sent twice), or when all 8 are in use. Below 8, one slow request doesn't delay another replacementUuid's pushes; with all 8 in use, every new push waits for a free one. Each replacementUuid keeps only its newest waiting push. An older waiting push from the same replacementUuid is never sent and reports skipped: superseded by a newer quote before it was sent. A cancel removes a waiting push the same way. A request already in flight can't be recalled.
  • A push older than one already seen for its replacementUuid is ignored (skipped: older than a quote already seen for this stream). A higher blockNumber always counts as newer. For 30 s after a cancel, a live quote on the same replacementUuid with a replacementSeqNumber at or below the cancel's is ignored.
  • Start a new replacementUuid for each block, or never restart replacementSeqNumber under one replacementUuid. A new replacementUuid isn't held behind the previous block's request, but it doesn't replace the previous block's waiting push, so that push is still sent.
  • Resending an already accepted bundle (same tx, blockNumber and maxTimestamp) returns the earlier result without sending it again. Resending a quote whose earlier copy is still waiting or being sent reports skipped: this quote is already queued or being sent.
  • Up to 256 pushes can wait per endpoint. When the queue is full, a push from a replacementUuid with nothing waiting reports skipped: parked queue full. A waiting push whose maxTimestamp passes is dropped (skipped: maxTimestamp passed while queued).
  • If the builder already holds the bundle (BlockRazor: already known or bundle already exist), Relatick reports the update as accepted.
  • After a transport error, a timeout, an auth failure, a 408, a 429, a 5xx or (Jet only) a 400 saying Jet never dispatched the request, Relatick pauses that endpoint for 500 ms to 30 s. If the builder asks Relatick to wait (Retry-After), Relatick waits up to 30 s. Pushes that arrive during the pause report skipped: backing off for …ms more.

Errors

Errors return an ApiError body:

{ "error": "" }
Status
When
400
The JSON is malformed, the chain_id is a chain Relatick serves other than 1 or 56, or a value is malformed. This includes malformed hex, wrong field lengths, replacementSeqNumber of 0, or a transaction signed for another chain. On BSC, a live quote cannot have blockNumber: 0. maxTimestamp cannot be 0 or milliseconds, or, on a live BSC quote, over five seconds ahead.
401
A Trading API key was sent and is invalid. No key is required.
404
Relatick doesn't serve the chain_id (Unknown chainId).
415
The Content-Type: application/json header is missing.
422
A required field is missing or has the wrong type.
429
Rate limit exceeded.
503
Maker submission is disabled for this chain, or no builder is configured for it. Every 503 returns the same body, Service temporarily unavailable, so the cases can't be told apart.

400 messages name the failing field or value. Body-parsing errors (malformed JSON, 415 and 422) return a plain-text body instead of ApiError.

Last updated 29 days ago