1. ๐Ÿงญ Networks
Pix2DePix API
  • โšก Quickstart
  • Guides
    • ๐Ÿ”‘ Authentication
    • ๐Ÿ”„ Possible Statuses
    • ๐Ÿ”€ Synchronous requests & safe retries
    • โš ๏ธ Errors & the response envelope
    • ๐Ÿงฏ Troubleshooting
    • โœ… Best Practices
    • ๐Ÿš€ Features
      • โฑ๏ธ QR Delay
    • ๐Ÿ›ก๏ธ Security & Limits
      • ๐Ÿšฆ API Limits
      • ๐Ÿงฑ Firewall
      • ๐Ÿชฒ Bug Bounty
    • ๐Ÿงญ Networks
      • ๐ŸŒ Networks and payout addresses
      • ๐Ÿ’ง Liquid network guide
      • ๐Ÿ“š Arkade network guide
      • โœจ Spark network guide
  • API Endpoints
    • Ping
      GET
    • Deposit (PIX โž” DePix)
      POST
    • Deposit Status
      GET
    • Deposits
      GET
    • User Info
      GET
    • Withdraw
      POST
    • Withdraw Status
      GET
  • Webhooks
    • ๐Ÿช Webhooks
    • Deposit Webhook
    • Withdraw Webhook
    • MED Webhook
  • Reference
    • ๐Ÿ“– Glossary
    • ๐Ÿ“ Changelog
  • Schemas
    • JWTClaims
    • ErrorObj
    • PingObj
    • ErrorResponse
    • DepositObj
    • PingResponse
    • DepositResponse
    • DepositStatusObj
    • DepositStatusResponse
    • DepositWebhookBody
    • DepositsResponse
    • DepositStatus
    • UserInfoResponse
    • WithdrawStatusResponse
    • WithdrawStatusObj
    • WithdrawResponse
    • WithdrawObj
    • WithdrawStatus
    • WithdrawWebhookBody
    • MEDWebhookBody
    • RejectionReasons
  1. ๐Ÿงญ Networks

โœจ Spark network guide

DePix on the Spark network: how a payout arrives, the single official token identifier, and how to swap DePix for BTC โ€” and BTC for DePix โ€” through the Flashnet AMM pool that Eulen operates. The payout rules that apply to every network are in Networks and payout addresses.
MAINNET ยท SPARK NETWORK ยท FLASHNET AMM ยท V3
Spark is in beta
Spark is live in the API, but still a beta. Please do not use it in production yet, and do not test it with substantial amounts. Always start with a small value. We will announce on the Changelog when it is ready for production use.

Receiving DePix on Spark#

Send a spark1โ€ฆ address in depixAddress on POST /deposit and the DePix is paid on Spark. There is no parameter naming a network: the address decides it. A Spark payout costs R$ 0,99 and carries no network fee on top of that.
POST /withdraw is not paid on Spark. Withdrawals are processed on Liquid only, and receiving DePix on Spark does not enable them on Spark.

The official DePix token on Spark#

On Spark the token name does not identify the asset: any issuer can choose any name. DePix on Spark has a single official token identifier.
Everything on this page is public
Every value below is public by nature โ€” the addresses and IDs of a token and of an AMM pool are already visible to anyone querying the network. This page just gathers them in one place. Fees, reserves, current tick and status are read live with getPool() or on Sparkscan, never from fixed values.
FieldValue
Name / tickerDecentralized PIX / DePix
Token identifier (bech32m)btkn1sdqgp9904d620fmgs6p9669fghzfq06hvpqmy2wg8c9xtw4qms3qpf4aty
Token identifier (hex)83408094afab74a7a76886825d68a945c4903f576041b229c83e0a65baa0dc22
Decimals8
FreezableNo
Issuer Spark addressspark1pgssx6ss5zdclxry80tkahdrzttr9e27fwymzmnhwzz4k7q35fmh8kw50pxnuf
NetworkBitcoin mainnet / Spark
Any other token presenting itself as DePix on Spark was not issued by Eulen. Verify this identifier before operating. This check applies always, not only during the beta.

BTC inside Flashnet#

The internal address the Flashnet AMM uses to represent native BTC (33-byte hex) โ€” it is not a real wallet address, it is the asset identifier the SDK expects.
020202020202020202020202020202020202020202020202020202020202020202

The DePix/BTC pool#

FieldValue
Pool ID (lpIdentityPublicKey)0354b3225e9239f2ccf45113fcad5a8ff1526ffd2ec893bcfc2828e3627d334b98
Pool Spark addresssp1pgssx49nyf0fyw0jen69zylu44dglu2jdl7jajynhn7zs28rvf7nxjucfavax5
Hosteulen
Curve typeV3 concentrated
Tick spacing10
Asset ADePix
Asset BBTC
Created2026-09-09
Read live state, don't hardcode it
Fees, reserves, the current tick and pool status are read live. Query them with getPool() or on Sparkscan by searching the Pool ID or the token identifier above โ€” don't rely on fixed values.

Swapping via @flashnet/sdk#

Install the SDK and the Spark SDK:
Then simulate and execute a swap. The example sells DePix for BTC:
import { FlashnetClient } from '@flashnet/sdk';
import { SparkWallet } from '@buildonspark/spark-sdk';

const POOL_ID = "0354b3225e9239f2ccf45113fcad5a8ff1526ffd2ec893bcfc2828e3627d334b98";
const DEPIX_ADDRESS = "83408094afab74a7a76886825d68a945c4903f576041b229c83e0a65baa0dc22"; // hex
const BTC_ADDRESS = "020202020202020202020202020202020202020202020202020202020202020202";

async function main() {
  // 1. Initialize YOUR OWN Spark wallet (never Eulen's).
  //    process.env.MNEMONIC is just an example placeholder.
  const { wallet } = await SparkWallet.initialize({
    mnemonicOrSeed: process.env.MNEMONIC,
    options: { network: "MAINNET" },
  });

  const client = new FlashnetClient(wallet);
  await client.initialize();

  // 2. Read the pool's current state (price, reserves, tick).
  const pool = await client.getPool(POOL_ID);
  console.log(pool);

  // 3. Simulate before executing (does not move funds).
  //    Sell DePix for BTC โ€” base units, 8 decimals ("100000000" = 1 DePix).
  const amountIn = "100000000"; // 1 DePix
  const simulation = await client.simulateSwap({
    poolId: POOL_ID,
    assetInAddress: DEPIX_ADDRESS,
    assetOutAddress: BTC_ADDRESS,
    amountIn,
  });
  console.log("Simulated:", simulation);

  // 4. Execute for real.
  const maxSlippageBps = 100; // 1%
  const minAmountOut = (
    (BigInt(simulation.amountOut) * BigInt(10000 - maxSlippageBps)) / 10000n
  ).toString();

  const result = await client.executeSwap({
    poolId: POOL_ID,
    assetInAddress: DEPIX_ADDRESS,
    assetOutAddress: BTC_ADDRESS,
    amountIn,
    maxSlippageBps,
    minAmountOut,
  });
  console.log("Swap executed:", result);
}

main().catch(console.error);
Reverse direction (buy DePix with BTC)
Swap assetInAddress/assetOutAddress: BTC_ADDRESS as the input (in sats), DEPIX_ADDRESS as the output. Same pool, same method.

Good to know#

Minimum amount per asset. There is a minimum input per asset (error FSAG-1003 if it's too low) โ€” not documented publicly by Flashnet; increase amountIn if it happens.
Automatic transfer. executeSwap transfers the assetIn from the wallet as part of the call itself โ€” no need to transfer manually beforehand. If it fails after sending, the SDK attempts an automatic clawback.
Already-deposited balance. To use balance already sitting in the pool instead of a fresh transfer on every swap, pass useFreeBalance: true.

Verifying independently#

Anyone can read reserves, price and fees without a wallet or any code โ€” via the getPool() call above, or directly on Sparkscan, by searching the Pool ID or the token identifier listed on this page.

Related pages#

Networks and payout addresses โ€” how the payout address selects the network, what each one costs, and the message codes.
Liquid network guide โ€” the same walkthrough for Liquid, the network withdrawals are paid on.
Arkade network guide โ€” the same end-to-end walkthrough for Arkade.
Glossary โ€” DePix, Spark, Flashnet and other terms used here.
Sparkscan โ€” external explorer for Spark tokens and pools.
Modified atย 2026-09-09 23:23:25
Previous
๐Ÿ“š Arkade network guide
Next
Ping
Built with