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
chain_id1 (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.
tx"0x" to cancel the quote.blockNumber0.replacementUuidreplacementSeqNumber0. Increase it for each update using the same replacementUuid.disableCrossRegionSharingtrue, 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.responseTimeoutMs0 responds as soon as the update is queued for every builder.maxTimestamp0 or a millisecond value is rejected on both chains; only BSC uses it.alwaysIncludetrue. 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.quoteAddressto (for example the CompressedOracle). Not the pool: pools go in poolAddresses. Ignored on BSC.poolAddressesassetPairsOn 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
replacementSeqNumber with the same replacementUuid. A cancel removes the quote.alwaysInclude: false. BlockRazor cannot cancel a bundle. A live quote therefore needs maxTimestamp.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.
acceptedtrue when at least one builder acknowledged the update by the response deadline.providers[].providertitan:wss://…, club48:wss://pamm.48.club, blockrazor:https://tokyo.builder.blockrazor.io, or jet:https://rpc.bsc.metric.jetbldr.xyz.providers[].acceptedproviders[].timestampNsproviders[].bundleHashproviders[].pendingtrue when the builder had not answered by the response deadline. accepted is then false and there is no error. Omitted otherwise.providers[].errorskipped: 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 aspending. - Each builder has three seconds to acknowledge. Relatick keeps delivering a
pendingupdate 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 itsreplacementUuidalready has a request in flight, when the same bundle is already being sent under anotherreplacementUuid(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 anotherreplacementUuid's pushes; with all 8 in use, every new push waits for a free one. EachreplacementUuidkeeps only its newest waiting push. An older waiting push from the samereplacementUuidis 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
replacementUuidis ignored (skipped: older than a quote already seen for this stream). A higherblockNumberalways counts as newer. For 30 s after a cancel, a live quote on the samereplacementUuidwith areplacementSeqNumberat or below the cancel's is ignored. - Start a new
replacementUuidfor each block, or never restartreplacementSeqNumberunder onereplacementUuid. A newreplacementUuidisn'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
replacementUuidwith nothing waiting reports skipped: parked queue full. A waiting push whosemaxTimestamppasses 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": "" }400chain_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.401404chain_id (Unknown chainId).415Content-Type: application/json header is missing.422429503503 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
Relatick