GithubHelp home page GithubHelp logo

Get order info about lobster HOT 3 CLOSED

rubik avatar rubik commented on June 15, 2024
Get order info

from lobster.

Comments (3)

rubik avatar rubik commented on June 15, 2024

@0x0xyz There's no method for that. However, off the top of my head, you could do it by accessing the orderbook's arena field, and then looking up the ID in the arena's order_map field.

from lobster.

BatiGencho avatar BatiGencho commented on June 15, 2024

@rubik Thanks, I can do that and there is a method that gets me the qty and the price:

    pub fn get_full(&self, id: u128) -> Option<(u64, u64, usize)> {
        self.order_map
            .get(&id)
            .map(|i| (self.orders[*i].price, self.orders[*i].qty, *i))
    }
But that is pretty much it - there is no info about the status of the order. Do you know how I could obtain it ?

Many thanks

from lobster.

rubik avatar rubik commented on June 15, 2024

@BatiGencho If you find the order in the arena, it's assumed that the order is still valid and resting in the order book. If it's fully matched by a market order or canceled, it's removed from the arena.

from lobster.

Related Issues (1)

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.