POST https://solver-relay-v2.chaindefuser.com/rpc
Authentication
This endpoint requires a JWT authentication token. Include the token in theX-API-Key header:
quote
Request price quotes from connected solvers. The Message Bus forwards the request to all solvers, waits up to 3000ms, and returns all available options.Only one of
exact_amount_in or exact_amount_out should be provided, not both.string
required
Asset to trade from (e.g.,
nep141:ft1.near)string
required
Asset to trade to (e.g.,
nep141:ft2.near)string
Amount of input token for exchange
string
Amount of output token for exchange
number
default:"60000"
Minimum validity time for offers (in milliseconds). Shorter times may yield better prices.
Example request
Example request
Example response
Example response
quote_hash- Quote response hashdefuse_asset_identifier_in- Asset to trade fromdefuse_asset_identifier_out- Asset to trade toamount_in- Input amount (exact if specified, proposed otherwise)amount_out- Output amount (exact if specified, proposed otherwise)expiration_time- Expiration timestamp of the offer
publish_intent
Submit a signed user intent for execution. Supported signature standards:nep413, erc191, raw_ed25519.
public_key and signature come from signing the intent message with the NEAR key you registered on the Verifier contract (add_public_key, see the Quickstart’s “Deposit liquidity” step), not from a value you construct by hand. The Example Solver walks through the real signing code (near-api-js’s signMessage, then bs58-encoding the result with an ed25519: prefix). For the full field-by-field spec of every supported standard (including erc191 and raw_ed25519 below), see Signing Intents.- NEP-413
- ERC-191
- Raw Ed25519
string[]
required
Quote response hashes from solvers
object
required
standard-"nep413"payload.message- Stringified intent payloadpayload.nonce- Unique noncepayload.recipient-"intents.near"payload.callbackUrl- Optional, for some walletssignature- Signature of the payloadpublic_key- Signer’s public key
Example request
Example request
Example response
Example response
status-"OK"or"FAILED"reason- Error reason (if failed)intent_hash- Intent identifier
publish_intents
Submit multiple signed intents in one call. If any fail, the relay automatically requotes and retries the failed ones rather than failing the whole batch.string[]
required
Quote response hashes from solvers, one set per intent being published
object[]
required
Array of signed intents, same shape as
signed_data in publish_intentboolean
default:"false"
When
true, automatically requests a fresh quote and retries any intent that fails to publish, instead of just reporting the failureExample request
Example request
Example response
Example response
get_status
Check the status of an intent’s execution.string
required
Intent identifier
Example request
Example request
Example response
Example response
intent_hash- Intent identifierstatus- Execution status (see status values below)status_details- Human-readable detail on the current status (e.g. failure reason forNOT_FOUND_OR_NOT_VALID)data.hash- NEAR transaction hash (if available)filled_amounts- Amounts actually filled per leg, in the order the intent’s diffs were specified (useful when atoken_diffonly partially fills)