Giter VIP home page Giter VIP logo

react-order-book's People

Contributors

brian-mcallister-lab49 avatar brianmcallister avatar dependabot[bot] avatar ragini-gundreddi-lab49 avatar scott-brown-lab49 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

react-order-book's Issues

Add ability to merge incoming order book data into the component.

Expose functions to help add a price update into the order book. Something like (book: Book, update: BookUpdate) => Book, but possibly a class to maintain the book prices in a tree for efficient insert and deletes. See bintrees, and the RBTree.

This could also be written as a hook.

Here's a rough example of what this might look like:

import { OrderBook, mergeUpdates } from '@lab49/react-order-book';

const MyComponent = ({ bookData: Book, bookUpdate: BookUpdate }) => {
  const book = mergeUpdates(bookData, bookUpdate);

  return <OrderBook book={book} />; 
}

defaultProps warning

in case this repo is still maintained, I get this error from my frontend:

Warning: OrderBook: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
OrderBook@webpack-internal:///(app-pages-browser)/./node_modules/@lab49/react-order-book/dist/OrderBook.mjs:53:17
ConditionalMarketOrderBook@webpack-internal:///(app-pages-browser)/./components/Markets/ConditionalMarketOrderBook.tsx:14:26
div

Allow for a custom end color during color interpolation.

Right now, you can pick custom colors (bidColor and askColor) which will get interpolated over the length of the order book. But, those colors simply get interpolated into white. Instead, we can add props to let users choose a custom end color. This could be quite useful when trying to match the visual design of your order book to an existing application's visual style.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.