Partners · API

Market making and the API

SideSwap welcomes programmatic trading. Stream bids and offers into the order books, take quotes from your own program, or bring your users’ order flow as a partner. Your keys stay on your own machine and every trade settles as one Liquid transaction.

sideswap.io/guides/market-making-and-api · Updated 9 Oct 2026

Partners · API

Market making and the API

SideSwap welcomes programmatic trading. Stream bids and offers into the order books, take quotes from your own program, or bring your users’ order flow as a partner. Your keys stay on your own machine and every trade settles as one Liquid transaction.

7 min readUpdated 9 Oct 2026New SideSwap walletPreview
The SideSwap API documentation at Loading available markets, with the output table and the example request and response in JSON.

At a glance

The APIJSON-RPC 2.0 over WebSocketDocumented at sideswap.io/docs
Market makingThe SideSwap dealerOpen source, with ready Linux builds
Swapping from codeSwaps API or SideSwap ManagerYour program signs its own inputs
FeesMakers pay none, takers 0.2%Plus a small fixed network fee
TestnetEvery tool runs on Liquid testnetStart there, then switch to Prod

Three ways in

Market makerRun the dealerKeeps your orders in the books and signs each match
TakerSwaps API or SideSwap ManagerTakes quotes from the books in one transaction
PartnerYour app with a partner API keyFlow through your key is tracked and shared

How an API swap works

One swap
Your program
Asks for a quote
SideSwap
Builds one transaction from the best orders
Your program
Checks the quote and signs its inputs
Liquid
Settled in one transaction

More than one maker can fill a swap. Online orders can be partly matched, offline orders only in full. A quote can be accepted for about 30 seconds, and a fresh one arrives every few seconds while you wait. SideSwap never holds the coins. The swap settles when both sides have signed.

Swap from your own program

The Swaps API takes market orders. Load the markets with list_markets, ask for quotes with start_quotes, download the transaction with get_quote, sign your inputs and send it back with taker_sign. Your program holds the keys. The API documentation shows every message, and how the amounts you deliver and receive follow from the quote.

SideSwap Manager does the wallet part for you. It is a self-hosted program that holds your wallet, opens a WebSocket on your machine and takes simple requests to receive, send, swap and make peg-ins. You build it from the sideswap_rust sources.

PayJoin lets a wallet with no L-BTC pay its network fee in USDt or EURx. SideSwap adds the L-BTC inputs and takes a small fee in the asset.

If a request fails

A failed send or swap request does not prove that nothing was broadcast. Check the transaction before you try again.

Coins the API takes

Native SegWit, nested SegWit and AMP multisig coins. Legacy and Taproot coins are not supported.

Make markets with the dealer

The dealer is SideSwap’s open source market making program. It keeps your orders in the books, signs each match in the time the server allows and moves your prices as the market moves.

  1. Pick your markets

    Stablecoin and AMP markets are supported as they are. Of the token markets only a few are, and you add others with whitelisted_assets. The market list shows what the dealer trades today.
  2. Pick the wallet

    There are three dealers, the same program with a different wallet each. The table after these steps compares them.
  3. Set how prices are made

    Automatically from a price source, Binance, Bitfinex, BitPreço, the SideSwap index price or a fixed price in USD, with your margin on top. Or from your own program, through the dealer’s HTTP and WebSocket endpoints.
  4. Get the program

    Download a ready Linux build from sideswap.io/download, or build it from source with Rust. The dealer tutorial has a config for each case.
  5. Start on testnet

    Set env to Testnet in the config and start the dealer. Your orders appear in the order book on testnet.sideswap.io. Switch to Prod when you are ready.
LWKA single signature walletNeeds only a mnemonic, cannot hold AMP assets
AMPAn AMP account on the Green backendTrades every market, AMP assets included
Elements nodeYour own Elements nodeFor high volume, more to set up

Keep the dealer online

Online orders need the dealer running. If it does not sign a match in time, the server disconnects it and pulls its orders for a while.

AMP markets

The issuer must have approved your dealer’s AMP ID, and buy orders need L-BTC or USDt in the AMP account. See AMP assets and securities.

Try it on testnet

  1. Explore the dealer API

    SideSwap runs a demo dealer with some balance on Liquid testnet. Its Swagger UI lists every call, from balances and new addresses to submitting, editing and cancelling orders, and you can try each one in the browser.
    testnet.sideswap.io/dealer-demo
    The SideSwap Dealer API in Swagger UI on testnet, with new_address, send_asset, metadata, order_book, own_orders, submit_order, edit_order and cancel_order.
  2. Read the API

    The API documentation covers the JSON-RPC API, the Swaps API and PayJoin, with an example for every message. Point your program at the testnet server first.
    sideswap.io/docs
    The top of the SideSwap API documentation, with JSON-RPC 2.0 over WebSocket and the production and testnet server addresses.

Partners and API keys

A wallet, exchange or app that brings order flow to SideSwap can become a partner. You get a partner API key and send it in the LoginClient message when your app connects. Revenue from the flow through your key is tracked automatically and shared with you every month.

The key only says the flow is yours. It cannot move funds or place orders for you.

The terms are on the partners page, and the team answers at [email protected].

Your own asset

Any asset in the Liquid asset registry can have a token market on SideSwap. The issuer provides the liquidity in its own market, and the dealer is there to do it with. SideSwap does not make markets for listed assets, and a listing is not an endorsement.

Good to know

Your mnemonic

The dealer and the manager sign with the mnemonic in their config, or in an environment variable. Generate it securely and keep a backup. A leaked or lost mnemonic is an irreversible loss of funds.

One wallet, one program

Use a wallet only for the dealer. Never open the same mnemonic in the SideSwap app while the dealer runs on it.

Fees

Makers pay no fee. The taker pays 0.2%, taken on the L-BTC side of the swap, or on the stablecoin side in a market without L-BTC. A small fixed fee on top pays the Liquid network fee. Every quote shows both.

Minimum order

A limit order must be at least 0.00025 L-BTC, or 25 USDt or 25 EURx in a market without L-BTC.

One request at a time

JSON-RPC batch requests are not supported. Send each request on its own.

Peg-out

Peg-out returns once the new keys are issued and the peg is restored. Updates are posted on sideswap.io/news.

Still stuck

Look your transaction up first. If it still looks wrong, write to support with the Bitcoin transaction ID.

Related guides