question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

questions about order structure

See original GitHub issue

Regarding the order status, the docs say:

'status':     'open',         // 'open', 'closed', 'canceled'

If an order is partially filled and then cancelled, what should the status be?

Regarding the cost:

'cost':        0.076094524,   // 'filled' * 'price' (filling price used where available)

If the filling price isn’t available, should this field be left blank? (I think it should)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
npomfretcommented, Mar 6, 2019

Ok. For what it’s worth I think leaving it blank, rather than potentially providing an inaccurate figure, is best.

1reaction
kroitorcommented, Mar 6, 2019

If an order is partially filled and then cancelled, what should the status be?

  • status == 'canceled'
  • filled > 0
  • filled < amount

If the filling price isn’t available, should this field be left blank? (I think it should)

The problem is 3/4 of exchanges do not actually return the filling price or assume filling price = limit price in their engines. So, we only fill it if

  • the exchange provides the actual cost in the response, so we don’t have to calculate it
  • the exchange doesn’t provide the actual cost from the API we use filled * price with the most accurate price available:
    • if the exchange specifies the filling price – we use that
    • otherwise we use the limit price from the exchange response

Let us know if that doesn’t answer your questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is an ordered structure, in general? - MathOverflow
An ordered structure would then be any model of a quasi-algebraic theory. The problem is that the 5th axiom is essentially incompatible with ......
Read more >
first order structure and its usage - Mathematics Stack Exchange
1. A first-order structure is needed in order to interpret a first-order "signature", i.e. a f-o language, like the f-o language for arithmetic....
Read more >
1 The order structure of the real numbers
We will show that the ordering and algebraic structure of the real line are uniquely given by some natural demands. The hierarchy of....
Read more >
Ordered Structure - an overview | ScienceDirect Topics
In a fully ordered material, neighboring domains, in which the A and B atoms have different positions, are separated by a surface called...
Read more >
Question order and student understanding of structure and ...
In our study, students answered a total of two question types. To address our research question of whether or not question order matters...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found