Skip to main content
POST /wallet/send Initiate an on-chain transfer using a wallet you manage.

Request (single-output)

{
  "api_key": "sk_live_...",
  "wallet_id": "w_c8b07c7d-9c7d-4a33-9200-0bdfa82dc497",
  "amount": 0.25,
  "destination": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
  "asset": "ETH",
  "eth_fee": 65000,
  "eth_max_priority_fee_per_gas": 1700000000,
  "eth_max_fee_per_gas": 3500000000,
  "metadata": {
    "invoice": "INV-42",
    "customer_id": "cust_123"
  }
}
Ethereum custom ERC-20 example (omit asset, provide a contract address):
{
  "api_key": "sk_live_...",
  "wallet_id": "w_c8b07c7d-9c7d-4a33-9200-0bdfa82dc497",
  "amount": 12.5,
  "destination": "0xA1b02d8c67b0FDCF4E379855868DeB470E169cfB",
  "eth_erc20_contract": "0xA0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
  "eth_fee": 65000,
  "metadata": { "invoice": "INV-43" }
}
Bitcoin fee tier example:
{
  "api_key": "sk_live_...",
  "wallet_id": "w_b1a2f3c4-5678-90ab-cdef-1234567890ab",
  "amount": 0.0015,
  "destination": "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8fn0d",
  "asset": "BTC",
  "btc_fee": "high"
}

Request (BTC multi-output)

For Bitcoin you can send to multiple recipients in one transaction. Provide a mapping of destination addresses to amounts and omit the top-level amount:
{
  "api_key": "sk_live_...",
  "wallet_id": "w_b1a2f3c4-5678-90ab-cdef-1234567890ab",
  "destination": {
    "bc1qaddr1...": 0.004,
    "bc1qaddr2...": 0.006
  },
  "asset": "BTC",
  "btc_fee": "normal",
  "metadata": { "batch": true }
}
FieldTypeRequiredNotes
api_keystringCustomer API key.
wallet_idstringWallet ID (w_<uuid>) or on-chain address.
amountnumber✓*Natural units (ETH, BTC, TRX, or token units). Required for single-output sends; omit for BTC multi-output.
destinationstring or objectSingle-output: recipient address as a string. BTC multi-output: object mapping { "address": amount }.
assetstring✓*Supported values:
• ETH wallets → ETH, USDC, USDT
• BTC wallets → BTC
• Tron wallets → TRX, USDT
For Ethereum, asset is not required when you provide eth_erc20_contract.
btc_feestringOptional BTC fee tier. Accepted values: low, normal, high. Defaults to the provider recommendation. May also accept a sat/vByte or sat/kByte string.
eth_feestringOptional Ethereum gas limit. Defaults to 21,000 for native ETH transfers and 65,000 for ERC-20 transfers.
eth_max_priority_fee_per_gasstringOptional for Ethereum. Tip paid to validators, expressed in wei. Must not exceed eth_max_fee_per_gas.
eth_max_fee_per_gasstringOptional for Ethereum. Total fee cap per gas unit in wei. Defaults to the API-estimated value when omitted.
eth_erc20_contractstringEthereum only. Provide a custom ERC-20 contract when sending a token not covered by asset. When present, omit asset.
metadataobjectOptional JSON object stored on the resulting transaction. Keys must be strings and data must be JSON serializable.

Response

Successful broadcast:
{
  "result": "ok",
  "tx_id": "0x9345a5f6f4d0f7..."
}
Failed broadcast (HTTP 200):
{
  "result": "fail",
  "tx_id": "Not enough TRX balance for transfer"
}
Use the result flag to decide whether to retry or alert an operator. A value of "ok" always includes the blockchain transaction hash in tx_id; a value of "fail" contains the upstream provider’s error string. Even when the result is "ok", final settlement still depends on miners or validators confirming the transaction on-chain.

Examples

from py_1151 import Client

client = Client(api_key="sk_live_...")

success, tx_hash_or_error = client.send_from_wallet(
    wallet_id="w_c8b07c7d-9c7d-4a33-9200-0bdfa82dc497",
    asset="ETH",
    amount=0.25,
    destination="0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
    metadata={"invoice": "INV-42"},
)

if not success:
    print("Transfer failed:", tx_hash_or_error)
else:
    print("Broadcasted transaction", tx_hash_or_error)
Each snippet sends a single-output transfer. Extend the payload with fee overrides, ERC-20 contract addresses, or BTC multi-output shapes as needed.

Errors

StatusPayloadWhen it happens
400{ "error": "Missing required fields" }Missing body parameters.
403{ "error": "API key is not valid" }API key fails validation.
404{ "result": "not_found" }Wallet does not exist or isn’t owned by your account.
400{ "error": "Wallet is not a BTC wallet" }Attempting to send BTC assets from a non-BTC wallet.
500{ "error": "<message>" }Unexpected service error.

Bitcoin UTXO handling

When broadcasting BTC, 1151 first tries to cover the transfer amount(s) and miner fee with a single UTXO from the wallet. If no individual output is large enough, the platform selects the smallest possible combination of UTXOs to fulfill the spend. Any change output — including the remainder from consolidated UTXOs — is automatically returned to the wallet’s receiving address as a single UTXO.

Operational tips

  • ERC-20 and TRC-20 transfers require the wallet to maintain enough native token (ETH/TRX) for gas or energy.
  • On Ethereum, choose one: either set asset (for native ETH and supported tokens) or provide eth_erc20_contract for a custom ERC-20.
  • When customizing Ethereum gas, ensure eth_max_fee_per_gas is greater than or equal to eth_max_priority_fee_per_gas; otherwise broadcasts will fail client-side.
  • If you omit Ethereum gas overrides, the API uses current network estimates. Supply all three Ethereum-specific parameters when you want a fully custom gas configuration.
  • Metadata travels with the transaction so you can look it up later via /transaction/get or the SDK helpers.
The SDK helpers (client.sendFromWallet(...) / wallet.send(...) in JavaScript and client.send_from_wallet(...) / wallet.send(...) in Python) accept the full set of optional arguments described above, including ERC-20 contract overrides, custom fees, and BTC multi-output payloads.