{"uid":"cap__gs0wBUQynf2r4eKwFZeI","slug":"delx-commerce-order-book-imbalance-calculator-b6f5d1db","name":"Delx Commerce — Order Book Imbalance Calculator","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/ob-imbalance?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"ask_size":{"type":"number","description":"Displayed size at best ask"},"bid_size":{"type":"number","description":"Displayed size at best bid"}}},"responseSchema":{"type":"json","example":{"schema":"delx/util-ob-imbalance/v1","ask_size":8,"bid_size":12,"imbalance":0.2}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_spu1sNoiLe46YapC2_gWP","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the order book imbalance ratio from displayed bid and ask sizes at the best quotes","exampleAgentPrompt":"Calculate the order book imbalance for me — the best bid has a displayed size of 12 and the best ask has a displayed size of 8.","exampleUseCases":[{"title":"Real-time trading signal generation","prompt":"I'm watching a stock and the best bid size is 500 and the best ask size is 200 — what's the order book imbalance right now so I can decide whether to go long?"},{"title":"Market microstructure research","prompt":"I need to compute the OBI metric for a set of snapshots. Start with bid size 12 and ask size 8 — give me the imbalance ratio so I can log it to my dataset."},{"title":"Automated HFT alert trigger","prompt":"My bot sees bid_size of 1000 and ask_size of 150 at the top of book — calculate the imbalance score so I can check if it crosses my threshold to fire an order."}],"resultDescription":"Returns a JSON object with the schema identifier 'delx/util-ob-imbalance/v1', the input bid_size and ask_size echoed back, and an imbalance value — a float representing the normalized difference between bid and ask depth (positive means bid-heavy, negative means ask-heavy, zero means balanced).","failureModes":["Missing bid_size or ask_size fields returns a validation error","Non-numeric values for sizes cause a 400 bad request","Both sizes being zero may cause a division-by-zero or undefined imbalance result","Payment failure via x402 prevents the computation from executing","Extremely large size values may cause precision issues in the result"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, pay-per-use computation of order book imbalance without setting up any SDK or account — ideal for agents that need a single, verifiable microstructure signal from level-1 quote data paid for in USDC on Base or Solana.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:54:08.189Z","isFirstParty":false,"canonicalSlug":"delx-commerce-order-book-imbalance-calculator-b6f5d1db"}