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.

v20.instrument.orderBook not implemented

See original GitHub issue

http://developer.oanda.com/rest-live-v20/instrument-ep/ refers an orderBook action, but this is not available in v20

api = v20.Context(
    hostname=config["hostname"],
    port=config["port"],
    token=config["token"],
    datetime_format=config["datetime_format"]
)
params = {
    "time": "2018-09-28T12:00:00:00Z"
}
response = api.instrument.orderBook(instrument, **params)
orderBook = response.get("orderBook", 200)
print(orderBook)

I get this error:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-47-355910ca7359> in <module>()
      3     "time": "2018-09-28T12:00:00:00Z"
      4 }
----> 5 response = api.instrument.orderBook(instrument, **params)
      6 orderBook = response.get("orderBook", 200)
      7 print(orderBook)

AttributeError: 'EntitySpec' object has no attribute 'orderBook'

Is this a bug?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12

github_iconTop GitHub Comments

1reaction
dmpettypcommented, Sep 28, 2018

It looks like the enpoint that is used to fetch the orderbooks wasn’t set up correctly to have an API call auto-generated for it. I’ll get that added and published shortly. The API call will indeed be “api.instrument.orderBook()” as you had predicted.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Release Notes - Oanda API
Version Date Details 3.0.22 April 11, 2018 Various documentation and example improvements 3.0.20 September 26, 2017 Added toString() methods to Java classes 3.0.19 September 12, 2017...
Read more >
OANDA REST-V20 API Documentation - Read the Docs
The oandapyV20 package offers an API to the OANDA V20 REST service. ... ENDPOINT = 'v3/instruments/{instrument}/orderBook'.
Read more >
Oanda Plugin - Zorro Project
More commands, f.i. for retrieving order book data, can be implemented on user ... The Oanda V20 API does not return rollover rates,...
Read more >
Deribit API
Deribit tradeable assets or instruments use the following system of naming: ... Note that subscriptions and cancel on disconnect are not supported via...
Read more >
FIX for GENIUM INET for NASDAQ OMX - Borsa İstanbul
User Notification (Currently not supported). ... NOTE: Genium INET OrderIDs are only unique per orderbook and Side.
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