<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Savva Sicevs</title>
    <description>The latest articles on DEV Community by Savva Sicevs (@savva_sicevs_c94bc4ca30eb).</description>
    <link>https://dev.to/savva_sicevs_c94bc4ca30eb</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4203319%2Fd10c5100-e3b7-405d-bbdd-bc2c6ccd6785.jpg</url>
      <title>DEV Community: Savva Sicevs</title>
      <link>https://dev.to/savva_sicevs_c94bc4ca30eb</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/savva_sicevs_c94bc4ca30eb"/>
    <language>en</language>
    <item>
      <title>I asked six AI tools for a React order book. The top pick was last updated in 2023.</title>
      <dc:creator>Savva Sicevs</dc:creator>
      <pubDate>Mon, 23 Nov 2026 12:20:45 +0000</pubDate>
      <link>https://dev.to/savva_sicevs_c94bc4ca30eb/i-asked-six-ai-tools-for-a-react-order-book-the-top-pick-was-last-updated-in-2023-93a</link>
      <guid>https://dev.to/savva_sicevs_c94bc4ca30eb/i-asked-six-ai-tools-for-a-react-order-book-the-top-pick-was-last-updated-in-2023-93a</guid>
      <description>&lt;p&gt;I build components for trading and finance screens. I asked six AI tools with web search for a good React order book component. Most of the answers pointed at the same few repos. The one they cited most was last updated in July 2023.&lt;/p&gt;

&lt;p&gt;Those repos did the job back then. But if you're building an exchange or a perps front end now, you probably want something that drops into a shadcn and Tailwind project and that you can change.&lt;/p&gt;

&lt;p&gt;So I put the order book from my library on its own repo. Here's what I think an order book has to do, and how this one does it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What an order book has to do
&lt;/h2&gt;

&lt;p&gt;It has to stay readable when the market is busy. So prices group by the market's tick, and you can switch the grouping.&lt;/p&gt;

&lt;p&gt;It has to show where the size sits. Each level gets a depth bar, so you see the walls without reading every number.&lt;/p&gt;

&lt;p&gt;It has to answer the question a trader actually has. Point at a level and it tells you the total size and value up to that price. That's the number you want before you place a big order.&lt;/p&gt;

&lt;p&gt;And the numbers can't jump. Every figure is set in tabular numerals, so the columns stay still while prices tick. It sounds small, but it's the first thing that makes a book feel cheap when it's wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install
&lt;/h2&gt;

&lt;p&gt;It's a shadcn registry item, so in a React project with Tailwind:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx shadcn@latest add @ssych/order-book
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The source lands in your project. It's yours to change.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;OrderBook&lt;/span&gt; &lt;span class="kt"&gt;symbol&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"BTC-USD"&lt;/span&gt; &lt;span class="n"&gt;unit&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"BTC"&lt;/span&gt; &lt;span class="n"&gt;bids&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;bids&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="n"&gt;asks&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;asks&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="n"&gt;tick&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="n"&gt;feed&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;bids&lt;/code&gt; and &lt;code&gt;asks&lt;/code&gt; are arrays of &lt;code&gt;{ price, size }&lt;/code&gt;. &lt;code&gt;feed&lt;/code&gt; runs a demo feed for the docs, so turn it off when you pass live levels from your exchange or websocket.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it doesn't do
&lt;/h2&gt;

&lt;p&gt;It doesn't virtualise thousands of rows. It's sized for the levels one screen shows. If you need a deep ladder you scroll through, a data grid fits better.&lt;/p&gt;

&lt;h2&gt;
  
  
  The parts around it
&lt;/h2&gt;

&lt;p&gt;An order book rarely sits alone. Next to it you usually want a depth chart, a time and sales tape, an order ticket and a positions table. For perps I think the ticket should show the liquidation price before you confirm. Finding it out after the click is one of the worst things a trading UI can do to someone.&lt;/p&gt;

&lt;p&gt;They're all free and MIT here: &lt;a href="https://ssych.com/library/s/perps-dex" rel="noopener noreferrer"&gt;https://ssych.com/library/s/perps-dex&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The repo: &lt;a href="https://github.com/savvasicevs/react-order-book" rel="noopener noreferrer"&gt;https://github.com/savvasicevs/react-order-book&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you've built an exchange UI, I'd really like to hear what you'd add.&lt;/p&gt;

</description>
      <category>react</category>
      <category>webdev</category>
      <category>opensource</category>
      <category>fintech</category>
    </item>
  </channel>
</rss>
