DEV Community

Huzaifa Zahoor
Huzaifa Zahoor

Posted on

OTC Crypto Desks for Developers: Order-Book Slippage, RFQ Quotes, and Who Sends First

If you've only ever bought crypto through an exchange UI, every trade looks like the same thing: pick an amount, hit buy, done. Large trades often don't work that way. Funds, companies and big holders frequently go "over the counter" (OTC), asking a trading desk for one private price instead of hitting the public order book.

As a developer, the interesting part is that OTC exists because of a mechanical problem you can model in a few lines of code. This post walks through that problem, how a request-for-quote (RFQ) flow behaves, and the risks that live outside the code. For the complete explainer, see NutshellCrypto's guide on how OTC crypto trading desks work.

The problem: a big market order walks the book

An exchange order book only holds so much size at each price. A large market buy eats the cheapest asks first, then keeps paying more for whatever is left. That gap between the price you expected and the price you actually got is slippage.

Here's a toy model with made-up numbers (not real market data):

# Illustrative numbers only, not real market data.
asks = [(100.0, 10), (101.0, 10), (103.0, 10)]  # (price, size) best first

def walk_book(asks, qty):
    cost, left = 0.0, qty
    for price, size in asks:
        take = min(size, left)
        cost += take * price
        left -= take
        if left == 0:
            return cost
    raise ValueError("not enough liquidity on the book")

qty = 30
book_cost = walk_book(asks, qty)
best = asks[0][0]
avg = book_cost / qty
print(f"order book: total ${book_cost:,.2f}, avg ${avg:.2f}, "
      f"slippage vs best ask {100 * (avg - best) / best:.2f}%")

otc_quote = 101.0  # one all-in price for the full size
print(f"OTC quote:  total ${otc_quote * qty:,.2f}, "
      f"saves ${book_cost - otc_quote * qty:,.2f}")
Enter fullscreen mode Exit fullscreen mode

Output:

order book: total $3,040.00, avg $101.33, slippage vs best ask 1.33%
OTC quote:  total $3,030.00, saves $10.00
Enter fullscreen mode Exit fullscreen mode

On a real book the levels thin out much faster for large sizes, and everyone watching sees the price jump while you buy. An OTC desk instead quotes one firm price for the whole block and takes on the job of sourcing the coins across venues and over time.

RFQ: a quote with a very short TTL

The OTC flow is basically an RFQ protocol:

  1. Onboard. KYC and anti-money-laundering checks first. Legit desks don't skip them.
  2. Request. "Buy 20 BTC with USD", by chat or through an RFQ screen or API.
  3. Quote. The desk returns one all-in price for the full size.
  4. Accept or expire. Quotes are short-lived. Coinbase Prime, for example, documents holding an RFQ price for 3 seconds in its interface and 1 second via API, and its RFQ orders are fill-or-kill: all or nothing.
  5. Settle. Coins and cash (or stablecoins) move between the two sides.

If you're building anything on top of an RFQ API, treat the quote like a lease with an expiry timestamp: check it locally before you accept, never retry an accept blindly, and handle the "expired" and "rejected" paths as normal outcomes rather than exceptions.

Minimums are real too. Kraken's OTC desk, for instance, lists a $50,000 USD-equivalent minimum, so this isn't a route most retail buyers need.

Principal vs agency, in code terms

  • Principal desk: the desk is your counterparty. It sells you its own inventory at a firm price and keeps the market risk. Its margin is inside the spread.
  • Agency desk: the desk is a router. It works your order across markets for a commission, so the price can move while it's filling, and more of that risk stays with you.

When comparing, compute the all-in cost: quoted price times amount, plus any commission, wire, network or withdrawal fees. NutshellCrypto has a separate breakdown of crypto exchange fees and spreads if you want to model the exchange side properly.

The risks your code can't fix

  • Counterparty risk. You depend on one company to deliver. Genesis, once a major institutional trading provider, froze lending redemptions in November 2022 and later stopped offering trading services entirely.
  • Settlement risk. Whoever sends first is exposed until the other side delivers. Know exactly who sends what, when, and to which verified account or wallet.
  • Fake "OTC brokers". Telegram and social media are full of them, offering below-market coins or "private allocations" and then demanding extra fees before you can withdraw. Reach desks only through a firm's official website, verify payment details through a second channel, and never share a recovery phrase.
  • Taxes. An OTC trade is taxed like any other crypto trade, so keep records of each one.

Takeaways

  • OTC exists because large market orders walk the book and slip.
  • An RFQ quote is a short-lived, often fill-or-kill price; design for expiry.
  • Principal desks take the risk and earn the spread; agency desks route and charge a fee.
  • Counterparty and settlement risk matter as much as the price.
  • For small buys, a normal exchange order book is usually enough.

Read the full guide on NutshellCrypto

This is educational content, not financial, investment or tax advice.

This post was written with AI assistance.

Top comments (0)