SShortSingh.
Back to feed

How Level-2 API Feeds Improve A-Share Order Book Analysis for Quant Trading

0
·1 views

A quantitative researcher building an A-share market monitor found that standard market APIs only provide basic price and volume data, while Level-2 feeds expose granular five-tier bid/ask order book data essential for trading simulations. Unlike simple price snapshots, Level-2 data includes trade direction flags and real-time order update events that reveal buying and selling pressure shifts. A key challenge is inconsistent field naming across A-share APIs, making a mandatory normalization step necessary before feeding data into any indicator calculations. The researcher recommends WebSocket streaming over HTTP polling to avoid missing rapid order book state changes and hitting API rate limits. Common implementation pitfalls include floating-point precision errors, unsorted price tiers, and lost messages that can corrupt downstream order book analysis.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

DeepSeek's Vision AI Journey: From VL Research to Vision-Exp Model Explained

DeepSeek's latest vision-capable model, deepseek-v4-flash-vision-exp, is the result of years of structured visual AI research rather than a sudden capability addition. The company's 2024 DeepSeek-VL paper outlined a practical vision-language framework targeting real-world inputs such as PDFs, web screenshots, OCR, and charts, built around a hybrid vision encoder and a staged training process. A key design principle was preserving the language model's reasoning abilities by gradually introducing multimodal data, with final pretraining using roughly 70% text and 30% visual content. DeepSeek-VL2 later added dynamic image tiling and a Mixture-of-Experts language component to handle higher-resolution and varied-aspect-ratio inputs more effectively. The analysis, sourced from DeepSeek's public research papers, distinguishes between what the published work discloses, what current API documentation states, and what remains unverified about the newest model's training data.

0
ProgrammingDEV Community ·

Gemini, Neo4j, and MCP Combined to Build Multi-Hop Reasoning AI Agents

Developers are moving beyond standard Retrieval-Augmented Generation (RAG), which relies on vector search, to address its limitations in handling complex, multi-step relational queries. The proposed architecture combines Google's Gemini as a reasoning engine, Neo4j as a structured knowledge graph, and the Model Context Protocol (MCP) as a standardized interface between tools. Unlike vector databases that match semantic similarity, graph databases store explicit typed relationships between entities, enabling multi-hop traversal across connected data points. This allows an AI agent to actively query a knowledge graph, evaluate results, and chain evidence together rather than simply retrieving loosely related text chunks. The approach targets real-world use cases such as identifying customer exposure to vendor outages or tracing dependencies in complex systems.

0
ProgrammingDEV Community ·

Verdict MCP Server Aims to Give Coding Agents Safer, Leaner Test Feedback

A developer has released Verdict, an open-source MCP server designed to replace direct pytest shell calls made by AI coding agents. The tool addresses three core issues with the current approach: excessive token usage from raw test output, unsandboxed test execution on the user's machine, and agents' inability to distinguish pre-existing failures from newly introduced ones. Verdict runs tests inside ephemeral containers with read-only source mounts and no network access, returning structured JSON verdicts of around 400 tokens instead of the typical 40,000-token raw output. Each test failure is assigned a fingerprint based on its normalized signature, allowing the tool to track failure history in a local SQLite database and flag whether a failure predated the agent's changes. The project is being developed in public, and the author noted that integrating Verdict with Claude Code immediately surfaced two bugs in the tool itself that its own test suite had missed.

0
ProgrammingDEV Community ·

Developer Discovers Rust ADS-B Tracker Silently Discarding 16% of Valid Aircraft Data

A developer building a real-time aircraft tracking system in Rust discovered that roughly one in nine valid position measurements was being silently rejected by the system's own validation layer. The tracker used an innovation gate to discard position updates that seemed physically impossible, but the root cause was that each measurement was being timestamped at arrival rather than adjusted for its reported age. ADS-B position records carry a field indicating how old the data already was when received, but in the original codebase that field was parsed and never actually used. Because aircraft positions varied widely in reported age — with some gaps causing apparent sudden jumps in position — the filter incorrectly flagged legitimate updates as implausible and discarded them. The fault went undetected for an extended period because rejections were logged only as a counter, and standard test fixtures used a constant age value that could not reproduce the timing variation responsible for the bug.