Language

Choose a language

/build/rpc / contracts / spot

spot.accept

spot.accept "id" ( {"bob_address":"str","confirmed":bool} ) Record acceptance for a spot offer and return the canonical acceptance payload. IMPORTANT: Review trade terms carefully before accepting. Use 'confirmed' parameter to proceed. Arguments: 1. id (string, required) Spot offer identifier 2. options (json object, optional) Acceptance options { "bob_address": "str", (string, optional) Bob receive address (bech32m) "confirmed": bool, (boolean, optional) Must be true after reviewing terms to accept } Result: { (json object) "accept_id" : "hex", (string, optional) Acceptance identifier (only if confirmed=true) "acceptance" : { (json object, optional) Canonical acceptance payload (only if confirmed=true) ... }, "terms" : {} (empty JSON object, optional) Trade terms for review (if confirmed is missing/false) "action_required" : "str", (string, optional) Instructions for user (if confirmed is missing/false) "warning" : "str" (string, optional) Warning message (if confirmed is missing/false) } Examples: > bitcoin-cli spot.accept "offer_id" (shows terms for review) > bitcoin-cli spot.accept "offer_id" '{"confirmed": true}' (accepts after review)

Signature

spot.accept(id: string, options?: object) → any

Code samples

curl --user "$RPC_USER:$RPC_PASS" \
  --data-binary '{"jsonrpc":"1.0","id":"docs","method":"spot.accept","params":["\"<id>\"",{}]}' \
  -H 'content-type: text/plain;' \
  http://127.0.0.1:8332/

Parameters

NameTypeReq.Description
idstringyesSpot offer identifier
optionsobjectAcceptance options { "bob_address": "str", (string, optional) Bob receive address (bech32m) "confirmed": bool, (boolean, optional) Must be true after reviewing terms to accept }

Result

Type:  any

{ (json object) "accept_id" : "hex", (string, optional) Acceptance identifier (only if confirmed=true) "acceptance" : { (json object, optional) Canonical acceptance payload (only if confirmed=true) ... }, "terms" : {} (empty JSON object, optional) Trade terms for review (if confirmed is missing/false) "action_required" : "str", (string, optional) Instructions for user (if confirmed is missing/false) "warning" : "str" (string, optional) Warning message (if confirmed is missing/false) }

Source: services/core-node/bcore/src/wallet/rpc/contracts.cpp:8544

C++ symbol: spot_accept