Language

Choose a language

/build/rpc / contracts / spot

spot.import_offer

spot.import_offer {} Import a spot swap offer JSON payload into the wallet registry. Arguments: 1. offer (json object, required) Offer payload { } Result: { (json object) "offer_id" : "hex", (string) Unique offer identifier "offer" : { (json object) Wallet-normalised offer payload ... } } Examples: > bitcoin-cli spot.import_offer {...}

Signature

spot.import_offer(offer: object) → any

Code samples

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

Parameters

NameTypeReq.Description
offerobjectyesOffer payload { }

Result

Type:  any

{ (json object) "offer_id" : "hex", (string) Unique offer identifier "offer" : { (json object) Wallet-normalised offer payload ... } }

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

C++ symbol: spot_import_offer