You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Handle crossed order book in `dYdXBrokerage`: add logic to uncross order book, validate bid-ask prices before emitting quote ticks, and improve illiquid asset handling.
* Refactor `UncrossOrderBook`: simplify bid-ask comparison logic and improve order book state updates within processing loop.
* Refactor `dYdXBrokerage`: remove `UncrossOrderBook` in favor of a new extension method, clean up bid-ask price logic, and update namespace resolution for consistency.
* Add `UncrossOrderBook` extension method and unit tests to handle crossed order books in `dYdXBrokerage`.
* Add license
---------
Co-authored-by: Martin Molinero <[email protected]>
* Licensed under the Apache License, Version 2.0 (the "License");
6
+
* you may not use this file except in compliance with the License.
7
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
8
+
*
9
+
* Unless required by applicable law or agreed to in writing, software
10
+
* distributed under the License is distributed on an "AS IS" BASIS,
11
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+
* See the License for the specific language governing permissions and
13
+
* limitations under the License.
14
+
*/
15
+
16
+
namespaceQuantConnect.Brokerages.dYdX.Extensions;
17
+
publicstaticclassOrderBookExtensions
18
+
{
19
+
/// <summary>
20
+
/// Crossed prices where best bid > best ask may happen.
21
+
/// This happens because the dydx network is decentralized, operated by 42 validators where the order book updates can be sent by any of the validators and therefore may arrive out of sequence to the full node/indexer
22
+
/// see ref https://docs.dydx.xyz/interaction/data/watch-orderbook#uncrossing-the-orderbook
23
+
/// </summary>
24
+
/// <param name="orderBook">Order book to uncross</param>
0 commit comments