Quote a purchase
const url = 'https://api.digirare.com/v1/fills/request';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"items":[{"asset":"example","quantity":1,"max_price_sats":1,"target_outpoint":{"txid":"example","vout":1}}],"buyer_address":"example","buyer_tap_internal_key":"example","delivery_address":"example","delivery_mode":"detached","fee_rate":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.digirare.com/v1/fills/request \ --header 'Content-Type: application/json' \ --data '{ "items": [ { "asset": "example", "quantity": 1, "max_price_sats": 1, "target_outpoint": { "txid": "example", "vout": 1 } } ], "buyer_address": "example", "buyer_tap_internal_key": "example", "delivery_address": "example", "delivery_mode": "detached", "fee_rate": 1 }'Returns a 180-second, non-reserving PSBT snapshot. Detached delivery is the default; a one-unit purchase may instead preserve the asset on its own buyer-owned asset UTXO. Public cart quotes may be requested without a session. A counter_id requires a current session matching buyer_address; foreign and missing counters return the same 404.
Authorizations
Section titled “Authorizations”- None
- session
Request Bodyrequired
Section titled “Request Bodyrequired”object
object
Canonical compact Counterparty key. A subasset uses its A
Optional exact asset outpoint. Never substitutes another unit. Cart quantity must be 1; offers must have asset scope.
object
Mainnet P2TR or P2WPKH address. The SIGNING capability: every signature is verified by reconstructing a BIP-143/BIP-341 witness sighash.
Destination for a detached Counterparty balance. ANY address family Core accepts, legacy P2PKH included: a delivery address is a UTF-8 string inside the detach OP_RETURN, never a signer and never an output script. Deliberately wider than BitcoinAddress.
object
Mainnet P2TR or P2WPKH address. The SIGNING capability: every signature is verified by reconstructing a BIP-143/BIP-341 witness sighash.
Destination for a detached Counterparty balance. ANY address family Core accepts, legacy P2PKH included: a delivery address is a UTF-8 string inside the detach OP_RETURN, never a signer and never an output script. Deliberately wider than BitcoinAddress.
Responses
Section titled “Responses”Non-reserving checkout quote
object
object
object
Mainnet P2TR or P2WPKH address. The SIGNING capability: every signature is verified by reconstructing a BIP-143/BIP-341 witness sighash.
object
object
object
object
Canonical compact Counterparty key. A subasset uses its A
Mainnet P2TR or P2WPKH address. The SIGNING capability: every signature is verified by reconstructing a BIP-143/BIP-341 witness sighash.
object
X-only BIP86 internal key of the marketplace fee output, derived server-side from the fee allocation’s own index (account m/86’/0’/1’, child 0/index, without its parity byte). The fee output is exactly the key-path-only P2TR of this key. Absent when there is no key to vouch for (a pre-fee template, or a fee key that is not configured or no longer derives the stored output).
object
Mainnet P2TR or P2WPKH address. The SIGNING capability: every signature is verified by reconstructing a BIP-143/BIP-341 witness sighash.
Example
{ "result": { "protocol_version": "direct_v1", "signing": { "sighash": "ALL" }, "delivery": { "mode": "detached", "utxo_value_sats": 330, "settlement_groups": 1 }, "reserves_inventory": false }}Stable machine-readable failure
object
On 422 mempool_rejected from a broadcast: which deterministic node policy refused the bytes. Retrying the same bytes fails the same way. fee_floor: re-quote at a higher fee_rate. chain_too_long: too many unconfirmed ancestors; wait for a confirmation, then retry. truc: a version-3 (TRUC) package rule, such as spending an unconfirmed version-3 output; wait for a confirmation, then retry.
The node’s own reject reason, on mempool_rejected (422) and on state_changed (409) when a broadcast lost to a conflicting or replacing spend.
Present and true when mempool_policy is chain_too_long or truc.
On a checkout or accept completion refused as mempool_rejected: the journaled settlement ended and every listing, bid, and asset claim it held was released (its inputs were proven unspent). The quote or accept is replaced; request a new one.
Batch listing routes only: every refused item. The first sets the status and code.
One refused item in a batch refusal’s refused_listings array. Nothing in the batch was changed.
object
On 429 rate_limited: the exact seconds until the oldest counted request leaves the window; a retry then is admitted (also sent as Retry-After). Limited writes are bucketed per route scope in exact sliding 60-second windows: by session address when a valid x-session-token is present, otherwise by IP, with a per-IP ceiling across sessions. Expensive writes: 20, ceiling 120. Signed completions: 120, ceiling 600. Session minting (/auth/*): 60 per IP. A request refused by any bucket is counted by none.
Example
{ "code": "invalid_request", "mempool_policy": "fee_floor"}Stable machine-readable failure
object
On 422 mempool_rejected from a broadcast: which deterministic node policy refused the bytes. Retrying the same bytes fails the same way. fee_floor: re-quote at a higher fee_rate. chain_too_long: too many unconfirmed ancestors; wait for a confirmation, then retry. truc: a version-3 (TRUC) package rule, such as spending an unconfirmed version-3 output; wait for a confirmation, then retry.
The node’s own reject reason, on mempool_rejected (422) and on state_changed (409) when a broadcast lost to a conflicting or replacing spend.
Present and true when mempool_policy is chain_too_long or truc.
On a checkout or accept completion refused as mempool_rejected: the journaled settlement ended and every listing, bid, and asset claim it held was released (its inputs were proven unspent). The quote or accept is replaced; request a new one.
Batch listing routes only: every refused item. The first sets the status and code.
One refused item in a batch refusal’s refused_listings array. Nothing in the batch was changed.
object
On 429 rate_limited: the exact seconds until the oldest counted request leaves the window; a retry then is admitted (also sent as Retry-After). Limited writes are bucketed per route scope in exact sliding 60-second windows: by session address when a valid x-session-token is present, otherwise by IP, with a per-IP ceiling across sessions. Expensive writes: 20, ceiling 120. Signed completions: 120, ceiling 600. Session minting (/auth/*): 60 per IP. A request refused by any bucket is counted by none.
Example
{ "code": "invalid_request", "mempool_policy": "fee_floor"}