Find something... ⌘K

Supported systems / Details

Bitcoin addresses

Which Bitcoin addresses Maxy pays, which it takes payment from, and how to check one before you quote. It is for the screen where the user types, pastes or scans a Bitcoin address.

Receiving BTC

Address typeLooks likeBuying with an EVM coinBuying with SOL
Native SegWit, P2WPKHbc1q…, 42 charactersYesYes
Native SegWit, P2WSHbc1q…, 62 charactersYesYes
Taproot, P2TRbc1p…NoYes, live; the sandbox takes bc1q… only
Nested SegWit, P2SH3…NoNo
Legacy, P2PKH1…NoNo

An EVM buy refuses any other address before the wallet is asked to sign. The order binds the receiving address: the intent the user signs carries the hash of its output script, and the settler pays the solver only for a payment to that script.

Paying BTC

OrderPays from
Selling BTC for an EVM coinAny Bitcoin wallet, paying one output of the exact amount to the deposit address. The SDK's swap.payDeposit pays from P2WPKH (bc1q…) or P2SH-P2WPKH (3…)
Selling BTC for SOLP2WPKH (bc1q…) or Taproot (bc1p…), through a Bitcoin signer

A deposit address belongs to the solver that locked the payout for this order. It is decoded from the script the settler stores. A payment that misses the amount or the window is returned under the mispaid-sell policy.

Check an address

GET /addresses/validate?chain=bitcoin&address=… says whether an address is well formed and whether a buy with an EVM coin would pay it. It reads nothing from a chain. The samples use the setup from Get a quote.

curlTypeScriptPython
Copy
curl -s -G -H "x-maxy-key: $MAXY_API_KEY" "$BASE/addresses/validate" -d chain=bitcoin -d address=bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq

What the call answered for each kind of address, in the sandbox:

addressvalidtypenetworkpayablereason
bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdqtruep2wpkhmainnettruenull
bc1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3qccfmv3truep2wshmainnettruenull
bc1p5d7rjq7g6rdk2yhzks9smlaqtedr4dekq08ge8ztwac72sfr9rusxg3297truep2trmainnetfalse"Receive BTC on a native SegWit address (bc1q...). Taproot and legacy addresses are not paid by this route."
3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLytruep2shmainnetfalseThe same
1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2truep2pkhmainnetfalseThe same
tb1qw508d6qejxtdg4y5r3zarvary0c5xw7kxpjzsxtruep2wpkhtestnetfalse"Not a Bitcoin mainnet address: Testnet and regtest addresses are not accepted; use a Bitcoin mainnet address."
bc1qnotanaddressfalsenullnullfalse"Bitcoin address has an invalid character."
FieldMeaning
validWell formed for Bitcoin and its network
typep2wpkh, p2wsh, p2tr, p2pkh or p2sh; null when not valid
networkmainnet, testnet (which also covers signet) or regtest
payableA buy with an EVM coin would pay it
reasonWhy not, as a sentence you can show; null when payable

payable is the EVM buy's own check. A Taproot address reads payable: false, though a SOL buy pays it live: for a SOL buy, accept valid: true with type p2wpkh, p2wsh or p2tr on mainnet. A malformed address is not an error: the answer is 200 with valid: false. A missing chain or address answers 400 invalid_input. The same call checks an EVM or Solana address with chain=base, chain=8453 or chain=solana.

Networks

Maxy pays mainnet only. A tb1… address is valid, reads network: "testnet", and is never payable. In the sandbox too, the recipient must be a mainnet address, while the sandbox's own deposit addresses are testnet ones (tb1q…), so no real wallet can pay them.

On the screen

  • Strip a bitcoin: prefix and anything after ? (a BIP-21 link), and trim spaces, before you check.
  • Check on paste, not on every keystroke.
  • Show reason next to the field, in words.
  • Read the address back on the confirm screen in short form, such as bc1qar0s…5mdq.

The check covers form and network only, not who owns the address. Maxy screens the addresses in every order, and you may add your own checks (Security and compliance). Wording for the confirm screen: Signature screen.